Author Topic: FFVII Text.  (Read 10327 times)

Akari

  • *
  • Posts: 766
    • View Profile
FFVII Text.
« on: 2007-07-16 14:39:59 »
Today I looked into FFVII Text system. (both japanese and english).

They are the same.

There are two part of text system: kernel and field.

Kernel system allow you:

Set changable variable (only in message that appear in battle on top):
EA (used on red window), EB (Items), EC (Gil), ED (Monster), EE (Skill), EF (Monster Letter), F0 (Element (or magic)), F1 (not used).
They has 2 parameters, but I didn't see the were used... only FFFF everywhere

F8 - define text window color for battle module (second parameter not used anywhere. I think it planned to be color index but it was not compleatly implemented. In any case if F8 are in text - there will be red window, like limits)

F9 - use simple compression.
FA - extended characters.
FC - extended characters.
FD - extended characters. (not implemented in battle module, don't know why)
FE - extended characters. (not implemented in battle module, don't know why)
FF - end of text.

Next I look into Field message system.

Cyberman

  • *
  • Posts: 1572
    • View Profile
Re: FFVII Text.
« Reply #1 on: 2007-07-17 21:16:31 »
Today I looked into FFVII Text system. (both japanese and english).

They are the same.
Identical coding?
There are two part of text system: kernel and field.

Kernel system allow you:

Set changable variable (only in message that appear in battle on top):
EA (used on red window), EB (Items), EC (Gil), ED (Monster), EE (Skill), EF (Monster Letter), F0 (Element (or magic)), F1 (not used).
They has 2 parameters, but I didn't see the were used... only FFFF everywhere
give money items and a monster.. hmmm I can see how that would work :D
F8 - define text window color for battle module (second parameter not used anywhere. I think it planned to be color index but it was not compleatly implemented. In any case if F8 are in text - there will be red window, like limits)

F9 - use simple compression.
FA - extended characters.
FC - extended characters.
FD - extended characters. (not implemented in battle module, don't know why)
FE - extended characters. (not implemented in battle module, don't know why)
FF - end of text.

Next I look into Field message system.
I haven't played the Japanese version, I probably should to identify locations of which there might be interesting information. I do have the Japanese variant because I wanted to decipher what the difference was in there encoding. As for why some symbol sets weren't used in the battle module, perhaps they kept all the battle conversations minimalistic in nature?

Cyb

Akari

  • *
  • Posts: 766
    • View Profile
Re: FFVII Text.
« Reply #2 on: 2007-07-18 02:23:33 »
Today I looked into FFVII Text system. (both japanese and english).

They are the same.
Identical coding?

Disasm are the same. Just some addreses differs but this doesn't matter.

There are two part of text system: kernel and field.

Kernel system allow you:

Set changable variable (only in message that appear in battle on top):
EA (used on red window), EB (Items), EC (Gil), ED (Monster), EE (Skill), EF (Monster Letter), F0 (Element (or magic)), F1 (not used).
They has 2 parameters, but I didn't see the were used... only FFFF everywhere
give money items and a monster.. hmmm I can see how that would work :D

This used in a lot of messages like "You stole Potion", "Manipulating MP A" and so on.


F8 - define text window color for battle module (second parameter not used anywhere. I think it planned to be color index but it was not compleatly implemented. In any case if F8 are in text - there will be red window, like limits)

F9 - use simple compression.
FA - extended characters.
FC - extended characters.
FD - extended characters. (not implemented in battle module, don't know why)
FE - extended characters. (not implemented in battle module, don't know why)
FF - end of text.

Next I look into Field message system.
I haven't played the Japanese version, I probably should to identify locations of which there might be interesting information. I do have the Japanese variant because I wanted to decipher what the difference was in there encoding. As for why some symbol sets weren't used in the battle module, perhaps they kept all the battle conversations minimalistic in nature?

Cyb

There is not any difference in text in japanese and english version. For a lot of kanji they used FA FB FC FD and FE extended characters.

FAC5=実
FAC6=舎
FACB=者
FACC=謝
FAD0=è‹¥
FAD2=å¼±

This is from japanese version of xenogears, but this shows the idea how to use this.

Cyberman

  • *
  • Posts: 1572
    • View Profile
Re: FFVII Text.
« Reply #3 on: 2007-07-19 03:09:50 »
The Italian translation team confirms this although they didn't really care to give the encoding information (namely because they were done with it).
Oh well LOL.

I see so they were used for messages and giving items monsters etc during combat.  That explains how they handled some of the things like the proudclod thing etc.

Cyb

Akari

  • *
  • Posts: 766
    • View Profile
Re: FFVII Text.
« Reply #4 on: 2007-07-20 13:03:54 »
The Italian translation team confirms this although they didn't really care to give the encoding information (namely because they were done with it).

Are you talking about http://www.sadnescity.it?

VanishedOne

  • *
  • Posts: 27
    • View Profile
Re: FFVII Text.
« Reply #5 on: 2007-08-05 19:14:26 »
I haven't played the Japanese version, I probably should to identify locations of which there might be interesting information.

There are some places where there are blank spaces in the English data that aren't blank in the Japanese; obviously the text for the 'Materia' scene is one, but there seem to be others. Some of that text might turn out to be junk, but there could well be more unused dialogue in there.

Akari

  • *
  • Posts: 766
    • View Profile
Re: FFVII Text.
« Reply #6 on: 2007-08-06 13:09:44 »
I haven't played the Japanese version, I probably should to identify locations of which there might be interesting information.

There are some places where there are blank spaces in the English data that aren't blank in the Japanese; obviously the text for the 'Materia' scene is one, but there seem to be others.

There is no such dialog in japanese version. This dialog was shown in trailer but never appeared in game.

Vehek

  • *
  • Posts: 215
    • View Profile
Re: FFVII Text.
« Reply #7 on: 2007-08-06 16:14:15 »
If you access the "Materia" option in sailor Barret's menu in the east debug room, you get that scene from the trailer.
In the English version, the dialog is completely blank.
http://faceofthemoon.blogspot.com/2007/04/lost-scenes-of-final-fantasy-vii.html
« Last Edit: 2007-08-06 16:16:23 by Vehek »

VanishedOne

  • *
  • Posts: 27
    • View Profile
Re: FFVII Text.
« Reply #8 on: 2007-08-06 20:24:41 »
As noted on the linked page, you need to be at the right point in the game, or have used the 'reset flag' button; otherwise you'll get an empty room.

Besides the three known outtakes which can be accessed via the debug rooms, there's quite a lot of unused dialogue in the files; http://faceofthemoon.blogspot.com/2007/05/lost-text-of-final-fantasy-vii.html has a limited selection.

Cyberman

  • *
  • Posts: 1572
    • View Profile
Re: FFVII Text.
« Reply #9 on: 2007-08-19 14:08:47 »
Akari by kernel are you referring to script codes in the field files? or are there other places script code is executed?
IE is the encoded data in the dialog section of a script in a field location?
Or are you referring to the battle script?  I'm not sure what section of FF7 script you are dealing with and where.
(Suddenly I have no clue sad isn't that?)

Cyb

Akari

  • *
  • Posts: 766
    • View Profile
Re: FFVII Text.
« Reply #10 on: 2007-08-19 16:39:42 »
Akari by kernel are you referring to script codes in the field files? or are there other places script code is executed?
IE is the encoded data in the dialog section of a script in a field location?
Or are you referring to the battle script?  I'm not sure what section of FF7 script you are dealing with and where.
(Suddenly I have no clue sad isn't that?)

Cyb

By KERNEL I mean text in kernel.bin file. It always loaded in memory.

Cyberman

  • *
  • Posts: 1572
    • View Profile
Re: FFVII Text.
« Reply #11 on: 2007-08-23 00:59:15 »
Thanks for the clarification. So those codes are only used in the persistent data in the game.

Cyb

Akari

  • *
  • Posts: 766
    • View Profile
Re: FFVII Text.
« Reply #12 on: 2007-08-29 13:12:33 »
Working on Field text system.

Text processing system divided on two parts: copying to window buffer (length 255) and displaying from buffer.
Total window working description will come after I compleatly understand it.
For now some info that already known.

During field copy only folowing bytes receive special treatment:

E0 - tabulation. Writes 0xA spaces(0x00) to string data. Increment letters and bytes data by 0xA.
E1 - tabulation. Writes 0x4 spaces(0x00) to string data. Increment letters and bytes data by 0x4.
E2 - writes 0x0C, 0x00(, ) Increment letters and bytes data by 0x2.
E3 - writes 0x0E, 0x02(.") Increment letters and bytes data by 0x2.
E4 - writes 0xA9, 0x02(...") Increment letters and bytes data by 0x2.
E7 - next row.
If row number equal to max row number - write FF to string. Set window state to 0x4. Write 0x0000 to 80114470 array. Write 0x0001 to 80114480 array.
If row numbet less then max row number - write E7 to string. Increment byte and row data by 1.
E8 - next window. Set window state to 0xE. Write FF to string. Write 0x0000 to 80114470 array. Write 0x0001 to 80114480 array.
E9 - next window. Set window state to 0xE. Write FF to string. Write 0x0000 to 80114470 array. Write 0x0001 to 80114480 array.
EA
EB
EC
ED
EE
EF
F0
F1
F2
F3
F4
F5
FA - copied to string together with next byte. Increment letters data by 1 and byte data by 2.
FB - copied to string together with next byte. Increment letters data by 1 and byte data by 2.
FC - copied to string together with next byte. Increment letters data by 1 and byte data by 2.
FD - copied to string together with next byte. Increment letters data by 1 and byte data by 2.
FE
FF - end string copying. Write FF to string. Set window state to 0x6. Write 0x0000 to 80114470 array.

Window states are as follows:
0 - closed window.
1 - window appears.
2 - text appears. (function that copy text from Field data to Window buffer called here)
3
4 - wait for next window (next block of text will show after this).
5
6 - final window (window will close after that).
7 - window closing.
8
9
A
B
C
D
E - wait for next window (next block of text will show after this).

Akari

  • *
  • Posts: 766
    • View Profile
Re: FFVII Text.
« Reply #13 on: 2007-08-31 13:07:25 »
Color data was wrong in every documentation that I found.
D2 and others are not color but usual letter. Colors define as FED2

New update on field text:

EA - character name from savemap 0x00 character data. Copy 9 bytes or until encount FF. Increment letters and byte data by 1 for each copying byte. Descrease 80114470 by S5 for each copying byte.
EB - character name from savemap 0x01 character data. Copy 9 bytes or until encount FF. Increment letters and byte data by 1 for each copying byte. Descrease 80114470 by S5 for each copying byte.
EC - character name from savemap 0x02 character data. Copy 9 bytes or until encount FF. Increment letters and byte data by 1 for each copying byte. Descrease 80114470 by S5 for each copying byte.
ED - character name from savemap 0x03 character data. Copy 9 bytes or until encount FF. Increment letters and byte data by 1 for each copying byte. Descrease 80114470 by S5 for each copying byte.
EE - character name from savemap 0x04 character data. Copy 9 bytes or until encount FF. Increment letters and byte data by 1 for each copying byte. Descrease 80114470 by S5 for each copying byte.
EF - character name from savemap 0x05 character data. Copy 9 bytes or until encount FF. Increment letters and byte data by 1 for each copying byte. Descrease 80114470 by S5 for each copying byte.
F0 - character name from savemap 0x06 character data. Copy 9 bytes or until encount FF. Increment letters and byte data by 1 for each copying byte. Descrease 80114470 by S5 for each copying byte.
F1 - character name from savemap 0x07 character data. Copy 9 bytes or until encount FF. Increment letters and byte data by 1 for each copying byte. Descrease 80114470 by S5 for each copying byte.
F2 - character name from savemap 0x08 character data. Copy 9 bytes or until encount FF. Increment letters and byte data by 1 for each copying byte. Descrease 80114470 by S5 for each copying byte.
F3 - party character name. Get character id from 0x0CAE party data in savemap and load character name from savemap data. Copy 9 bytes or until encount FF. If party character 0xFF (none) - write 0xA9(...) 9 times. Increment letters and byte data by 1 for each copying byte. Descrease 80114470 by S5 for each copying byte.
F4 - party character name. Get character id from 0x0CAF party data in savemap and load character name from savemap data. Copy 9 bytes or until encount FF. If party character 0xFF (none) - write 0xA9(...) 9 times. Increment letters and byte data by 1 for each copying byte. Descrease 80114470 by S5 for each copying byte.
F5 - party character name. Get character id from 0x0CB0 party data in savemap and load character name from savemap data. Copy 9 bytes or until encount FF. If party character 0xFF (none) - write 0xA9(...) 9 times. Increment letters and byte data by 1 for each copying byte. Descrease 80114470 by S5 for each copying byte.
F6 - usual letter.
F7 - usual letter.
F8 - usual letter.
F9 - usual letter.
FE - special opcode. Write FE to string. Increment byte data by 1. Read next byte and do something according to it.
_D2 - increment byte data by 1. Write this byte to string. (colour formater)
_D3 - increment byte data by 1. Write this byte to string. (colour formater)
_D4 - increment byte data by 1. Write this byte to string. (colour formater)
_D5 - increment byte data by 1. Write this byte to string. (colour formater)
_D6 - increment byte data by 1. Write this byte to string. (colour formater)
_D7 - increment byte data by 1. Write this byte to string. (colour formater)
_D8 - increment byte data by 1. Write this byte to string. (colour formater)
_D9 - increment byte data by 1. Write this byte to string. (colour formater)
_DA - increment byte data by 1. Write this byte to string. (colour formater)
_DB - increment byte data by 1. Write this byte to string. (colour formater)
_DC - decrement byte data by 1. Set window state to 0xD. Write 0x0000 to 80114470 array. Write 0x0001 to 80114480 array. End string copying. Write FF to string.
_DD - set window state to 0x3. Copy next byte and byte after it to 8011445C array (swapped). Increment byte data by 3 (similar to write 000000). Write FF to string. End string copying.
_DE
_DF
_E0 - decrement byte data by 1. Set window state to 0xB. Write 0x0000 to 80114470 array. Write 0x0001 to 80114480 array. End string copying. Write FF to string.
_E1
_E2
_E3 - usual letter.
_E4 - usual letter.
_E5 - usual letter.
_E6 - usual letter.
_E7 - usual letter.
_E8 - usual letter.
_E9 - increment byte data by 1. Write this byte to string. (max letter width formater)
_EA
_EB
_EC
_ED
_EE
_EF
_F0
_F1
_F2
_F3
_F4
_F5
_F6
_F7
_F8
_F9
_FA
_FB
_FC
_FD
_FE
_FF - pause string output. Decrement byte data by 1. Set window state to 0xD. Write 0x0000 to 80114470 array. Write 0x0001 to 80114480 array. End string copying. Write FF to string.

window states update:
3 - pause string output. (next part of sting will be added to outputed string after time).
B - pause string output. (text will be scrolled to next window while you hold OK button).
D - pause string output. (next part of sting will be added to outputed string after OK button).

ps: I don't remember this windows was ever used in game =)
« Last Edit: 2007-08-31 13:09:35 by Akari »

Akari

  • *
  • Posts: 766
    • View Profile
Re: FFVII Text.
« Reply #14 on: 2007-09-05 17:05:25 »
Finish reversing work. Now all text opcodes from E0 to FF are well known and compleatly understanded. Only two opcodes nether used in game: 0xFEDF (variable to display digit as hex) and 0xFEE0 (ends current page of text, you will need to hold OK button to scroll to next page).

Now it's time to write some documentation.

Cyberman

  • *
  • Posts: 1572
    • View Profile
Re: FFVII Text.
« Reply #15 on: 2007-09-05 23:29:01 »
Finish reversing work. Now all text opcodes from E0 to FF are well known and compleatly understanded. Only two opcodes nether used in game: 0xFEDF (variable to display digit as hex) and 0xFEE0 (ends current page of text, you will need to hold OK button to scroll to next page).

Now it's time to write some documentation.
Documentation? What's that! :)
Good to hear you are having success.

Cyb