If you are still using the old URL (datacrystal.romhacking.net), please update your bookmarks! The old URL may stop working soon.
The current URL is datacrystal.tcrf.net.
The current URL is datacrystal.tcrf.net.
Super Mario Bros./RAM map
< Super Mario Bros.(Redirected from Super Mario Bros.:RAM map)
Jump to navigation
Jump to search
The following article is a RAM map for Super Mario Bros..
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).
|
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)
|
0x000B | Vertical direction input state (flags);
|
0x000E | Player's state
|
0x000F-0x0013 | Enemy drawn? Max 5 enemies at once.
|
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.
|
0x0016/A | Enemy type (5x).
|
0x001B | Powerup on screen
|
0x001D | Player "float" state
|
0x001E,0x0023 | Enemy state? Haven't tested much.
|
0x0023 | Powerup state/heading (there's probably another register to check)
|
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.
|
0x0039 | Powerup type (when on screen)
|
0x0045 | Player Moving Direction.
|
0x0046/A | Enemy heading
|
0x004B | Shroom heading
|
0x0057 | Player horizontal speed
|
0x0058/C | Enemy horizontal speed
|
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
|
0x00A0/4 | Enemy vertical velocity
|
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
|
0x00B6/A | Enemy vertical screen position (same as player)
|
0x00BB | Powerup vertical screen position (same as player)
|
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.) Set to 0x20 to have the player walk behind scenery (used for going down pipes and the end of the level.) |
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
|
0x0456 | Player max velocity to the right
|
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)
|
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)
|
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).
|
0x070A | Current fall gravity (not sure how this is decided). This value is decided, then copied to 0x0709 IF Mario is falling (0x009F positive).
|
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
|
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.
|
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
|
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.
|
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
|
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.
|
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.
| |
---|---|