View Single Post
  #20466    
Old February 3rd, 2012, 08:04 AM
Darkdata's Avatar
Darkdata
15 year old me was an idiot.
 
Join Date: Aug 2005
Nature: Calm
The Pokemon games use uncompressed strings. And they are easy to repoint and work with.

Here is a table file:
Code:
00= 
01=À
02=Á
03=Â
04=Ç
05=È
06=É
07=Ê
08=Ë
09=Ì
0B=Î
0C=Ï
0D=Ò
0E=Ó
0F=Ô
10=Œ
11=Ù
12=Ú
13=Û
14=Ñ
15=ß
16=à
17=á
19=ç
1A=è
1B=é
1C=ê
1D=ë
1E=ì
20=î
21=ï
22=ò
23=ó
24=ô
25=œ
26=ù
27=ú
28=û
29=ñ
2A=º
2B=ª
2D=&
2E=+
34=[Lv]
35==
36=;
51=¿
52=¡
53=[pk]
54=[mn]
55=[po]
56=[ké]
57=[bl]
58=[oc]
59=[k]
5A=Í
5B=%
5C=(
5D=)
68=â
6F=í
79=[U]
7A=[D]
7B=[L]
7C=[R]
85=<
86=>
A1=0
A2=1
A3=2
A4=3
A5=4
A6=5
A7=6
A8=7
A9=8
AA=9
AB=!
AC=?
AD=.
AE=-
AF=·
B0=...
B1=«
B2=»
B3='
B4='
B5=|m|
B6=|f|
B7=$
B8=,
B9=*
BA=/
BB=A
BC=B
BD=C
BE=D
BF=E
C0=F
C1=G
C2=H
C3=I
C4=J
C5=K
C6=L
C7=M
C8=N
C9=O
CA=P
CB=Q
CC=R
CD=S
CE=T
CF=U
D0=V
D1=W
D2=X
D3=Y
D4=Z
D5=a
D6=b
D7=c
D8=d
D9=e
DA=f
DB=g
DC=h
DD=i
DE=j
DF=k
E0=l
E1=m
E2=n
E3=o
E4=p
E5=q
E6=r
E7=s
E8=t
E9=u
EA=v
EB=w
EC=x
ED=y
EE=z
EF=|>|
F0=:
F1=Ä
F2=Ö
F3=Ü
F4=ä
F5=ö
F6=ü
F7=|A|
F8=|V|
F9=|<|
FA=|nb|
FB=|nb2|
FC=|FC|
FD=|FD|
FE=|br|
FF=|end|
If you load this, you should be able to see any string you search for. To repoint a string, say this guy:


First, search for his string in a hex editor, I use WINDHEX, so I can load a table and search in ASCII characters directly. When I look for it, I find it at 0x17d80d

Now, saw there was not enough room for this string, first I need to find the pointer to it, to do that, you take the bytes, and reverse the order. So 0x17d80d -> [17] [D8] [0D] becomes [0d] [d8] [17], we then add an [08] to the end.

So, [0d] [d8] [17] [08] (0DD81708) is what we search for! After searching, we find it at 0x165831. Keep note of this.

Now, we just need to find some free space. There's about 3MB of free space floating around for anyone to use, just look around 0x800000. So i'll just use that.

So, I insert/write my new text into that slot.
[img width=640 height=54]http://i.imgur.com/Benl7.png[/img]
Now, we just convert 0x800000 into a pointer the same way we did the old text: [80] [00] [00] -> [00] [00] [80] [08] adding [08] to the end like normal.

Now we go back to the first text pointer we found: 0DD81708 at 0x165831, remember? and replace that pointer (0DD81708) with our new one (00008008).



FE=|br|, is the first linebreak you make, then you use FB=|nb2|, for each line after in the same box. To make a new box appear, you use FA=|nb|. Always have a [FF] at the end to terminate the string.
__________________
Jul | Homepage

Last edited by Darkdata; February 3rd, 2012 at 08:13 AM. Reason: Fixed broken formating