Welcome
Welcome to the home of the Ocarina of Time Beta Restoration Project

How To Port Maps

How To Port Maps

Postby DeathBasket on Sat Feb 07, 2009 10:14 pm

Ok, so everyone thinks porting maps is hard?
Well, it isn't. :lol:

So first, you will need:
Zelda Resource Extractor
Utility of Time
A hex editor
Any MM ROM
OoT Debug ROM
Hex Calculator*
These lists:
http://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:
http://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. :lol:
Image

Never-ending, This Poem.
User avatar
DeathBasket
Member
 
Posts: 20
Joined: Wed Jan 21, 2009 4:13 pm
Location: England!

Re: How To Port Maps

Postby Oni Kage on Sun Feb 08, 2009 4:04 am

thanks death! a couple of questions:

with this can i port mario 64 maps? it sounds dunb but its a serious question.

also would using the MM demo rom be better? since sme classifiy it has MM debug rom...

is there a similar way to "port" characters what i mean is, (in majoras mask or oot really, perferably majoras mask) make skull kid replace link so you play a skull kid? even if i cant replace the voice its ok, i just wanted to play as skull kid because hes awesome/1337 :mrgreen:
"...Every hero has their story... and yours is about to end..!"

~Oni Vaati
_▲
▲ ▲ The Legend Of Zelda©: Rise of the Deity

FC's are:
Wii Number 0777 9626 0651 5050
Brawl 2878 9273 3046
ACCF 3094 0789 8323
Mario Kart Wii 4812 1111 7835
User avatar
Oni Kage
#1 Site Poster
 
Posts: 133
Joined: Tue Dec 09, 2008 1:25 am
Location: Hell, Oni's Estate

Re: How To Port Maps

Postby to coool on Sun Feb 08, 2009 1:52 pm

You can port characters. But you can't play as Skull Kid because he is not a playable character. Well you can, but it requires a large amount of hex knowledge. If only can change the source to C# (the language they used to make the games.).
User avatar
to coool
Member
 
Posts: 21
Joined: Wed Jan 28, 2009 3:01 am

Re: How To Port Maps

Postby DeathBasket on Sun Feb 08, 2009 8:37 pm

Oni Kage wrote:thanks death! a couple of questions:

with this can i port mario 64 maps? it sounds dunb but its a serious question.

also would using the MM demo rom be better? since sme classifiy it has MM debug rom...

is there a similar way to "port" characters what i mean is, (in majoras mask or oot really, perferably majoras mask) make skull kid replace link so you play a skull kid? even if i cant replace the voice its ok, i just wanted to play as skull kid because hes awesome/1337 :mrgreen:


1. No, not unless they are of the same format as OoT maps, which they are not.

2. The Demo ROM is all it says it is, a Demo. There is no MM Debug ROM, however the Japanese version of the game does contain a debug room not seen in the other versions.

3. I have not tried to port characters before. It is possible though.
Image

Never-ending, This Poem.
User avatar
DeathBasket
Member
 
Posts: 20
Joined: Wed Jan 21, 2009 4:13 pm
Location: England!

Re: How To Port Maps

Postby Oni Kage on Sun Feb 15, 2009 10:37 pm

hey death is porting ocarina of times maps to majora the same as porting majora maps to ocarina? I want to make a mod based on my comic book where link ventures from hyrule to termina too early, as in he never transformed into adult link... so ganon isnt dead..
"...Every hero has their story... and yours is about to end..!"

~Oni Vaati
_▲
▲ ▲ The Legend Of Zelda©: Rise of the Deity

FC's are:
Wii Number 0777 9626 0651 5050
Brawl 2878 9273 3046
ACCF 3094 0789 8323
Mario Kart Wii 4812 1111 7835
User avatar
Oni Kage
#1 Site Poster
 
Posts: 133
Joined: Tue Dec 09, 2008 1:25 am
Location: Hell, Oni's Estate

Re: How To Port Maps

Postby ChampionMan on Sat Mar 07, 2009 4:08 am

Deathbasket, first off, fantastic tutorial. I've seen this same tutorial all over the internet, can you please give proper credit it for it? Or, if you're unable to find the original writer, put a small note saying explaining you give credit to the unnamed author. =)
We all appreciate the proper credit being given on these forums, as you'll see in our Codes forum, and I wanted to make sure the same happened here.
Sorry if this was perceived as mean or anything, I certainly don't mean to be.
Image
Taking something everybody cares about, and turning it into something everybody is curious about
ChampionMan
Site Addict
 
Posts: 100
Joined: Mon Aug 18, 2008 1:44 am

Re: How To Port Maps

Postby spinout on Sat Mar 07, 2009 11:06 pm

He is the author.
spinout
Site lover
 
Posts: 53
Joined: Sat Sep 20, 2008 5:31 am

Re: How To Port Maps

Postby ChampionMan on Sun Mar 08, 2009 12:14 am

I'm pretty sure I've seen this same one all over the internet. Or maybe I'm just confused. Deathbasket, if you ARE the original author then sorry for the mixup. I could have sworn I used this on other sites. If, however you copied it from elsewhere, proper credit is appreciated as always =)
Image
Taking something everybody cares about, and turning it into something everybody is curious about
ChampionMan
Site Addict
 
Posts: 100
Joined: Mon Aug 18, 2008 1:44 am

Re: How To Port Maps

Postby spinout on Tue Mar 10, 2009 11:39 pm

He has posted it on other sites.
spinout
Site lover
 
Posts: 53
Joined: Sat Sep 20, 2008 5:31 am


Return to Tutorials

Who is online

Users browsing this forum: No registered users and 1 guest

cron