User Tools

Site Tools


return_of_samus:data_locations:ram_map

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Last revisionBoth sides next revision
return_of_samus:data_locations:ram_map [2018/12/27 13:23] – Document scrolling bounding box quantamreturn_of_samus:data_locations:ram_map [2020/04/03 20:07] kkzero
Line 46: Line 46:
     + 17: Source address of data for $DC00..FF (bank 8, 2 bytes)     + 17: Source address of data for $DC00..FF (bank 8, 2 bytes)
     + 19: Bank for current room     + 19: Bank for current room
-    + 1A: Samus solid block threshold +    + 1A: Samus passable block threshold 
-    + 1B: Enemy solid block threshold +    + 1B: Enemy passable block threshold 
-    + 1C: Projectile solid block threshold+    + 1C: Projectile passable block threshold
     + 1D: Samus' equipment     + 1D: Samus' equipment
     + 1E: Samus' beam     + 1E: Samus' beam
Line 118: Line 118:
 C415: left-most visible metatile column index in map * $10 (big-endian word). C415: left-most visible metatile column index in map * $10 (big-endian word).
  
 +C417: Number of tile that Baby Metroid is touching.
 C418: Set to [$D058] in $2:4000 C418: Set to [$D058] in $2:4000
  
Line 137: Line 138:
 C45C: Used as index for table at $1:729C, value for $FFEA C45C: Used as index for table at $1:729C, value for $FFEA
  
