øAslickproductions.org/forum/index.php?PHPSESSID=5f0fck550j2m4m2fpbtkj2vkm1&topic=1933.15e:/My Web Sites/Slick Productions - FFIV Message Board/slickproductions.org/forum/index72e6.htmlslickproductions.org/forum/index.php?PHPSESSID=5f0fck550j2m4m2fpbtkj2vkm1&board=17.60e:/My Web Sites/Slick Productions - FFIV Message Board/slickproductions.org/forum/index72e6.html.zx‰9h^ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÈà•¤ õOKtext/htmlISO-8859-1gzip0|Ö õÿÿÿÿÿÿÿÿWed, 11 Mar 2020 01:22:41 GMT0ó°° ®0®P®€§²ð®ˆ9h^ÿÿÿÿÿÿÿÿÈ' õ Text display subroutines

Author Topic: Text display subroutines  (Read 5446 times)

Digitsie

  • Mom Bomb
  • *
  • Posts: 105
    • View Profile
Re: Text display subroutines
« Reply #15 on: January 14, 2015, 12:27:12 PM »
 Huh. This is really handy. You should add the mute patch too, if you're including fixes.

I'm trying to understand what happen when you see a lot of 'tlBartzir'

noisecross

  • FF5 Hacker
  • *
  • Posts: 146
    • View Profile
Re: Text display subroutines
« Reply #16 on: January 14, 2015, 04:34:41 PM »
"tl" + "Bartz" + "ir" means bytes 17 02 0F. There are special characters. A "wait" plus a "close the window" if I am not wrong.
The problem here is speech uses a different tbl than field menu which is also different to the one used in battle menus. The default tbl is generic and displays special characters that strange way, but you can edit it, having some tbls and choosing the one you need in a given moment.

You can see some tbls here http://datacrystal.romhacking.net/wiki/Final_Fantasy_V:TBL.

By the way, I am working not in applying the mute patch but in allowing the user exporting and importing the image.

Digitsie

  • Mom Bomb
  • *
  • Posts: 105
    • View Profile
Re: Text display subroutines
« Reply #17 on: January 29, 2015, 11:30:43 AM »
Ok. I'm uncertain on how to make sure those special characters don't get in the way.

So that means loading several tables to make this work?

noisecross

  • FF5 Hacker
  • *
  • Posts: 146
    • View Profile
Re: Text display subroutines
« Reply #18 on: January 29, 2015, 02:30:29 PM »
You can do it editing the TBL.

Open it with a text editor. I'm attaching here a TBL useful for speech (and only for speech).

If you are working on the Spooniest revision you may found some issues because the tool expects an "[End of Line]" after every speech line but there are two of them which doesn't end with that character.
I talk about that here:
Spooniest, I have a question here. When I dump the TLOC text, the lines "One is in a place deeper than the floor of the sea, protected by flame..." and "Obtained Third Tablet!" are both in the same Speech id. That means both texts are displayed as once and the message "Obtained Third Tablet!" never is displayed (a clear window is displayed instead?)

The same happens with the lines "And the last behind a waterfall, protected by water..." and "Obtained Fourth Tablet!"

It may be an issue with my export, but I'd like to double check with you. Have anybody experienced weird behaviours with these lines in TLOC?

To fix that, you can export the speech in a CSV, and edit properly the lines 1877 with 1878 and 1886 with 1887 as they are in https://docs.google.com/spreadsheets/d/14ZzD3P82uay_0bGdYExidHybcFK-Q7dwV-LxMHdirME/edit#gid=0. After importing that CSV in the game, the "Edit" button in the "Main speech" section should work fine.

noisecross

  • FF5 Hacker
  • *
  • Posts: 146
    • View Profile
Re: Text display subroutines
« Reply #19 on: February 08, 2015, 08:45:21 AM »
Here it is the new version of the editor and it's readme file.
Includes some nice new features and several bugs have been fixed thanks to Digitsie  :happy:.

