News: 11 March 2016 - Forum Rules
Current Moderators - DarkSol, KingMike, MathOnNapkins, Azkadellia, Danke

Author Topic: [NES] [Super Mario Bros] Memory address of levels and objects?  (Read 778 times)

mhughson

  • Newbie
  • *
  • Posts: 1
    • View Profile
[NES] [Super Mario Bros] Memory address of levels and objects?
« on: December 04, 2017, 03:56:10 pm »
Hi,

I am putting together a little SMB de-make for Pico-8. You can see a quick playthrough here if interested: https://twitter.com/matthughson/status/934693262576648192.

Anyway, I am interested in looking at the byte code for levels and objects in a Super Mario Bros ROM. I have managed to find some of them by comparing data in a Super Mario Bros Level Editor, but it is fairly time consuming, so I was hoping someone has already done this work.

I found this (http://datacrystal.romhacking.net/wiki/Super_Mario_Bros.:ROM_map) which appears to be exactly the kind of thing I am trying to find, except that it leaves out Level and Object information.

I am essentially looking for something like:

World 1-1: 0x0000->0x000f [Map] 0x0010->0x001f [Objects]
World 1-2: 0x0000->0x0020 [Map] 0x0010->0x002f [Objects]
etc.


Apologies if this is super obvious stuff. I have no background in ROM hacking.

segwayspeedracer

  • Jr. Member
  • **
  • Posts: 46
    • View Profile
Re: [NES] [Super Mario Bros] Memory address of levels and objects?
« Reply #1 on: December 06, 2017, 03:34:35 pm »
If you know the hex addresses, you can pull it up and view in a hex editor (Transhexltion is a good one). I had trouble finding the offsets in that link. Ill dig a bit more when Im off mobile.

I would also look at the byte strings in SMB Utility. You may have noted this, but it shows the two bytes for each object in the levels is in one of those pop out window that lets you edit the game.

----------

Wow your twitter is badass. Enjoyed flipping through your products.

Found this in my notes. Someone else produced this text document.. it's probably 5 to 15 years old so I can't cite the source. Let me know if this helps. Metatiles and sprites (enemies) are in two different areas for each level.

LEVELS

Objects

21BF - 221F          1-4 (6-4)
2220 - 229E          4-4
229F - 2311          2-4 (5-4)
2312 - 237E          3-4
237F - 2409          7-4
240A - 247A          8-4
247B - 24DD          3-3
24DE - 2546          8-3
2547 - 2599          4-1
259A - 2628          6-2
2629 - 269D          3-1
269E - 2702          1-1
2703 - 2757        1-3 (5-3)
2758 - 27DC         2-3 (7-3)
27DD - 2841          2-1
2842 - 284A        Beginning (1-2, 2-2, 4-2, 7-2)
284B - 2889        5-1
288A - 289E        Clouds (Day)
289F - 2905        4-3
2906 - 296A        6-3
296B - 29DD        6-1
29DE - 2A0E        Mushrooms (4-2)
2A0F - 2AA1        8-1
2AA2 - 2B14        5-2
2B15 - 2B8D        8-2
2B8E - 2BE6        7-1
2BE7 - 2C11        Clouds (Night)
2C12 - 2C44        3-2
2C45 - 2CE7        1-2
2CE8 - 2D88        4-2
2D89 - 2E15        Underground
2E16 - 2E54        Underwater
2E55 - 2ECF        2-2 (7-2)
2ED0 - 2EEA        Underwater (8-4)

Sprites

1D80 - 1DA6        1-4 (6-4)
1DA7 - 1DBF          4-4
1DC0 - 1DEE        2-4 (5-4)
1DEF - 1E19         3-4
1E1A - 1E2E        7-4
1E2F - 1E68        8-4
1E69 - 1E8D          3-3
1E8E - 1EAA        8-3
1EAB - 1EB8          4-1
1EB9 - 1EDF          6-2
1EE0 - 1F10        3-1
1F11 - 1F2E        1-1
1F2F - 1F4B        1-3 (5-3)
1F4C - 1F60        2-3 (7-3)
1F61 - 1F8B        2-1
1F8C - 1FAF        5-1
1FB0 - 1FB8        Clouds (Day)
1FB9 - 1FDD          4-3
1FDE - 2000        6-3
2001 - 2009          6-1
200B - 2044        8-1
2045 - 206F        5-2
2070 - 209D        8-2
209E - 20B9        7-1
20BA - 20C2        Clouds (Night)
20C3 - 20E7          3-2
20E8 - 2114        1-2
2115 - 2142          4-2
2143 - 216F        Underground
2170 - 2180        Underwater
2181 - 21AA        2-2 (7-2)
21AB - 21BE        Underwater (8-4)

If viewing in a hex editor isn't good enough, I recommend viewing it smbdis.asm... doppleganger's assembly of super mario bros. You can view the level objects and sprites in Hex with green notes labeling each level.

« Last Edit: December 06, 2017, 10:48:36 pm by segwayspeedracer »