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: Difference between revisions
Jump to navigation
Jump to search
Justcool393 (talk | contribs) (Added level to RAM map.) |
(Added screen scrolling allow/freeze byte) |
||
Line 370: | Line 370: | ||
|- | |- | ||
|0x071F || Some kind of load timer while scrolling, loading the next part up ahead? runs from 4 to 0 | |0x071F || Some kind of load timer while scrolling, loading the next part up ahead? runs from 4 to 0 | ||
|- | |||
|0x0723 || 1 = Prevent screen from scrolling right, i.e. Bowser, warp zone, etc. 0 = Allow scroll. | |||
|- | |- | ||
|0x072C || Current level layout index | |0x072C || Current level layout index |
Revision as of 01:57, 5 October 2013
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.
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) |
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). (Sorry, not too familiar with names. I'm sure someone will fix them.)
|
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
|
0x0039 | Powerup type (when on screen)
|
0x0045 | Player facing
|
0x0046/A | Enemy heading
|
0x004B | Shroom heading
|
0x0057 | Player horizontal speed
|
0x0058/C | Enemy vertical 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 1 x |
0x008E | Fireball 2 x |
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 1 y |
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?) |
0x03B8 | Player vertical pos? |
0x03AF | When frozen, sets same x coord for both fireballs? |
0x03BA | When frozen, sets same y coord for both fireballs? |
0x03C4 | Player palette, cycles when you have a star (not when you become fiery though, even though that uses the exact same cycles) |
0x0400 | Some kind of horizontal movement counter |
0x0416 | Player; some kind of vertical movement counter |
0x0417/B | Enemy; some kind of vertical movement counter |
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 | Horizontal split offset, 0x00-0xFF (it moves up when the screen moves, not when the player moves and the screen does not, each 0-FF is a full screen) |
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 | Player sprite Mario state (didn't check them myself)
|
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 speed in _either_ direction (0 - 0x28) |
0x0701 | Is breaking when 1 (freeze this and you immediately stand still when you stop moving) |
0x0702 | Walk animation (didn't check values)
|
0x0704 | Set to 0 to swim |
0x0705 | Some kind of counter that only 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) |
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 | Player x position, loads next screen when player past it? |
0x071D | Player x position, moves screen position forward when this moves |
0x071E | Some kind of load timer between levels (like bonus levels). 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 | Some kind of load timer while scrolling, loading the next part up ahead? runs from 4 to 0 |
0x0723 | 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 | Some kind of timer. when set, everything freezes; enemies, powerups, even loading of next screen. |
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 loaded- Check this page for full list of value results. |
0x0752 | If not 0 will crash game when level loads |
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 | Something with background. 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 | ?? Changes on game and level start. Crashes game if changed |
0x0775 | Scrollspeed |
0x0776 | Is paused |
0x0777 | Timer when (un)pausing, you can only re/unpause when this is zero |
0x0778 | Affects blocks and level, lowest bit seems to toggle loaded screen..? also affects sprite palletes of objects |
0x0779 | Affects colors.. most values crash
|
0x077A | If true, will load luigi when mario dies. You have to unset 0753 to move with luigi though |
0x0780-0x07A2 | All kinds of timers. Should investigate more to see what timer does what. Some are explained below |
0x0781 | Timer: fireball shot |
0x0782 | Timer: when jumping |
0x0795 | Timer: falling down a pit (and more...) |
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 | 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) |
0x07DD-0x07E2 | Mario score (1000000 100000 10000 1000 100 10) |
0x07D3/8 | Luigi score (1000000 100000 10000 1000 100 10) |
0x07ED/E | Coins (10 1) (on screen only) |
0x07F8/A | Digits of time (100 10 1) |
0x07FC | Game difficulty (set when you beat the game) |