Super Mario Land/ROM map: Difference between revisions

From Data Crystal
Jump to navigation Jump to search
m (Redundant category removal)
Line 1: Line 1:
{{rommap|game=Super Mario Land}}
{{rommap|game=Super Mario Land}}
==Lives==
===Updates Lives, Extra Life===
* <tt>0x1C2A-0x1C62</tt> - Updates Lives after a death or after earning an extra life
ROM0:1C2A F0 9F            ld  a,(ff00+9F)
ROM0:1C2C A7              and  a
ROM0:1C2D C0              ret  nz
ROM0:1C2E FA A3 C0        ld  a,(C0A3) // Load Life earned or lost in accumulator
ROM0:1C31 B7              or  a
ROM0:1C32 C8              ret  z
ROM0:1C33 FE FF            cp  a,FF
ROM0:1C35 FA 15 DA        ld  a,(DA15)
ROM0:1C38 28 32            jr  z,1C6C // If the player died, jump to 0x1C6C (lose a Life)
ROM0:1C3A FE 99            cp  a,99
ROM0:1C3C 28 20            jr  z,1C5E // If the player has 99 Lives, skip the Extra Life
ROM0:1C3E F5              push af
ROM0:1C3F 3E 08            ld  a,08
ROM0:1C41 EA E0 DF        ld  (DFE0),a
ROM0:1C44 E0 D3            ld  (ff00+D3),a
ROM0:1C46 F1              pop  af
ROM0:1C47 C6 01            add  a,01 // Extra Life
ROM0:1C49 27              daa 
ROM0:1C4A EA 15 DA        ld  (DA15),a // Store Lives in (DA15)
ROM0:1C4D FA 15 DA        ld  a,(DA15) // a = Lives
ROM0:1C50 47              ld  b,a
ROM0:1C51 E6 0F            and  a,0F
ROM0:1C53 EA 07 98        ld  (9807),a // Update the number of Lives displayed on screen
ROM0:1C56 78              ld  a,b
ROM0:1C57 E6 F0            and  a,F0
ROM0:1C59 CB 37            swap a
ROM0:1C5B EA 06 98        ld  (9806),a // Updates Lives displayed in (C806) and (C807)
ROM0:1C5E AF              xor  a
ROM0:1C5F EA A3 C0        ld  (C0A3),a // (C0A3) = 0
ROM0:1C62 C9              ret 
===Game Over===
* <tt>0x1C63-0x1C6B</tt> - Game Over
ROM0:1C63 3E 39            ld  a,39
ROM0:1C65 E0 B3            ld  (ff00+B3),a
ROM0:1C67 EA A4 C0        ld  (C0A4),a
ROM0:1C6A 18 F2            jr  1C5E
===Lose 1 Life===
* <tt>0x1C6C-0x1C72</tt> - Lose 1 Life
ROM0:1C6C A7              and  a
ROM0:1C6D 28 F4            jr  z,1C63 // If the player has no more Lives, Game Over
ROM0:1C6F D6 01            sub  a,01
ROM0:1C71 18 D6            jr  1C49


==Object Locations==
==Object Locations==

Revision as of 16:06, 19 April 2015

Chip tiny.png The following article is a ROM map for Super Mario Land.

Lives

Updates Lives, Extra Life

  • 0x1C2A-0x1C62 - Updates Lives after a death or after earning an extra life
ROM0:1C2A F0 9F            ld   a,(ff00+9F)
ROM0:1C2C A7               and  a
ROM0:1C2D C0               ret  nz
ROM0:1C2E FA A3 C0         ld   a,(C0A3)	// Load Life earned or lost in accumulator
ROM0:1C31 B7               or   a
ROM0:1C32 C8               ret  z
ROM0:1C33 FE FF            cp   a,FF
ROM0:1C35 FA 15 DA         ld   a,(DA15)
ROM0:1C38 28 32            jr   z,1C6C		// If the player died, jump to 0x1C6C (lose a Life)
ROM0:1C3A FE 99            cp   a,99
ROM0:1C3C 28 20            jr   z,1C5E		// If the player has 99 Lives, skip the Extra Life
ROM0:1C3E F5               push af
ROM0:1C3F 3E 08            ld   a,08
ROM0:1C41 EA E0 DF         ld   (DFE0),a
ROM0:1C44 E0 D3            ld   (ff00+D3),a
ROM0:1C46 F1               pop  af
ROM0:1C47 C6 01            add  a,01		// Extra Life
ROM0:1C49 27               daa  
ROM0:1C4A EA 15 DA         ld   (DA15),a	// Store Lives in (DA15)
ROM0:1C4D FA 15 DA         ld   a,(DA15)	// a = Lives
ROM0:1C50 47               ld   b,a
ROM0:1C51 E6 0F            and  a,0F
ROM0:1C53 EA 07 98         ld   (9807),a	// Update the number of Lives displayed on screen
ROM0:1C56 78               ld   a,b
ROM0:1C57 E6 F0            and  a,F0
ROM0:1C59 CB 37            swap a
ROM0:1C5B EA 06 98         ld   (9806),a	// Updates Lives displayed in (C806) and (C807)
ROM0:1C5E AF               xor  a
ROM0:1C5F EA A3 C0         ld   (C0A3),a	// (C0A3) = 0
ROM0:1C62 C9               ret  

