ROM map: Difference between revisions
Content added Content deleted
Piranhaplant (talk | contribs) No edit summary |
Piranhaplant (talk | contribs) No edit summary |
||
Line 2: | Line 2: | ||
category = ROM address |
category = ROM address |
||
include = {Infobox ROM address}:%PAGE%:length:type:name:description:args:ret_type |
include = {Infobox ROM address}:%PAGE%:length:type:name:description:args:ret_type |
||
table = class="wikitable sortable ram_rom_map",-,Address,Length,Type,Name,Description,Arguments/ |
table = class="wikitable sortable ram_rom_map",-,Address,Length,Type,Name,Description,Arguments and return values/Data type,Return<br/>Type |
||
tablerow = data-sort-value="{{#invoke:Utils|ramAddress2dec|%%}}"|[[%%]],data-sort-value="{{#invoke:Utils|hex2dec|%%}}"|%%,%%,%%,%% |
tablerow = data-sort-value="{{#invoke:Utils|ramAddress2dec|%%}}"|[[%%]],data-sort-value="{{#invoke:Utils|hex2dec|%%}}"|%%,%%,%%,%% |
||
</DPL> |
</DPL> |
Revision as of 22:05, 17 June 2024
Address | Length | Type | Name | Description | Arguments and return values/Data type | Return Type |
---|---|---|---|---|---|---|
$80:8002 | 0xAC | Code | Initialize various SNES hardware registers | None | RTS | |
$80:80AE | 0xBE | Code | main | Main entry point of the game. Clears RAM and does various other initialization | None | N/A |
$80:816C | 0x0D | Code | vblank | VBLANK interrupt handler | None | RTI |
$80:8179 | 0x80 | Code | vblankHandler | Default (and only) VBLANK handler | None | RTL |
$80:81F9 | 0x10 | Data | directionForDpad | The direction for each d-pad input | direction x2[0x10] | |
$80:8209 | 0x01 | Code | Various interrupt handlers. Does nothing. | None | RTI | |
$80:820A | 0x3C | Code | deleteAllEntities | Deletes all entities (except the current entity) and VBLANK and VBLANK end listeners | None | RTL |
$80:8246 | 0x02 | Code | Unused infinite loop | None | N/A | |
$80:8248 | 0x16 | Code | createPlayerEntity | Creates an entity for a player | Y+A = [pointer32] Entity pointer Returns A = [unit16] Entity ID |
RTL |
$80:825E | 0x80 | Code | createEntity | Creates an entity | Y+A = [pointer32] Entity pointer Returns A = [uint16] Entity ID |
RTL |
$80:82DE | 0x30 | Data | entityDPs | Direct page address for each entity | pointer16[0x18] | |
$80:830E | 0x30 | Data | entityStacks | Starting stack address for each entity | pointer16[0x18] | |
$80:833E | 0x15 | Code | Entities return here when completed. Deletes the current entity and resumes the entity loop. | None | N/A | |
$80:8353 | 0x45 | Code | waitFrames | Pauses the current entity for the given number of frames | A = [uint16] Number of frames | N/A |
$80:8398 | 0x16 | Code | Decrements the number of frames left to wait on each entity | None | RTS | |
$80:83AE | 0x27 | Code | runOnVBLANK | Creates a VBLANK listener | Y+A = [pointer32] Listener subroutine Returns X = [uint16] Listener ID |
RTL |
$80:83D5 | 0x0B | Code | stopRunningOnVBLANK | Deletes the given VBLANK listener | A = [uint16] Listener ID | RTL |
$80:83E0 | 0x38 | Code | runVBLANKListeners | Runs all the current VBLANK listeners | None | RTS |
$80:8418 | 0x25 | Code | runOnVBLANKEnd | Creates a VBLANK end listener | Y+A = [pointer32] Listener subroutine Returns X = [uint16] Listener ID |
RTL |
$80:843D | 0x38 | Code | runVBLANKEndListeners | Runs all the current VBLANK end listeners | None | RTS |
$80:8475 | 0x0B | Code | setCollisionHandler | Sets the sprite collision handler for the current entity | Y+A = [pointer32] Handler subroutine | RTL |
$80:8480 | 0x31 | Code | runCollisionHandler | Runs the sprite collision handler for the given entity | X = [uint16] Entity ID Y = [sprite type] Type of sprite collided with |
RTL |
$80:84B1 | 0x65 | Code | Main game loop | None | N/A | |
$80:8516 | 0xB9 | Code | playLevel | Plays the current level | None | RTL |
$80:891A | 0x19 | Code | fadeIn | Fades the screen in from black | None | RTL |
$80:8933 | 0x14 | Code | fadeOut | Fades the screen out to black | None | RTL |
$80:9C52 | 0x20 | Code | fadeInAsync | Fades the screen in from black asynchronously | None | RTS |
$80:9C72 | 0x1A | Code | fadeOutAsync | Fades the screen out to black asynchronously | None | RTS |
$80:9D39 | 0x22 | Code | getRandomByte | Gets a random value in the range 0-255 | Returns A = [uint16] Random value | RTL |
$80:9D6A | 0x3C | Code | playerForCharacter | Gets the player that is using the given character | A = [character x2] Character Returns X = [uint16 x2] Player |
RTL |
$80:BE0C | 0x2F | Code | createSprite | Creates a sprite | Returns A/Y = [pointer16] Sprite pointer | RTL |
$81:8191 | 0x11 | Code | removeOneShotEntity | Marks the given one-shot entity as no longer needing to be spawned | A = [uint16] One-shot entity index | RTL |
$80:BE41 | 0x3C | Code | deleteSprite | Deletes the given sprite | A = [pointer16] Sprite pointer | RTL |
$81:8000 | 0x24 | Code | createMonsterSprite | Creates a sprite for a monster | RTL | |
$80:CC3B | 0x11 | Code | playSound | Plays the given sound effect | A = [uint16] Sound effect ID | RTL |
$80:AE97 | 0x95 | Code | bgSolidToMonsters | Gets whether the background is solid to monsters at the given position | X = [int16] X position Y = [int16] Y position Returns C = [boolean] Whether it's solid |
RTL |
$80:BF67 | 0x61 | Code | touchingSpriteSolidToMonsters | Gets whether the given position is touching a sprite that is solid to monsters | A = [pointer16] current sprite X = [int16] X position Y = [int16] Y position Returns C = [boolean] Whether it's solid |
RTL |
$80:B2A5 | 0x5D | Code | findPlayerInRange | Finds the closest player within the given distance on a single axis | A = [uint16] Maximum single-axis distance X = [int16] X position Y = [int16] Y position Returns A = [uint16] direction to player Returns X = [uint16] single-axis distance to player Returns Y = [pointer16] player sprite |
RTL |
$80:C7D9 | 0x40 | Code | givePoints | Awards points to the given character | N = [boolean] give to Julie A = [uint16 bcd] number of points |
RTL |
$81:83A3 | 0x23 | Code | showMonsterDeath | Show monster death animation and play sound | A = [pointer16] Animation X = [uint16] Do nothing if not equal to 0xF5F5 Y = [uint16] Sprite tile data bank |
RTL |
$81:83C6 | 0x3E | Code | bubbleMonster | Call from a monster's sprite collision handler to cause it to be bubbled | Returns C = [boolean] Collision handler return value | RTL |
$81:847E | 0x58 | Code | freezeMonster | Call from a monster's sprite collision handler to cause it to be frozen | Returns C = [boolean] Collision handler return value | RTL |
$81:8561 | 0x2A | Data | weaponDamage | The base damage dealt by each weapon | uint16[21] | |
$81:8506 | 0x3C | Code | showDamageAnimation | Call from a monster's sprite collision handler to show a damage animation | Returns C = [boolean] Collision handler return value | RTL |
$80:B123 | 0x6C | Code | findTarget | Finds the closest sprite for a monster to target | X = [int16] X position Y = [int16] Y position Returns A = [uint16] distance to target Returns X = [pointer16] target sprite |
RTL |
$80:B3F1 | 0x31 | Code | snapToTarget | Sets the given sprite's X and/or Y positions to that of the target if they are within 1 pixel | X = [pointer16] Sprite Y = [pointer16] Target sprite |
RTL |
$80:B22A | 0x35 | Code | getDirectionToTarget | Gets the direction from the given sprite to the given target sprite | X = [pointer16] Sprite Y = [pointer16] Target sprite Returns A = [direction] Direction to target |
RTL |
$81:832C | 0x1D | Code | showAnimation | Shows the given animation on the sprite stored in $08 | A = [pointer16] Animation | RTL |