Edit the DMADATA for compressed ROM compability - Printable Version
+- Hylian Modding (https://hylianmodding.com)
+-- Forum: N64 Zelda Modding (https://hylianmodding.com/Forum-N64-Zelda-Modding)
+--- Forum: Modding Discussion (https://hylianmodding.com/Forum-Modding-Discussion)
+---- Forum: Tutorials (https://hylianmodding.com/Forum-Tutorials)
+---- Thread: Edit the DMADATA for compressed ROM compability (/Thread-Edit-the-DMADATA-for-compressed-ROM-compability)
Edit the DMADATA for compressed ROM compability - Ostrealava02 - 06-14-2018
"The dmadata file consists of a table of records for every file in the game (including itself)."
The dmadata need to be updated for compressed ROM to be working correctly.
It contains every files of the game. (Scenes, Rooms, Objects, Actors etc..)
That means every single file you edited need to be updated in the dmadata ONLY if the size of the file is not the same as the original one.
Injecting a custom map (let's say 1 scene and 2 rooms) over Goron City.
Goron City Scene size: A450
Goron City Room0 size: 127D0
Goron City Room1 size: 4200
New map Scene size: C850
New map Room0 size: 87A0
New map Room1 size: B990
As you can see, sizes are not matching between Goron City and the new map and you need to update the dmadata.
You can see size's file by saving binary and opening them in a hex editor.
How do I find my file in the dmadata?
The following table tells where the dmadata starts for each version of OoT
Each entry in the dmadata follow this form: XX XX XX XX YY YY YY YY XX XX XX XX 00 00 00 00
X: Start Offset of the file.
Y: End Offset of the file.
Finding the file in the data is pretty simple, for the next example I'll be using a hex editor (XVI32) and the Debug ROM.
Open your ROM.
Use the "Find" tool and search for the Start offset and the End offset of the file you want to edit.
Goron City Scene start offset: 02A8F000
Goron City Scene end offset: 02A99450
That means you have to find the following hex string: 02 A8 F0 00 02 A9 94 50 02 A8 F0 00 00 00 00 00
Here it is.
Now edit the new Start offset and the new End offset.
Since I injected a new map at the same Start offset, I just need to edit the new End offset.
This was only the Goron City scene, repeat for each files you have modified (such as rooms).
File List Debug: https://wiki.cloudmodding.com/oot/File_List/Debug
File List 1.0: https://wiki.cloudmodding.com/oot/File_List/NTSC_1.0
dmadata table picture and quote from wiki.cloudmodding.com/
Thanks to Nokaubure.
RE: Edit the DMADATA for compressed ROM compability - Psi-Hate - 06-17-2018
Thanks for writing this out for us, I've always needed something like this since I didn't exactly understand the structure of DMADATA too well.