Register - Login
Views: 99378659
Main - Memberlist - Active users - Calendar - Wiki - IRC Chat - Online users
Ranks - Rules/FAQ - Stats - Latest Posts - Color Chart - Smilies
04-23-22 10:26:51 PM
Jul - SM64 Hacking (Archive) - Level Editing Topic New poll - New thread - Thread closed
Next newer thread | Next older thread
Doogie1012
Member
Level: 15


Posts: 4/35
EXP: 14542
For next: 1842

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: 2594032
For next: 134768

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/
Lyskar
12210
-The Chaos within trumps the Chaos without-
Level: 192


Posts: 1800/12211
EXP: 99235306
For next: 638265

Since: 07-03-07

From: 52-2-88-7

Since last post: 7.4 years
Last activity: 7.3 years

Posted on 10-24-08 10:52:11 PM Link

Time/Date

10-24-08 04:52:11pm

Posts

1800

Days Here

479

Level

59
Metal_Man88
Local Moderator
I think I'll have this be the main topic to move the level editing Q & A to. So move the relevant data here if necessary.

____________________
Original Layout © Tobias Kelmandia
Doogie1012
Member
Level: 15


Posts: 5/35
EXP: 14542
For next: 1842

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: 2594032
For next: 134768

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: 14542
For next: 1842

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: 1135501
For next: 21618

Since: 07-27-07

From: Montreal, Canada

Since last post: 4.7 years
Last activity: 1.2 years

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: 14542
For next: 1842

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: 1775
For next: 412

Since: 06-23-10


Since last post: 11.8 years
Last activity: 11.3 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: 24545349
For next: 504305

Since: 05-24-10

From: Delta Quadrant

Since last post: 1.6 years
Last activity: 121 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: 99235306
For next: 638265

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.

____________________
Life is a mystery, unlike death.
Eisnaught - SSQ² - Mobius Roleplay - SSS
shiftybill
Random nobody
Level: 4


Posts: 2/2
EXP: 184
For next: 95

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: 461678
For next: 18467

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: 24545349
For next: 504305

Since: 05-24-10

From: Delta Quadrant

Since last post: 1.6 years
Last activity: 121 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: 46327
For next: 3616

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: 99235306
For next: 638265

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.

____________________
SSQ - Mobius Roleplay - SSS
Next newer thread | Next older thread
Jul - SM64 Hacking (Archive) - Level Editing Topic New poll - New thread - Thread closed


Rusted Logic

Acmlmboard - commit 47be4dc [2021-08-23]
©2000-2022 Acmlm, Xkeeper, Kaito Sinclaire, et al.

35 database queries, 4 query cache hits.
Query execution time:  0.090402 seconds
Script execution time:  0.038653 seconds
Total render time:  0.129055 seconds


