If you are still using the old URL (datacrystal.romhacking.net), please update your bookmarks! The old URL may stop working at any time.
The current URL is datacrystal.tcrf.net.
The current URL is datacrystal.tcrf.net.
Text Table
Jump to navigation
Jump to search
| This page is rather stubbly and could use some expansion. Are you a bad enough dude to rescue this article? |
A Text Table or .TBL file describes to a hex editor how to convert a ROM's text format into readable text.
Overview
Normal Entries
- The whole file is always UTF-8, and each line is in the format
HEX=string(formally, [Hex sequence]=[Text sequence]). - Blank lines are ignored, and # can be used as the first character of a line to leave a comment (until the end of said line).
- The hex value must be an even number of nibbles (2 nibbles would give
42, 4 nibbles1EE7, etc.), and must be in big endian (most significant to least significant,10means 16 in decimal, andCA75means 51829 in decimal ). - Whitespaces can only be present in the text sequence, which can't contain '[' or ']' characters.
For example:
E1=Hmeans the byte 0xE1 means uppercase H.1502= thatmeans the byte 0x15 followed by the byte 0x02 means the word "that" with spaces on either side.
Non-Normal Entries
These special cases allow for more flexibility and ease of usage. It contains the prefixes, labels, parameters, control code, end token, etc.
For example:
*HEXindicates thatHEXis a newline. Notice there is no text sequence.HEX=\nindicates thatHEXis a newline too.\HEXindicates thatHEXis the end of text. Notice there is no text sequence.\HEX=[end of text]\nindicates thatHEXis the end of text. The optional text sequence here is useful for debugging or clarity purpose. Line breaks are used by dumpers only and will be ignored by inserters.(HEXh)Titledetermines bookmarks. You need thehafter the hexidecimal address for it to be read as hex.
Examples
These are purely made up examples and do not came from any known game.
Simple case
Using this TBL:
00= 01=A 02=B 03=C 04=D
This sequence 0x02, 0x01, 0x04, 0x00, 0x03, 0x01, 0x02
Is decoded as BAD CAB
More complex case
Using this TBL:
# Alphabet 00= 01=A 02=B 03=C 04=D 05=E # Dictionary 70=AT # Controls *FE \FF=[end of text]\n
This sequence 0x01, 0x00, 0x02, 0x01, 0x04, 0x00, 0x03, 0x70, 0xFE, 0x70, 0x05, 0x00, 0x01, 0x00, 0x02, 0x70, 0xFF
Is decoded as:
A BAD CAT
ATE A BAT[end of text]
Note:
- The use (and abuse) of
0x70to compressAT - The use of
0xFEand0xFFfor new line and end of text, respectively.
Useful tools
- TaBuLar can be used to create TBL files
- crystaltile2 can help you make and display TBL files
See Also
- Category:TBL Files - All .TBL files are in this category. Place {{TBL|game=game name}} at the top of all such pages.
External Links
- Original TBL format description Use this for reference
- Table File node on Everything2 (includes an example)
- Thread on gbatemp interesting post by 'FAST6191' on how to get the data to make these files