|
Commented decompression routine
|
09 Oct 2005
|
Heavily commented assembly code for routine 02/FEBB, which decompresses bytes from an input block to an output block. It can handle several nifty types of compression.
One thing it transfers is the indexes for the damages monsters take from Link's various attack classes: the block at ROM address 03/E800 is decompressed to RAM address 7F/4000. (Which in turn is further decompressed to 7F/6000 by some other routine; see Section 8 of my "Monster/Attack Stats Guide" for specifics on how the data is treated, and Sections 5 and 8 for what attack classes are.)
NOTE: I see this has been done before for graphics. The function is identical, except 02/FEBB has a couple added instructions at the beginning, and it uses an inverted pointer for decompression method 1JKb (so one less XBA). Doesn't duplicating a 173-byte function defeat the purpose of compression, Nintendo?
|