Tip: If you place a moon, midpoint, or dragon coin through Map16, it will always respawn whenever you reenter that sublevel. It will not respawn if you add it through the Add Objects/Extended Objects window.
link OBSOLETE. See the SMAS ROM and RAM Map links in the menu instead.
This is the SMAS memory map. It is currently hosted by Kieran, and maintained by me (and Counterfeit provided the current layout. Thanks!)
I've been lazy to work on it the past few days but I think it's pretty much complete, because all functionality is available - viewing, and submitting/editing/removing addresses. Addresses can only be added and changed by SMAS disassembly members. Contact them if you have new information - That would be me, imamelia, and wiiqwertyuiop as of now. They have the current login information. Or post the data in this thread and we'll update the map.
-------------------- My blog. I could post stuff now and then
Yeah, thinking about it earlier, I figured that the game just pointed to different levels and added a couple new things, while keeping the main engine the same.
I might help on this, though I'm only decent at ASM.
700004: Offset of last save data accessed (added to 700010)
0000: Super Mario Bros. - FILE A
0009: Super Mario Bros.: The Lost Levels - FILE A
0011: Super Mario Bros. 2 - FILE A
001A: Super Mario Bros. 3 - FILE A
0120: Super Mario Bros. - FILE B
0129: Super Mario Bros.: The Lost Levels - FILE B
0131: Super Mario Bros. 2 - FILE B
013A: Super Mario Bros. 3 - FILE B
0240: Super Mario Bros. - FILE C
0249: Super Mario Bros.: The Lost Levels - FILE C
0251: Super Mario Bros. 2 - FILE C
025A: Super Mario Bros. 3 - FILE C
0360: Super Mario Bros. - FILE D
0369: Super Mario Bros.: The Lost Levels - FILE D
0371: Super Mario Bros. 2 - FILE D
037A: Super Mario Bros. 3 - FILE D
700007: Debug Flag
FILE A
Super Mario Bros.
700010: World Completion
700011: Level Completion (inaccessible via file menu)
700013: Lives, Player 1
700014: Lives, Player 2
700015: Star Worlds accessible flag
700016: Number of Players (00: 1 Player, 01: 2 Players)
Super Mario Bros.: The Lost Levels
700019: World Completion
70001A: Level Completion
70001C: Lives
Super Mario Bros. 2
700021: World Completion
700022: Level Completion (inaccessible via file menu)
700023: Lives
700024: Number of Levels Completed as Mario
700025: Number of Levels Completed as Princess
700026: Number of Levels Completed as Toad
700027: Number of Levels Completed as Luigi
Super Mario Bros. 3
70002A: World Completion
The site moved from p4's server to Caffie. Here is the new site. I didn't completely nuke the old link - it's a redirect page now.
I gave it a new look while at it which should really reflect the SMAS feeling. Big thanks go out to Counterfeit who was generous enough to redesign the site.
-------------------- My blog. I could post stuff now and then
That's some really useful information there actually. Those addresses seem to be written upon level load, and you can trace level load (located at $2A8DB6 I think) all the way back (or forward) to other stuff like actual palette data, level data, map16 data, background data, etc. I added them to the RAM map. Thanks!
e:
Messing with those 2 RAM addresses during level load right after they get written.
-------------------- My blog. I could post stuff now and then
In SMB3, I'm almost certain that $0566 is the generator number (values 00-08 are valid, where 00 is nothing, though 03 seems to be unused). $0671 seems to be the sprite number table, but I'm not sure. There is also some kind of buffer for sprite data that seems to start around $1B3E, though what its format, size, and starting point is, I don't know. I've been finding a lot of my data by starting with the information from Smasb3.html in the "Level documentations" folder. And while we're on the topic of sprites, I'm reasonably sure that $288000 is a table of sprite init pointers and $28821C is a table of sprite main pointers (the size fits, and tracing them seems to yield results), though there seems to be a third such table at $288438, and I don't know what that one is. Graphics routines, maybe?
That's some really useful information there actually. Those addresses seem to be written upon level load, and you can trace level load (located at $2A8DB6 I think) all the way back (or forward) to other stuff like actual palette data, level data, map16 data, background data, etc. I added them to the RAM map. Thanks!
You're welcome. I've actually been inspired by this post from GSCentral, which provided the equivalent codes for Super Mario Advance 4 (specifically the "Level Background is..." codes).
Mod edit: fixed link.
-------------------- Your layout has been removed.
I don't suppose you'd know what all the possible values for those addresses are?
Also, I've been looking into SMB3's level data format, and it's confusing. I can somewhat follow Smasb3.html for the header and object data, but the routine is kind of weird. The routine I looked at starts at $20990B. I found an object of some sort that seems to be used for some extended objects and some linear objects. (See my note file in the "Other notes" subfolder for more details.) I'd have more luck with the object data if I could figure out which bits do what, though...I did mess around in the bsnes debugger a bit to make the objects change size, position, type, and what have you, but I didn't figure out anything definite. Also, objects can apparently have either 3 or 4 bytes, and I've thus far found no way to tell them apart.
Edit: Still looking into the object format, still confused. I did find out one thing, though: $070A. I'm pretty sure that it's the foreground tileset. It never seems to go above 0F, and I've placed all values other than 00 and 05.
Follow Us On