#46073 - Kyoufu Kawa - Sun Jun 19, 2005 3:39 pm
Having abused NDSTool a bit, I noticed that nearly every single file in Mario 64DS's filesystem is LZ77 compressed. Even sounds and dialogue text.
I've tried cheating with some GBA tools, tried to write my own, but I can't seem to get these files to unpack correctly >_<
Any ideas?
Very slightly off-topic: http://board.acmlm.org/thread.php?id=12971&pl=255238 <- the inspiration to ask this.
#46079 - wintermute - Sun Jun 19, 2005 5:31 pm
#46082 - Kyoufu Kawa - Sun Jun 19, 2005 6:06 pm
Nice. But all of these files have a small header of at least 4 bytes, those being "LZ77". I tried to expand them myself by skipping those four, but that didn't work...
#46086 - tepples - Sun Jun 19, 2005 7:48 pm
The 'lzgb' tool included with Tetanus On Drugs M3 should be able to pack the GBA's variant of LZSS properly, although it doesn't have a VRAM-safe mode yet.
_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.
#46090 - Kyoufu Kawa - Sun Jun 19, 2005 8:15 pm
But Tepp, I don't want to -pack- them. I want to -un-pack them.
#46093 - tepples - Sun Jun 19, 2005 9:05 pm
Kyoufu Kawa wrote: |
But Tepp, I don't want to -pack- them. I want to -un-pack them. |
For each file that is 64 KB or smaller, you can call LZ77UnCompWram() within a GBA emulator and then copy the result to cart SRAM (which should pop up as a .sav file).
_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.
#46101 - SmileyDude - Mon Jun 20, 2005 3:55 am
tepples wrote: |
Kyoufu Kawa wrote: | But Tepp, I don't want to -pack- them. I want to -un-pack them. |
For each file that is 64 KB or smaller, you can call LZ77UnCompWram() within a GBA emulator and then copy the result to cart SRAM (which should pop up as a .sav file). |
I haven't tested this myself, but you could also use the source to VBA's implementation of the LZ77UnCompWram() function in your own code, and uncompress it directly. If the LZ77UnCompWram() works in VBA, that is :)
_________________
dennis
#46104 - tepples - Mon Jun 20, 2005 5:41 am
The implementation of LZ77UnCompWram() in VBA's high-level-emulated BIOS works. What doesn't work is the 'offset' parameter to BitUnPack(); VBA treats it as always zero.
_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.
#46115 - Kyoufu Kawa - Mon Jun 20, 2005 12:58 pm
The code I used was a VB translation of Visualboy's unpacker. I think I was just off by... a couple bytes. Not knowing the header size sucks.
#46144 - Kyoufu Kawa - Mon Jun 20, 2005 8:17 pm
Well, I tried that tool you linked to, thank whatever deity you believe in that I just acquired a copy of VC7 to compile it with ^_^
And hey, it works!
[Images not permitted - Click here to view it]