Game Over

  • 0x1C63-0x1C6B - Game Over
ROM0:1C63 3E 39            ld   a,39
ROM0:1C65 E0 B3            ld   (ff00+B3),a
ROM0:1C67 EA A4 C0         ld   (C0A4),a
ROM0:1C6A 18 F2            jr   1C5E

Lose 1 Life

  • 0x1C6C-0x1C72 - Lose 1 Life
ROM0:1C6C A7               and  a
ROM0:1C6D 28 F4            jr   z,1C63		// If the player has no more Lives, Game Over
ROM0:1C6F D6 01            sub  a,01
ROM0:1C71 18 D6            jr   1C49

Object Locations

0xA004 is the first Chibibo(Goomba).

And below is the general location for the rest of the enemies, and other non-power-up sprites for each level. Tempting as it is, you are not allowed to use fewer enemies in one level to add more to another. It's really annoying in 3-3, which uses way too few sprites.

  • $A002-$A070 - 1-1
  • $A073-$A0FC - 1-2
  • $A0FE-$A18D - 1-3
  • $5179-$5220 - 2-1
  • $5222-$5299 - 2-2
  • $529B-$530F - 2-3
  • $CE74-$CF1B - 3-1
  • $CF1D-$CFD6 - 3-2
  • $CFD8-$D03D - 3-3
  • $5311-$5403 - 4-1
  • $5405-$54D3 - 4-2
  • $54D5-$55B8 - 4-3

Enemy Data/Object Data