Digitsie

  • Mom Bomb
  • *
  • Posts: 105
    • View Profile
Re: Text display subroutines
« Reply #20 on: February 09, 2015, 11:19:58 AM »
I'm not 100 percent clear on what happened, but if you're importing the Speech.csv into the editor, and you've been editing with Excel or OpenOffice's app, the import puts in some commas after every id.

To avoid, use notepad++, is that right, noisecross?

noisecross

  • FF5 Hacker
  • *
  • Posts: 146
    • View Profile
Re: Text display subroutines
« Reply #21 on: February 09, 2015, 01:07:22 PM »
Not exactly. That comma thing only happens when you add new colums to the CSV (i.e. writing text in a column out of the first one) and after doing that you forget deleting these new columns.

Off course, using notepad++ or any kind of plain text editor is a way to avoid it. But if the text of any dialogue contains "newlines", the CSV will contain the multi-line dialogue in the same cell (which is right) but a plain text editor, otherwise, will create new lines breaking the file (as it won't contain the expected 2160 dialogue lines)

Digitsie

  • Mom Bomb
  • *
  • Posts: 105
    • View Profile
Re: Text display subroutines
« Reply #22 on: February 26, 2015, 07:06:26 AM »
Need someone to translate:

    When Exdeath says "How nice, being killed at the hands of your own!", before his name it says "Bartz: ".


This one was there in the RPGe and the Legend of the Crystal take, as well as the DeJap translation.

Anyone know what actually was there?

The Japanese reads:

"「仲ド間ビの手ファリス 「でゆっくりころされるが いい!!
 ファファファ?"

noisecross

  • FF5 Hacker
  • *
  • Posts: 146
    • View Profile
Re: Text display subroutines
« Reply #23 on: February 26, 2015, 08:26:17 AM »
I don't know Japanese, but after using some translators, it seems to be something similar to:

"A bare hands kill must be done slowly Faris!
Bwahahahaaa..."

or

"You must kill Faris slowly and with your bare hands!
Bwahahahaaa..."

The GBA script says:
Exdeath: Mwa-hahahaha! Face destruction at your friend's hands!

Digitsie

  • Mom Bomb
  • *
  • Posts: 105
    • View Profile
Re: Text display subroutines
« Reply #24 on: February 26, 2015, 08:48:46 AM »
So Bartz being in there is an error?

Digitsie

  • Mom Bomb
  • *
  • Posts: 105
    • View Profile
Re: Text display subroutines
« Reply #25 on: February 26, 2015, 01:55:46 PM »
How about:
Exdeath:  Excellent, for you to die slowly at the hands of your own sister,
  Faris!
  Fwahahahahaaha...!

Because there's a reference to Faris in there, so...
« Last Edit: February 26, 2015, 02:16:43 PM by Digitsie »

Digitsie

  • Mom Bomb
  • *
  • Posts: 105
    • View Profile
Re: Text display subroutines
« Reply #26 on: March 09, 2015, 11:23:27 AM »
After some testing, noisecross has found a fix for an issue with regard to how VWF works with [Wait] and [Delay]. Details forthcoming.

noisecross

  • FF5 Hacker
  • *
  • Posts: 146
    • View Profile
Re: Text display subroutines
« Reply #27 on: March 12, 2015, 12:05:20 PM »
This post is going to be huge... sorry for that.

The [Wait] and the [Delay] characters are a little bit troublesome.

The routine which displays the script characters in screen was hacked by RPGe to allow displaying a VWF. It works accumulating the graphics of the different characters to display in a buffer and whenever the buffer reaches 16 pixels width or more, the first 16 pixels of the buffer (64 bytes) are written in VRAM and the buffer cleared.
There is a flag [$00:0BA7] which is set to 0 when the buffer is not fully filed and 1 or more when the buffer have 16 or more pixel columns to display.

That means that flag is written, to trigger the display of the buffer, also with some special characters: [End Of Line], [End of Dialogue], [Autoclose], [Wait] and [Delay].
The first three of them are not a problem. [Wait] and [Delay] are.

When the buffer is written to VRAM, the pointer to VRAM is incremented by 64 bytes but the buffer is not cleared.
That means, when a [Wait] or [Delay] are reached, the buffer is going to be written on the screen, with the right side of the buffer blank, which is right, but after the wait the buffer is going to be displayed again fully filled, some pixels ahead.
In example, the sequence "Hello[Delay] my friend!" will be displayed as:
- Before the wait "Hello"
- After the wait "Hello o my friend!"

I have not been able to find how to reset the buffer and anyway the VRAM pointer is increased, so the next location to write in the screen after a wait is always issued...
RPGe deal with this writing four blanks before a wait and jumping to next line after waiting. I didn't like that shortcut.

To fix it, I propose four edits:


FIRST:

E0/31A8 is the address where the flag is written after a wait. Currently the code increment the flag and the accumulated width in 16 pixels.
My attempt is avoiding the width increment as it only throws right the next characters to display.
As A7 is used only as a flag, and for anything else (as long as I know) I am writing #$42 in it.

Code: [Select]
E0/31A8 <= A9, 42, 85, A7, 6B, EA, EA, EA, EA, EA

$E0/31A8 A9 42       LDA $#42        ; .
$E0/31AA 85 A7       STA $A7         ; writeBufferFlag = 0x42
$E0/31AC 6B          RTL             ; return
$E0/31AD EA EA EA EA NOP NOP NOP NOP ; ...
$E0/31B1 EA          NOP             ; ...


SECOND:

C0/8E23 is the method write the buffer in the VRAM.
My attempt is not clearing the flag here and doing an additional treatment at the very end of the method.

Code: [Select]
C0/8E23 <= EA, EA

$C0/8E23 64 A7       STZ $A7 -> EA EA       NOP NOP

C0/8ECE <= 22, 30, 4C, E0

$C0/8ECE A5 06       LDA $06  -> 22 30 4C E0  JSL $E04C30
$C0/8ED0 E2 20       SEP #$20 ..

; E04C30 will be a new method


THIRD:

From E04C30 and forward, the bank E0 only contains blanks.
My attempt is writing a method here which takes back the pointer to VRAM in 64 bytes whenever the flag variable contains a value > 0x40.

Code: [Select]
E04C30 <= A5, A7, 29, FF, 00, C9, 40, 00,
          90, 08, A5, A9, 38, E9, 40, 00,
          85, A9, A5, 06, E2, 20, 85, A7,
          6B
 
A5 A7       LDA A7     ; .
29 FF 00    AND #$00FF ; .
C9 40 00    CMP #$0040 ; .
90 08       BCC $08    ; if (writeBufferFlag >= 0x40){
A5 A9       LDA $A9    ;   .
38          SEC        ;   .
E9 40 00    SBC #$0040 ;   Pointer to paint -= 0x40;
85 A9       STA $A9    ; }
A5 06       LDA $06    ; // Normal routine solving
E2 20       SEP #$20   ; // A width set to 8 bit
85 A7       STA $A7    ; writeBufferFlag = A = 0;
6B          RTL        ; return;

These editions solve the issue and the texts are displayed as expected.

noisecross

  • FF5 Hacker
  • *
  • Posts: 146
    • View Profile
Re: Text display subroutines
« Reply #28 on: November 19, 2015, 08:47:42 AM »
After a long period of silence in this thread, I am coming back with a new release of the FF5e_Text_Editor in its v1.6.

The new release fix automatically the bug reported in the previous post.
It also fixes a new found which produces when a speech window with the text of "You found '[MAGIC]'!" is displayed it displays 6 bytes instead of 5.

The editor have also some new nice features like a graphic editor to modify the menu windows and a fine/grain editor in some of the "Fixed Tables". Try a 'click' in the Items label and you will see.