Jammin'
NNNO WAY! I CAN'T BELIEEEEVE THIS!
If you're not aware of what the title is referring to, it's a reference to the Tonkachi Editor which was used to make Tonkachi Mario (the very first Mario ROM hack) by modifying the hexadecimal data byte by byte.
This thread is for my ramblings about figuring out how to hack the SMB1 ROM using a similar method by manualling modifying the hex.
A decent starting point is the ROM map for SMB1 on Data Crystal.
It gives the locations for specific things like the bytes to edit in order to change the "GAME OVER" text, for example. However, it's got nothing about level data.
So in order to fix that, I figured out the basics of how levels work!
Using SMB Utility, I modified my SMB1 ROM's 1-1 and compared the modified ROM with the vanilla one to see which bytes were changed. By doing this, I found out the object data for 1-1 seems to start at
I also learned that levels are separated into "pages". Each page being 15x12 objects. I also ended up figuring out the blocks/objects take up two bytes of data. One byte for their position in the page and the other for the type of object and what page it's on. (I'll elaborate on these two values later.)
I've mastered understanding the first byte, (which I'll call the Location byte) but the second byte (which I'll call the Type byte) doesn't really make sense to me. I'll figure it out soon enough, though.
From what I can tell, most blocks like bricks and hard blocks (but not ? blocks) are put into 1xY lines.
Basically, there's a horizontal brick line object and you're able to decide how long the line of brick blocks is. This allows what looks like multiple brick objects to be handled by one singular object. That's a pretty crappy explanation but I think it's fine for the layman.
Enjoy the thread.
I spent quite a lot of time today figuring out the Type byte.
It's actually much simpler than I thought. The entire byte defines the object's type.
I don't really have anything else to talk about, so here's the list of all the objects I managed to identify.
Next up on Jam's Schizophrenia: finding the enemy data for 1-1!
This thread is for my ramblings about figuring out how to hack the SMB1 ROM using a similar method by manualling modifying the hex.
A decent starting point is the ROM map for SMB1 on Data Crystal.
It gives the locations for specific things like the bytes to edit in order to change the "GAME OVER" text, for example. However, it's got nothing about level data.
So in order to fix that, I figured out the basics of how levels work!
Using SMB Utility, I modified my SMB1 ROM's 1-1 and compared the modified ROM with the vanilla one to see which bytes were changed. By doing this, I found out the object data for 1-1 seems to start at
0x26A0
!I also learned that levels are separated into "pages". Each page being 15x12 objects. I also ended up figuring out the blocks/objects take up two bytes of data. One byte for their position in the page and the other for the type of object and what page it's on. (I'll elaborate on these two values later.)
I've mastered understanding the first byte, (which I'll call the Location byte) but the second byte (which I'll call the Type byte) doesn't really make sense to me. I'll figure it out soon enough, though.
From what I can tell, most blocks like bricks and hard blocks (but not ? blocks) are put into 1xY lines.
Basically, there's a horizontal brick line object and you're able to decide how long the line of brick blocks is. This allows what looks like multiple brick objects to be handled by one singular object. That's a pretty crappy explanation but I think it's fine for the layman.
Enjoy the thread.
Post automatically merged:
I spent quite a lot of time today figuring out the Type byte.
It's actually much simpler than I thought. The entire byte defines the object's type.
I don't really have anything else to talk about, so here's the list of all the objects I managed to identify.
~Single instance objects~
00 - ? block with mushroom
01 - ? block
02 - invisible ? block
03 - invisible ? block with 1-up
04 - bricks with mushroom
05 - bricks with vine
06 - bricks with starman
07 - bricks with 10 coins
08 - bricks with coins
09 - left-facing pipe rim (enterable)
0a - used block
0b - spring
0c - weird pipe used in the cutscene at 1-2 (enterable)
0d - flagpole
~Objects with changable length~
10-1f - tree platform
20-2f - horizontal brick blocks
30-3f - horizontal hard blocks
40-4f - horizontal coins
50-5f - vertical brick blocks
60-6f - vertical hard blocks
70-77 - pipe (cant enter)
78-7f - pipe (enterable)
80-ff - the last 8 entries but put in the next "page" (the function of these is consistant regardless of the previous byte)
~Variants that appear if the previous byte is *C~
00-0f - pit
10-1f - things at the top of the pulley platforms (doesn't spawn the latter)
20-4f - bridge (starting at *7 and ending at *A)
50-5f - water
60-7f - horizontal ? blocks (at varying heights)
~Variants that appear if the previous byte is *F~
00-0f - literally just a line (maybe something to do with the pulley?)
10-1f - same as above except you can change the length
20-2f - middle part for the big castle
30-3f - right facing hard block staircase
40-4f - sub-level pipe (enterable)
50-5f - unused climable buzzing ball
00 - ? block with mushroom
01 - ? block
02 - invisible ? block
03 - invisible ? block with 1-up
04 - bricks with mushroom
05 - bricks with vine
06 - bricks with starman
07 - bricks with 10 coins
08 - bricks with coins
09 - left-facing pipe rim (enterable)
0a - used block
0b - spring
0c - weird pipe used in the cutscene at 1-2 (enterable)
0d - flagpole
~Objects with changable length~
10-1f - tree platform
20-2f - horizontal brick blocks
30-3f - horizontal hard blocks
40-4f - horizontal coins
50-5f - vertical brick blocks
60-6f - vertical hard blocks
70-77 - pipe (cant enter)
78-7f - pipe (enterable)
80-ff - the last 8 entries but put in the next "page" (the function of these is consistant regardless of the previous byte)
~Variants that appear if the previous byte is *C~
00-0f - pit
10-1f - things at the top of the pulley platforms (doesn't spawn the latter)
20-4f - bridge (starting at *7 and ending at *A)
50-5f - water
60-7f - horizontal ? blocks (at varying heights)
~Variants that appear if the previous byte is *F~
00-0f - literally just a line (maybe something to do with the pulley?)
10-1f - same as above except you can change the length
20-2f - middle part for the big castle
30-3f - right facing hard block staircase
40-4f - sub-level pipe (enterable)
50-5f - unused climable buzzing ball
Next up on Jam's Schizophrenia: finding the enemy data for 1-1!
Last edited: