Doogie1012
Member
Level: 15
   
Posts: 4/35
EXP: 14556 For next: 1828
Since: 10-21-08
Since last post: 11.6 years Last activity: 9.2 years
|
| Posted on 10-24-08 01:49:30 PM (last edited by Doogie1012 at 10-26-08 08:09 AM) |
Link
| |
Seems to be a need for a generalized 'Level editing' topic, I'll use this one then. Sorry for the hijack.
Various people: Ask your level structure questions here. -Metal Man
Well I have a few Q's about how levels operate.
Basically, I tried to copy the entire level code from Bom-omb Battlefield and override Whomps Fortress.
Of course, I didn't expect this to work as it was a MAJOR long shot in getting levels not the same size to execute.
Bom-Omb Battlefield Level Size - 1360 bytes
Whomp's Fortress Level Size - 3264 bytes
Since there are a few people here who actually know how SM64 is structured and have N64 asm knowledge, I was wondering if there are any key values to possibly help make level copying a reality or explain to me why it isn't possible.
Thanks for your time. |
messiaen
Catgirl
Level: 68
   
Posts: 351/1085
EXP: 2596323 For next: 132477
Since: 11-20-07
Since last post: 8.1 years Last activity: 7.2 years
|
| Posted on 10-24-08 02:44:23 PM |
Link
| |
Take a look at the beggining of the Mario64_HackingDoc1.5.txt file:
First is a list of offsets found starting at 2AC094 in the Super Mario 64 ROM.
They points to the level layout data for each courses found in the game.
Entry points are where the level layout script starts to be decoded in the segment. (0E)
[Start ] [ End ] [Entry ]
003828C0 00383950 0E000418 -- Haunted House
[...]
00405A60 00405FB0 0E000264 -- Bob-Omb's Battlefield
These offsets are part of a "conditional jump" section of the SM64MainLevelScripts.txt, the 'hub' from which levels are launched. Here is the full command that loads (and launch) Bob-omb's level:
2AC0F8/0458: 00 10 00 0E 00 40 5A 60 00 40 5F B0 0E 00 02 64 --Bob Omb's Battlefield
This is the format of this command (adapted from Cellar Dweller's notes):
00 10 [nn nn] [ss ss ss ss] [ee ee ee ee] [aa aa aa aa]
[0] Command number (0)
[1] Length (16 bytes [10 in hex])
[2 -3] Segment ('bank') number to load to
[4 -7] ROM start address
[8 -11] ROM end address
[12-15] Segmented address to call (entry-point) <-- IMPORTANT!
What went wrong when you overrided Whomp's Fortress with Bob-omb is that you haven't corrected the entry-point, that is, the place where the scripts begins to be processed. Correct it and it shall work.
Now, a cleaner way to get a second Bob-omb level in the game would be to copy the script somewhere else in the ROM (hint: always use addresses like 0x1300000 or something like that so that all relative offsets won't require any math) and then changing the 0x00 command above so that the game loads it. For instance:
00 10 [00 0E] [01 30 00 00] [01 30 00 30] [0E 00 02 64] --Bob Omb's Battlefield
Since I only copied the level and didn't changed nothing in the level script, the entry-point stays the same (and I wouldn't recommend messing with this).
PS: There is a serious error in the last 0x00 command. See if you can spot it and you are on the right way .
____________________ Mario 64 notes @ http://sites.google.com/site/messiaen64/ |
Doogie1012
Member
Level: 15
   
Posts: 5/35
EXP: 14556 For next: 1828
Since: 10-21-08
Since last post: 11.6 years Last activity: 9.2 years
|
| Posted on 10-26-08 11:05:08 AM |
Link
| |
Alright, after reading it over for a while, I finally grasp what your saying
So would copying the Bom-Omb Battlefield level to 014A0000 work, since all the data after that is just bytes with the value of 1. (and there is MORE then enough space )
Of course I would have to change where the Whomp's Fortress HUB code points to correct? So the code would be:
00 10 00 0E 014A0000 014A0550 0E000264
Which is located at 2AC224/2802212 address. |
messiaen
Catgirl
Level: 68
   
Posts: 357/1085
EXP: 2596323 For next: 132477
Since: 11-20-07
Since last post: 8.1 years Last activity: 7.2 years
|
| Posted on 10-26-08 01:15:21 PM |
Link
| |
You got it . You can use any space after about 0x11B0000 (this is not precise) or wherever the big block of 01's start.
You can try this as an exercise: use the FlatWorldBattleFieldHexData.txt and insert it manually in the extended ROM but in a different address than the one used by VL-Tone. There is uncommented version of that text file in one of TT64 folders, it will be easier to paste it into your hex editor from that file.
Besides copying the 'script' bank (0x0E) and changing the command that loads it, you'll also have to copy another block of data (bank 0x07), which is loaded from inside the level script by the 0x17 command. Understand this process and you'll have a good grasp of how levels work.
This diagram is a good description of the process. Start from "Main Menu" and go down from there.
____________________ Mario 64 notes @ http://sites.google.com/site/messiaen64/ |
Doogie1012
Member
Level: 15
   
Posts: 8/35
EXP: 14556 For next: 1828
Since: 10-21-08
Since last post: 11.6 years Last activity: 9.2 years
|
| Posted on 11-04-08 10:11:55 AM |
Link
| |
NOTE: You may need to refer to VL-Tone's hacking documents to see what commands I talk about and possibly the rom bank document.
Alright, so basically I've been looking through my hex editor refering to the VL-Tone documents about how the geometry/polygons are loaded and etc. Im trying to find the RSP commands for specific levels so I can attempt to make my own level editor (I realize I dont need to, I have Toads Tool, but Im doing this just to understand how the game works a bit better).
Anyway I started with Bom-Omb's Battlefield and I searched for the command that loads polygon commands. I noted the various addresses that I had found and after swapping values around and running Mario 64 I determined these load the polygons of the level (obviously since thats what the hacking document says).
Found at 00405F48 / 4218696
---------------------------
15 01 00 00 07 004390 (offset: 17296, goto: 1459824 )
009D80
00A470
00A920
00DD18
00E338
For a while I messed around with trying to find what the address is of what this is pointing to. Then I found the ROM Banks document so 07 on the ROM Banks document was :
007 = 01442528 - 01443440 << Geo/Scr
Knowing this, I jumped to that address to find it executes commands '0D' and '02'.
0D 80 29 80
23 80 0F 80
02 C1 7F 15
7E 0F 7C C3
Now what '0D' does is currently unknown/undocumented. But '02' jumps to an address in the segment. Knowing this I converted 7E to 126 (Hooray MS Calculator) and looked up the ROM Bank document again.
126 = 17979563 - 18014833 << Poly/Tex
So now I convert 0F 7C C3 to 1014979.
So I assumed that by adding 17979563 + 1014979 together the address and offset I would come across more commands if I jumped to that address.
But I did not, just a heap of bytes of 01.
So where did I go wrong? |
VL-Tone
Member Super Mario 64 forum moderator
Level: 53
   
Posts: 342/621
EXP: 1136482 For next: 20637
Since: 07-27-07
From: Montreal, Canada
Since last post: 4.7 years Last activity: 6 days
|
| Posted on 11-04-08 11:38:18 AM (last edited by VL-Tone at 11-04-08 08:40 AM) |
Link
| |
| Time: Now - Date: Today - Weather: What can be seen outside. - Mood: How it feels. Answer to the universe: 42 | Originally posted by Doogie1012
For a while I messed around with trying to find what the address is of what this is pointing to. Then I found the ROM Banks document so 07 on the ROM Banks document was :
007 = 01442528 - 01443440 << Geo/Scr
This is where you went wrong, this is not the right address, and it's not the right place to look for it.
The Bank numbers used in the document you're referring to are only used internally by TT64 to uniquely identify banks. The only place where this could ever be useful to you is if you looked inside the label.txt files, which use those. (The numbers are also used in the GeoLayoutPrts docs and labeled as "ROMBank:", but the real game bank numbers are also used in there.)
Real bank numbers used by the game never go higher than 0x0F anyway. And banks don't always contain the same data depending on the level. Bank 0x07 in particular contains level specific data. To find where this particular 0x15 command is pointing to, you have to know in which level it's used. Then, in the level script for that level, find the 0x17 command that loads data into the 0x07 RAM bank. This is where you'll find the base pointer for bank 0x07 in that particular case.
____________________
|   | |
|
Doogie1012
Member
Level: 15
   
Posts: 9/35
EXP: 14556 For next: 1828
Since: 10-21-08
Since last post: 11.6 years Last activity: 9.2 years
|
| Posted on 11-04-08 12:52:58 PM (last edited by Doogie1012 at 11-04-08 09:53 AM) |
Link
| |
Ah Thank you. I assumed that the commands jumped to RAM addresses but when I tried out adding the two together it came across to fairly valid commands so I disregarded my assumption.
I'll have a look in the Bom-Omb Battlefield level script then. Thanks. |
ChumChum770
Random nobody
Level: 8
   
Posts: 9/9
EXP: 1776 For next: 411
Since: 06-23-10
Since last post: 11.8 years Last activity: 11.4 years
|
| Posted on 07-03-10 02:52:53 PM |
Link
| |
| now i have one more question, this one is less complex. On Toadstool when editing a custom level, how do I add power stars from the original level? |
Zero One
5170       And as we fall the spirit carries on, That a hero'll come and save us all, As we call the ones we left below, We all dream of the day we rise above
Level: 129
   

Posts: 656/5173
EXP: 24571586 For next: 478068
Since: 05-24-10
From: Delta Quadrant
Since last post: 1.6 years Last activity: 130 days
|
| Posted on 07-03-10 04:58:27 PM |
Link
| |
Originally posted by ChumChum770 now i have one more question, this one is less complex. On Toadstool when editing a custom level, how do I add power stars from the original level?
You change one of your Empty Objects into a Star Object. Make sure that you assign it the correct ID. ID 0 is Star 1, ID 1 is Star 2 and so on.
____________________ "The last Metroid is in captivity."
And yet, the galaxy is STILL fucked.
|
|
|
Lyskar
12210          -The Chaos within trumps the Chaos without-
Level: 192
   

Posts: 5918/12211
EXP: 99320673 For next: 552898
Since: 07-03-07
From: 52-2-88-7
Since last post: 7.4 years Last activity: 7.3 years
|
| Posted on 07-03-10 07:12:48 PM |
Link
| |
| Stats | Time/Date
07-03-10 01:12:48 PM
Posts
5918
Days Here
1096
Level
112
|
| | Metal_Man88's Post | Hm. I was going to go, "Why is this topic here?" but then again, the help thread is kind of getting overwhelmed with level editing stuff. May as well use this topic I had intended for that to help save a little room, although I don't mind if you ask it in here or in the question topic.
____________________
|
| |
|
shiftybill
Random nobody
Level: 4
   
Posts: 2/2
EXP: 185 For next: 94
Since: 08-08-10
Since last post: 11.7 years Last activity: 11.6 years
|
| Posted on 08-25-10 02:17:18 AM |
Link
| |
Hi guys,
I was thinking of making a 'HUB' level much like the inside castle, so i went ahead and replaced the secret aquarium level and made it the level the game automatically loads. Now when i start the game mario does not start at the warp point but rather he appears outside the level and immediately dies.
My question is, is there any way to move the starting point to somewhere inside the level?
Thanks you. |
Me-me
340      
Level: 41
   

Posts: 226/341
EXP: 462078 For next: 18067
Since: 08-05-07
Since last post: 9.7 years Last activity: 8.1 years
|
| Posted on 08-25-10 09:02:14 AM |
Link
| |
I made the same mistake with my hub.
It'll be possible to change this position in the future (I think?), but I found a temporary solution.
In the importer its possible to change the model position, so I simply messed around until the model got to where Mario spawned.
The coordinates is here:
X -6000
Y -1000
Z 6200
Depending on how large your model is, this might or might not work. Try experimenting yourself 
____________________ IOS, WAD, DOL and ELF -- I hate them all. |
Zero One
5170       And as we fall the spirit carries on, That a hero'll come and save us all, As we call the ones we left below, We all dream of the day we rise above
Level: 129
   

Posts: 1382/5173
EXP: 24571586 For next: 478068
Since: 05-24-10
From: Delta Quadrant
Since last post: 1.6 years Last activity: 130 days
|
| Posted on 09-05-10 03:05:44 PM |
Link
| |
I have a collison problem. It's just one polygon, but it's huge and for some reason, Mario passes right through it. I'll post pictures when my Internet is back up.
____________________ "The last Metroid is in captivity."
And yet, the galaxy is STILL fucked.
|
|
|
mrspeedrun
Random nobody
Level: 3
   
Posts: 1/1
EXP: 60 For next: 68
Since: 05-29-12
Since last post: 9.9 years Last activity: 9.9 years
|
| Posted on 05-29-12 06:34:16 PM |
Link
| |
hey guys im completely new here and got huge issues with toadstool...
i simply dont understand that program - after 11 hours of intense working with google skatchup youtube tutorial videos toadstool several extending software things with many failures ect. i got my level into the game (a small costum testlevel; replaced peaches slide)
now i tried to replace bob-ombs mountain but every time when i try to start the level with my costum map it crashes now im think that its getting quite complex here.
i wanted just to delete all the items from bob omb mountain but im afraid that this completely destroys the map (remove star quests warp triggers ect.) causing another unfixable crash.
so my first goal is to create my own map and later my own hack like sm64 star road or (my personal favourite) sm74
so can you please give me some (or maybe a lot) advice how i can create simple warps and star quests like the guy did in this video? i dont have any problems with the 3D related polygon stuff but i completely failed with toadstool =\
- http://www.youtube.com/watch?v=3kAn0zL8k6M
i would be thankful if someone could help me out :D and please forgive my crappy english rofl |
Eggs6131
Member
Level: 21
   

Posts: 28/82
EXP: 46382 For next: 3561
Since: 08-27-11
From: United Kingdom
Since last post: 8.0 years Last activity: 7.0 years
|
| Posted on 05-29-12 07:28:29 PM |
Link
| |
MrSpeedRun, why don't you look up a tutorial on Youtube?
By the by, don't bump old threads!
----------------
I'm watching you. |
Lyskar
12210          -The Chaos within trumps the Chaos without-
Level: 192
   

Posts: 11299/12211
EXP: 99320673 For next: 552898
Since: 07-03-07
From: 52-2-88-7
Since last post: 7.4 years Last activity: 7.3 years
|
| Posted on 05-30-12 12:16:33 AM |
Link
| |
| Stats | Posts
11299
Days Here
1792
Level
159
|
| | Metal_Man88's Post | Re-ask your question in TT64/SM64 hacking questions. This thread sort of died eons ago and you're not so likely to get help in here.
I'm closing it to make sure it doesn't get bumped anymore.
____________________
|
| |
|