-C500-FE: Offscreen enemy bytes (for current map) +C500-FE: Object spawn states (map-specific) 
-    C540-7F: Item/Metroid data bytes (for current mapgets copied to $C900 when switching maps)+    C500-C53F: Non-persistent object (e.g. enemy) spawn states 
 +        01: Spawned in object table ("visible"
 +        02: Dead/acquired 
 +        FF: Not spawned 
 +    C540-7F: Persistent object (e.g. itemMetroidspawn states
  
 C600..C7FF: Enemy data. 20h byte slots according to $30BB, current address is kept in $D05E C600..C7FF: Enemy data. 20h byte slots according to $30BB, current address is kept in $D05E
Line 452: Line 457:
 D027: Samus X position D027: Samus X position
 D029: Samus Y position D029: Samus Y position
-D02B: Direction Samus is facing+D02B: Direction Samus is facing, mirrored from $D81E at save load.
         0: Left         0: Left
         1: Right         1: Right
Line 482: Line 487:
         Eh: On meet of right-facing wall and floor         Eh: On meet of right-facing wall and floor
  
-D045: Samus' equipment+D045: Samus' equipment, mirrored from $D815 at save load.
         01: Bombs         01: Bombs
         02: Hi-jump         02: Hi-jump
Line 493: Line 498:
 D047: Tiles update flag (see $FFB1..B6, $2BA3, $27BA) D047: Tiles update flag (see $FFB1..B6, $2BA3, $27BA)
  
-D04D: Weapon equipped.  Mirror of $D816?+D04D: Weapon equipped.
         0: Normal         0: Normal
         1: Ice         1: Ice
Line 502: Line 507:
 D04E: Bank D04E: Bank
  
-D050: Samus' energy tanks, mirror of $D817? +D050: Samus' max energy tanks, mirrored from $D817 at save load. 
-D051: Samus' health,       mirror of $D818? +D051: Samus' health, mirrored from $D818 at save load. 
-D053: Samus' missiles,     mirror of $D81C? +D052: Samus' filled energy tanks, mirrored from $D819 at save load. 
-D055: Samus' beam. Saved to SRAM, mirror of $D04D/$D816?+D053: Samus' missiles(upper nybble tenslower nybble ones), mirrored from $D81C at save load. 
 +D054: Samus' missiles(upper nybble thousands, lower nybble hundreds), mirrored from $D81D at save load. 
 +D055: Samus' beam. Saved to SRAM, mirrored from $D816 at save load.
         0: Normal         0: Normal
         1: Ice         1: Ice
Line 511: Line 518:
         3: Spazer         3: Spazer
         4: Plasma         4: Plasma
-D056: Samus solid block threshold+D056: Samus passable block threshold
 D057: Room sprite priority D057: Room sprite priority
         0: Sprites over BG         0: Sprites over BG
Line 523: Line 530:
 D067: Used in title. Set to 01h by $0CA3 and game mode Ah D067: Used in title. Set to 01h by $0CA3 and game mode Ah
  
-D069: Enemy solid block threshold+D069: Enemy passable block threshold
  
 D06E: Highest OAM stack pointer D06E: Highest OAM stack pointer
Line 542: Line 549:
 D07F: Object 0 palette D07F: Object 0 palette
 D080: Object 1 palette D080: Object 1 palette
-D081: Samus' max missiles, mirror of $D81A?+D081: Samus' max missiles(upper nybble tenslower nybble ones), mirrored from $D81A at save load. 
 +D082: Samus' max missiles(upper nybble thousands, lower nybble hundreds), mirrored from $D81B at save load.
 D083: Read in $1:7A34, adjusts sprite Y position in $1:4DDF D083: Read in $1:7A34, adjusts sprite Y position in $1:4DDF
 D084: Samus' health for display,   mirror of $D051/D818? D084: Samus' health for display,   mirror of $D051/D818?
Line 548: Line 556:
  
 D089: Real number of Metroids remaining D089: Real number of Metroids remaining
-D08A: Projectile solid block threshold+D08A: Projectile passable block threshold
 D08B: Metroid Queen's room flag D08B: Metroid Queen's room flag
         11h: In Metroid Queen's room (set by screen transition command 8)         11h: In Metroid Queen's room (set by screen transition command 8)
Line 587: Line 595:
  
 D0A7: Metroids remaining in area D0A7: Metroids remaining in area
 +
 +D600-1F: OAM data for the starry background in the credits.
  
 D700-3F: Screen transition commands D700-3F: Screen transition commands
Line 601: Line 611:
     D80F: Source address of data for $DC00-FF (bank 8, 2 bytes)     D80F: Source address of data for $DC00-FF (bank 8, 2 bytes)
     D811: Bank for current room     D811: Bank for current room
-    D812: Samus solid block threshold +    D812: Samus passable block threshold (>= this tile index is passable, < is impassible) 
-    D813: Enemy solid block threshold +    D813: Enemy passable block threshold 
-    D814: Projectile solid block threshold +    D814: Projectile passable block threshold 
-    D815: Samus' equipment +    D815: Samus' equipment at save load. 
-    D816: Samus' beam +    D816: Samus' beam at save load. 
-    D817: Samus' energy tanks +    D817: Samus' max energy tanks at save load. 
-    D818: Samus' health +    D818: Samus' health at save load. 
-    D81A: Samus' max missiles +    D819: Samus' filled energy tanks at save load. 
-    D81C: Samus' missiles +    D81A: Samus' max missiles at save load. Upper nybble tens, lower nybble ones. 
-    D81E: Direction Samus is facing+    D81B: Samus' max missiles at save load. Upper nybble thousands, lower nybble hundreds. 
 +    D81C: Samus' missiles at save load. Upper nybble tens, lower nybble ones. 
 +    D81D: Samus' missiles at save load. Upper nybble thousands, lower nybble hundreds. 
 +    D81E: Direction Samus is facing at save load.
     D81F: Acid damage     D81F: Acid damage
     D820: Spike damage     D820: Spike damage
Line 621: Line 634:
 D900-FF: 10h byte slots? The first byte of which each is cleared when saving D900-FF: 10h byte slots? The first byte of which each is cleared when saving
 DA00-DBFF: Metatile definitions DA00-DBFF: Metatile definitions
-DC00-FF: Collision data buffer+DC00-FF: Tile properties 
 +    1: Viscous. Reduces jumping and detaches spider ball on movement. Also causes morph ball sound effect glitch. 
 +    2: Jump-through block. Passable when jumping, impassable in all other states (in all directions). 
 +    4: Fall-through block. Passable when falling, impassable in all other states (in all directions). 
 +    8: Spike 
 +    10h: Acid 
 +    20h: Destructible by shot/bomb 
 +    40h: Destructible by bomb 
 +    80h: Save pillar 
 DD00-FF: Projectile RAM DD00-FF: Projectile RAM
 +    Beams - Takes up three 16-byte rows for each shot on-screen. Spazer and Plasma take up all three immediately.
 +    DD00, DD10, DD20: Beam state.
 +        0-4: On-screen, being fired. Value will match the currently-equipped beam's as stored at D055.
 +        FFh: Not on-screen.
 +    DD01, DD11, DD21: Direction of fire.
 +        1: To the right.
 +        2: to the left.
 +        4: Upwards.
 +        8: Downwards.
 +    DD02, DD12, DD22: Shot Y position.
 +    DD03, DD13, DD23: Shot X position.
 +    DD04, DD14, DD24: Unknown, switches between 0 and 8 on a seemingly random interval between firings.
 +    DD05, DD15, DD25: Displacement from position fired at, ends up differently for each direction.
 +    
 +    Missiles - Shares a 16-byte row with the third beam slot.
 +    DD20: Missile state.
 +        8: On-screen, being fired.
 +        FFh: Not on-screen.
 +    DD21: Direction of fire.
 +        1: To the right.
 +        2: to the left.
 +        4: Upwards.
 +        8: Downwards.
 +    DD22: Shot Y position.
 +    DD23: Shot X position.
 +    DD24: Unknown, switches between 0 and 8 on a seemingly random interval between firings.
 +    DD25: Displacement from position fired at, ends up differently for each direction.
 +    
 +    Bombs - Takes up three 16-byte rows for each bomb on-screen.
 +    DD30, DD40, DD50: Bomb state.
 +        1: Laid, waiting to explode.
 +        2: Exploding.
 +        FFh: No bomb on-screen.
 +    DD31, DD41, DD51: Bomb timer. Starts at the value it was set at and decreases to zero.
 +    DD32, DD42, DD52: Bomb Y position.
 +    DD33, DD43, DD53: Bomb X position.
 +    
 DE00-FF: Metatile update entries DE00-FF: Metatile update entries
     + 0: Dest. address. $0000 terminates update     + 0: Dest. address. $0000 terminates update
return_of_samus/data_locations/ram_map.txt · Last modified: 2020/04/04 20:15 by kkzero