Jump to content
  • 0

Decompressing ROMs?


Rinku
 Share

Question

Hello there,

 

I would like to know if there's any tool to decompress any Zelda ROMs, especially Majora's Mask ROMs, especially the MM debug ROM?

 

I've read about a tool called zdec but I couldn't find any download links; I don't know how old it is and if it is the only decompressing tool.

 

Thank you very much for reading!

Link to comment
Share on other sites

15 answers to this question

Recommended Posts

  • 0

I byte-swapped it to big-endian with xdaniel's SceneNavi, but it didn't change the extension automatically (or rather it lets you choose the whole name and extension of the ROM),

so I got a byte-swapped ROM who had still a .n64 extension; so I changed the extension manually to .z64.

 

But it still says "abnormal ROM".

Link to comment
Share on other sites

  • 0

I .n64 is little-endian. You'll need to run it through a byte-swapper first.

Ah, that's right. Though, I didn't have to byteswap mine before using zdec (Didn't have a tool for that until a few days ago when I downloaded GZRT). I guess I just happened to download one that already was byte-swapped.

I have such a hard time finding clean ROMs these days, especially OoT Debug ROM, where I don't even own a perfectly clean one anymore. They always have the room fixes.

So by default .n64 SHOULD be little-endian, and .z64 byte-swapped? I didn't actually know that. I guess you learn something new every day.

Edited by CloudMax
Link to comment
Share on other sites

  • 0

So by default .n64 SHOULD be little-endian, and .z64 byte-swapped? I didn't actually know that. I guess you learn something new every day.

Except of course when Nintendo itself decides to use .n64 on big-endian ROMS :rolleyes:  (e.g. Zelda Collector's Edition) 

 

Also IIRC zdec doesn't work on the MM Debug ROM; SoD made a modified z64dump or something that was able to decompress it I believe.

Link to comment
Share on other sites

  • 0

File extensions are quite arbitrary, so they're not a reliable way to detect endianness, although I believe .z64 files should be big-endian, .v64 little-endian and .n64 middle-/mixed-endian. As far as I know:

  • First and ninth byte in ROM are 0x80 = big-endian = .z64
  • Second and tenth byte in ROM are 0x80 = middle-endian = .n64
  • Fourth and twelfth byte in ROM are 0x80 = little-endian = .v64

That's how SceneNavi detects which endianness a given ROM has.

 

Also: http://en.wikipedia.org/wiki/Endianness#Examples_of_storing_the_value_0A0B0C0Dh_in_memory

 

(just waiting for someone to point out I read the wikipedia article wrong or something, wouldn't bloody surprise me today...)

 

Link to comment
Share on other sites

  • 0

.rom, just like ex. .bin, is a super-generic file extension that could be anything, really. Easiest would probably be you open your .rom files in a hex editor and have a look at the bytes I mentioned in my last post, i.e. where the 0x80 bytes are near the start. That should tell you what endianness they have, and thus if they are (meaning, "would usually be named") .v64, .z64 or .n64.

 

.v64 files are ROMs intended for and/or dumped using a Doctor V64 backup unit; .z64 files in turn got their "name" from the Z64 backup unit.

Link to comment
Share on other sites

  • 0

Sorry for double post: Problem resolved!

 

I took an MM (E) ROM, searched for the last seemingly used bytes (following these bytes was a probably unused space with repeating bytes), searched for the same bytes in MM debug ROM and found them right before the padding space and the OoT Dump.

I cut the whole padding space and OoT Dump out of the ROM.

Now zdec works with it and decompressed Majora's Mask Debug ROM!

Link to comment
Share on other sites

 Share

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.