|SMW Memory Map|
|$7E1484||1 byte||Sprites||A flag used in the spotlight code to determine which side of the top left window border the bottom left window border is on.
#$00 = bottom left is more to the left; #$01 = bottom left is on the same position, or more to the right.
|$7E1485||1 byte||Sprites||A flag used in the spotlight code to determine which side of the top right window border the bottom right window border is on.
#$00 = bottom right is more to the left; #$01 = bottom right is on the same position, or more to the right.
|$7E1486||1 byte||Sprites||Unused, set to #$01 in the dark room spotlight sprite. Change $03:C544 to EA EA EA (NOP #3) to change this into free RAM. If that patch is performed, this address is safe for other uses. Cleared on reset, titlescreen load, overworld load and cutscene load.|
|$7E1487||4 bytes||Empty||Empty. Cleared on reset, titlescreen load and overworld load.|
|$7E148B||2 bytes||Misc.||Used by random number generation subroutine to determine the next output.
Do not use these if you want a random number. Use $7E:148D instead.
|$7E148D||2 bytes||Misc.||Output of random number generation routine, located at $01:ACF9.|
|$7E148F||1 byte||Player||Flag used to detect if the player is holding an object (throw block, key, shell, etc.) Also adjusts the player image, different from $7E:1470. This address does store its value to $7E:1470.
If the player is carrying something, this address should usually (not always, regarding the glitch) prevent the player from holding a second item.
#$00 = Carrying nothing; #$01 = carrying something.
|$7E1490||1 byte||Timer||Star power timer. Decrements every fourth frame, except when lock flag ($9D) AND while the freezable frame counter ($14) has a value divisible by 4, will decrement each frame (assuming it's a glitch). The music will revert when this timer reaches #$1E.|
|$7E1491||1 byte||Sprites||Amount of pixels on the X/Y axis a sprite has moved in the current frame. It is set after every call to update sprite position based on speed, and the routine that updates both X/Y position based on speed will leave $7E:1491 with the movement on the X axis in this address. Very often used for rideable sprites as this address can be added to the player position to move the player in tandem with the sprite.|
|$7E1492||1 byte||Timer||Player peace image timer.|
|$7E1493||1 byte||Timer||End level timer. Setting to #$FF will end the level as a goal sphere / boss fight. Peace sign is shown here when the timer hits #$28. The switches (yellow, green, red and blue) set it to #$08.|
|$7E1494||1 byte||Palettes||Direction of the color fading at level end. Only the highest bit is ever read.
#$00 = getting darker; #$80 = getting brighter.
|$7E1495||1 byte||Timer||Timer that controls fading and the level end scorecard. Increments and stops when it hits #$40. While it's ticking, the colors will fade; when it's done, $7E:003A through $7E:003D won't be read and the Layer 3 scrolling will be locked.|
|$7E1496||1 byte||Timer||Player animation timer. This controls a lot of things such as the walking/running animation rate, how long the death animation should last, how long to stay invisible for after getting the cape, the alternating player images when the player is walking over slippery surfaces, etc.|
|$7E1497||1 byte||Timer||Flashing invulnerability timer - not to be confused with the star timer. This is activated when the player gets hurt. Controls both interaction (player should not interact with sprites again) as well as the blinking graphics.|
|$7E1498||1 byte||Timer||Time to show player picking an item/object up pose.|
|$7E1499||1 byte||Timer||Time for player to face the screen.|
|$7E149A||1 byte||Timer||Time to show player kicking something pose.|
|$7E149B||1 byte||Timer||Time for the player to change through palettes, as if he got a fire flower. Only ticks when the "get flower" animation is active, and is just a flag otherwise.|
|$7E149C||1 byte||Timer||Time to show player shooting a fireball pose.|
|$7E149D||1 byte||Timer||Side flipping climbing net sprite flag and timer. Whenever you punch the flipping net, this gets set to #$1E and decrements every frame till it's zero. That's how many frames the spinning animation lasts. It also determines the X speed the player has while he's on the climbing net sprite - this means that it should be decremented every frame in order to avoid issues.|
|$7E149E||1 byte||Timer||Player punches while climbing on a net flag and timer. Every time you punch a net this is set to #$08 and decremented till it's zero again. During the time it's not zero, the frame is displayed that shows the player punching the net. If you store #$08 or greater to it every frame you'll be hold onto the net without being able to move or get off.
When this RAM address is non-zero, the player can also not move.
|$7E149F||1 byte||Timer||This timer controls the time until the player gets into gliding/sinking mode after he has jumped into the air with a cape. Is set to #$50 the moment you get airborne, and decrements every frame afterwards. The ability of raising any further stops at #$00.
Note that this doesn't reset when going into another sublevel, allowing the player to "carry over" flying if the player is spawn in midair (or jump immediately when placed on ground) and maintains holding dash.
|$7E14A0||1 byte||Timer||How long the running frames should be shown after the player launches off with the cape. Is #$10 by default and decrements each frame.|
|$7E14A1||1 byte||Timer||Player slides a bit when turning around timer. Most notably used with very steep slopes. If this is non-zero, $7E:13DD's image (#$0D) won't be shown.|