Table Files are files which are pretty much essential for any budding ROM hackers to get their heads round. Basically, in the code of a video game ROM, data is usually stored in hexadecimal format. This data, among many other things, is often used to relate to blocks of text (since there are blocks of text in almost every game, even if it is only the copyright text on the title screen). But with only 16 different hex values, and any number of characters to be displayed (for example: some games have a full lower case alphabet, a full upper case alphabet, full set of punctuation (including all those signs you have on your number keys on the keyboard), Spaces, a load of other random signs...). So clearly, using one hexadecimal character for each letter to be displayed will not work.

However, using two hex values together gives us a rang of $00 - $FF. If you can't work it out for yourself, in decimal, that's 256 values ($00 is decimal 0, $FF is decimal 255). And that's more than enough for any game - you could almost have ten complete alphabets with that system.

So when hacking a ROM, it's useful, to say the least, to know which two hex values mean which character. In fact, if you're doing any text replacement at all, it's essential.

So Table Files were created. They simply contain values that the game displays (such as A, B, C.... X, Y, Z, a, b, c... x, y, z) together with a hex value which represents them. Most games have the alphabet stored in ascending order, so if the hex for A is $28, the hex fo B will be $29, the hex for C will be $2A, and so on.

But naturally, it often gets a lot more difficult. Sometimes, a hex value is used to store sets of two commonly used letters (such as "th" etc.). This is called DTE (stands for Dual Text Encryption) and can make building a Table File very hard. Most of the early Final Fantasy games used DTE. And that isn't the only advanced text storage routine. There is also dictionary compression - this uses a set of hex values (usually four) to represent a word. This can be illustrated in the Robotrek file below, where common names and words (like the character's name, and names of towns) have hex values of $E000 to $E3FFF.

Table files are saved as <game name>.TBL format files, but can be read and edited with any text editor.

The benefit of using table files is that if you have a compatible hex editor such as Thingy, when you open a ROM in the same directory as a table file of the same name, it will load that as well, and you will be able to search for text strings nice and easy. The Hex will appear on the left hand side, and the text which it translates to (translates using the Table File) will appear on the right. You can then edit either the raw hex or the text.


yerricde says "Some games, such as Lode Runner, GNOME vs KDE, and Tetanus On Drugs, don't need a table file because they use ASCII as their native character encoding. I'm pretty sure Mega Man 5 uses ASCII as well." - thanks for pointing this out.


Below is a table file for the SNES game Robotrek. I didn't make it myself, and I'm sorry that it's cut and paste, but it illustrates the points about dictionary compression etc. very well, so I'm using it. The table file was downloaded from Zophar's Domain, where it is in a database of Table Files. It was originally made by Niiru of Partial Translations. I assume that since they put the table file up for download on a popular emulation site they have no problem with me using it here. If they do, then please get in touch with me either here or by email (address is on my home node) and I'll remove it.

If you want to use it, copy and paste into a text file, save as robotrek.tbl, and make sure your ROM is called robotrek.smc. Any compatible hex editor such as Thingy should detect it and use it.

*cd
/cc


20= 
21=!
23=#
24=$
25=%
26=&
27=->
28=(
29=)
2A=*
2B=+
2C=,
2D=-
2E=.
2F=/
30=0
31=1
32=2
33=3
34=4
35=5
36=6
37=7
38=8
39=9
3A=:
3b=;
3C="l
3d==
3e="r
3F=?
40= 
41=A
42=B
43=C
44=D
45=E
46=F
47=G
48=H
49=I
4A=J
4B=K
4C=L
4D=M
4E=N
4F=O
50=P
51=Q
52=R
53=S
54=T
55=U
56=V
57=W
58=X
59=Y
5A=Z
5B="l
5d="r

