Difference between revisions of "Super Mario Bros.:RAM map"

From Data Crystal
Jump to navigation Jump to search
 
(→‎Table: Updated firebar IDs based on SMB disassembly, line 8100 : https://gist.github.com/1wErt3r/4048722)
 
(53 intermediate revisions by 27 users not shown)
Line 1: Line 1:
This data was found by acmlm board member frantik. It is currently posted here exactly as it was posted on the acmlm board.
+
{{rammap|game=Super Mario Bros.}}
  
RAM - Purpose
+
This data is relevant to '''Super Mario Bros. (JU) (PRG0) [!]''' and may not be correct for [[Super_Mario_Bros.#Known_Dumps|other dumps]].  Most (but not all?) of these addresses apply to the Japanese version of Lost Levels, otherwise known as Super Mario Bros. 2 [Japanese].
  
0002 - Current y (vert) pos 
+
==Table==
0005 - Current x (horz) pos
 
000A - Button State (4 - A, 8 - B)
 
000B - Vertical direction pad State (4 - Down, 8 - Up)
 
000D - Button State (4 - A, 8 - B)
 
000E*- Mario mode (00 - move mario to left side of screen, 01 - climbing up vine, 02 - went in pipe, 03 - pipe2, 04,05 - autowalk, 06 - mario dies, 08 - normal, 09 - mario cant move, higher numbers crash emu)
 
000F*- Enemy mode (00 - not shown, 01 - shown)
 
 
0014*- Show sprite (bool)
 
0016*- Current Enemy type 06 - goomba; 11 - lakitu; 2a - surfing lift
 
001B*- Current power up 2E - Mushroom/fire
 
001D - 00 when standing, 01 when jumping, 02 when falling, 03 when sliding down flagpole
 
  
0023 - set to 80 when a power up on screen. if set above 06, game will run power up checking routine
+
{| border="1" align="center" cellpadding="4" cellspacing="0" style="margin: 0 0 1em 1em; background: #f7f8ff; border: 1px #8888cc solid; border-collapse: collapse; font-size: 95%"
002A*- Coin anim (?)
+
|- style=background:#ccccff
002B*- Coin anim (?)
+
!'''RAM'''  || '''Information'''
002C*- Coin anim (?)
+
|-
002D*- Coin anim (?)
+
|0x0000 || Temp/various uses. Is used in vertical physics for gravity acceleration (value copied from 0x0709).
002E*- Coin anim (?)
+
|-
002F*- Coin anim (?)
+
|0x0001      || Player's animation
 +
|-
 +
|0x0002      || Temp/various. Something to do with player y (but it skips to 0 every x frames, even when you dont move)
 +
|-
 +
|0x0003      || Player's direction (and others).
 +
* 1 - Right
 +
* 2 - Left
 +
|-
 +
|0x0004      || How much to load
 +
|-
 +
|0x0005      || Something to do with player x (same as 0x0002)
 +
|-
 +
|0x0008 || Object Offset.
 +
|-
 +
|0x0009 || Frame Counter. Count number of Frames.
 +
|-                 
 +
|0x000A      || Button state AB (flags)
 +
* 0x00 - No Button
 +
* 0x40 - A
 +
* 0x80 - B
 +
* 0xC0 - Both
 +
|-
 +
|0x000B      || Vertical direction input state (flags);
 +
* 0x00 - No Button
 +
* 0x40 - Down
 +
* 0x80 - Up
 +
* 0xC0 - Both
 +
|-
 +
|0x000E      || Player's state
 +
* 0x00 - Leftmost of screen
 +
* 0x01 - Climbing vine
 +
* 0x02 - Entering reversed-L pipe
 +
* 0x03 - Going down a pipe
 +
* 0x04 - Autowalk
 +
* 0x05 - Autowalk
 +
* 0x06 - Player dies
 +
* 0x07 - Entering area
 +
* 0x08 - Normal
 +
* 0x09 - Transforming from Small to Large (cannot move)
 +
* 0x0A - Transforming from Large to Small (cannot move)
 +
* 0x0B - Dying
 +
* 0x0C - Transforming to Fire Mario (cannot move)
 +
|-
 +
|0x000F-0x0013|| Enemy drawn? Max 5 enemies at once.
 +
* 0 - No
 +
* 1 - Yes (not so much drawn as "active" or something)
 +
|-
 +
|0x0014      || Powerup drawn? (Corresponds with hitbox at 0x04C4). If a powerup is on screen and a second one would appear, the first one disappears (completely). You can see this in 1.1, get the star and open the powerup at the top. Hitbox is shared.
 +
* 0 - No
 +
* 1 - Yes
 +
|-
 +
|0x0016/A    || Enemy type (5x).
 +
* 0x00 - Green Koopa
 +
* 0x01 - Red Koopa
 +
* 0x02 - Buzzy beetle
 +
* 0x03 - Red Koopa
 +
* 0x04 - Green Koopa
 +
* 0x05 - Hammer brother
 +
* 0x06 - Goomba
 +
* 0x07 - Blooper
 +
* 0x08 - BulletBill FrenzyVar 
 +
* 0x09 - Green Koopa paratroopa
 +
* 0x0A - Grey CheepCheep
 +
* 0x0B - Red CheepCheep       
 +
* 0x0C - Pobodoo
 +
* 0x0D - Piranha Plant
 +
* 0x0E - Green Paratroopa Jump 
 +
* 0x0F - Crashes game(status bar margin)
 +
* 0x10 - Bowser's flame
 +
* 0x11 - Lakitu               
 +
* 0x12 - Spiny Egg
 +
* 0x13 - Nothing
 +
* 0x14 - Fly CheepCheep
 +
* 0x15 - Bowser's Flame
 +
* 0x16 - Fireworks
 +
* 0x17 - BulletBill Frenzy
 +
* 0x18 - Stop Frenzy
 +
* 0x1B/0x1C/0x1D/0x1E - Firebar
 +
* 0x1F - Long Firebar (castle) AND sets previous enemy slot to 0x20 or else only half of the line shows
 +
* 0x24/0x25 - Static lift
 +
* 0x26/0x27 - Vertical going lift
 +
* 0x28 - Horizontal going lift
 +
* 0x29 - Static lift (Will Fall if Player stays on it for too long)
 +
* 0x2A - Horizontal forward moving lift with strange hitbox
 +
* 0x2B/0x2C - Halves of double lift (like 1.2)
 +
* 0x2D - Bowser (special), will try to set previous addr to 2D as well, if unable only his ass shows :) He also tries to reach a certain height, if not there already, before starting his routine.
 +
* 0x2E - PowerUp Object
 +
* 0x2F - Vine Object
 +
* 0x30 - Flagpole Flag Object   
 +
* 0x31 - StarFlag Object       
 +
* 0x32 - Jump spring Object
 +
* 0x33 - BulletBill CannonVar
 +
* 0x34 - Warpzone
 +
* 0x35 - Retainer Object       
 +
* 0x36 - Crash
 +
* 0x37 - 2 Little Goomba.
 +
* 0x38 - 3 Little Goomba.
 +
* 0x3A - Skewed goomba.
 +
* 0x3B - 2 Koopa Troopa.
 +
* 0x3C - 3 Koopa Troopa.
 +
|-
 +
|0x001B      || Powerup on screen
 +
* 0x00 - No
 +
* 0x2E - Yes
 +
|-
 +
|0x001D      || Player "float" state
 +
* 0x00 - Standing on solid/else
 +
* 0x01 - Airborn by jumping
 +
* 0x02 - Airborn by walking of a ledge
 +
* 0x03 - Sliding down flagpole
 +
|-
 +
|0x001E,0x0023|| Enemy state? Haven't tested much.
 +
* 0x00 - Does _not_ mean they don't exist
 +
* 0x01 - falling_enemy or Bullet_Bill drawn(not killed yet).
 +
* 0x04 - Enemy Stomped
 +
* 0x20 - BulletBill / CheepCheep / hammer_bro stomped
 +
* 0x22 - killed with fire or star
 +
* 0x23 - bowser_killed
 +
* 0xC4 - koopa stomped falling
 +
* 0x84 - koopa or buzzyBeetle Stomped and moving;
 +
* 0xFF - Will kill them off (like getting hit by a star)
 +
|-
 +
|0x0023      || Powerup state/heading (there's probably another register to check)
 +
* 0x02-0x06 - 'question block' hit sequence
 +
* 0x07-0x11 - Powerup emerging sequence
 +
* 0xC0 - When shroom airborn going right
 +
* 0xC2 - When shroom airborn going left
 +
* 0x80 - When powerup moving right (or not moving at all)
 +
* 0x82 - When powerup moving left
 +
|-
 +
|0x0024/5    || Fireball drawn (corresponds with hitbox coordinates 0x04C8/C) when not 0
 +
|-
 +
|0x002A-0x0032|| Hammers (correspond with last 9 hitbox coordaintes, 0x04D0-0x04F3), when not 0
 +
|-
 +
|0x0030/2    || Coins (corresponds with last three coordinates, 0x04E0, 0x04EC, 0x04F0), when not 0
 +
|-
 +
|0x0033      || Player facing Direction.
 +
* 0 - Not on screen
 +
* 1 - Right
 +
* 2 - Left
 +
|-
 +
|0x0039      || Powerup type (when on screen)
 +
* 0 - Mushroom
 +
* 1 - Flower
 +
* 2 - Star
 +
* 3 - 1up
 +
|-
 +
|0x0045      || Player Moving Direction.
 +
* 1 - Right
 +
* 2 - Left
 +
|-
 +
|0x0046/A    || Enemy heading
 +
* 1 - Right
 +
* 2 - Left
 +
|-
 +
|0x004B      || Shroom heading
 +
* 1 - Right
 +
* 2 - Left
 +
|-
 +
|0x0057      || Player horizontal speed
 +
* 0xD8<0 - Moving left
 +
* 0x00 - Not moving
 +
* 0<0x28 - Moving right
 +
|-
 +
|0x0058/C    || Enemy horizontal speed
 +
* 0xD8<0 - Moving left
 +
* 0x00 - Not moving
 +
* 0<0x28 - Moving right
 +
|-
 +
|0x006D      || Player horizontal position in level
 +
|-
 +
|0x006E-0x0072|| Enemy horizontal position in level
 +
|-
 +
|0x0086      || Player x position on screen
 +
|-
 +
|0x0087/B    || Enemy x position on screen
 +
|-
 +
|0x008C      || Powerup x position on screen
 +
|-
 +
|0x008D      || Fireball X-Position.
 +
|-
 +
|0x00D5      || Fireball Y-Position
 +
|-
 +
|0x008F-0x0091|| Brick smash 1 y
 +
|-
 +
|0x0090/2    || Brick smash 2 y
 +
|-
 +
|0x009F      || Player vertical velocity in whole pixels (signed byte), see 0x0433 for fractional
 +
* Upward: FB = normal jump
 +
* Downward: 05 = fastest fall
 +
|-
 +
|0x00A0/4    || Enemy vertical velocity
 +
* Upward - 0xFB ~ 0xFF (FB = fastest)
 +
* Downward - 0x01 ~ 0x04 (04 = fastest)
 +
|-
 +
|0x00A2/3    || Timers for the fireballlines (castles). I guess their position can be determined from this. Runs 0-0x1F for one circle (slow?)
 +
|-
 +
|0x00B5      || Player vertical screen position
 +
* viewport = 1
 +
* above viewport = 0
 +
* anywhere below viewport is >1
 +
* (when falling down a pit this will increase up to 5)
 +
|-
 +
|0x00B6/A    || Enemy vertical screen position (same as player)
 +
* viewport = 1
 +
* above viewport = 0
 +
* anywhere below viewport is >1
 +
* (when falling down a pit this will increase up to 5)
 +
|-
 +
|0x00BB      || Powerup vertical screen position (same as player)
 +
* viewport = 1
 +
* above viewport = 0
 +
* anywhere below viewport is >1
 +
* (when falling down a pit this will increase up to 5)
 +
|-
 +
|0x00CE      || Player y pos on screen (multiply with value at 0x00B5 to get level y pos)
 +
|-
 +
|0x00CF-0x00D3|| Enemy y pos on screen (multiply with value at 0x00B6/A to get level y pos)
 +
|-
 +
|0x00D4      || Powerup sprite y (multiply with value at 0x00BB to get level y pos)
 +
|-
 +
|0x00D79      || Brick smash 1 x
 +
|-
 +
|0x00D8/A    || Brick smash 2 x
 +
|-
 +
|0x00E4/6    || Y of air bubbles when under water :p I think their x is equal to the player, not sure.
 +
|-
 +
|0x00A6      || Fireball_Y_Speed     
 +
|-
 +
|0x00A7      || Fireball 2 y
 +
|-
 +
|0x00D6      || Vertical 1 vert speed
 +
|-
 +
|0x00D7      || Fireball 2 vert speed
 +
|-
 +
|0x00E7      || Level layout address
 +
|-
 +
|0x00E9      || Enemy layout address
 +
|-
 +
|0x00FA      || "Pause" Effect Register
 +
|-
 +
|0x00FB      || Area Music Register
 +
|-
 +
|0x00FC      || Event Music Register
 +
|-
 +
|0x00FD      || Sound Effect Register 1 (brick shatter, Bowser flame, others?)
 +
|-
 +
|0x00FE      || Sound Effect Register 2 (coin collect, powerup/vine emerge, powering-up, 1-Up, bullet blase, Bowser's plummet, others)
 +
|-
 +
|0x00FF      || Sound Effect Register 3 (jumping, bumping head, stomping, kicking, others)
 +
|-
 +
|0x0110/5    || Score tiles (the floating numbers when you get points, this tells which number should be shown, it's a palette, surprise surprise...)
 +
|-
 +
|0x0117/B    || Score x
 +
|-
 +
|0x011E-0x0122|| Score y
 +
|-
 +
|0x03AD      || Player x pos within current screen offset
 +
|-
 +
|0x03AE-0x03B2|| Enemy x pos within current screen offset
 +
|-
 +
|0x03B3      || Powerup x pos within current screen offset
 +
|-
 +
|0x03B8      || Player y pos within current screen (vertical screens always offset at 0?)
 +
|-
 +
|0x03B9/D    || Enemy y pos within current screen (vertical screens always offset at 0?)
 +
|-
 +
|0x03BE      || Powerup y pos within current screen (vertical screens always offset at 0?)
 +
|-
 +
|0x03AF      || Fireball Relative X-Position.
 +
|-
 +
|0x03BA      || Fireball Relative Y-Position.
 +
|-
 +
|0x03C4      || Player palette, cycles when you have a star (not when you become fiery though, even though that uses the exact same cycles)
 +
|-
 +
|0x0400      || Player Object X-MoveForce.
 +
|-
 +
|0x0416      || Player Object YMF_Dummy.
 +
|-
 +
|0x0417/B    || Enemy YMF_Dummy.
 +
|-
 +
|0x0433 || Player vertical fractional velocity. This is not accounted for when clamping to max fall velocity etc.  
 +
|-
 +
|0x043A      || Fireball stuff?
 +
|-
 +
|0x043B      || Fireball stuff?
 +
|-
 +
|0x0450      || Player max velocity to the left. Values taken from
 +
* 0xE4: max walking vel
 +
* 0xD8: max running vel (changes to this when pressing B+L)
 +
|-
 +
|0x0456      || Player max velocity to the right
 +
* 0x1C - max walking vel
 +
* 0x30 - max running vel (changes to this when pressing B+R)
 +
|-
 +
|0x0490      || Player Collision_Bits,if you collided with Any Block / Object / Brick , Then Value will change to 0xFE otherwise it will stay 0xFF.
 +
|-
 +
|0x0491 || Enemy Collision_Bits, Value is set to 0x01 whenever player gets collided with enemy otherwise it stays 0x00.
 +
|-
 +
|0x04AC      || Player hitbox (1x4 bytes, <<x1,y1> <x2,y2>>)
 +
|-
 +
|0x04B0      || Enemy hitboxes (5x4 bytes, <<x1,y1> <x2,y2>>)
 +
|-
 +
|0x04C4      || Powerup hitbox (1x4 bytes, <<x1,y1> <x2,y2>>)
 +
|-
 +
|0x04C8      || (Fiery) fireball hitbox (2x4 bytes, <<x1,y1> <x2,y2>>)
 +
|-
 +
|0x04D0      || Hammer hitbox (9x4 bytes, <<x1,y1> <x2,y2>>) (like from bowser, hammerbros)
 +
|-
 +
|0x04E0      || Coin hitboxes (3x4 bytes, <<x1,y1> <x2,y2>>) (used for coins from questionmarks and when getting coins above bricks by hitting the brick)
 +
|-
 +
|0x0500-0x069F|| Current tile (Does not effect graphics)
 +
|-
 +
|0x06CE      || Fireball counter (increments as you fire). First bit probably used to toggle between hitbox indices
 +
|-
 +
|0x06D4      || Cycle counter of gold coin in top of screen and image of questionmark blocks
 +
|-
 +
|0x06D5      || PlayerGfx_Offset ,  Player sprite Mario state (didn't check them myself)
 +
* 0xB8 - small stand
 +
* [0x60, 0x70, 0x80] - small walk cycle
 +
* 0xC8 - big stand
 +
* 0x20 - big jump
 +
* [0x00, 0x10, 0x20] - bigwalk cycle
 +
* 0x50 - crouch
 +
|-
 +
|0x06D6      || Warpzone Control. Game Checks value from here and decides which warpzone to load.
 +
|-
 +
|0x06D9      || MultiLoop Correct Control.
 +
|-
 +
|0x06DE      || ChangeArea Timer.
 +
|-
 +
|0x06FC      || Player 1 input (regular flag pattern), select and start are reset after 1 frame. See 0x074A for more accurate input.
 +
|-
 +
|0x06FD      || Player 2 input (regular flag pattern), select and start are reset after 1 frame. See 0x074B for more accurate input.
 +
|-
 +
|0x0700      || Player X-Speed Absolute ,Player speed in _either_ direction (0 - 0x28)
 +
|-
 +
|0x0701      || Friction Adder High ,Is breaking when 1 (freeze this and you immediately stand still when you stop moving)
 +
|-
 +
|0x0702      || Walk animation (didn't check values)
 +
* 0xE4 - is running
 +
* 0x30 - skidding
 +
* 98 - normal
 +
* Also some other values when starting to run or when turning around
 +
|-
 +
|0x0704      || Swimming Flag ,Set to 0 to swim
 +
|-
 +
|0x0705      || Player X-MoveForce, runs when you press left or right
 +
|-
 +
|0x0709      || Current gravity which will be applied to the player sprite (see 0x0000, 0x0433 and Notes page).
 +
* Based on the current horizontal velocity, this takes on different values:
 +
** 0x30 in a jump when still or walking slowly.
 +
** 0x2D in a jump when walking at full speed.
 +
** 0x38 in a jump when running at full speed.
 +
** If player is falling, takes values from 0x070A.
 +
|-
 +
|0x070A      || Current fall gravity (not sure how this is decided). This value is decided, then copied to 0x0709 IF Mario is falling (0x009F positive).
 +
* Based on the current horizontal velocity, this takes on different values:
 +
** 0xA8 for falling when still or walking slowly.
 +
** 0x90 for falling when walking at full speed.
 +
** 0xD0 for falling when running at full speed.
 +
|-
 +
|0x070B      || When not 0, runs big-small animation (but does not affect anything internally)
 +
|-
 +
|0x070C      || Player walk animation delay, in game frames (1/60 s). 0x05=slow walk, 0x03=full walk speed, 0x02=fastest/running speed
 +
|-
 +
|0x070D      || Player walk animation current frame index (0,1,2,0,etc)
 +
|-
 +
|0x0712      || Is DeathMusicLoaded? (boolean)  Usually triggered for falling deaths.
 +
|-
 +
|0x0714      || 0x04 when ducking as big mario, 0 otherwise (also when ducking as small). Keeps being 4 when you slide of an edge while ducking (so does not affect image, but does when set to 4 and being small...). When this register is frozen, you can move like normal, you're just ducking while doing so.
 +
|-
 +
|0x071A      || Current screen (in level)
 +
|-
 +
|0x071B      || Next screen (in level)
 +
|-
 +
|0x071C      || ScreenEdge X-Position, loads next screen when player past it?
 +
|-
 +
|0x071D      || Player x position, moves screen position forward when this moves
 +
|-
 +
|0x071E      || Column Sets . Counts back, done when this is FF. you can see the level being built in memory up as this counter progresses, one frame at a time.
 +
|-
 +
|0x071F      || AreaParser TaskNumber,  runs from 4 to 0.
 +
|-
 +
|0x0722      || Player HitDetect Flag. Determines whether allow Player to Pass through from Bricks or not. (Settting it to 0xFF will cause Player to Penetrate through Walls/Bricks) 
 +
|-
 +
|0x0723      || Scroll Lock, 1 = Prevent screen from scrolling right, i.e. Bowser, warp zone, etc.  0 = Allow scroll.
 +
|-
 +
|0x072C      || Current level layout index
 +
|-
 +
|0x072F      || Last value of 0x072C
 +
|-
 +
|0x0733      || Replaces trees and Mushroom platforms
 +
* 0 - All Mushroom platforms replaced with trees
 +
* 1 - All trees replaced with Mushroom platforms, overwrites first BG palette line
 +
* 2 - All trees and Mushroom platforms replaced Bill Blasters
 +
* 3 - All trees and Mushroom platforms removed
 +
* 4 - All trees and Mushroom platforms removed, causes invisible floors and ceilings to appear
 +
* 5+ - Crash
 +
|-
 +
|0x0739      || Current enemy layout index
 +
|-
 +
|0x0743      || When true, new groundtiles and blocktiles will be loaded as clouds (coinblocks and questionmark blocks remain the same!)
 +
|-
 +
|0x0744      || Something with background palette
 +
|-
 +
|0x0747      || Timer Control.
 +
|-
 +
|0x074A      || Buttons pressed player 1 (keeps updated, even while paused or whatever, the other register resets the start and select immediately)
 +
|-
 +
|0x074B      || Buttons pressed player 2 (keeps updated, even while paused or whatever, the other register resets the start and select immediately)
 +
|-
 +
|0x074E      || "Gold" block pallette - 00 turns blocks into water world and makes bubble, but no swimming
 +
|-
 +
|0x0750      || Area Offset- Check [http://1st.geocities.jp/bysonshome/smb1/index256a_2.html this page] for full list of value results.
 +
|-
 +
|0x0752      || Controls level entry (climbing up vine, coming up pipe, falling down from top of screen, etc.).
 +
|-
 +
|0x0753      || Affects mario/luigi before level load, disables movement when not 0 after level load
 +
|-
 +
|0x0754      || Player's state. This also affects hitting stuff. Decreases when you eat a mushroom! Increases when you get hit.
 +
* 0 - Big
 +
* 1 - Small
 +
* 2 - When set to two, you can't hit blocks but you can stand on them... (no idea where this is used)
 +
* 5 - Makes you small (even when your state is big or even fiery, in fiery case you become a small fiery)
 +
|-
 +
|0x0755      || Player_Position For Scroll. It moves up to 0x70 (sometimes even 0x72) when player moves. When this register is frozen, NOTHING changes in the level, not even internally.
 +
|-
 +
|0x0756      || Powerup state
 +
* 0 - Small
 +
* 1 - Big
 +
* >2 - fiery
 +
|-
 +
|0x075E      || Set to 1 during "prelevel" screen
 +
|-
 +
|0x075A      || Lives
 +
|-
 +
|0x075E      || Coins
 +
|-
 +
|0x075F      || World
 +
|-
 +
|0x0760      || Level
 +
|-
 +
|0x0770      || Game mode. Setting this will take affect immediately. You can skip a WORLD by setting it to 02 (and waiting a second or two). Crashes when set to >02 or when set to 02 in world 8. You can activate the demo at _any_ time. Set to 01 at the title screen and you start the game with the title screen showing.
 +
* 00 - Start demo
 +
* 01 - Start normal
 +
* 02 - End current world
 +
* 03 - End game (dead).
 +
|-
 +
|0x0772      || Level loading setting. You can set this while playing.
 +
- 00 - Restarts level
 +
- 01 - Right before the start of a level
 +
- 02 - Has an effect but unsure what (skip frame or input?)
 +
- 03 - Reset level. When in a level when doing this midlevel, this sometimes teleports you to a bonuslevel. exiting that bonuslevel enters another bonuslevel (as if you were exiting a pipe though), and exiting that level enters the normal world again.
 +
|-
 +
|0x0773      || Level palette
 +
* 00 - Normal
 +
* 01 - Underwater
 +
* 02 - Night
 +
* 03 - Underground
 +
* 04 - Castle
 +
|-
 +
|0x0774      || Disable ScreenFlag.
 +
|-
 +
|0x0775      || Scroll Amount         
 +
|-
 +
|0x0776      || Game Pause Status.
 +
|-
 +
|0x0777      || GamePauseTimer,  when (un)pausing, you can only re/unpause when this is zero
 +
|-
 +
|0x0778      || Mirror_PPU CTRL_REG1  Affects blocks and level, lowest bit seems to toggle loaded screen..? also affects sprite palletes of objects
 +
|-
 +
|0x0779      || Mirror_PPU CTRL_REG2 Affects colors.. most values crash. It is the value written to the PPU at 0x2001. See [http://wiki.nesdev.com/w/index.php/PPU_registers#Mask_.28.242001.29_.3E_write this page] for details.
 +
* 1E - Default
 +
* 1F - Makes it grey scale
 +
* 3E - Intensify red colors
 +
* 5E - Intensify green colors
 +
* 9E - Intensify blue colors
 +
|-
 +
|0x077A      || Number_Of_Players ,If true, will load luigi when mario dies. You have to unset 0753 to move with luigi though
 +
|-
 +
|0x077F ||Interval Timer Control. runs from 20 to 0 (Also Called 21 FrameRule) From This timer Game Checks for level Completion After every 21 Frames.
 +
|-
 +
|0x0780-0x07A2|| All kinds of timers. Should investigate more to see what timer does what. Some are explained below
 +
|-
 +
|0x0781      || Player Animation Timer     
 +
|-
 +
|0x0782      || JumpSwim Timer       
 +
|-
 +
|0x0783        ||Running Timer
 +
|-
 +
|0x0784 ||BlockBounce Timer
 +
|-
 +
|0x0785 ||SideCollision Timer
 +
|-
 +
|0x0786 ||Jumpspring Timer
 +
|-
 +
|0x0787 ||GameTimer Control Timer (Setting it to 0x02 will Freeze Game Time)
 +
|-
 +
|0x0789 ||ClimbSide Timer
 +
|-
 +
|0x078A ||EnemyFrame Timer
 +
|-
 +
|0x078F ||FrenzyEnemy Timer
 +
|-
 +
|0x0790 ||BowserFireBreath Timer
 +
|-
 +
|0x0791 ||Stomp Timer
 +
|-
 +
|0x0792 ||AirBubble Timer 
 +
|-
 +
|0x0795      || Timer: falling down a pit (and more...)
 +
|-
 +
|0x079D      || Timer: multi-coin block
 +
|-
 +
|0x079E      || Timer: invincible after enemy collision. Freeze this register to anything but 0 and you remain invincible
 +
|-
 +
|0x079F      || Timer: star (when you have star)
 +
|-
 +
|0x07A0      || Timer: "prelevel" screen timer, fired again when level starts
 +
|-
 +
|0x07A2      || Timer: demo start
 +
|-
 +
|0x07B1      || EventMusic Buffer , If true, you wont "die" after falling or getting hit while small. You will be unable to move at the bottom of the screen though until you set it to 00
 +
|-
 +
|0x07D7/C    || High score (1000000 100000 10000 1000 100 10) in BCD Format.
 +
|-
 +
|0x07DD-0x07E2|| Mario score (1000000 100000 10000 1000 100 10) in BCD Format.
 +
|-
 +
|0x07D3/8    || Luigi score (1000000 100000 10000 1000 100 10) in BCD Format.
 +
|-
 +
|0x07ED/E    || Coins (10 1) (on screen only) 
 +
|-
 +
|0x07F8/A    || Digits of Game Timer (0100 0000 0000) in BCD Format.
 +
|-
 +
|0x07FC      || Game difficulty (set when you beat the game)
 +
|-
 +
|0x87F2      || Warpzone Control byte for the left Pipe. Game Checks this value and assigns the according byte to the World number AND the tile to draw on top of it.
 +
|-
 +
|0x87F3      || Warpzone Control byte for the middle Pipe. Game Checks this value and assigns the according byte to the World number AND the tile to draw on top of it.
 +
|-
 +
|0x87F4      || Warpzone Control byte for the right Pipe. Game Checks this value and assigns the according byte to the World number AND the tile to draw on top of it.
 +
|}
  
0030*- Coin anim (?)
+
{{Internal Data|game=Super Mario Bros.}}
0031*- Coin anim (?)
 
0032*- Run 200pts animation or throw hammer (?)
 
0033*- 00 to F1: face right, F2 - FF face left
 
0039*- Power up type on screen (00 - mushroom, 01 - fire flower, 02 - starman, 03 - 1UP)
 
 
 
0045 - Mario Direction (01 - Right, 02 - Left)
 
0046 - Enemy Direction
 
0047 - Enemy Direction
 
004B - Mushroom Sprite Direction (01 - Right, 02 - Left)
 
 
 
0057 - horizontal speed (pos/neg)
 
0058 - enemy speed (pos/neg)
 
0059 - enemy speed (pos/neg)
 
005A - enemy speed (pos/neg)
 
 
 
006D*- Horitonal position (?)
 
 
 
0070 - current page (?)
 
0071 - current page (?)
 
0072 - current page (?)
 
0073 - current page - 1 (?)
 
 
 
0086*- Mario x location
 
0087*- current enemy 1 sprite x location
 
0088*- current enemy 2 sprite x location
 
008C*- current power up sprite x location
 
 
 
009F - Vertical speed
 
 
 
00B5 - appears to be the screen height multiplier (ie [mario's y location at 00CE] * [this byte] = [mario's true y val])
 
 
 
00CE*- Mario sprite y pos
 
00CF*- enemy 1 sprite y pos
 
 
 
00D0*- enemy 2 sprite y pos
 
00D4*- Power up sprite y pos
 
 
 
03AD - mario x pos
 
03AE - enemy x pos
 
 
 
03B8 - mario vertical pos
 
03B9 - enemy vertical pos
 
 
 
03C4*- mario palette #
 
 
 
0400 - horizontal movement counter
 
 
 
0416 - mario vert position
 
 
 
0433 - Mario vertical speed
 
 
 
0450 - F8 if running
 
0456 - 28 if running
 
 
 
0490*- FF normal game play allows horizontal movement
 
 
 
04C4 - power up location 1
 
04C6 - power up location 2
 
 
 
06CE - fire ball counter (?) increases when fireball thrown
 
 
 
06D4 - gold color cycle
 
06D5 - Mario state (?) (B8 - small stand, [60, 70, 80] - small walk cycle, C8 - big stand, 20 - big jump, [00, 10, 20] - bigwalk cycle, 50 - crouch)
 
 
 
06FC - buttons pressed
 
 
 
0700 - x speed
 
0701 - is skidding
 
0702 - E4 - is running, 30 - skidding, 98 normal
 
0705 - some kind of horizontal movement counter, doesnt count while in air
 
070B - if true, runs big-small animation (doesnt affect state though)
 
 
 
0714*- 04 when crouching
 
071A - current level room
 
071B - next level room
 
071C*- affects marios Horiz pos (on screen only though?)
 
071D*- affects marios Horiz pos (on screen only though?)
 
071F - scroll speed?
 
 
 
0743 - if true, is cloud level (game sets to $03), can be set mid level
 
0744 - affects background color
 
0747 - timer (?) pauses enemies while set
 
074A - Buttons pressed
 
074E - "Gold" block pallette - 00 turns blocks into water world and makes bubble, but no swimming
 
 
 
0752 - if not 00 will crash game when level load
 
0753 - affects mario/luigi if set before level load, but prevents movement in level if not 00
 
0754 - if true, is small
 
0756 - power up state (small/big/fire)
 
0757 - set to 01 during "prelevel" screen
 
075A - lives
 
075E - coins
 
 
 
0770*- game mode (00 - demo, 01 - normal, 02 - End World, 03 - End Game (?) ) (set to 01 at the title screen and you start the game with the title screen showing )
 
0771
 
0772*- 00 restarts level
 
0773*- Level palette (00 - normal, 01 - underwater, 02 - night, 03 - underground, 04 - castle)
 
0774 - ?? changes on game and level start. crashes game if changed
 
0775 - scroll speed (?)
 
0776*- is paused (bool)
 
0777 - timer (set when pausing/unpausing
 
0778*- affects blocks
 
0779*- affects colors.. most values crash, 1E default, 1F makes it grey scale
 
077A*- if true, will load luigi when mario dies. you have to unset 0753 to move with luigi though
 
 
 
0780*- timer - (all timers count down from whatever value they are set to)
 
0781*- timer - fired when fireball shot
 
0782*- timer - fired when jumping
 
0783*- timer
 
0784*- timer
 
0785*- timer
 
0786*- timer
 
0787 - ??
 
0788*- timer
 
0789 - ??
 
078A*- timer
 
078B*- timer
 
078C*- timer
 
078D*- timer
 
078E*- timer
 
078F*- timer
 
 
 
0790*- timer
 
0791*- timer -
 
0792*- timer
 
0793*- timer
 
0794*- timer
 
0795*- timer - fired when you fall down a pit
 
0796*- timer -
 
0797*- timer
 
0798*- timer
 
0799*- timer
 
079A*- timer
 
079B*- timer
 
079C*- timer
 
079D*- timer
 
079E*- flashing timer (when you get hit and are invincible for a short while)
 
079F*- starman timer
 
 
 
07A0*- timer - "prelevel" screen timer, fired again when level starts
 
07A1*- timer
 
07A2*- timer - counts how long before demo is run on main screen
 
07A7 - ?? rapidly changing even when paused
 
07A8 - ?? rapidly changing even when paused
 
07A9 - ?? rapidly changing even when paused
 
07AA - ?? rapidly changing even when paused
 
07AB - ?? rapidly changing even when paused
 
07AC - ?? rapidly changing even when paused
 
07AD - ?? rapidly changing even when paused
 
 
 
07B1*- if true, you wont "die" after falling or getting hit while small. you will be unable to move at the bottom of the screen though until you set it to 00)
 
07BD*- timer (?) 10 when mushroom/fireflower block last hit (fired when power up grabbed or coin block hit)
 
 
 
07D7*- high score - 1000000s
 
07D8*- high score - 100000s
 
07D9*- high score - 10000s
 
07DA*- high score - 1000s
 
07DB*- high score - 100s
 
07DC*- high score - 10s
 
07DD*- mario score 1000000s
 
07DE*- mario score - 100000s
 
07DF*- mario score - 10000s
 
 
 
07E0*- mario score - 1000s
 
07E1*- mario score - 100s
 
07E2*- mario score - 10s
 
07E3*- luigi score 1000000s
 
07E4*- luigi score - 100000s
 
07E5*- luigi score - 10000s
 
07E6*- luigi score - 1000s
 
07E7*- luigi score - 100s
 
07E8*- luigi score - 10s
 
07ED*- coins 10s (on screen only)
 
07EE*- coins 1s (on screen only)
 
 
 
07F8*- time - 100s
 
07F9*- time - 10s
 
07FA*- time - 1s
 
07FC*- if true, game is harder (set after you beat the game)
 

Latest revision as of 09:57, 8 June 2022

This data is relevant to Super Mario Bros. (JU) (PRG0) [!] and may not be correct for other dumps. Most (but not all?) of these addresses apply to the Japanese version of Lost Levels, otherwise known as Super Mario Bros. 2 [Japanese].

Table

RAM Information
0x0000 Temp/various uses. Is used in vertical physics for gravity acceleration (value copied from 0x0709).
0x0001 Player's animation
0x0002 Temp/various. Something to do with player y (but it skips to 0 every x frames, even when you dont move)
0x0003 Player's direction (and others).
  • 1 - Right
  • 2 - Left
0x0004 How much to load
0x0005 Something to do with player x (same as 0x0002)
0x0008 Object Offset.
0x0009 Frame Counter. Count number of Frames.
0x000A Button state AB (flags)
  • 0x00 - No Button
  • 0x40 - A
  • 0x80 - B
  • 0xC0 - Both
0x000B Vertical direction input state (flags);
  • 0x00 - No Button
  • 0x40 - Down
  • 0x80 - Up
  • 0xC0 - Both
0x000E Player's state
  • 0x00 - Leftmost of screen
  • 0x01 - Climbing vine
  • 0x02 - Entering reversed-L pipe
  • 0x03 - Going down a pipe
  • 0x04 - Autowalk
  • 0x05 - Autowalk
  • 0x06 - Player dies
  • 0x07 - Entering area
  • 0x08 - Normal
  • 0x09 - Transforming from Small to Large (cannot move)
  • 0x0A - Transforming from Large to Small (cannot move)
  • 0x0B - Dying
  • 0x0C - Transforming to Fire Mario (cannot move)
0x000F-0x0013 Enemy drawn? Max 5 enemies at once.
  • 0 - No
  • 1 - Yes (not so much drawn as "active" or something)
0x0014 Powerup drawn? (Corresponds with hitbox at 0x04C4). If a powerup is on screen and a second one would appear, the first one disappears (completely). You can see this in 1.1, get the star and open the powerup at the top. Hitbox is shared.
  • 0 - No
  • 1 - Yes
0x0016/A Enemy type (5x).
  • 0x00 - Green Koopa
  • 0x01 - Red Koopa
  • 0x02 - Buzzy beetle
  • 0x03 - Red Koopa
  • 0x04 - Green Koopa
  • 0x05 - Hammer brother
  • 0x06 - Goomba
  • 0x07 - Blooper
  • 0x08 - BulletBill FrenzyVar
  • 0x09 - Green Koopa paratroopa
  • 0x0A - Grey CheepCheep
  • 0x0B - Red CheepCheep
  • 0x0C - Pobodoo
  • 0x0D - Piranha Plant
  • 0x0E - Green Paratroopa Jump
  • 0x0F - Crashes game(status bar margin)
  • 0x10 - Bowser's flame
  • 0x11 - Lakitu
  • 0x12 - Spiny Egg
  • 0x13 - Nothing
  • 0x14 - Fly CheepCheep
  • 0x15 - Bowser's Flame
  • 0x16 - Fireworks
  • 0x17 - BulletBill Frenzy
  • 0x18 - Stop Frenzy
  • 0x1B/0x1C/0x1D/0x1E - Firebar
  • 0x1F - Long Firebar (castle) AND sets previous enemy slot to 0x20 or else only half of the line shows
  • 0x24/0x25 - Static lift
  • 0x26/0x27 - Vertical going lift
  • 0x28 - Horizontal going lift
  • 0x29 - Static lift (Will Fall if Player stays on it for too long)
  • 0x2A - Horizontal forward moving lift with strange hitbox
  • 0x2B/0x2C - Halves of double lift (like 1.2)
  • 0x2D - Bowser (special), will try to set previous addr to 2D as well, if unable only his ass shows :) He also tries to reach a certain height, if not there already, before starting his routine.
  • 0x2E - PowerUp Object
  • 0x2F - Vine Object
  • 0x30 - Flagpole Flag Object
  • 0x31 - StarFlag Object
  • 0x32 - Jump spring Object
  • 0x33 - BulletBill CannonVar
  • 0x34 - Warpzone
  • 0x35 - Retainer Object
  • 0x36 - Crash
  • 0x37 - 2 Little Goomba.
  • 0x38 - 3 Little Goomba.
  • 0x3A - Skewed goomba.
  • 0x3B - 2 Koopa Troopa.
  • 0x3C - 3 Koopa Troopa.
0x001B Powerup on screen
  • 0x00 - No
  • 0x2E - Yes
0x001D Player "float" state
  • 0x00 - Standing on solid/else
  • 0x01 - Airborn by jumping
  • 0x02 - Airborn by walking of a ledge
  • 0x03 - Sliding down flagpole
0x001E,0x0023 Enemy state? Haven't tested much.
  • 0x00 - Does _not_ mean they don't exist
  • 0x01 - falling_enemy or Bullet_Bill drawn(not killed yet).
  • 0x04 - Enemy Stomped
  • 0x20 - BulletBill / CheepCheep / hammer_bro stomped
  • 0x22 - killed with fire or star
  • 0x23 - bowser_killed
  • 0xC4 - koopa stomped falling
  • 0x84 - koopa or buzzyBeetle Stomped and moving;
  • 0xFF - Will kill them off (like getting hit by a star)
0x0023 Powerup state/heading (there's probably another register to check)
  • 0x02-0x06 - 'question block' hit sequence
  • 0x07-0x11 - Powerup emerging sequence
  • 0xC0 - When shroom airborn going right
  • 0xC2 - When shroom airborn going left
  • 0x80 - When powerup moving right (or not moving at all)
  • 0x82 - When powerup moving left
0x0024/5 Fireball drawn (corresponds with hitbox coordinates 0x04C8/C) when not 0
0x002A-0x0032 Hammers (correspond with last 9 hitbox coordaintes, 0x04D0-0x04F3), when not 0
0x0030/2 Coins (corresponds with last three coordinates, 0x04E0, 0x04EC, 0x04F0), when not 0
0x0033 Player facing Direction.
  • 0 - Not on screen
  • 1 - Right
  • 2 - Left
0x0039 Powerup type (when on screen)
  • 0 - Mushroom
  • 1 - Flower
  • 2 - Star
  • 3 - 1up
0x0045 Player Moving Direction.
  • 1 - Right
  • 2 - Left
0x0046/A Enemy heading
  • 1 - Right
  • 2 - Left
0x004B Shroom heading
  • 1 - Right
  • 2 - Left
0x0057 Player horizontal speed
  • 0xD8<0 - Moving left
  • 0x00 - Not moving
  • 0<0x28 - Moving right
0x0058/C Enemy horizontal speed
  • 0xD8<0 - Moving left
  • 0x00 - Not moving
  • 0<0x28 - Moving right
0x006D Player horizontal position in level
0x006E-0x0072 Enemy horizontal position in level
0x0086 Player x position on screen
0x0087/B Enemy x position on screen
0x008C Powerup x position on screen
0x008D Fireball X-Position.
0x00D5 Fireball Y-Position
0x008F-0x0091 Brick smash 1 y
0x0090/2 Brick smash 2 y
0x009F Player vertical velocity in whole pixels (signed byte), see 0x0433 for fractional
  • Upward: FB = normal jump
  • Downward: 05 = fastest fall
0x00A0/4 Enemy vertical velocity
  • Upward - 0xFB ~ 0xFF (FB = fastest)
  • Downward - 0x01 ~ 0x04 (04 = fastest)
0x00A2/3 Timers for the fireballlines (castles). I guess their position can be determined from this. Runs 0-0x1F for one circle (slow?)
0x00B5 Player vertical screen position
  • viewport = 1
  • above viewport = 0
  • anywhere below viewport is >1
  • (when falling down a pit this will increase up to 5)
0x00B6/A Enemy vertical screen position (same as player)
  • viewport = 1
  • above viewport = 0
  • anywhere below viewport is >1
  • (when falling down a pit this will increase up to 5)
0x00BB Powerup vertical screen position (same as player)
  • viewport = 1
  • above viewport = 0
  • anywhere below viewport is >1
  • (when falling down a pit this will increase up to 5)
0x00CE Player y pos on screen (multiply with value at 0x00B5 to get level y pos)
0x00CF-0x00D3 Enemy y pos on screen (multiply with value at 0x00B6/A to get level y pos)
0x00D4 Powerup sprite y (multiply with value at 0x00BB to get level y pos)
0x00D79 Brick smash 1 x
0x00D8/A Brick smash 2 x
0x00E4/6 Y of air bubbles when under water :p I think their x is equal to the player, not sure.
0x00A6 Fireball_Y_Speed
0x00A7 Fireball 2 y
0x00D6 Vertical 1 vert speed
0x00D7 Fireball 2 vert speed
0x00E7 Level layout address
0x00E9 Enemy layout address
0x00FA "Pause" Effect Register
0x00FB Area Music Register
0x00FC Event Music Register
0x00FD Sound Effect Register 1 (brick shatter, Bowser flame, others?)
0x00FE Sound Effect Register 2 (coin collect, powerup/vine emerge, powering-up, 1-Up, bullet blase, Bowser's plummet, others)
0x00FF Sound Effect Register 3 (jumping, bumping head, stomping, kicking, others)
0x0110/5 Score tiles (the floating numbers when you get points, this tells which number should be shown, it's a palette, surprise surprise...)
0x0117/B Score x
0x011E-0x0122 Score y
0x03AD Player x pos within current screen offset
0x03AE-0x03B2 Enemy x pos within current screen offset
0x03B3 Powerup x pos within current screen offset
0x03B8 Player y pos within current screen (vertical screens always offset at 0?)
0x03B9/D Enemy y pos within current screen (vertical screens always offset at 0?)
0x03BE Powerup y pos within current screen (vertical screens always offset at 0?)
0x03AF Fireball Relative X-Position.
0x03BA Fireball Relative Y-Position.
0x03C4 Player palette, cycles when you have a star (not when you become fiery though, even though that uses the exact same cycles)
0x0400 Player Object X-MoveForce.
0x0416 Player Object YMF_Dummy.
0x0417/B Enemy YMF_Dummy.
0x0433 Player vertical fractional velocity. This is not accounted for when clamping to max fall velocity etc.
0x043A Fireball stuff?
0x043B Fireball stuff?
0x0450 Player max velocity to the left. Values taken from
  • 0xE4: max walking vel
  • 0xD8: max running vel (changes to this when pressing B+L)
0x0456 Player max velocity to the right
  • 0x1C - max walking vel
  • 0x30 - max running vel (changes to this when pressing B+R)
0x0490 Player Collision_Bits,if you collided with Any Block / Object / Brick , Then Value will change to 0xFE otherwise it will stay 0xFF.
0x0491 Enemy Collision_Bits, Value is set to 0x01 whenever player gets collided with enemy otherwise it stays 0x00.
0x04AC Player hitbox (1x4 bytes, <<x1,y1> <x2,y2>>)
0x04B0 Enemy hitboxes (5x4 bytes, <<x1,y1> <x2,y2>>)
0x04C4 Powerup hitbox (1x4 bytes, <<x1,y1> <x2,y2>>)
0x04C8 (Fiery) fireball hitbox (2x4 bytes, <<x1,y1> <x2,y2>>)
0x04D0 Hammer hitbox (9x4 bytes, <<x1,y1> <x2,y2>>) (like from bowser, hammerbros)
0x04E0 Coin hitboxes (3x4 bytes, <<x1,y1> <x2,y2>>) (used for coins from questionmarks and when getting coins above bricks by hitting the brick)
0x0500-0x069F Current tile (Does not effect graphics)
0x06CE Fireball counter (increments as you fire). First bit probably used to toggle between hitbox indices
0x06D4 Cycle counter of gold coin in top of screen and image of questionmark blocks
0x06D5 PlayerGfx_Offset , Player sprite Mario state (didn't check them myself)
  • 0xB8 - small stand
  • [0x60, 0x70, 0x80] - small walk cycle
  • 0xC8 - big stand
  • 0x20 - big jump
  • [0x00, 0x10, 0x20] - bigwalk cycle
  • 0x50 - crouch
0x06D6 Warpzone Control. Game Checks value from here and decides which warpzone to load.
0x06D9 MultiLoop Correct Control.
0x06DE ChangeArea Timer.
0x06FC Player 1 input (regular flag pattern), select and start are reset after 1 frame. See 0x074A for more accurate input.
0x06FD Player 2 input (regular flag pattern), select and start are reset after 1 frame. See 0x074B for more accurate input.
0x0700 Player X-Speed Absolute ,Player speed in _either_ direction (0 - 0x28)
0x0701 Friction Adder High ,Is breaking when 1 (freeze this and you immediately stand still when you stop moving)
0x0702 Walk animation (didn't check values)
  • 0xE4 - is running
  • 0x30 - skidding
  • 98 - normal
  • Also some other values when starting to run or when turning around
0x0704 Swimming Flag ,Set to 0 to swim
0x0705 Player X-MoveForce, runs when you press left or right
0x0709 Current gravity which will be applied to the player sprite (see 0x0000, 0x0433 and Notes page).
  • Based on the current horizontal velocity, this takes on different values:
    • 0x30 in a jump when still or walking slowly.
    • 0x2D in a jump when walking at full speed.
    • 0x38 in a jump when running at full speed.
    • If player is falling, takes values from 0x070A.
0x070A Current fall gravity (not sure how this is decided). This value is decided, then copied to 0x0709 IF Mario is falling (0x009F positive).
  • Based on the current horizontal velocity, this takes on different values:
    • 0xA8 for falling when still or walking slowly.
    • 0x90 for falling when walking at full speed.
    • 0xD0 for falling when running at full speed.
0x070B When not 0, runs big-small animation (but does not affect anything internally)
0x070C Player walk animation delay, in game frames (1/60 s). 0x05=slow walk, 0x03=full walk speed, 0x02=fastest/running speed
0x070D Player walk animation current frame index (0,1,2,0,etc)
0x0712 Is DeathMusicLoaded? (boolean) Usually triggered for falling deaths.
0x0714 0x04 when ducking as big mario, 0 otherwise (also when ducking as small). Keeps being 4 when you slide of an edge while ducking (so does not affect image, but does when set to 4 and being small...). When this register is frozen, you can move like normal, you're just ducking while doing so.
0x071A Current screen (in level)
0x071B Next screen (in level)
0x071C ScreenEdge X-Position, loads next screen when player past it?
0x071D Player x position, moves screen position forward when this moves
0x071E Column Sets . Counts back, done when this is FF. you can see the level being built in memory up as this counter progresses, one frame at a time.
0x071F AreaParser TaskNumber, runs from 4 to 0.
0x0722 Player HitDetect Flag. Determines whether allow Player to Pass through from Bricks or not. (Settting it to 0xFF will cause Player to Penetrate through Walls/Bricks)
0x0723 Scroll Lock, 1 = Prevent screen from scrolling right, i.e. Bowser, warp zone, etc. 0 = Allow scroll.
0x072C Current level layout index
0x072F Last value of 0x072C
0x0733 Replaces trees and Mushroom platforms
  • 0 - All Mushroom platforms replaced with trees
  • 1 - All trees replaced with Mushroom platforms, overwrites first BG palette line
  • 2 - All trees and Mushroom platforms replaced Bill Blasters
  • 3 - All trees and Mushroom platforms removed
  • 4 - All trees and Mushroom platforms removed, causes invisible floors and ceilings to appear
  • 5+ - Crash
0x0739 Current enemy layout index
0x0743 When true, new groundtiles and blocktiles will be loaded as clouds (coinblocks and questionmark blocks remain the same!)
0x0744 Something with background palette
0x0747 Timer Control.
0x074A Buttons pressed player 1 (keeps updated, even while paused or whatever, the other register resets the start and select immediately)
0x074B Buttons pressed player 2 (keeps updated, even while paused or whatever, the other register resets the start and select immediately)
0x074E "Gold" block pallette - 00 turns blocks into water world and makes bubble, but no swimming
0x0750 Area Offset- Check this page for full list of value results.
0x0752 Controls level entry (climbing up vine, coming up pipe, falling down from top of screen, etc.).
0x0753 Affects mario/luigi before level load, disables movement when not 0 after level load
0x0754 Player's state. This also affects hitting stuff. Decreases when you eat a mushroom! Increases when you get hit.
  • 0 - Big
  • 1 - Small
  • 2 - When set to two, you can't hit blocks but you can stand on them... (no idea where this is used)
  • 5 - Makes you small (even when your state is big or even fiery, in fiery case you become a small fiery)
0x0755 Player_Position For Scroll. It moves up to 0x70 (sometimes even 0x72) when player moves. When this register is frozen, NOTHING changes in the level, not even internally.
0x0756 Powerup state
  • 0 - Small
  • 1 - Big
  • >2 - fiery
0x075E Set to 1 during "prelevel" screen
0x075A Lives
0x075E Coins
0x075F World
0x0760 Level
0x0770 Game mode. Setting this will take affect immediately. You can skip a WORLD by setting it to 02 (and waiting a second or two). Crashes when set to >02 or when set to 02 in world 8. You can activate the demo at _any_ time. Set to 01 at the title screen and you start the game with the title screen showing.
  • 00 - Start demo
  • 01 - Start normal
  • 02 - End current world
  • 03 - End game (dead).
0x0772 Level loading setting. You can set this while playing.

- 00 - Restarts level - 01 - Right before the start of a level - 02 - Has an effect but unsure what (skip frame or input?) - 03 - Reset level. When in a level when doing this midlevel, this sometimes teleports you to a bonuslevel. exiting that bonuslevel enters another bonuslevel (as if you were exiting a pipe though), and exiting that level enters the normal world again.

0x0773 Level palette
  • 00 - Normal
  • 01 - Underwater
  • 02 - Night
  • 03 - Underground
  • 04 - Castle
0x0774 Disable ScreenFlag.
0x0775 Scroll Amount
0x0776 Game Pause Status.
0x0777 GamePauseTimer, when (un)pausing, you can only re/unpause when this is zero
0x0778 Mirror_PPU CTRL_REG1 Affects blocks and level, lowest bit seems to toggle loaded screen..? also affects sprite palletes of objects
0x0779 Mirror_PPU CTRL_REG2 Affects colors.. most values crash. It is the value written to the PPU at 0x2001. See this page for details.
  • 1E - Default
  • 1F - Makes it grey scale
  • 3E - Intensify red colors
  • 5E - Intensify green colors
  • 9E - Intensify blue colors
0x077A Number_Of_Players ,If true, will load luigi when mario dies. You have to unset 0753 to move with luigi though
0x077F Interval Timer Control. runs from 20 to 0 (Also Called 21 FrameRule) From This timer Game Checks for level Completion After every 21 Frames.
0x0780-0x07A2 All kinds of timers. Should investigate more to see what timer does what. Some are explained below
0x0781 Player Animation Timer
0x0782 JumpSwim Timer
0x0783 Running Timer
0x0784 BlockBounce Timer
0x0785 SideCollision Timer
0x0786 Jumpspring Timer
0x0787 GameTimer Control Timer (Setting it to 0x02 will Freeze Game Time)
0x0789 ClimbSide Timer
0x078A EnemyFrame Timer
0x078F FrenzyEnemy Timer
0x0790 BowserFireBreath Timer
0x0791 Stomp Timer
0x0792 AirBubble Timer
0x0795 Timer: falling down a pit (and more...)
0x079D Timer: multi-coin block
0x079E Timer: invincible after enemy collision. Freeze this register to anything but 0 and you remain invincible
0x079F Timer: star (when you have star)
0x07A0 Timer: "prelevel" screen timer, fired again when level starts
0x07A2 Timer: demo start
0x07B1 EventMusic Buffer , If true, you wont "die" after falling or getting hit while small. You will be unable to move at the bottom of the screen though until you set it to 00
0x07D7/C High score (1000000 100000 10000 1000 100 10) in BCD Format.
0x07DD-0x07E2 Mario score (1000000 100000 10000 1000 100 10) in BCD Format.
0x07D3/8 Luigi score (1000000 100000 10000 1000 100 10) in BCD Format.
0x07ED/E Coins (10 1) (on screen only)
0x07F8/A Digits of Game Timer (0100 0000 0000) in BCD Format.
0x07FC Game difficulty (set when you beat the game)
0x87F2 Warpzone Control byte for the left Pipe. Game Checks this value and assigns the according byte to the World number AND the tile to draw on top of it.
0x87F3 Warpzone Control byte for the middle Pipe. Game Checks this value and assigns the according byte to the World number AND the tile to draw on top of it.
0x87F4 Warpzone Control byte for the right Pipe. Game Checks this value and assigns the according byte to the World number AND the tile to draw on top of it.


Internal Data for Super Mario Bros.

ROM MapRAM MapText TableNotesTutorials