Points of Required Attention™
Please chime in on a proposed restructuring of the ROM hacking sections.
Views: 88,476,163
Main | FAQ | Uploader | IRC chat | Radio | Memberlist | Active users | Latest posts | Calendar | Stats | Online users | Search 04-24-24 07:31 AM
Guest: Register | Login

0 users currently in ROM Hacking | 3 guests

Main - ROM Hacking - Super Mario Land 2 Overworld format documented and explained New thread | New reply


Raccoon Sam
Posted on 10-27-07 12:43 AM (rev. 7 of 11-02-07 01:44 PM) Link | Quote | ID: 68688


Cobrat
Level: 56

Posts: 332/672
EXP: 1379791
Next: 18385

Since: 02-19-07
From: Hi

Last post: 3465 days
Last view: 2696 days
Yeah. Thought I'd make my contribution to the hacking community, so here's the SML2 Overworld format, oven-fresh. Have a great time hacking.

The main overworld is built from Chunks. One Chunk is 1024 bytes, and is composed from 32 rows, each containing 32 bytes. One byte is one tile.
0x37000 - 0x373FF | Chunk 1
0x37400 - 0x377FF | Chunk 2
0x37800 - 0x37BFF | Chunk 3
0x37C00 - 0x37FFF | Chunk 4
For extra reference, please see this.

Besides the main overworld, there are the submaps. Submaps are stored like chunks, but there are only 20 rows, each one having 32 tiles but only 20 shown onscreen, since the submaps never involve scrolling. (Again, for extra reference, please see this.)
The submaps are stored in locations listed below.
0x3B000 - 0x3B23F | Pumpkin Zone
0x3B240 - 0x2B47F | Tree Zone
0x3B480 - 0x3B6BF | Space Zone
0x3B6C0 - 0x3B8FF | Macro Zone
0x3B900 - 0x3BB3F | Turtle Zone
0x3BB40 - 0x3BD7F | Mario Zone
0x3BD80 - 0x3BFBF | Wario's Castle
0x43000 - 0x4323F | Minigame Hill

The minigames are also stored like submaps.
0x43240 - 0x4347F | The 30 Coin Game
0x43480 - 0x436BF | The 50 Coin Game
0x436C0 - 0x438FF | The 200 Coin Game
0x43900 - 0x43B3F | The 999 Coin Game
0x47800 - 0x47A3F | Conveyor Game
0x47A40 - 0x47C7F | Rat Game


"But how do I know what tile is what?"
All the tiles are inside tilesets. To view tilesets, you need a tile viewing program like Tile Molester or Tile Layer PRO. The tilesets are located in the locations listed below. Be sure to have canvas set to 16 x 16 tiles!
0x34800 - 0x357FF | Overworld Tileset
0x36000 - 0x36FFF | Macro Zone Tilest
0x38500 - 0x387FF | Pumpkin Zone Tileset (only used after completion)
0x38800 - 0x397FF | Pumpkin Zone Tileset (includes also the Minigame Hill Tileset)
0x3A000 - 0x3AFFF | Tree Zone Tileset
0x40800 - 0x417FF | Space Zone Tileset
0x42000 - 0x42FFF | Mario's Castle Tileset
0x44800 - 0x457FF | Mario Zone Tileset
0x46000 - 0x46FFF | Wario's Castle Tileset
0x64000 - 0x64FFF | Coin Games Tileset
0x65000 - 0x65FFF | End-of-level Bonus Game Tileset

However, there's a catch. When you've chosen the tile you want to have in the overworld, you'd normally get its coordinate from the tileset (FA Being tile 11 from row 16). The thing is, rows don't start from 0, but 8. Columns are normally from 0 to F, but rows go 8, 9, A, B, C, D, E, F, 0, 1, 2, 3, 4, 5, 6, 7. It isn't all that complicated. For extra reference, please see this.

EDIT: Looks like I found something else, too. The Title screen is stored in 0x159E0 - 0x15C1F.
EDIT 2: And the "Choose a File" level is stored in 0x30A52 - 0x30C91.
EDIT 3: The HUD at the bottom of the screen is located in 0x7EA - 0x7FD.
EDIT 4: And the Coin Wall is located at 0x32492 - 0x326D1.

EDIT 5: Gathered some notes:

Graphics locations
0x141E5 - 0x159E4 | Title Graphics
0x18000 - 0x197FF | Mario
0x19800 - 0x1AD7F | Tree Zone enemies and Boss
0x1C000 - 0x1F84F | Level tiles
0x30C92 - 0x31491 | Coin Wall sprites
0x31492 - 0x32491 | Coin Wall tiles
0x32ACA - 0x32E49 | File selection sprites
0x34000 - 0x347FF | Overworld sprites
0x34800 - 0x357FF | Overworld tiles
0x35800 - 0x35FFF | Macro Zone sprites..?
0x36000 - 0x36FFF | Macro Zone tiles
0x38000 - 0x384FF | Pumpkin Zone sprites
0x38500 - 0x387FF | Pumpkin Zone Tileset (only used after completion)
0x38800 - 0x397FF | Pumpkin Zone Tileset (includes also the Minigame Hill Tileset)
0x39800 - 0x39FFF | Tree Zone sprites
0x3A000 - 0x3AFFF | Tree Zone tiles
0x40000 - 0x407FF | Space Zone sprites
0x40800 - 0x417FF | Space Zone tiles
0x41800 - 0x41FFF | Mario Zone objects and some Mario's Castle sprites
0x42000 - 0x42FFF | Mario's Castle Tileset
0x44000 - 0x447FF | Mario Zone sprites
0x44800 - 0x457FF | Mario Zone tiles
0x45800 - 0x45FFF | Wario's Castle sprites
0x46000 - 0x46FFF | Wario's Castle tiles
0x64000 - 0x64FFF | Converyor game graphics
0x65000 - 0x65FFF | Rat game graphics
0x68656 - 0x68E55 | Ending graphics
0x6C000 - 0x6DDFF | Mario Zone level tiles
0x6DE00 - 0x6EFFF | Mario Zone enemies and Boss
0x6F000 - 0x6FBFF | HUD tiles
0x70000 - 0x71DFF | Macro Zone level tiles
0x71E00 - 0x72FFF | Macro Zone enemies and Boss
0x74000 - 0x757FF | Turtle Zone level tiles
0x75800 - 0x7667F | Turtle Zone enemies and Boss
0x76680 - 0x77E7F | Animated tiles
0x78000 - 0x78BFF | Space Zone level tiles
0x78C00 - 0x799FF | Wario's Castle level tiles
0x79A00 - 0x7A36F | Hippo Zone enemies and some Space Zone enemies
0x7A370 - 0x7A87F | Space Zone Boss
0x7A880 - 0x7B67F | Wario's Castle enemies and Boss
0x7C000 - 0x7DDFF | Pumpkin Zone level tiles
0x7DE00 - 0x6EFFF | Pumpking Zone enemies and Boss


So how about some new MarCas now?

EDIT: There are some flaws in my notes. Please contact me if you are up to hacking SML2.

____________________


Main - ROM Hacking - Super Mario Land 2 Overworld format documented and explained New thread | New reply

Acmlmboard 2.1+4δ (2023-01-15)
© 2005-2023 Acmlm, blackhole89, Xkeeper et al.

Page rendered in 0.018 seconds. (347KB of memory used)
MySQL - queries: 37, rows: 57/58, time: 0.015 seconds.