Welcome Guest [Log In] [Register]

Announcements

Welcome to Zelda64.net. Announcements can be found below!
As of 3.1.2017, this site seems pretty dead. Or on the brink of dying. So I've decided to try to help it out. Z64 is having its theme reworked to be more modern and professional. I'll try my best to get back into the Zelda modding scene. Hopefully we can get this place back up without the cobwebs (and without looking like a web page from the 1990s). Enjoy the current Zelda64 Dark theme over the next few days while I finish sorting out the rest of it and the Light theme. Thanks for sticking with us. Sylux102 out.
Welcome to Zelda64. We hope you enjoy your visit.


You're currently viewing our forum as a guest. This means you are limited to certain areas of the board and there are some features you can't use. If you join our community, you'll be able to access member-only sections, and use many member-only features such as customizing your profile, sending personal messages, and voting in polls. Registration is simple, fast, and completely free. A valid email address is required. Your email address will NOT be sold as it is only needed to prevent spammers (and admittedly, some still get around this, but this makes it a bit more difficult, plus, if the moderators need to contact you, we have an email on file to do so). Thanks for considering us!


Join our community!


If you're already a member please log in to your account to access all of our features:

Username:   Password:
Add Reply
Decompress, Compress, and Create Patches; Create patches like a pro, without making them huge
Topic Started: Feb 1 2017, 10:56 PM (1,000 Views)
aroenai
Member Avatar
Sentient Hunk of Green Cheese
How to decompress & recompress the Zelda roms for console compatibility (with small patch files):

Ndec - tool to decompress the rom by Wareya (CMD program)
download mirror (cached copy of the topic - Wareya's full file archive)

Code:
 
ndec decompresses Zelda 64 ROMS.
Usage: ndec.exe inrom outrom [-clean]

-clean will wipe the space between files and is required for console compatibility.


Aegh - tool to recompress the Zelda roms by Zoinkity (native compression; GUI program)
download - Source thread

-Open the original Zelda rom you're using and use the "Extract Table" option
-Decompress your rom with Ndec above (make sure to use "-clean" too!), and apply any mods you need (the Decompress option in Aegh decompresses the rom without any 00's between files, which can lead to some confusion with offsets)
-Recompress the rom by loading the modified rom in Aegh and open the Exception Table you extracted earlier, then click Compress

The Exception table for the Debug rom can be made by extracting the table from the OoT MQ PAL rom and removing the 15xx entries at the end.

ie.
Code:
 
[0, 1, 2, 3, 4, 5, 6, 7, 8, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 942, 944, 946, 948, 950, 952, 954, 956, 958, 960, 962, 964, 966, 968, 970, 972, 974, 976, 978, 980, 982, 984, 986, 988, 990, 992, 994, 996, 998, 1000, 1002, 1004]


Floating IPS - Tool to create your rom patches, creates patches in BPS format which is much, much smaller and easier to apply. (GUI program)
download - Source thread

Click on "Create Patch", select the unmodified rom, then select your modified rom compressed with Aegh (assuming you're patching a commercial rom or want the Debug rom compressed to 32 MB)

Using this method you can decompress one of the commercial roms to 64 mb, then recompress it back to 32mb and have the CRC match the original file. For console compatibility, you should also make sure your rom's CRC is correct using a tool such as rn64crc.exe (required for MM, since the header crc's always seem to come out wrong)
Offline Profile Quote Post Goto Top
 
mzxrules

One thing that may come up with some people's hacks is that for some reason the Debug Rom is able to bypass dmadata and read directly from rom. As such, some hacks like Zelda's Birthday can't be compressed this way without modification first.

Another thing that needs consideration that I don't know if this program considers is that the compressed file must ultimately be smaller than when uncompressed. This is because the compressed file is first loaded into ram before being decompressed. If the compressed file ends up being larger, it will overwrite data beyond the bounds allocated for it, which has the potential to cause some ill effects
Offline Profile Quote Post Goto Top
 
aroenai
Member Avatar
Sentient Hunk of Green Cheese
Zoinkity's tool handles rearranging all the virtual addresses for the dma table, you don't have to worry about the files being larger than the original (unless it hypothetically compresses larger than the uncompressed file for some reason)

The console output tells you file sizes, you can edit the exception table and add the file number for files that compress poorly. Unfortunately, it won't do that piece on its own.
Edited by aroenai, Feb 2 2017, 12:04 AM.
Offline Profile Quote Post Goto Top
 
Flash

http://cheats.emulation64.com/converting.htm
Offline Profile Quote Post Goto Top
 
aroenai
Member Avatar
Sentient Hunk of Green Cheese
Posting random links that have nothing to do with the topic?
Offline Profile Quote Post Goto Top
 
1 user reading this topic (1 Guest and 0 Anonymous)
ZetaBoards - Free Forum Hosting
Fully Featured & Customizable Free Forums
Learn More · Register for Free
« Previous Topic · Beginner Tutorials · Next Topic »
Add Reply