TidyHTML vomit below
line 1 column 1 - Warning: missing <!DOCTYPE> declaration
line 2 column 310 - Warning: unescaped & or unknown entity "&page"
line 119 column 11 - Warning: <form> isn't allowed in <table> elements
line 118 column 10 - Info: <table> previously mentioned
line 120 column 11 - Warning: missing <tr>
line 120 column 119 - Warning: missing </font> before </td>
line 124 column 16 - Warning: plain text isn't allowed in <tr> elements
line 120 column 11 - Info: <tr> previously mentioned
line 125 column 68 - Warning: missing </nobr> before </td>
line 141 column 68 - Warning: missing </nobr> before <tr>
line 147 column 35 - Warning: missing <tr>
line 147 column 50 - Warning: missing </font> before </td>
line 148 column 37 - Warning: unescaped & or unknown entity "&id"
line 147 column 190 - Warning: missing </font> before </table>
line 149 column 35 - Warning: missing <tr>
line 149 column 50 - Warning: missing </font> before </td>
line 149 column 91 - Warning: missing </font> before </table>
line 156 column 9 - Warning: <div> isn't allowed in <table> elements
line 152 column 17 - Info: <table> previously mentioned
line 158 column 9 - Warning: missing <tr>
line 176 column 13 - Warning: missing <tr>
line 196 column 9 - Warning: <div> isn't allowed in <table> elements
line 152 column 17 - Info: <table> previously mentioned
line 198 column 9 - Warning: missing <tr>
line 216 column 13 - Warning: missing <tr>
line 255 column 9 - Warning: <div> isn't allowed in <table> elements
line 152 column 17 - Info: <table> previously mentioned
line 257 column 9 - Warning: missing <tr>
line 275 column 13 - Warning: missing <tr>
line 278 column 73 - Warning: <style> isn't allowed in <td> elements
line 278 column 9 - Info: <td> previously mentioned
line 278 column 960 - Error: <z> is not recognized!
line 278 column 960 - Warning: discarding unexpected <z>
line 278 column 982 - Warning: discarding unexpected </z>
line 278 column 1008 - Error: <z> is not recognized!
line 278 column 1008 - Warning: discarding unexpected <z>
line 278 column 1015 - Warning: discarding unexpected </z>
line 278 column 1045 - Error: <z> is not recognized!
line 278 column 1045 - Warning: discarding unexpected <z>
line 278 column 1051 - Warning: discarding unexpected </z>
line 278 column 1077 - Error: <z> is not recognized!
line 278 column 1077 - Warning: discarding unexpected <z>
line 278 column 1082 - Warning: discarding unexpected </z>
line 281 column 9 - Warning: <div> isn't allowed in <table> elements
line 152 column 17 - Info: <table> previously mentioned
line 283 column 9 - Warning: missing <tr>
line 301 column 13 - Warning: missing <tr>
line 315 column 9 - Warning: <div> isn't allowed in <table> elements
line 152 column 17 - Info: <table> previously mentioned
line 317 column 9 - Warning: missing <tr>
line 335 column 13 - Warning: missing <tr>
line 347 column 9 - Warning: <div> isn't allowed in <table> elements
line 152 column 17 - Info: <table> previously mentioned
line 349 column 9 - Warning: missing <tr>
line 367 column 13 - Warning: missing <tr>
line 413 column 9 - Warning: <div> isn't allowed in <table> elements
line 152 column 17 - Info: <table> previously mentioned
line 415 column 9 - Warning: missing <tr>
line 433 column 13 - Warning: missing <tr>
line 436 column 73 - Warning: <style> isn't allowed in <td> elements
line 436 column 9 - Info: <td> previously mentioned
line 436 column 1511 - Warning: missing </font> before <blockquote>
line 436 column 1590 - Warning: inserting implicit <font>
line 436 column 1590 - Warning: missing </font> before <hr>
line 437 column 1 - Warning: inserting implicit <font>
line 437 column 1 - Warning: missing </font> before <blockquote>
line 440 column 1868 - Warning: inserting implicit <font>
line 440 column 1868 - Warning: missing </font> before <hr>
line 441 column 1 - Warning: inserting implicit <font>
line 441 column 1 - Warning: missing </font> before <hr>
line 442 column 1 - Warning: inserting implicit <font>
line 436 column 137 - Warning: missing </div>
line 450 column 9 - Warning: <div> isn't allowed in <table> elements
line 152 column 17 - Info: <table> previously mentioned
line 452 column 9 - Warning: missing <tr>
line 470 column 13 - Warning: missing <tr>
line 478 column 9 - Warning: <div> isn't allowed in <table> elements
line 152 column 17 - Info: <table> previously mentioned
line 480 column 9 - Warning: missing <tr>
line 498 column 13 - Warning: missing <tr>
line 504 column 9 - Warning: <div> isn't allowed in <table> elements
line 152 column 17 - Info: <table> previously mentioned
line 506 column 9 - Warning: missing <tr>
line 524 column 13 - Warning: missing <tr>
line 527 column 317 - Warning: missing </font> before <body>
line 527 column 346 - Warning: discarding unexpected <body>
line 527 column 380 - Warning: inserting implicit <font>
line 527 column 380 - Warning: missing </font> before <hr>
line 527 column 448 - Warning: inserting implicit <font>
line 527 column 448 - Warning: missing </font> before <hr>
line 528 column 1 - Warning: inserting implicit <font>
line 531 column 986 - Warning: plain text isn't allowed in <tr> elements
line 527 column 291 - Info: <tr> previously mentioned
line 534 column 9 - Warning: <div> isn't allowed in <table> elements
line 152 column 17 - Info: <table> previously mentioned
line 536 column 9 - Warning: missing <tr>
line 554 column 13 - Warning: missing <tr>
line 557 column 74 - Warning: <style> isn't allowed in <td> elements
line 557 column 9 - Info: <td> previously mentioned
line 557 column 1365 - Error: <z> is not recognized!
line 557 column 1365 - Warning: discarding unexpected <z>
line 557 column 1377 - Warning: discarding unexpected </z>
line 559 column 1409 - Error: <z> is not recognized!
Tidy found 395 warnings and 11 errors! Not all warnings/errors were shown.

The alt attribute should be used to give a short description
of an image; longer descriptions should be given with the
longdesc attribute which takes a URL linked to the description.
These measures are needed for people using non-graphical browsers.

For further advice on how to make your pages accessible
see http://www.w3.org/WAI/GL.
You are recommended to use CSS to specify the font and
properties such as its size and color. This will reduce
the size of HTML files and make them easier to maintain
compared with using <FONT> elements.

You are recommended to use CSS to control line wrapping.
Use "white-space: nowrap" to inhibit wrapping in place
of inserting <NOBR>...</NOBR> into the markup.

About HTML Tidy: https://github.com/htacg/tidy-html5
Bug reports and comments: https://github.com/htacg/tidy-html5/issues
Official mailing list: https://lists.w3.org/Archives/Public/public-htacg/
Latest HTML specification: http://dev.w3.org/html5/spec-author-view/
Validate your HTML documents: http://validator.w3.org/nu/
Lobby your company to join the W3C: http://www.w3.org/Consortium

Do you speak a language other than English, or a different variant of
English? Consider helping us to localize HTML Tidy. For details please see
https://github.com/htacg/tidy-html5/blob/master/README/LOCALIZE.md