![]() (2bytes * 256 pointers to each horizontal tile line * 5 worlds) Each offset points to a compressed horizontal row of world map tiles. The function addressed at C0/69A1 performs a custom decompression oriented to load the World Map tilemap data.įirst of all, it reads the offset of the tileset which is stored at CF/E000. The first byte pointed by $D0 is not a header in this case.ĭecompression Type Custom Wold Map (Custom + LZS) Subroutine C0/69A1 The function addressed at C3/0053 performs a Decompression Type 02 (LZSS). Increment offset (if offset > #$07FF then offset = #$0000)Īfter consuming the 8 bits from the bitmap byte, a new bitmap byte is read from $D0. Read a byte from the circular buffer with the given offset I'm going to call that byte "bitmap byte".Įvery time a bitmap byte is read, it marks the next eight lectures.īeginning with the lesser bit of the bitmap byte and ending with the higher: The data is stored as packages with one byte heading every package. This algorithm counts with a temporal circular buffer stored in 7F/F7FF, with a size of #$0800 bytes, initially filled with zeroes and with an initial offset of #$07DE. The decompression ends when that number of bytes has been written. The first two bytes after the header are a 16 bit value which represents the number of bytes to write in $D3. Read n bytes from $D0 and write them in $D3 Read next byte from $D0 and store it as byteToRepeat. While the decompressing is happening, the "action byte" is taken from $D0 and choose the next action to perform: I'm going to call that byte "action byte". The data is stored here as packages with one byte heading every package. The first two bytes after the header are a 16 bit value which represents the number of bytes to read forward from $D0.Įvery byte which is read from $D0 is stored in $D3. If the first byte is a number over 2, the function just returns. I am going to call them Type 00, Type 01 and Type 02. The first byte pointed by $D0 is read and to choose the decompression algorithm. ![]() The pointer to the source to decompress for is stored in $D0 and the pointer to the destination of the decompressed data is stored in $D3. The function stored in 7F/C00D is a decompressor which waits for headed data. One of them read the first byte to check the type of decompression to apply and the other one presuppose decompression "type 02".Īt the beginning of the game, some code is written to bank 7F. The game includes some functions to decompress that data. 1.6 Decompression Type Custom Wold Map (Custom + LZS) Subroutine C0/69A1įFV have some ROM areas of texts, graphics, data and even code which are compressed.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |