What's new

Yay0 Compression

R-II

New member
I've been doing some work on the Paper Mario ROM, and I noticed a whole bunch of Yay0 blocks. I looked at the Yay0 documention that comes with the Dolwin source and tried writing my own function to decompress the data, but the example function left me a little confused and I don't know if I'm decompressing correctly. Nothing in the decompressed data jumps out at me, so I don't know if it's a bad algorithm on my part or just data formats I don't understand.

Does anyone have some examples of Yay0 blocks and their decompressed counter-parts so I can check my work? Or source code I can understand easier.

Thanks.
 

thakis

New member
I've written a yay0 decoder for luigi's mansion, you can get it with source at www.amnoid.de/gc/yay0dec.zip . It seems to work for luigi's mansion (.szp files) at least.

Yay0 is very similar to Yaz0...only check the decodeYay0() function, the decodeAll() function is a bit of an overkill because all files I've seen so far contain exactly one yay0 block.
 

ShizZy

Emulator Developer
@thakis, just out of curiousity. When trying to decode a file, and writing your decoder, how did you know that your decoder worked - when the end result was still unreadable data?
 

thakis

New member
It wasn't - Luigi's Mansion's .szp files are yay0 compressed RARC archives, and I already had a working derarc program.
 

Top