Post by Deleted on Feb 7, 2009 16:18:52 GMT -5
Ok, so everyone thinks porting maps is hard?
Well, it isn't.
So first, you will need:
Zelda Resource Extractor
Utility of Time
A hex editor
Any MM ROM
OoT Debug ROM
Hex Calculator*
These lists:
www.64.vg/wiki/index.php?title=Zelda_64_Scene_Listings
*Start - Accesories - Calculator, then View - Scientific, then click hex.
So, the first step is easy, you just need to extract your MM ROM using Zelda Resource Extractor.
Now, go to the scene listings and make sure you choose the list that is for the MM ROM version you are using.
Find a map you wish to port from the list, then go to where you extracted the files, and find the scene and all of the maps that go with it.
You may want to move these to a new folder, so you do not lose them amongst the rest of the resources.
Now, let's edit the scene file first.
Open the scene in a hex editor, and look for:
0E xx yy yy bb aa aa aa
We are interested in aa aa aa.
This is the offset for all the scene actors in that scene.
So, for example, if it looks like:
0E 01 00 00 02 00 00 B0
Then the offset for the scene actors will be at 0xB0.
Now, go to this offset, the data there is like this:
xx xx aa aa aa aa aa aa aa aa aa aa aa aa yy yy
Where:
x = Actor number
a = Position/rotation data
y = variable
All you have to do is change
xx xx to 00 09
and
yy yy to 00 00
With that done, you will now have doors in your ported map.
Now, go to the bottom of your scene file and write down how long it is in bytes. You will need this to know where to place your map file(s) in the ROM. Note: add 1 to the actual length of the file, so if it is D3CF, you would write down D3D0.
Now it's time to make a few small changes to the map file before we go on to edit further with UoT.
Open your map file in a hex editor, and look for
10 00 00 00 xx xx yy 00
Where:
xx = Time map is loaded to, should probably be FF FF
yy = Time flow speed, MM has 03, 00 or FF is none, and 0A is OoT's value.
You don't have to do this, but in OoT a lot of maps have no time flow, and the ones that do have a much faster time flow than MM.
Now look for:
0B xx 00 00 bb yy yy yy
For the purposes of this tutorial we're only interested in xx for now.
xx = Number of objects loaded in the map.
All you have to do is make it a number that you feel is enough for what you will need, or if you are not going to have any actors in your ported map, just set it to 00. Note: don't make the number higher than it was originally unless you know what you are doing.
Now look for:
01 xx 00 00 bb yy yy yy
Again we are only interested in xx.
xx = number of actors loaded in the map.
Set it to a number smaller than it is or just set it to 00 for no actors.
Now go to the end of your map file and write down its size, the same way you did for the scene file.
Example: AF80 (AF7F + 1)
So, now we've edited the files enough to be able to do the rest with UoT, unless of course you prefer using a hex editor to edit the rest.
Open your scene and map with UoT, and set the actors and objects to whatever you want them to be, but make sure they are all valid OoT actors and objects. Now go to the level options tab and change the music modifier to a value you want it to be. Finally go to the collision tab and change the exit values to OoT ones. This isn't necessary but avoids a crash when exiting the area.
Now click save, and when it asks for the offset to save Zmap to, here's what we do.
Choose an offset to save your scene to, somewhere near the end of the ROM where there is empty space, for example 0x03603000.
Now, get out your calculator and add to that the file size of your scene file that you wrote down earlier. Just to separate the files a bit, add 30 to the result you get. So in the example I had earlier,
(hex)
3603000 + D3D0 + 30 = 3610400
Now, you tell the value you got to UoT as the offset you want to save the Zmap to.
Now it asks for the offset to save the Zscene, which is the offset you chose earlier (in my case 3603000).
Almost done now, open yur ROM in a hex editor and go to the offset in the ROM where you saved your scene file, and look for
04 xx 00 00 bb yy yy yy
yy yy yy = Offset of map pointers, from the start of the scene file.
Add this value to the offset of the scene file, and go to that offset, so if
yy yy yy = 00 00 C0
and the scene file is at 3603000, the pointers are at 36030C0.
They will look like xx xx xx xx yy yy yy yy,
xx xx xx xx = starting offset of map
yy yy yy yy = ending offset of map
Now write in the starting offset of the map, that you calculated earlier. Now add to this the size of the map file, and you get its ending offset.
For example:
03 61 04 00 03 61 B3 80
With that done, there's just one more step until you will see your map in the game.
Go to:
www.64.vg/wiki/index.php?title=Zelda_64_Scene_Listings:_Debug_ROM
And find a level you want to replace.
Now search in the ROM for the start offset of the scene for the level, example:
01 FC 20 00
And go to the third result, and replace it with the start offset of your scene file, example:
03 60 30 00
Now save, and load the ROM in an emulator. Go to the area you replaced and you should end up in the map you just ported. If it didn't work, the most likely things are that you got the pointers wrong somewhere, or that you left in an actor or object that caused the game to crash.
Well, good luck, and after you have done this once, you will realise that it is really much easier than it looks.
Have fun. ;D
Well, it isn't.
So first, you will need:
Zelda Resource Extractor
Utility of Time
A hex editor
Any MM ROM
OoT Debug ROM
Hex Calculator*
These lists:
www.64.vg/wiki/index.php?title=Zelda_64_Scene_Listings
*Start - Accesories - Calculator, then View - Scientific, then click hex.
So, the first step is easy, you just need to extract your MM ROM using Zelda Resource Extractor.
Now, go to the scene listings and make sure you choose the list that is for the MM ROM version you are using.
Find a map you wish to port from the list, then go to where you extracted the files, and find the scene and all of the maps that go with it.
You may want to move these to a new folder, so you do not lose them amongst the rest of the resources.
Now, let's edit the scene file first.
Open the scene in a hex editor, and look for:
0E xx yy yy bb aa aa aa
We are interested in aa aa aa.
This is the offset for all the scene actors in that scene.
So, for example, if it looks like:
0E 01 00 00 02 00 00 B0
Then the offset for the scene actors will be at 0xB0.
Now, go to this offset, the data there is like this:
xx xx aa aa aa aa aa aa aa aa aa aa aa aa yy yy
Where:
x = Actor number
a = Position/rotation data
y = variable
All you have to do is change
xx xx to 00 09
and
yy yy to 00 00
With that done, you will now have doors in your ported map.
Now, go to the bottom of your scene file and write down how long it is in bytes. You will need this to know where to place your map file(s) in the ROM. Note: add 1 to the actual length of the file, so if it is D3CF, you would write down D3D0.
Now it's time to make a few small changes to the map file before we go on to edit further with UoT.
Open your map file in a hex editor, and look for
10 00 00 00 xx xx yy 00
Where:
xx = Time map is loaded to, should probably be FF FF
yy = Time flow speed, MM has 03, 00 or FF is none, and 0A is OoT's value.
You don't have to do this, but in OoT a lot of maps have no time flow, and the ones that do have a much faster time flow than MM.
Now look for:
0B xx 00 00 bb yy yy yy
For the purposes of this tutorial we're only interested in xx for now.
xx = Number of objects loaded in the map.
All you have to do is make it a number that you feel is enough for what you will need, or if you are not going to have any actors in your ported map, just set it to 00. Note: don't make the number higher than it was originally unless you know what you are doing.
Now look for:
01 xx 00 00 bb yy yy yy
Again we are only interested in xx.
xx = number of actors loaded in the map.
Set it to a number smaller than it is or just set it to 00 for no actors.
Now go to the end of your map file and write down its size, the same way you did for the scene file.
Example: AF80 (AF7F + 1)
So, now we've edited the files enough to be able to do the rest with UoT, unless of course you prefer using a hex editor to edit the rest.
Open your scene and map with UoT, and set the actors and objects to whatever you want them to be, but make sure they are all valid OoT actors and objects. Now go to the level options tab and change the music modifier to a value you want it to be. Finally go to the collision tab and change the exit values to OoT ones. This isn't necessary but avoids a crash when exiting the area.
Now click save, and when it asks for the offset to save Zmap to, here's what we do.
Choose an offset to save your scene to, somewhere near the end of the ROM where there is empty space, for example 0x03603000.
Now, get out your calculator and add to that the file size of your scene file that you wrote down earlier. Just to separate the files a bit, add 30 to the result you get. So in the example I had earlier,
(hex)
3603000 + D3D0 + 30 = 3610400
Now, you tell the value you got to UoT as the offset you want to save the Zmap to.
Now it asks for the offset to save the Zscene, which is the offset you chose earlier (in my case 3603000).
Almost done now, open yur ROM in a hex editor and go to the offset in the ROM where you saved your scene file, and look for
04 xx 00 00 bb yy yy yy
yy yy yy = Offset of map pointers, from the start of the scene file.
Add this value to the offset of the scene file, and go to that offset, so if
yy yy yy = 00 00 C0
and the scene file is at 3603000, the pointers are at 36030C0.
They will look like xx xx xx xx yy yy yy yy,
xx xx xx xx = starting offset of map
yy yy yy yy = ending offset of map
Now write in the starting offset of the map, that you calculated earlier. Now add to this the size of the map file, and you get its ending offset.
For example:
03 61 04 00 03 61 B3 80
With that done, there's just one more step until you will see your map in the game.
Go to:
www.64.vg/wiki/index.php?title=Zelda_64_Scene_Listings:_Debug_ROM
And find a level you want to replace.
Now search in the ROM for the start offset of the scene for the level, example:
01 FC 20 00
And go to the third result, and replace it with the start offset of your scene file, example:
03 60 30 00
Now save, and load the ROM in an emulator. Go to the area you replaced and you should end up in the map you just ported. If it didn't work, the most likely things are that you got the pointers wrong somewhere, or that you left in an actor or object that caused the game to crash.
Well, good luck, and after you have done this once, you will realise that it is really much easier than it looks.
Have fun. ;D