Difference between revisions of "FF7/FF Text"

From Final Fantasy Inside
< FF7
Jump to navigation Jump to search
my_wiki>Albeoris
(Created page with "FF Text is a format that Squaresoft used to store strings in the English version of Final Fantasy VII. Large subsets of the character (e.g. A-Z, a-z, 0-9) set are coded as sim...")
m (Fix Pad Buttons Chars)
 
(4 intermediate revisions by 4 users not shown)
Line 2: Line 2:
  
 
{| class="wikitable"
 
{| class="wikitable"
<font size="10px"><font face="Tahoma">!
+
!
! style="background: rgb(204,204,204); width: 53px" align="center" | 00
+
! 00
! style="background: rgb(204,204,204); width: 53px" align="center" | 01
+
! 01
! style="background: rgb(204,204,204); width: 53px" align="center" | 02
+
! 02
! style="background: rgb(204,204,204); width: 53px" align="center" | 03
+
! 03
! style="background: rgb(204,204,204); width: 53px" align="center" | 04
+
! 04
! style="background: rgb(204,204,204); width: 53px" align="center" | 05
+
! 05
! style="background: rgb(204,204,204); width: 53px" align="center" | 06
+
! 06
! style="background: rgb(204,204,204); width: 53px" align="center" | 07
+
! 07
! style="background: rgb(204,204,204); width: 53px" align="center" | 08
+
! 08
! style="background: rgb(204,204,204); width: 53px" align="center" | 09
+
! 09
! style="background: rgb(204,204,204); width: 53px" align="center" | 0A
+
! 0A
! style="background: rgb(204,204,204); width: 53px" align="center" | 0B
+
! 0B
! style="background: rgb(204,204,204); width: 53px" align="center" | 0C
+
! 0C
! style="background: rgb(204,204,204); width: 53px" align="center" | 0D
+
! 0D
! style="background: rgb(204,204,204); width: 53px" align="center" | 0E
+
! 0E
! style="background: rgb(204,204,204); width: 53px" align="center" | 0F
+
! 0F
 
|-
 
|-
 
! 00
 
! 00
| align="center" | {SPACE}
+
| {SPACE}
| align="center" | !
+
| !
| align="center" | "
+
| "
| align="center" | #
+
| #
| align="center" | $
+
| $
| align="center" | %
+
| %
| align="center" | &amp;
+
| &amp;
| align="center" | '
+
| '
| align="center" | (
+
| (
| align="center" | )
+
| )
| align="center" | *
+
| *
| align="center" | +
+
| +
| align="center" | ,
+
| ,
| align="center" | -
+
| -
| align="center" | .
+
| .
| align="center" | /
+
| /
 
|-
 
|-
 
! 10
 
! 10
| align="center" | 0
+
| 0
| align="center" | 1
+
| 1
| align="center" | 2
+
| 2
| align="center" | 3
+
| 3
| align="center" | 4
+
| 4
| align="center" | 5
+
| 5
| align="center" | 6
+
| 6
| align="center" | 7
+
| 7
| align="center" | 8
+
| 8
| align="center" | 9
+
| 9
| align="center" | :
+
| :
| align="center" | ;
+
| ;
| align="center" | &lt;
+
| &lt;
| align="center" | =
+
| =
| align="center" | &gt;
+
| &gt;
| align="center" | ?
+
| ?
 
|-
 
|-
 
! 20
 
! 20
| align="center" | @
+
| @
| align="center" | A
+
| A
| align="center" | B
+
| B
| align="center" | C
+
| C
| align="center" | D
+
| D
| align="center" | E
+
| E
| align="center" | F
+
| F
| align="center" | G
+
| G
| align="center" | H
+
| H
| align="center" | I
+
| I
| align="center" | J
+
| J
| align="center" | K
+
| K
| align="center" | L
+
| L
| align="center" | M
+
| M
| align="center" | N
+
| N
| align="center" | O
+
| O
 
|-
 
|-
 
! 30
 
! 30
| align="center" | P
+
| P
| align="center" | Q
+
| Q
| align="center" | R
+
| R
| align="center" | S
+
| S
| align="center" | T
+
| T
| align="center" | U
+
| U
| align="center" | V
+
| V
| align="center" | W
+
| W
| align="center" | X
+
| X
| align="center" | Y
+
| Y
| align="center" | Z
+
| Z
| align="center" | [
+
| [
| align="center" | \
+
| \
| align="center" | ]
+
| ]
| align="center" | ^
+
| ^
| align="center" | _
+
| _
 
|-
 
|-
 
! 40
 
! 40
| align="center" | `
+
| `
| align="center" | a
+
| a
| align="center" | b
+
| b
| align="center" | c
+
| c
| align="center" | d
+
| d
| align="center" | e
+
| e
| align="center" | f
+
| f
| align="center" | g
+
| g
| align="center" | h
+
| h
| align="center" | i
+
| i
| align="center" | j
+
| j
| align="center" | k
+
| k
| align="center" | l
+
| l
| align="center" | m
+
| m
| align="center" | n
+
| n
| align="center" | o
+
| o
 
|-
 
|-
 
! 50
 
! 50
| align="center" | p
+
| p
| align="center" | q
+
| q
| align="center" | r
+
| r
| align="center" | s
+
| s
| align="center" | t
+
| t
| align="center" | u
+
| u
| align="center" | v
+
| v
| align="center" | w
+
| w
| align="center" | x
+
| x
| align="center" | y
+
| y
| align="center" | z
+
| z
| align="center" | {
+
| {
| align="center" | |
+
| |
| align="center" | }
+
| }
| align="center" | ~
+
| ~
 +
|
 
|-
 
|-
 
! 60
 
! 60
| align="center" | Ä
+
| Ä
| align="center" | Á
+
| Á
| align="center" | Ç
+
| Ç
| align="center" | É
+
| É
| align="center" | Ñ
+
| Ñ
| align="center" | Ö
+
| Ö
| align="center" | Ü
+
| Ü
| align="center" | á
+
| á
| align="center" | à
+
| à
| align="center" | â
+
| â
| align="center" | ä
+
| ä
| align="center" | ã
+
| ã
| align="center" | å
+
| å
| align="center" | ç
+
| ç
| align="center" | é
+
| é
| align="center" | è
+
| è
 
|-
 
|-
 
! 70
 
! 70
| align="center" | ê
+
| ê
| align="center" | ë
+
| ë
| align="center" | í
+
| í
| align="center" | ì
+
| ì
| align="center" | î
+
| î
| align="center" | ï
+
| ï
| align="center" | ñ
+
| ñ
| align="center" | ó
+
| ó
| align="center" | ò
+
| ò
| align="center" | ô
+
| ô
| align="center" | ö
+
| ö
| align="center" | õ
+
| õ
| align="center" | ú
+
| ú
| align="center" | ù
+
| ù
| align="center" | û
+
| û
| align="center" | ü
+
| ü
 
|-
 
|-
 
! 80
 
! 80
| align="center" | ⌘
+
|
| align="center" | °
+
| °
| align="center" | ¢
+
| ¢
| align="center" | £
+
| £
| align="center" | Ù
+
| Ù
| align="center" | Û
+
| Û
| align="center" | ¶
+
|
| align="center" | ß
+
| ß
| align="center" | ®
+
| ®
| align="center" | ©
+
| ©
| align="center" | ™
+
|
| align="center" | ´
+
| ´
| align="center" | ¨
+
| ¨
| align="center" | ≠
+
|
| align="center" | Æ
+
| Æ
| align="center" | Ø
+
| Ø
 
|-
 
|-
 
! 90
 
! 90
| align="center" | ∞
+
|
| align="center" | ±
+
| ±
| align="center" | ≤
+
|
| align="center" | ≥
+
|
| align="center" | ¥
+
| ¥
| align="center" | µ
+
| µ
| align="center" | ∂
+
|
| align="center" | Σ
+
| Σ
| align="center" | Π
+
| Π
| align="center" | π
+
| π
| align="center" | ⌡
+
|
| align="center" | <u>ª</u>
+
| ª
| align="center" | <u>º</u>
+
| º
| align="center" | Ω
+
| Ω
| align="center" | æ
+
| æ
| align="center" | ø
+
| ø
 
|-
 
|-
 
! A0
 
! A0
| align="center" | ¿
+
| ¿
| align="center" | ¡
+
| ¡
| align="center" | ¬
+
| ¬
| align="center" | √
+
|
| align="center" | ƒ
+
| ƒ
| align="center" | ≈
+
|
| align="center" | ∆
+
|
| align="center" | «
+
| «
| align="center" | »
+
| »
| align="center" | …
+
|
| align="center" | {NOTHING}
+
| {NOTHING}
| align="center" | À
+
| À
| align="center" | Ã
+
| Ã
| align="center" | Õ
+
| Õ
| align="center" | Œ
+
| Œ
| align="center" | œ
+
| œ
 
|-
 
|-
 
! B0
 
! B0
| align="center" | –
+
|
| align="center" | —
+
|
| align="center" | “
+
|
| align="center" | ”
+
|
| align="center" | ‘
+
|
| align="center" | ’
+
|
| align="center" | ÷
+
| ÷
| align="center" | ◊
+
|
| align="center" | ÿ
+
| ÿ
| align="center" | Ÿ
+
| Ÿ
| align="center" | ⁄
+
|
| align="center" | ¤
+
| ¤
| align="center" | ‹
+
|
| align="center" | ›
+
|
| align="center" | fi
+
|
| align="center" | fl
+
|
 
|-
 
|-
 
! C0
 
! C0
| align="center" | ■
+
|
| align="center" | ▪
+
|
| align="center" | ‚
+
|
| align="center" | „
+
|
| align="center" | ‰
+
|
| align="center" | Â
+
| Â
| align="center" | Ê
+
| Ê
| align="center" | Ë
+
| Ë
| align="center" | Á
+
| Á
| align="center" | È
+
| È
| align="center" | í
+
| í
| align="center" | î
+
| î
| align="center" | ï
+
| ï
| align="center" | ì
+
| ì
| align="center" | Ó
+
| Ó
| align="center" | Ô
+
| Ô
 
|-
 
|-
 
! D0
 
! D0
| align="center" | {SPACE}
+
| {SPACE}
| align="center" | Ò
+
| Ò
| align="center" | Ù
+
| Ù
| align="center" | Û
+
| Û
 
|
 
|
 
|
 
|
Line 272: Line 273:
 
|-
 
|-
 
! E0
 
! E0
| align="center" | {Choice}
+
| {Choice}
| align="center" | {Tab}
+
| {Tab}
| align="center" | ,
+
| ,
| align="center" | ."
+
| ."
| align="center" | ..."
+
| ..."
 
|
 
|
 
|
 
|
| align="center" | {EOL}
+
| {EOL}
| align="center" | {New Scr}
+
| {New Scr}
| align="center" | {New Scr?}
+
| {New Scr?}
| align="center" | {Cloud}
+
| {Cloud}
| align="center" | {Barret}
+
| {Barret}
| align="center" | {Tifa}
+
| {Tifa}
| align="center" | {Aerith}
+
| {Aerith}
| align="center" | {Red XIII}
+
| {Red XIII}
| align="center" | {Yuffie}
+
| {Yuffie}
 
|-
 
|-
 
! F0
 
! F0
| align="center" | {Cait Sith}
+
| {Cait Sith}
| align="center" | {Vincent}
+
| {Vincent}
| align="center" | {Cid}
+
| {Cid}
| align="center" | {Party #1}
+
| {Party #1}
| align="center" | {Party #2}
+
| {Party #2}
| align="center" | {Party #3}
+
| {Party #3}
| align="center" | 〇
+
|
| align="center" | △
+
|
| align="center" | ☐
+
|
| align="center" | ✕
+
|
 
|
 
|
 
|
 
|
Line 305: Line 306:
 
|
 
|
 
! style="background: rgb(255,205,154)" | {FUNC}
 
! style="background: rgb(255,205,154)" | {FUNC}
| align="center" | {END}
+
| {END}
</font></font>|}
+
|}
  
 
There is no equivalent character to 80h in most font families.<br /> Characters D4h - DFh appear to produce odd graphical errors.
 
There is no equivalent character to 80h in most font families.<br /> Characters D4h - DFh appear to produce odd graphical errors.
Line 339: Line 340:
 
Example
 
Example
  
  S  t  o  l  e    X       !
+
  S  t  o  l  e    X       !
 
  33 54 4F 4C 45 00 EB FF FF 01 FF
 
  33 54 4F 4C 45 00 EB FF FF 01 FF
  
Line 359: Line 360:
  
 
  24 52 41 49 4E 53 00 3B 30 4F 49 53 4F 4E 3D 00 41 54 54 41 43 4B 53 0C 00 50 52 4F 54 45 43 54 53 00 41 47 F9 21 54 F9 A0 3D
 
  24 52 41 49 4E 53 00 3B 30 4F 49 53 4F 4E 3D 00 41 54 54 41 43 4B 53 0C 00 50 52 4F 54 45 43 54 53 00 41 47 F9 21 54 F9 A0 3D
   D  r  a  i  n  s    [  P  o  i  s  o  n  ]    a  t  t  a  c  k  s  ,    p  r  o  t  e  c  t  s    a  g ** ??  t ** ??  ]
+
   D  r  a  i  n  s    [  P  o  i  s  o  n  ]    a  t  t  a  c  k  s  ,    p  r  o  t  e  c  t  s    a  g ** ??  t ** ??  ]
  
 
At the end we have two F9 functions located at the end. The first one references the "ains" in the word "Drains" earlier in the description and the second one references the " [Poison" shortly after. The bytes following the F9 describe how to get to those texts:
 
At the end we have two F9 functions located at the end. The first one references the "ains" in the word "Drains" earlier in the description and the second one references the " [Poison" shortly after. The bytes following the F9 describe how to get to those texts:

Latest revision as of 21:50, 25 August 2021

FF Text is a format that Squaresoft used to store strings in the English version of Final Fantasy VII. Large subsets of the character (e.g. A-Z, a-z, 0-9) set are coded as simply their ASCII values offset by 0x20.

00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F
00 {SPACE} ! " # $ % & ' ( ) * + , - . /
10 0 1 2 3 4 5 6 7 8 9 : ; < = > ?
20 @ A B C D E F G H I J K L M N O
30 P Q R S T U V W X Y Z [ \ ] ^ _
40 ` a b c d e f g h i j k l m n o
50 p q r s t u v w x y z { } ~
60 Ä Á Ç É Ñ Ö Ü á à â ä ã å ç é è
70 ê ë í ì î ï ñ ó ò ô ö õ ú ù û ü
80 ° ¢ £ Ù Û ß ® © ´ ¨ Æ Ø
90 ± ¥ µ Σ Π π ª º Ω æ ø
A0 ¿ ¡ ¬ ƒ « » {NOTHING} À Ã Õ Œ œ
B0 ÷ ÿ Ÿ ¤
C0 Â Ê Ë Á È í î ï ì Ó Ô
D0 {SPACE} Ò Ù Û
E0 {Choice} {Tab} , ." ..." {EOL} {New Scr} {New Scr?} {Cloud} {Barret} {Tifa} {Aerith} {Red XIII} {Yuffie}
F0 {Cait Sith} {Vincent} {Cid} {Party #1} {Party #2} {Party #3} {FUNC} {END}

There is no equivalent character to 80h in most font families.
Characters D4h - DFh appear to produce odd graphical errors.

{FUNC} Character

This character is in fact an opcode, that takes one or more arguments. For the most time it's used to indicate colours, which are as follows:

FE D2: Gray colour
FE D3: Blue colour
FE D4: Red colour
FE D5: Purple colour
FE D6: Green colour
FE D7: Cyan colour
FE D8: Yellow colour
FE D9: White colour
FE DA: Flash colour*
FE DB: Rainbow colour*

* these colours are global for a window, you can't reset them with other modifiers.

More info can be found in Dialog Window section of the wiki.

Battle Text within the KERNEL.BIN

Sections 10-17 and 26 of the KERNEL.BIN are encoded differently than the rest of the text data. Several other values have additional functions:

EA - F0: These are variable position markers used in the Battle Text section (25) of KERNEL.BIN. These will only appear in specific texts and should only be used in those texts. These tell the battle engine that when a title needs to be displayed that certain values need to be inserted into the string. These are always followed by two NULL pointers (FFFFh).

EA: Name of a Character EB: Name of an Item EC: Number ED: Name of the Target EF: Name of Attack FO: Target's Letter (for enemies)

Example

S  t  o  l  e     X        !
33 54 4F 4C 45 00 EB FF FF 01 FF

The battle engine will replace the "EB FF FF" with the name of the item at the index passed to it.

F8: This appears at the beginning of a text. It tells the battle engine that the next byte will determine the color of the box the text is to be displayed in. 02h is the only one used and it displays a red box associated with Limit Breaks.

F9: This is an encoding technique designed to make the raw data smaller. It is based on the LZS compression method, but optimized for smaller files with fewer large similar blocks. A byte following this value will tell the game's memory the location of, and how much, text to read. The byte is set up like this:

In binary:
YYXXXXXX
Where YY is the number of bytes to read and XXXXXX is how far back from the F9 byte to look.

The number of bytes to read uses the formula:

no_of_bytes = (YY) * 2 + 4  [Where YY is binary]

The location starts at the position that the data read the byte F9 and proceeds backwards XXXXXX + 1 times.
Ex: This is the description of the Poison Ring stored in section 15 of the kernel, both raw data and decoded text.

24 52 41 49 4E 53 00 3B 30 4F 49 53 4F 4E 3D 00 41 54 54 41 43 4B 53 0C 00 50 52 4F 54 45 43 54 53 00 41 47 F9 21 54 F9 A0 3D
 D  r  a  i  n  s     [  P  o  i  s  o  n  ]     a  t  t  a  c  k  s  ,     p  r  o  t  e  c  t  s     a  g ** ??  t ** ??  ]

At the end we have two F9 functions located at the end. The first one references the "ains" in the word "Drains" earlier in the description and the second one references the " [Poison" shortly after. The bytes following the F9 describe how to get to those texts:

21
00 100001 - go back 34 bytes and display four characters
A0
10 100000 - go back 33 bytes and display eight characters

This is an absolute position so it does not matter if there are other encrypted segments between it and the text it is trying to read.

NOTE: This may even request that a NULL terminator (0xFF) be output as well, but the data will then be terminated after the last piece of encoded text. This encoding can span back to previous descriptions as well.

Useful downloads