60=`
61=a
62=b
63=c
64=d
65=e
66=f
67=g
68=h
69=i
6A=j
6B=k
6C=l
6D=m
6E=n
6F=o
70=p
71=q
72=r
73=s
74=t
75=u
76=v
77=w
78=x
79=y
7A=z

c200=*Name*
c302=yell
c303=pink
c300=whit

d1=**

E000=Tetron
E001=Nagisa:
E002=Akihabara:
E003=Kotetsu:
E004=Mint:
E005=Dr.Einst:
E006=Kurogane:
E007=Carl:
E008=Soldier:
E009=Mayor:
E00A=Blackmore:
E00B=Rose:
E00C=Napoleon:
E00D=Gateau:
E00E=Tira:
E00F=Flavon:
E010=Polon:
E011=Rask:
E012=Cookie:
E013=Igor:
E014=Count Prinky:
E015=Valet:
E016=Dr.G:
E017=Assistant A:
E018=Old Man:
E019=Chief:
E01A=Robot
E01B=Elder Baibai!
E01C=Robot
E01D=Robots

E300=the 
E301=you 
E302=have 
E303=I`m 
E304=The 
E305=your 
E306=I`ll 
E307=don`t 
E308=and 
E309=You 
E30A=about 
E30B=You`re 
E30C=for 
E30D=It`s 
E30E=this 
E30F=can`t 
E310=with 
E311=Mayor 
E312=will 
E313=you`re 
E314=can 
E315=that 
E316=was 
E317=Don`t 
E318=has 
E319=What 
E31A=He`s 
E31B=it`s 
E31C=are 
E31D=father 
E31E=not 
E31F=from 
E320=come 
E321=something 
E322=but 
E323=what 
E324=This 
E325=going 
E326=get 
E327=Mayor`s 
E328=When 
E329=want 
E32A=Oh, 
E32B=would 
E32C=That`s 
E32D=like 
E32E=What 
E32F=found 
E330=take 
E331=Hey, 
E332=Akihabara`s 
E333=Please 
E334=Well, 
E335=just 
E336=But 
E337=give 
E338=Hacker 
E339=little 
E33A=some 
E33B=know 
E33C=been 
E33D=talk 
E33E=back 
E33F=really 
E340=Your 
E341=he`s 
E342=make 
E343=when 
E344=his 
E345=There`s 
E346=Hackers 
E347=inventor 
E348=There 
E349=South 
E34A=out 
E34B=there 
E34C=inventory`s 
E34D=find 
E34E=must 
E34F=tell 
E350=should 
E351=What`s 
E352=Come 
E353=I`ve 
E354=time 
E355=great 
E356=need 
E357=children 
E358=heard 
E359=Stone 
E35A=him 
E35B=Just 
E35C=People 
E35D=good 
E35E=see 
E35F=shouldn`t 
E360=trying 
E361=mother 
E362=That 
E363=were 
E364=Welcome 
E365=looking 
E366=nothing 
E367=won`t 
E368=they`re 
E369=without 
E36A=thought 
E36B=Are 
E36C=got 
E36D=help 
E36E=went 
E36F=lost 
E370=around 
E371=all 
E372=understand 
E373=Maybe 
E374=suspicious 
E375=taking 
E376=Scrap 
E377=making 
E378=one 
E379=house 
E37A=secretary, 
E37B=change 
E37C=Thank 
E37D=young 
E37E=came 
E37F=Because 
E380=Count`s 
E381=meet 
E382=kind 
E383=combine 
E384=worried 
E385=show 
E386=dangerous 
E387=invention 
E388=Why 
E389=secretary 
E38A=Invention 
E38B=inventory 
E38C=Let`s 
E38D=still 
E38E=might 
E38F=We`re 
E390=mouse 
E391=looks 
E392=she`s 
E393=place 
E394=could 
E395=saved 
E396=very 
E397=master 
E398=Surprise 
E399=probably 
E39A=gotten 
E39B=Rococo 
E39C=hard 
E39D=remember 
E39E=house. 
E39F=happened 
E3A0=who 
E3A1=Month, 
E3A2=Thanks 
E3A3=Now 
E3A4=long 
E3A5=Get 
E3A6=here 
E3A7=now 
E3A8=said 
E3A9=They 
E3AA=caused 
E3AB=sure 
E3AC=care 
E3AD=them 
E3AE=straightened 
E3AF=father`s 
E3B0=things 
E3B1=only 
E3B2=anything 
E3B3=you`ve 
E3B4=You`ll 
E3B5=interesting 
E3B6=talking 
E3B7=there`s 
E3B8=forward 
E3B9=use 
E3BA=No, 
E3BB=against 
E3BC=did 
E3BD=dog 
E3BE=any 
E3BF=First 
E3C0=moved 
E3C1=more 
E3C2=Fever 
E3C3=over 
E3C4=Inventions 
E3C5=lots 
E3C6=look 
E3C7=Could 
E3C8=such 
E3C9=than 
E3CA=let`s 
E3CB=their 
E3CC=these 
E3CD=real 
E3CE=Where 
E3CF=Especially 
E3D0=Take 
E3D1=read 
E3D2=where 
E3D3=told 
E3D4=Robot 
E3D5=knows 
E3D6=left 
E3D7=Everything 
E3D8=check 
E3D9=seems 
E3DA=keep 
E3DB=they 
E3DC=bring 
E3DD=you. 
E3DE=happy, 
E3DF=health 
E3E0=matter 
E3E1=invent 
E3E2=police 
E3E3=Akihabara 
E3E4=inventor, 
E3E5=Everybody 
E3E6=too 
E3E7=people 
E3E8=strong 
E3E9=pretty 
E3EA=increases 
E3EB=island 
E3EC=combining 
E3ED=Did 
E3EE=rearrange 
E3EF=somewhere 
E3F0=didn`t 
E3F1=rumors 
E3F2=before 
E3F3=recovered 
E3F4=that`s 
E3F5=different 
E3F6=her 
E3F7=Nagisa 
E3F8=looked 
E3F9=Office 
E3FA=You`ve 
E3FB=way 
E3FC=important 
E3FD=Father`s 
E3FE=invented 
E3FF=Everyone 

Table file downloaded from Zophar's Domain (www.zophar.net).
Made by Niiru from Partial Translations (pt.parodius.com).

Log in or register to write something here or to contact authors.