00 Chibibo (Goomba)
01 Flattened Chibibo
02 Pakkun (Piranha Plant)
03 Invisible Flying Bat thing
04 Nokobon (Turtle)
05 Nokobon's bomb
06 Punching Hand
07 Rising Platform that you step on and it rises.
08 1-3 Boss
09 Thing killable by jumping on it.
0A Falling Platform
0B Left to Right Platform
0C Falling Tile from 1-2 (Falls as you pass by it)
0D Nothing?
0E Jumping Bat thing.
0F Death Animation of Jumping Bat Thing.
10 Jumping Fish
11 Nothing?
12 Nothing?
13 Same as 07
14 Same as 07 but rises on its own
15 Jumping Bat Thing death noise.
16 Fireballs?
17 Half of 1-3 boss that goes in a Counter-Clockwise motion and vanishes.
18 Like 16 but waits to attack.
19 Same as 15
1A Cue the 2-3 Water boss but it keeps rising. May need walls to stop it. That, and it is supposed to center on a "Swimming" Mario.
1B Higher Fireball
1C Nothing?
1D Jumping Spynx-like enemy
1E Lower Fireball
1F Flying Boss Ball
20 (Jumping Bat Thing)?
21 Explosion that shoots 2 bullets(Water level) (Gunion?)
22 Low Boss Ball
23 Bouncing Ball?
24 Really high jumping thing (From another level)
25 Something that rises when you go by it and you can jump on it and kill it. Then it makes that death noise
26 Nothing?
27 Explosion?
28 A Right Moving Mushroom that is passthroughable
29 Same as 28 but Left Moving
2A Right Moving Heart: Passthroughable
2B Left Moving Heart: Passthroughable
2C Right Moving Star: Passthroughable
2D Flower (Passthroughable) A little ways off the ground.
2E Flower (Passthroughable) On the ground.
2F It start as one thing, then splits into three. (This may be from another level.)
30 Something that scoots across the ground. Unkillable?
31 Moving really fast thing (From another level?)
32 Cue a boss. (Undistinguishable)
33 Something flipping around.
34 Left Moving Star (Passthroughable)
35 Falling Object?
36 Falling Object from the end of levels
37 Nothing?
38 Diagonal Right Moving Platform
39 Diagonal Left Moving Platform
3A Up to Down Two ball platform.
3B Left to Right Two Ball platform.
3C Some jumping enemy
3D Death of 3C
3E Death Sound?
3F Gao (fireball shooting sphinx)
40 Death of 3F
41 Death Sound?
42 Flying Bee
43 Death of 42
44 Death Sound?
45 Falling Arrow
46 Explosion?
47 Jumping thing. Can stand on it.
48 Boss music, and some moving thing.
49 Gira shooter from Pipe
4A Gira (Bullet Bill)
4B Low Bullet
4C One of those 36 sprites, but it raises and carrys Mario to the end of the level, but also past the end.
4D Same as 4C but rises on its own.
4E Nothing.
4F Explosion!
50 Right Diagonal Bullet
51 Rises then falls and kills. Some ball?
52 Something that moves on ground and rises and shoots back a bullet.
53 Some thing that jumps around.
54 Fireball going around in a circle.
55 Upside Down Pakkun
56 Pionpi
57 Same as 56 but its dead first, then it jumps.
58 Low moving fast fireball
59 Something invisible that you run over and Mario hops up and gets 800 points.
5A Diagonal Left Bullet
5B Cue Final Boss
5C Fireball explosion spewing Fireballs from Final Boss
5D Upper Fireball from Fireball explosion from Final Boss
5E Middle Fireball from Fireball explosion from Final Boss
5F Lower Fireball from Fireball explosion from Final Boss
60 Final Boss with different music and faster too?
61 Another Boss?
62 Explosion and then Final Boss.
63 Diagonal left Goomba (Most likely TileSet issue) going very fast.
64 Like 63 but it goes Up and drops something.
65 A Goomba, that when passed by, it turns into a rising platform.
66 Nothing?
67 Boss Music with thing that jumps around and flies away when contact with Mario.
68 Like 64 but it falls back down.
69 Not moving thing (Goomba?)
6A Thing that kills you and likes to change sprites randomly.
6B Diagonalish thing. Touch it and it turns into a star, but you cant get it.
6C Thing that jumps on ground. Dies eventually.
6D Thing that rises and then Boss Music starts.
6E Like 69
6F Like 6C but keeps going.
70 Dosn't move. Kills you.
71 Dosn't move. Hit it and it explodes and shoots two fireballs.
72 Like 6F
73 Like 71
74 Like 71
75 Like 72
76 Like 6A
77 Not moving. Jump and it "Dies" and shoots out a fireball.
78 Like 6F
79 Boss Music. Thing that kills you if you walk into it.
7A Dosnt move.
7B Like 6F but slower.
7C Not Moving
7D Like 6A
7E Thing that dosnt move.

Note: Add $80 to the enemy's number to make it appear only in Hard Mode.
Note2: These were all tested in the first level, 1-1, so TileSets may be an issue, therefore the object data stated here that is "buggy" or "glitchy" may work in other levels.

Level Map Structure

The first byte is split in two parts. The high 4 bits are a y-component(y) and the low 4 bits are a length(x). The game draws x tiles to y + 2(because of the status bar at the top of the screen). There are x bytes following the first byte that indicate what tile to draw. I'm not sure how many bytes follow if x=0. The tile number is the byte + or - 0x80. If the byte is 0x00-0x7F, 0x80 is added. If the byte is 0x80-0xFF, 0x80 is subtracted. 7F appears to be a tile that is a used coin block. F4 appears to be a coin. An FD byte indicates that there isn't x bytes after the first byte. Instead, ONE byte follows the first byte and is repeated x times. If x=0, it fills the rest of the column. If there is a FE byte it goes to the next row. For example, at 0xA817, there are the bytes 00 FD 7F FE. y is 0. x is also 0. FD indicates there is only one tile byte. The tile indicated by 7F is repeated across the entire column because x=0. FE indicates that that is the end of the line. I'm not sure, but FF tells the game, that it is the end of the tile map. -Quoted from Coolman.

  • 0xA2BE (0xA200-0xB872?) - The first Level Map (1-1)
  • 0x56CD-0x65D2 - The second Level Map
  • 0x65D3-0x7DAD - The fourth Level Map
  • 0xD22C-0xE416 - The third Level Map

Screen Order

  • 0xA198-0xA1B5 - 1-1
  • 0xA1BD-0xA1D8 - 1-2
  • 0xA1E0-0xA1FD - 1-3
  • 0x55C1-0x55E0 - 2-1
  • 0x55E8-0x5603 - 2-2
  • 0x560B-0x562E - 2-3
  • 0xD045-0xD072 - 3-1
  • 0xD07A-0xD099 - 3-2
  • 0xD0A1-0xD0BE - 3-3
  • 0x5636-0x5663 - 4-1
  • 0x566B-0x5692 - 4-2
  • 0x569A-0x56C9 - 4-3

References