Friday, June 7, 2013

Step 8: understand hexadecimal codes

Before extracting and translating the texts we have to understand something: the PSX is a computer, and computers don't understand nor read our language. It uses binary systems, so that means that all texts are stored in binary format.

There are tools that allow us to read those binary files and convert them to hexadecimal code. But we cannot read hexademical codes either, we need to convert those hex codes to our alphabet. Let's focus on our Parasite Eve project. You may remember the character set that we have extracted earlier:

Each one of these characters that you are seeing have assigned a unique hex code. How can we know which hex code belongs to each character? Well, in this case it's very easy, let's see an hex code table:

You get the idea, right? The position of each character in the matrix tells us which code it has assigned. In Parasite Eve, the equivalence is the following:

00=0
01=1
02=2
03=3
04=4
05=5
06=6
07=7
08=8
09=9
0A=+
0B=-
0C==
0D=*
0E=%
0F= 
10=A
11=B
12=C
13=D
14=E
15=F
16=G
17=H
18=I
19=J
1A=K
1B=L
1C=M
1D=N
1E=O
1F=P
20=Q
21=R
22=S
23=T
24=U
25=V
26=W
27=X
28=Y
29=Z
2A=&
2B=!
2C=?
2D="
2E='
2F=.
30=a
31=b
32=c
33=d
34=e
35=f
36=g
37=h
38=i
39=j
3A=k
3B=l
3C=m
3D=n
3E=o
3F=p
40=q
41=r
42=s
43=t
44=u
45=v
46=w
47=x
48=y
49=z
4A=:
4B=,
4C=/

By the way, 0F is a blank space in case you didn't notice. Additionally we added new Spanish characters:





So their equivalence will be the following:

4D=Á
4E=É
4F=Í
50=Ó
51=Ú
52=á
53=é
54=í
55=ó
56=ú
57=¿
58=¡
59=ñ
5A=Ñ
5B=ü
5C=Ü

So now that we understand hex codes, we can continue our translation project. In the next episode we will focus on how to change the width of these new characters, as their default widht is 12 pixels and that's too much.

No comments:

Post a Comment