The current URL is datacrystal.tcrf.net.
Phantasy Star II/Notes
The notes are for the american version. Offsets are different in the japanese version (checked).
Graphics Storage
Basic Compression
The game uses one basic compression scheme, for storing some of the arts, as well as other data (such maps). Here's its description :
First, the data is split in 32 bytes chunks. Then, for each chunk:
* N (byte) : it's a counter. If $FF, the compression is over. * repeat N times: * V (byte) : the value that will be decoded * M (long) : a mask indicating the locations in the current 32 byte chunk where to put this value * At the end of the loop, some locations in the chunks may not have got a value. If so, they are given in raster order after at this point. * Go to first stage.
An example from the game : the font is located at 0x29EB8
01 : N = 1 we repeat 1 time : BB : the value FF88B888 : the mask (=0b11111111100010001011100010001000). The current chunk is :
BBBBBBBB BBBBBBBB BB?????? BB?????? BB??BBBB BB?????? BB?????? BB??????
Since the loop is over, all subsequent bytes are values for each ?? in the preceding (there are 16 of them) :
11 11 11 16 66 66 16 16 BA AA 16 BA AA 16 BA AB : we get for the 1st chunk :
BBBBBBBB BBBBBBBB BB111111 BB166666 BB16BBBB BB16BAAA BB16BAAA BB16BAAB
02 : N = 2, so BB, EE008000 : that gives
BBBBBB?? BBBBBB?? ???????? ???????? BB?????? ???????? ???????? ????????
55, 00102277 : now we have
BBBBBB?? BBBBBB?? ??????55 ???????? BB??55?? ????55?? ??555555 ??555555
16 values are left unknown : B1 15 11 11 B1 66 6B 16 15 B1 61 AB 15 56 B1 15 : so the final value is :
BBBBBBB1 BBBBBB15 1111B155 666B1615 BBB15561 AB155556 B1555555 15555555
Some example of such graphisms (to be completed) :
29EB8 : Font 2AC66 : SEGA logo 6FF22 : intro art (2)
Nemesis compressed graphisms
Some art uses the well-known Nemesis compression scheme. You can use The Sega Compressor to decompress / recompress them.
Some example of such graphisms : see maps storage.