;============================================================================ ; Faxanadu (U).nes ; ; RAM ($0000 - $07ff) ;============================================================================
.segment "RAM" .ORG $0000
;============================================================================ ; Temporary variables used throughout the game. ; ; Some of these are used for specific purposes (e.g., addresses), and some ; are more generally-used. ; ; MOD NOTES: ; These should be safe for custom code to use outside ; of referenced code paths. ; ; XREFS: ; BScript_Action_FacePlayerX ; BScript_Action_FacePlayerY ; CurrentSprite_CheckHitPlayer ; Maybe_Sprite_HandleDeathDrop ; Player_CheckShieldHitByMagic ; Player_DrawShield ; Player_DrawWeapon ; Player_HitEnemyWithMagic ; Player_HitSpriteWithWeapon ; SpriteBehavior_EnemyUnused18__9991 ; SpriteBehavior_EnemyUnused43 ; SpriteBehavior_Pakukame__9d78 ; SpriteBehavior_Unknown_29 ; SpriteBehavior_Zorugeriru__9df7 ; SpriteBehavior_Zorugeriru__9e13 ; SpriteUpdateHandler_Effect_EnemyDeath ; SpriteUpdateHandler_Effect_LightningBall20 ; Sprite_CheckHitByCastMagic ; Sprites_CalcYFromGravity ; Sprites_IsSpriteOutOfWeaponRange ; Area_ConvertPixelsToBlockPos ; Area_HandleBreakableFloor ; Area_LoadBlockProperties ; Area_SetBlocks ; Area_SetBlocks_SetAttributes ; CastMagic_FinishHandler_HitWallEffect ; CastMagic_FinishHandler_TilteAfterFirstHit ; DEADCODE_FUN_PRG15_MIRROR__c033 ; FUN_PRG15_MIRROR__ec58 ; Maybe_IsSpriteEntityNotOnScreen ; Player_DrawBody ; Player_DrawSprite ; Player_DrawSpriteImmediately ; Player_HandleKnockback ; Player_LoadArmorTilesToPPU ; Player_LoadShieldTilesToPPU ; Player_LoadWeaponTilesToPPU ; Screen_LoadBlockDataVert ; Screen_LoadBlocksHoriz ; Sprite_Draw_FlippedHoriz ; Sprite_Draw_Standard ; Sprites_HasSpritesNotOfType ; Sprites_LoadCommon ; Sprites_LoadImageForCurrentSprite ;============================================================================
; ; Generic temporary variable for 1-byte values. ; ; ; XREFS: ; BScript_Action_FacePlayerX ; BScript_Action_FacePlayerY ; CurrentSprite_CheckHitPlayer ; Maybe_Sprite_HandleDeathDrop ; Player_CheckShieldHitByMagic ; Player_DrawShield ; Player_DrawWeapon ; Player_HitEnemyWithMagic ; Player_HitSpriteWithWeapon ; SpriteBehavior_EnemyUnused18__9991 ; SpriteBehavior_EnemyUnused43 ; SpriteBehavior_Pakukame__9d78 ; SpriteBehavior_Unknown_29 ; SpriteBehavior_Zorugeriru__9df7 ; SpriteBehavior_Zorugeriru__9e13 ; SpriteUpdateHandler_Effect_EnemyDeath ; SpriteUpdateHandler_Effect_LightningBall20 ; Sprite_CheckHitByCastMagic ; Sprites_CalcYFromGravity ; Sprites_IsSpriteOutOfWeaponRange ; Area_ConvertPixelsToBlockPos ; Area_HandleBreakableFloor ; Area_LoadBlockProperties ; Area_SetBlocks ; Area_SetBlocks_SetAttributes ; CastMagic_FinishHandler_HitWallEffect ; CastMagic_FinishHandler_TilteAfterFirstHit ; DEADCODE_FUN_PRG15_MIRROR__c033 ; FUN_PRG15_MIRROR__ec58 ; Maybe_IsSpriteEntityNotOnScreen ; Player_DrawBody ; Player_DrawSprite ; Player_DrawSpriteImmediately ; Player_HandleKnockback ; Player_LoadArmorTilesToPPU ; Player_LoadShieldTilesToPPU ; Player_LoadWeaponTilesToPPU ; Screen_LoadBlockDataVert ; Screen_LoadBlocksHoriz ; Sprite_Draw_FlippedHoriz ; Sprite_Draw_Standard ; Sprites_HasSpritesNotOfType ; Sprites_LoadCommon ; Sprites_LoadImageForCurrentSprite ;
[0000]Temp_00:; [$0000] [0000].byte $00; [$0000] byte
; ; Generic temporary variable for 1-byte values. ; ; ; XREFS: ; Maybe_Sprite_HandleDeathDrop ; Player_HitEnemyWithMagic ; Sprite_CheckHitByCastMagic ; Screen_LoadBlockDataVert ; Screen_LoadBlocksHoriz ; Sprite_Draw_FlippedHoriz ; Sprite_Draw_Standard ;
[0001]Temp_01:; [$0001] [0001].byte $00; [$0001] byte
; ; Temporary variable used for address reads. ; ; ; XREFS: ; BScript_Op_AddToSpriteData ; Player_ApplyDamage ; Player_DrawWeapon ; Player_HitEnemyWithMagic ; Sprite_GetBounds ; Area_LoadScrollDataRight ; Area_SetBlocks_SetAttributes ; Area_SetStateFromDoorDestination ; CurrentSprite_LoadTilesInfo ; DEADCODE_FUN_PRG15_MIRROR__c033 ; Game_LoadAreaTable ; IScripts_DrawPortraitTileToPPU ; IScripts_LoadPortraitTilesAddress ; LAB_PRG15_MIRROR__e852 [$PRG15_MIRROR::e852] ; LAB_PRG15_MIRROR__ea13 [$PRG15_MIRROR::ea13] ; Player_CheckSwitchScreen ; Player_CheckSwitchScreen_SwitchAreaHoriz ; Player_LoadArmorTile ; Player_LoadShieldTile ; Player_LoadWeaponTile ; Screen_LoadAllScreenInfo ; Sprite_Draw ; Sprite_DrawPortraitPartAppearance ; Sprite_Draw_FlippedHoriz ; Sprite_SetAppearanceAddrFromOffset ; Sprite_SetPlayerAppearanceAddr ; Sprites_LoadCommon ;
[0002]Temp_Addr_L:; [$0002] [0002].byte $00; [$0002] byte
; ; XREFS: ; BScript_Op_AddToSpriteData ; Player_ApplyDamage ; Player_DrawWeapon ; Sprite_GetBounds ; Area_LoadScrollDataRight ; Area_SetBlocks_SetAttributes ; Area_SetStateFromDoorDestination ; CurrentSprite_LoadTilesInfo ; Game_LoadAreaTable ; IScripts_LoadPortraitTilesAddress ; Player_CheckSwitchScreen ; Player_CheckSwitchScreen_SwitchAreaHoriz ; Player_LoadArmorTile ; Player_LoadShieldTile ; Player_LoadWeaponTile ; Screen_LoadAllScreenInfo ; Sprite_DrawPortraitPartAppearance ; Sprite_SetAppearanceAddrFromOffset ; Sprite_SetPlayerAppearanceAddr ; Sprites_LoadCommon ;
[0003]Temp_Addr_U:; [$0003] [0003].byte $00; [$0003] byte
; ; XREFS: ; Player_ApplyDamage ; Player_CalcValueAndFFForNeg ; Player_DrawWeapon ; FUN_PRG15_MIRROR__ec58 ; IScripts_DrawPortraitTileToPPU ; Player_LoadWeaponTile ; Sprite_Draw_FlippedHoriz ;
[0004]Temp_04:; [$0004] [0004].byte $00; [$0004] byte
; ; XREFS: ; Player_ApplyDamage ; Player_CalcValueAndFFForNeg ; Player_DrawWeapon ; FUN_PRG15_MIRROR__ec58 ; IScripts_DrawPortraitTileToPPU ; Player_LoadWeaponTile ; Sprite_Draw_FlippedHoriz ;
[0005]Temp_05:; [$0005] [0005].byte $00; [$0005] byte
; ; XREFS: ; Area_SetBlocks_SetAttributes ; PPUBuffer_DrawCommand_RemoveVerticalLines ; PPUBuffer_DrawCommand_RotateTilesRight1Pixel ; Screen_LoadBlockDataVert ; Screen_LoadBlocksHoriz ; Screen_RunWriteScrollDataHandler ;
[0006]Temp_06:; [$0006] [0006].byte $00; [$0006] byte
; ; Temporary variable used only for vertical line removal. ; ; This is used by ; PPUBuffer_DrawCommand_RemoveVerticalLines, ; which is used during the player death animation. ; ; Outside of that, it's unused by Faxanadu. ; ; ; XREFS: ; PPUBuffer_DrawCommand_RemoveVerticalLines ;
[0007]Temp_07:; [$0007] [0007].byte $00; [$0007] byte
; ; XREFS: ; Area_LoadBlocks ; Area_LoadNextCompressedScreenBit ; Area_LoadTiles ; PPUBuffer_DrawCommand_RemoveVerticalLines ; Screen_LoadBlockDataVert ; Screen_LoadBlocksHoriz ; Screen_LoadSpritePalette ; Screen_LoadUIPalette ; Screen_SetFadeOutPalette ; Screen_SetPaletteData ;
[0008]Temp_08:; [$0008] [0008].byte $00; [$0008] byte
; ; XREFS: ; Area_LoadBlocks ; Area_LoadTiles ; Palette_IndexToROMOffset16 ; Screen_LoadBlockDataVert ; Screen_LoadBlocksHoriz ; Screen_LoadSpritePalette ; Screen_LoadUIPalette ; Screen_SetFadeOutPalette ;
[0009]Temp_09:; [$0009] [0009].byte $00; [$0009] byte
;============================================================================ ; Saved flags for PPUCTRL. ; ; These are set here so that the intended flags can be applied whenever ; necessary. ; ; XREFS: ; Game_InitScreenAndMusic ; PPUBuffer_Draw ; PPU_HandleOnInterrupt ; PPU_InitVBlank ; PPU_SetVRAMIncrementAdd1Across ; Screen_WriteScrollHorizPPUTileData ; Screen_WriteScrollVertPPUTileData ;============================================================================
; ; XREFS: ; Game_InitScreenAndMusic ; PPUBuffer_Draw ; PPU_HandleOnInterrupt ; PPU_InitVBlank ; PPU_SetVRAMIncrementAdd1Across ; Screen_WriteScrollHorizPPUTileData ; Screen_WriteScrollVertPPUTileData ;
[000a]PPU_ControlFlags:; [$000a] [000a].byte $00; [$000a] PPUCtrlFlags
;============================================================================ ; The color mode of the screen. ; ; 0 = Color ; 1 = Grayscale ; ; XREFS: ; Player_HitEnemyWithMagic ; Player_HitSpriteWithWeapon ; SpriteBehavior_FlashScreenHitPlayer ; Game_InitScreenAndMusic ; PPU_HandleOnInterrupt ; Screen_ClearSprites ;============================================================================
; ; XREFS: ; Player_HitEnemyWithMagic ; Player_HitSpriteWithWeapon ; SpriteBehavior_FlashScreenHitPlayer ; Game_InitScreenAndMusic ; PPU_HandleOnInterrupt ; Screen_ClearSprites ;
[000b]PPU_Mask:; [$000b] [000b].byte $00; [$000b] PPUMaskFlags
;============================================================================ ; X delta in pixels used during scrolling. ; ; This controls the PPU scroll overlay when switching ; between screens 0 and 1. ; ; XREFS: ; Area_LoadScrollDataRight ; Area_ScrollScreenRight ; Game_InitScreenAndMusic ; Game_InitStateForSpawn ; PPU_HandleOnInterrupt ; Screen_HandleScrollLeft ; Screen_HandleScrollRight ; Screen_UpdateForScroll ; Sprite_Draw ;============================================================================
; ; XREFS: ; Area_LoadScrollDataRight ; Area_ScrollScreenRight ; Game_InitScreenAndMusic ; Game_InitStateForSpawn ; PPU_HandleOnInterrupt ; Screen_HandleScrollLeft ; Screen_HandleScrollRight ; Screen_UpdateForScroll ; Sprite_Draw ;
[000c]PPU_ScrollX:; [$000c] [000c].byte $00; [$000c] byte
;============================================================================ ; X delta in screens used during scrolling. ; ; This is used to swap between the PPU scroll screens. ; The even/odd flag will be used to dictate the current ; screen. ; ; XREFS: ; TextBox_FillBackground ; Area_LoadScrollDataRight ; Area_ScrollScreenRight ; Area_SetBlocks_SetAttributes ; Area_SetPPUAddrForBlockIndex ; Game_InitScreenAndMusic ; Game_InitStateForSpawn ; PPU_HandleOnInterrupt ; PPU_SetAddrForTextBoxPos ; Screen_HandleScrollLeft ; Screen_HandleScrollRight ;============================================================================
; ; XREFS: ; TextBox_FillBackground ; Area_LoadScrollDataRight ; Area_ScrollScreenRight ; Area_SetBlocks_SetAttributes ; Area_SetPPUAddrForBlockIndex ; Game_InitScreenAndMusic ; Game_InitStateForSpawn ; PPU_HandleOnInterrupt ; PPU_SetAddrForTextBoxPos ; Screen_HandleScrollLeft ; Screen_HandleScrollRight ;
[000d]PPU_ScrollScreen:; [$000d] [000d].byte $00; [$000d] byte
;============================================================================ ; The ready state for the screen. ; ; This has two states: ; ; 0 = Ready ; 1 = Not Ready (Game not yet playable) ; ; NOTE: ; Some code checks against alternative states: 1 and 5. ; ; These do not seem to be used, and appear to be ; remnants of an older design. ; ; XREFS: ; Game_DrawScreenInFrozenState ; Game_InitStateForSpawn ; Player_DrawBody ; Player_HandleDeath ; Screen_SetupSprites ;============================================================================
; ; XREFS: ; Game_DrawScreenInFrozenState ; Game_InitStateForSpawn ; Player_DrawBody ; Player_HandleDeath ; Screen_SetupSprites ;
[000e]Screen_ReadyState:; [$000e] [000e].byte $00; [$000e] ScreenReadyState
;============================================================================ ; MOD NOTES: 1 unused byte of RAM. ;============================================================================
[000f].byte $00; [$000f] undefined
;============================================================================ ; A latch managing interrupt handling logic. ; ; This is set to 1 when interrupt handlers have been run. ; That includes: ; ; * PPU handling ; * OAM reset ; * Audio/sound playback ; * Input handling. ; * Advancing InterruptCounter ; ; If already 1, PRG15_MIRROR:c999 won't run handlers again. ; ; Callers can set to 0 to request running interrupt handlers. ; ; XREFS: ; Game_InitScreenAndMusic ; OnInterrupt ; WaitForNextFrame ;============================================================================
; ; XREFS: ; Game_InitScreenAndMusic ; OnInterrupt ; WaitForNextFrame ;
[0010]Game_InterruptsHandledLatch:; [$0010] [0010].byte $00; [$0010] bool
;============================================================================ ; The previous PRG ROM bank saved before switching to a new bank. ; ; This allows for pushing to a new bank and then popping ; back to this bank. ; ; XREFS: ; Game_InitMMCAndBank ; MMC1_RestorePrevROMBank ; MMC1_SaveROMBankAndUpdateTo ;============================================================================
; ; XREFS: ; Game_InitMMCAndBank ; MMC1_RestorePrevROMBank ; MMC1_SaveROMBankAndUpdateTo ;
[0011]SavedPRGBank:; [$0011] [0011].byte $00; [$0011] ROMBank
;============================================================================ ; State used to help synchronize MMC1 operations. ; ; 0 = Idle ; 1 = Writing to MMC1 (switching banks). ; > 1 = MMC1 is re-initializing. ; ; XREFS: ; Game_InitMMCAndBank ; MMC1_EnsurePRG ; MMC1_UpdateROMBank ;============================================================================
; ; XREFS: ; Game_InitMMCAndBank ; MMC1_EnsurePRG ; MMC1_UpdateROMBank ;
[0012]MMC1_ShiftSync:; [$0012] [0012].byte $00; [$0012] byte
;============================================================================ ; Whether to process standard behavior on interrupts. ; ; If 1, then the interrupt handler will manage game ; state, audio, and read button inputs. ; ; If 0, this will all be paused. ; ; XREFS: ; DEADCODE_FUN_PRG15_MIRROR__cb1f ; Game_InitScreenAndMusic ; OnInterrupt ; PPU_WaitUntilFlushed ; Screen_ResetForGamePlay ; Screen_ResetForNonGame ;============================================================================
; ; XREFS: ; DEADCODE_FUN_PRG15_MIRROR__cb1f ; Game_InitScreenAndMusic ; OnInterrupt ; PPU_WaitUntilFlushed ; Screen_ResetForGamePlay ; Screen_ResetForNonGame ;
[0013]Game_InterruptHandlersEnabled:; [$0013] [0013].byte $00; [$0013] bool
;============================================================================ ; Counter tracking state for temporary pausing of interrupt handlers. ; ; When interrupt handlers are paused (by setting ; Game_InterruptHandlersEnabled to 0), this will be ; incremented up to a value of 2. ; ; PPU_WaitUntilFlushed will wait for this to hit 2 ; before returning, ensuring there's time for the PPU to ; flush before returning to the caller. ; ; XREFS: ; OnInterrupt ; PPU_WaitUntilFlushed ;============================================================================
; ; XREFS: ; OnInterrupt ; PPU_WaitUntilFlushed ;
[0014]PauseInterruptCounter:; [$0014] [0014].byte $00; [$0014] byte
;============================================================================ ; MOD NOTES: 1 unused byte of RAM. ;============================================================================
[0015].byte $00; [$0015] byte
;============================================================================ ; Controller port and button state management. ; ; XREFS: ; PasswordScreen_GetDPadBits ; Maybe_Player_CalcAnimFrame ; Player_CastMagic ; EndGame_MovePlayerTowardKing ; GameLoop_CheckUseCurrentItem ; Game_UpdatePlayerOnScroll ; GetRandom ; Input_HandleOnInterrupt ; Player_CheckHandleClimb ; Player_CheckHandleClimbMaybeSide ; Player_CheckHandleJump ; Player_CheckPushingBlock ; Player_GetBodySpriteFrameOffset ; Player_UpdateAcceleration ;============================================================================
; ; Buttons last pressed by the player in controller port 1. ; ; Bit 0: Right ; Bit 1: Left ; Bit 2: Down ; Bit 3: Up ; Bit 4: Start ; Bit 5: Select ; Bit 6: B ; Bit 7: A ; ; ; XREFS: ; PasswordScreen_GetDPadBits ; Maybe_Player_CalcAnimFrame ; Player_CastMagic ; EndGame_MovePlayerTowardKing ; GameLoop_CheckUseCurrentItem ; Game_UpdatePlayerOnScroll ; GetRandom ; Input_HandleOnInterrupt ; Player_CheckHandleClimb ; Player_CheckHandleClimbMaybeSide ; Player_CheckHandleJump ; Player_CheckPushingBlock ; Player_GetBodySpriteFrameOffset ; Player_UpdateAcceleration ;
[0016]Joy1_ButtonMask:; [$0016] [0016].byte $00; [$0016] ButtonBitmask
; ; Buttons last pressed by the player in controller port 2. ; ; Bit 0: Right ; Bit 1: Left ; Bit 2: Down ; Bit 3: Up ; Bit 4: Start ; Bit 5: Select ; Bit 6: B ; Bit 7: A ; ; ; XREFS: ; Debug_ChooseArea ; Input_HandleOnInterrupt ;
[0017]Joy2_ButtonMask:; [$0017] [0017].byte $00; [$0017] ButtonBitmask
; ; Buttons previously pressed before the latest button presses. ; ; This is used to restore any movement or actions invoked ; before a screen scroll or similar. ; ; Bit 0: Right ; Bit 1: Left ; Bit 2: Down ; Bit 3: Up ; Bit 4: Start ; Bit 5: Select ; Bit 6: B ; Bit 7: A ; ; ; XREFS: ; Game_UpdatePlayerOnScroll ; Input_HandleOnInterrupt ;
[0018]Joy1_PrevButtonMask:; [$0018] [0018].byte $00; [$0018] ButtonBitmask
; ; Button bits changed since the last interrupt. ; ; Bit 0: Right ; Bit 1: Left ; Bit 2: Down ; Bit 3: Up ; Bit 4: Start ; Bit 5: Select ; Bit 6: B ; Bit 7: A ; ; ; XREFS: ; IScriptAction_AddInventoryItem ; IScriptAction_ShowBuySellMenu ; IScriptAction_ShowPassword ; IScripts_WaitForMenuInput ; Menu_UpdateAndDraw ; PasswordScreen_DrawAndHandleInputLoop ; PasswordScreen_GetDPadBits ; PasswordScreen_HandleWrongPasswordAndWaitForInput ; PlayerMenu_HandleInventoryMenuInput ; PlayerMenu_Show ; PlayerMenu_ShowStatusMenu ; PlayerMenu_ShowSubmenu ; StartScreen_CheckHandleInput ; TextBox_CheckForDismiss ; TextBox_CheckShouldContinue ; TextBox_CheckShouldContinueOrDismissMessage ; TextBox_CheckShouldContinueOrDismissQuestion ; TextBox_IsBPressed ; Player_CastMagic ; Player_CheckHandlePressUpOnNPC ; Area_CheckCanClimbAdjacent ; EndGame_MovePlayerTowardKing ; GameLoop_CheckPauseGame ; GameLoop_CheckShowPlayerMenu ; GameLoop_CheckUseCurrentItem ; Game_ShowStartScreen ; Input_HandleOnInterrupt ; Player_CheckHandleAttack ; Player_CheckHandleEnterDoor ; Player_ContinueHandleClimbOrJump ;
[0019]Joy1_ChangedButtonMask:; [$0019] [0019].byte $00; [$0019] ButtonBitmask
;============================================================================ ; Additional interrupt handling state. ; ; XREFS: ; IScripts_PlayFillingSound ; IScripts_PlayGoldChangeSound ; IScripts_UpdatePortraitAnimation ; PasswordScreen_DrawPasswordFieldCursor ; PasswordScreen_WriteWrongPassword ; SplashAnimation_RunOutro ; SplashAnimation_UpdateOutro ; TextBox_DrawDownArrowTerminatorSymbol ; TextBox_DrawQuestionMarkTerminatorSymbol ; TextBox_DrawUpArrowTerminatorSymbol ; SpriteBehavior_Something_850d ; Area_ScrollTo ; CastMagic_FinishHandler_Death ; CastMagic_FinishHandler_Deluge ; CastMagic_FinishHandler_Fire ; CastMagic_FinishHandler_Thunder ; CastMagic_FinishHandler_Tilte ; Game_DecGloveDuration ; Game_DecHourGlassDuration ; Game_DecOintmentDuration ; Game_DecWingBootsDuration ; Game_WaitForOAMReset ; OnInterrupt ; Player_CheckOnBreakableBlock ; Player_DrawDeathAnimation ; WaitForInterrupt ;============================================================================
; ; A running counter tracking the number of interrupt handlers ; run. ; ; ; XREFS: ; IScripts_PlayFillingSound ; IScripts_PlayGoldChangeSound ; IScripts_UpdatePortraitAnimation ; PasswordScreen_DrawPasswordFieldCursor ; PasswordScreen_WriteWrongPassword ; SplashAnimation_RunOutro ; SplashAnimation_UpdateOutro ; TextBox_DrawDownArrowTerminatorSymbol ; TextBox_DrawQuestionMarkTerminatorSymbol ; TextBox_DrawUpArrowTerminatorSymbol ; SpriteBehavior_Something_850d ; Area_ScrollTo ; CastMagic_FinishHandler_Death ; CastMagic_FinishHandler_Deluge ; CastMagic_FinishHandler_Fire ; CastMagic_FinishHandler_Thunder ; CastMagic_FinishHandler_Tilte ; Game_DecGloveDuration ; Game_DecHourGlassDuration ; Game_DecOintmentDuration ; Game_DecWingBootsDuration ; Game_WaitForOAMReset ; OnInterrupt ; Player_CheckOnBreakableBlock ; Player_DrawDeathAnimation ; WaitForInterrupt ;
[001a]InterruptCounter:; [$001a] [001a].byte $00; [$001a] byte
; ; Whether the OAM needs to be reset at the next ; interrupt handler. ; ; ; XREFS: ; Game_WaitForOAMReset ; OnInterrupt ;
[001b]Game_NeedOAMReset:; [$001b] [001b].byte $00; [$001b] bool
; ; XREFS: ; Sprite_Draw_FlippedHoriz ; Sprite_Draw_Standard ; Sprites_Reset ;
[001c]Sprites_StartSlotRange:; [$001c] [001c].byte $00; [$001c] byte
;============================================================================ ; State for animating the fog in the area of Mist. ; ; XREFS: ; Fog_OnTick ; Fog_UpdateTiles ;============================================================================
; ; Tile offset for a fog tile to animate in Mist. ; ; ; XREFS: ; Fog_OnTick ; Fog_UpdateTiles ;
[001d]Fog_TileIndex:; [$001d] [001d].byte $00; [$001d] byte
; ; State index used to determine when to animate fog tiles ; and when to compute new starting tile indexes. ; ; ; XREFS: ; Fog_OnTick ; Fog_UpdateTiles ;
[001e]Fog_StateIndex:; [$001e] [001e].byte $00; [$001e] byte
;============================================================================ ; PPU ring buffer state. ; ; This is used to schedule draws, utilizing a ring buffer. ; Contents may either be a length count and data up to that ; length to draw, or one or more draw commands up with ; arguments. ; ; See PPUBuffer_Draw. ; ; XREFS: ; Game_InitStateForSpawn ; PPUBuffer_Clear ; PPUBuffer_Draw ; PPUBuffer_DrawAll ; PPUBuffer_DrawCommand_RemoveVerticalLines ; PPUBuffer_DrawCommand_RotateTilesRight1Pixel ; PPUBuffer_HasCapacity ; PPUBuffer_WaitUntilClear ; PPU_WaitUntilFlushed ;============================================================================
; ; Current offset within the buffer to begin adding to or ; drawing from. ; ; ; XREFS: ; Game_InitStateForSpawn ; PPUBuffer_Clear ; PPUBuffer_Draw ; PPUBuffer_DrawAll ; PPUBuffer_DrawCommand_RemoveVerticalLines ; PPUBuffer_DrawCommand_RotateTilesRight1Pixel ; PPUBuffer_HasCapacity ; PPUBuffer_WaitUntilClear ; PPU_WaitUntilFlushed ;
[001f]PPUBuffer_ReadOffset:; [$001f] [001f].byte $00; [$001f] byte
; ; Current upper bounds of the ring buffer. ; ; This may wrap from 0xFF -> 0. ; ; Drawing occurs until the offset meets the upper bounds. ; ; ; XREFS: ; DEADCODE_FUN_PRG12__9041 ; IScriptAction_AddInventoryItem_ClearTextBox ; PasswordScreen_DrawMessage ; PasswordScreen_WriteCharTile ; TextBox_Close ; TextBox_DrawItemImage ; TextBox_FillBackground ; TextBox_Open ; UI_DrawString ; Area_SetBlocks_SetAttributes ; Area_SetBlocks_WriteBlockData12 ; Area_SetBlocks_WriteBlockData34 ; DEADCODE_FUN_PRG15_MIRROR__c033 ; Fog_UpdateTiles ; Game_InitStateForSpawn ; IScripts_DrawPortraitTileToPPU ; PPUBuffer_Clear ; PPUBuffer_Draw ; PPUBuffer_DrawAll ; PPUBuffer_HasCapacity ; PPUBuffer_QueueCommandOrLength ; PPUBuffer_WaitUntilClear ; PPUBuffer_WritePalette ; PPUBuffer_WriteValueMany ; PPU_WaitUntilFlushed ; Player_DrawDeathAnimation ; Player_LoadWeaponTile ; Sprites_LoadImageForCurrentSprite ; TextBox_FillPlaceholderTextAtLineWithStartChar ; TextBox_LoadItemSourceTiles ; TextBox_WriteChar ; UI_ClearSelectedItemPic ; UI_DrawDigitsZeroPadded ;
[0020]PPUBuffer_WriteOffset:; [$0020] [0020].byte $00; [$0020] byte
; ; Temporary state used when drawing from the PPU buffer. ; ; MOD NOTES: ; This is clobbered by PPUBuffer_Draw, but is ; otherwise unused and can be reused in self-contained code. ; ; ; XREFS: ; PPUBuffer_Draw ;
[0021]PPUBuffer_Temp_PendingEntryCount:; [$0021] [0021].byte $00; [$0021] byte
; ; Temporary state used when drawing from the PPU buffer. ; ; MOD NOTES: ; This is clobbered by PPUBuffer_Draw, but is ; otherwise unused and can be reused in self-contained code. ; ; ; XREFS: ; PPUBuffer_Draw ;
[0022]PPUBuffer_Temp_TotalByteLength:; [$0022] [0022].byte $00; [$0022] byte
;============================================================================ ; Temporary value used when populating the PPU nametable. ; ; MOD NOTES: ; This is clobbered by ; PPU_InitAttributeAndNameTables, ; but is otherwise unused and can be reused in ; self-contained code. ; ; XREFS: ; PPU_InitAttributeAndNameTables ;============================================================================
; ; XREFS: ; PPU_InitAttributeAndNameTables ;
[0023]Temp_PPU_NameTableValue:; [$0023] [0023].byte $00; [$0023] byte
;============================================================================ ; The current area the player is in. ; ; $00 = Eolis ; $01 = Apolune ; $02 = Forepaw ; $03 = Mascon ; $04 = Victim ; $05 = Conflate ; $06 = Daybreak ; $07 = Evil Fortress ; ; XREFS: ; PlayerMenu_HandleInventoryMenuInput ; SpriteBehavior_EnemyUnused18__9991 ; Area_SetStateFromDoorDestination ; FUN_PRG15_MIRROR__daf6 ; Fog_OnTick ; GameLoop_CheckShowPlayerMenu ; Game_EnterAreaHandler ; Game_EnterBuilding ; Game_ExitBuilding ; Game_InitStateForStartScreen ; Game_LoadAreaTable ; Game_LoadCurrentArea ; Game_LoadFirstLevel ; Game_SetupAndLoadOutsideArea ; Game_SpawnInTemple ; Player_CheckSwitchScreen ; Player_CheckSwitchScreen_SwitchAreaHoriz ; Player_EnterDoorToInside ; Player_SetWeapon ; Player_UseMattock ; Screen_LoadAllScreenInfo ;============================================================================
; ; XREFS: ; PlayerMenu_HandleInventoryMenuInput ; SpriteBehavior_EnemyUnused18__9991 ; Area_SetStateFromDoorDestination ; FUN_PRG15_MIRROR__daf6 ; Fog_OnTick ; GameLoop_CheckShowPlayerMenu ; Game_EnterAreaHandler ; Game_EnterBuilding ; Game_ExitBuilding ; Game_InitStateForStartScreen ; Game_LoadAreaTable ; Game_LoadCurrentArea ; Game_LoadFirstLevel ; Game_SetupAndLoadOutsideArea ; Game_SpawnInTemple ; Player_CheckSwitchScreen ; Player_CheckSwitchScreen_SwitchAreaHoriz ; Player_EnterDoorToInside ; Player_SetWeapon ; Player_UseMattock ; Screen_LoadAllScreenInfo ;
[0024]Area_CurrentArea:; [$0024] [0024].byte $00; [$0024] Area
;============================================================================ ; The next sprite slot. ; ; This will alternate between putting sprites in ranges 0-31 ; and 32-63. ; ; If either range is filled with sprites, Sprites_SlotsFull ; will be set to 1. No new sprite slots will be allocated. ; This takes place in Sprites_IncNextSpriteSlot. ; ; XREFS: ; Sprite_Draw_FlippedHoriz ; Sprite_Draw_Standard ; Sprites_IncNextSpriteSlot ; Sprites_Reset ;============================================================================
; ; XREFS: ; Sprite_Draw_FlippedHoriz ; Sprite_Draw_Standard ; Sprites_IncNextSpriteSlot ; Sprites_Reset ;
[0025]Sprites_SpriteSlot:; [$0025] [0025].byte $00; [$0025] byte
;============================================================================ ; Current sprite state. ; ; XREFS: ; SUB_PRG14__ba48 [$PRG14::ba48] ; Something_SetDAT26 [$PRG14::8c7f] ; SpriteUpdateHandler_Invisible ; CastMagic_CalculateVisibility ; Sprite_Draw_Finish ; Sprite_Draw_FlippedHoriz ; Sprite_Draw_Standard ;============================================================================
; ; Visibility state for the current sprite being processed. ; ; This tracks whether the current sprite is: ; ; $00 = Fully visible by foreground elements ; $01 = Obscured only on the trailing side of the sprite. ; $02 = Obscured only on the leading side of the sprite. ; $03 = Fully obscured ; ; The trailing and leading sides have to do with the direction ; the sprite is facing. ; ; ; XREFS: ; SUB_PRG14__ba48 [$PRG14::ba48] ; Something_SetDAT26 [$PRG14::8c7f] ; SpriteUpdateHandler_Invisible ; CastMagic_CalculateVisibility ; Sprite_Draw_Finish ; Sprite_Draw_FlippedHoriz ; Sprite_Draw_Standard ;
[0026]MovingSpriteVisibility:; [$0026] [0026].byte $00; [$0026] MovingSpriteVisibility
; ; An argument to Sprite_EnterNextAppearancePhase. ; ; This specifies the X position of the sprite. ; ; ; XREFS: ; IScripts_SetPortraitSpriteXY ; CurrentSprite_UpdateState ; Player_CalculateVisibility ; Player_DrawShield ; Player_DrawWeapon ; SpriteUpdateHandler_Effect_LightningBall20 ; SpriteUpdateHandler_Enemy_Unused_SnakeRoundPart ; CastMagic_FinishHandler_TilteAfterFirstHit ; CastMagic_RunUpdateSpellHandler ; FUN_PRG15_MIRROR__ec58 ; Player_DrawBody ; Sprite_Draw ; UI_DrawPromptInputSymbol ;
[0027]Arg_DrawSprite_PosX:; [$0027] [0027].byte $00; [$0027] byte
; ; An argument to Sprite_EnterNextAppearancePhase. ; ; This specifies the Y position of the sprite. ; ; ; XREFS: ; IScripts_SetPortraitSpriteXY ; CurrentSprite_UpdateState ; Player_CalculateVisibility ; Player_DrawShield ; Player_DrawWeapon ; SpriteUpdateHandler_Effect_EnemyDeath ; SpriteUpdateHandler_Effect_LightningBall20 ; SpriteUpdateHandler_Enemy_Unused_SnakeRoundPart ; CastMagic_FinishHandler_HitWallEffect ; CastMagic_FinishHandler_TilteAfterFirstHit ; CastMagic_RunUpdateSpellHandler ; FUN_PRG15_MIRROR__ec58 ; Player_DrawBody ; Sprite_Draw ; UI_DrawPromptInputSymbol ;
[0028]Arg_DrawSprite_PosY:; [$0028] [0028].byte $00; [$0028] byte
;============================================================================ ; The current sprite's flip mask. ; ; This indicates if the sprite is flipped horizontally, ; utilizing only the Facing bit of a sprite or player's flags. ; ; The following values are allowed: ; ; $00 = Facing right (default) ; $40 = Facing left (flipped) ; ; XREFS: ; CurrentSprite_UpdateFlipMask ; Maybe_Player_CalcAnimFrame ; Player_DrawShield ; Player_DrawWeapon ; SpriteUpdateHandler_Bread ; SpriteUpdateHandler_Coin ; SpriteUpdateHandler_Effect_EnemyDeath ; SpriteUpdateHandler_Effect_Fountain ; SpriteUpdateHandler_Effect_LightningBall20 ; SpriteUpdateHandler_Enemy_Lamprey ; SpriteUpdateHandler_Item_Special ; SpriteUpdateHandler_Item_Standard ; SpriteUpdateHandler_Magic_81 ; SpriteUpdateHandler_Magic_83 ; SpriteUpdateHandler_NPC_ArmorSalesman ; SpriteUpdateHandler_NPC_Doctor ; SpriteUpdateHandler_NPC_KeySalesman_Others ; SpriteUpdateHandler_NPC_King ; CastMagic_FinishHandler_HitWallEffect ; CastMagic_FinishHandler_TilteAfterFirstHit ; CastMagic_UpdateSpriteDirection ; IScripts_DrawPortraitAnimationFrame ; Player_GetBodySpriteFrameOffset ; Player_SetFacingLeft ; Sprite_Draw ; Sprite_Draw_FlippedHoriz ; Sprite_Draw_Standard ; UI_DrawPromptInputSymbol ;============================================================================
; ; XREFS: ; CurrentSprite_UpdateFlipMask ; Maybe_Player_CalcAnimFrame ; Player_DrawShield ; Player_DrawWeapon ; SpriteUpdateHandler_Bread ; SpriteUpdateHandler_Coin ; SpriteUpdateHandler_Effect_EnemyDeath ; SpriteUpdateHandler_Effect_Fountain ; SpriteUpdateHandler_Effect_LightningBall20 ; SpriteUpdateHandler_Enemy_Lamprey ; SpriteUpdateHandler_Item_Special ; SpriteUpdateHandler_Item_Standard ; SpriteUpdateHandler_Magic_81 ; SpriteUpdateHandler_Magic_83 ; SpriteUpdateHandler_NPC_ArmorSalesman ; SpriteUpdateHandler_NPC_Doctor ; SpriteUpdateHandler_NPC_KeySalesman_Others ; SpriteUpdateHandler_NPC_King ; CastMagic_FinishHandler_HitWallEffect ; CastMagic_FinishHandler_TilteAfterFirstHit ; CastMagic_UpdateSpriteDirection ; IScripts_DrawPortraitAnimationFrame ; Player_GetBodySpriteFrameOffset ; Player_SetFacingLeft ; Sprite_Draw ; Sprite_Draw_FlippedHoriz ; Sprite_Draw_Standard ; UI_DrawPromptInputSymbol ;
[0029]CurrentSprite_FlipMask:; [$0029] [0029].byte $00; [$0029] byte
; ; UNUSED: Y scroll position for a sprite. ; ; This is written to but never read from. ; ; ; XREFS: ; CurrentSprite_UpdateState ; CastMagic_RunUpdateSpellHandler ; Player_DrawBody ;
[002a]Unused_Sprite_ScrollPosY:; [$002a] [002a].byte $00; [$002a] byte
; ; UNUSED: X scroll position for a sprite. ; ; This is written to but never read from. ; ; ; XREFS: ; CurrentSprite_UpdateState ; CastMagic_RunUpdateSpellHandler ; Player_DrawBody ;
[002b]Unused_Sprite_ScrollPosX:; [$002b] [002b].byte $00; [$002b] byte
;============================================================================ ; MOD NOTES: 7 unused bytes of RAM. ;============================================================================
[002c].byte $00,$00,$00,$00,$00,$00,$00; [$002c] undefined
; ; XREFS: ; CurrentSprite_UpdateState ; Player_DrawShield ; Player_DrawWeapon ; SpriteUpdateHandler_Bread ; SpriteUpdateHandler_Effect_BossDeath ; SpriteUpdateHandler_Effect_EnemyDeath ; SpriteUpdateHandler_Effect_LightningBall20 ; SpriteUpdateHandler_Enemy_Unused_SnakeRoundPart ; SpriteUpdateHandler_Invisible ; IScripts_DrawPortraitAnimationFrame ; Sprite_Draw_Finish ; Sprite_Draw_FlippedHoriz ; Sprite_Draw_Standard ; Sprites_Reset ;
[0033]Sprites_PPUOffset:; [$0033] [0033].byte $00; [$0033] byte
;============================================================================ ; UNUSED: The following 5 bytes are either unused or only ; written to, never read from. ; ; All but $0036 are unsafe to use. ; ; XREFS: ; Sprites_Reset ;============================================================================
; ; XREFS: ; Sprites_Reset ;
[0034]Sprites_Unused_0034:; [$0034] [0034].byte $00; [$0034] byte
; ; XREFS: ; Sprites_Reset ;
[0035]Sprites_Unused_0035:; [$0035] [0035].byte $00,$00; [$0035] byte
; ; XREFS: ; Sprites_Reset ;
[0037]Sprites_Unused_0037:; [$0037] [0037].byte $00; [$0037] byte
; ; XREFS: ; Sprites_Reset ;
[0038]Sprites_Unused_0038:; [$0038] [0038].byte $00; [$0038] byte
;============================================================================ ; Whether sprites can currently be added. ; ; This is 0 when there's room for sprites, and 1 when the slots ; are full. ; ; XREFS: ; Sprite_Draw_FlippedHoriz ; Sprite_Draw_Standard ; Sprites_IncNextSpriteSlot ; Sprites_Reset ;============================================================================
; ; XREFS: ; Sprite_Draw_FlippedHoriz ; Sprite_Draw_Standard ; Sprites_IncNextSpriteSlot ; Sprites_Reset ;
[0039]Sprites_SlotsFull:; [$0039] [0039].byte $00; [$0039] bool
; ; Temporary variable for the lower byte of a sprite's ; image data. ; ; ; XREFS: ; Sprite_Draw ; Sprite_Draw_FlippedHoriz ; Sprite_Draw_Standard ;
[003a]Sprite_TileInfo_ReadAddr_L:; [$003a] [003a].byte $00; [$003a] byte
; ; Temporary variable for the upper byte of a sprite's ; image data. ; ; ; XREFS: ; Sprite_Draw ;
[003b]Sprite_TileInfo_ReadAddr_U:; [$003b] [003b].byte $00; [$003b] byte
; ; Temporary variable for the normalized X position of a sprite. ; ; ; XREFS: ; Sprite_Draw ; Sprite_Draw_FlippedHoriz ; Sprite_Draw_Standard ;
[003c]Temp_Sprites_NormXPos:; [$003c] [003c].byte $00; [$003c] byte
; ; Temporary variable for the normalized Y position of a sprite. ; ; ; XREFS: ; Sprite_Draw ; Sprite_Draw_FlippedHoriz ; Sprite_Draw_Standard ;
[003d]Temp_Sprites_NormYPos:; [$003d] [003d].byte $00; [$003d] byte
; ; XREFS: ; Sprite_Draw ; Sprite_Draw_FlippedHoriz ; Sprite_Draw_Standard ;
[003e]Sprite_TileInfo_OffsetX:; [$003e] [003e].byte $00; [$003e] byte
; ; XREFS: ; Sprite_Draw ; Sprite_Draw_FlippedHoriz ; Sprite_Draw_Standard ;
[003f]Sprite_TileInfo_OffsetY:; [$003f] [003f].byte $00; [$003f] byte
; ; Temporary variable for the number of sprite tile columns ; remaining to draw. ; ; ; XREFS: ; Sprite_Draw ; Sprite_Draw_FlippedHoriz ; Sprite_Draw_Standard ;
[0040]Temp_Sprites_ColsRemaining:; [$0040] [0040].byte $00; [$0040] byte
; ; Temporary variable for the number of sprite tile rows ; remaining to draw. ; ; ; XREFS: ; Sprite_Draw ; Sprite_Draw_FlippedHoriz ; Sprite_Draw_Standard ;
[0041]Temp_Sprites_RowsRemaining:; [$0041] [0041].byte $00; [$0041] byte
; ; Temporary variable for the current X tile offset to draw for ; the sprite. ; ; ; XREFS: ; Sprite_Draw_FlippedHoriz ; Sprite_Draw_Standard ;
[0042]Temp_Sprites_TileXOffset:; [$0042] [0042].byte $00; [$0042] byte
; ; Temporary variable for the current Y tile offset to draw for ; the sprite. ; ; ; XREFS: ; Sprite_Draw_FlippedHoriz ; Sprite_Draw_Standard ;
[0043]Temp_Sprites_TileYOffset:; [$0043] [0043].byte $00; [$0043] byte
; ; A counter that increments or decrements when scrolling ; vertically. ; ; When scrolling from top to bottom, this will count up ; from 0 to 0xCF. ; ; When scrolling from bottom to top, this will count down ; from 0xCF to 0. ; ; ; XREFS: ; Screen_HandleScrollDown ; Screen_HandleScrollUp ; Screen_LoadBlockDataVert ; Screen_LoadBlocksDown ; Screen_LoadDataUp ;
[0044]Screen_ScrollVertLoadCounter:; [$0044] [0044].byte $00; [$0044] byte
; ; A counter that increments or decrements when scrolling ; horizontally. ; ; When scrolling from left to right, this will count up ; from 0x01 to 0xF9. ; ; When scrolling from right to left, this will count down ; from 0xFF to 0 and wrapping to 0xFE. ; ; ; XREFS: ; Area_LoadScrollDataRight ; Screen_HandleScrollLeft ; Screen_HandleScrollRight ; Screen_LoadBlocksHoriz ; Screen_LoadDataLeft ; Screen_LoadDataRight ;
[0045]Screen_ScrollHorizLoadCounter:; [$0045] [0045].byte $00; [$0045] byte
; ; XREFS: ; Screen_LoadBlocksHoriz ;
[0046]Screen_ScrollHorizLoadOffset:; [$0046] [0046].byte $00; [$0046] byte
; ; XREFS: ; Area_ScrollScreenRight ; Screen_LoadBlocksHoriz ;
[0047]Screen_Maybe_ScrollHorizDirection:; [$0047] [0047].byte $00; [$0047] byte
; ; XREFS: ; Screen_LoadBlockDataVert ;
[0048]Temp_Blocks_0048:; [$0048] [0048].byte $00; [$0048] byte
; ; XREFS: ; Screen_LoadBlockDataVert ;
[0049]Unused_Blocks_0049:; [$0049] [0049].byte $00; [$0049] byte
; ; UNUSED: The next 2 bytes are unused by Faxanadu. ;
[004a].byte $00,$00; [$004a] byte
;============================================================================ ; PPU tilemap and attribute addresses used during screen scroll. ; ; XREFS: ; Screen_LoadBlocksHoriz ; Screen_WriteScrollHorizPPUTileData ;============================================================================
; ; PPU tilemap address used when scrolling horizontally. ; ; ; XREFS: ; Screen_LoadBlocksHoriz ; Screen_WriteScrollHorizPPUTileData ;
[004c]Screen_ScrollHorizBlocks_PPUTileMapAddr_L:; [$004c] [004c].byte $00; [$004c] byte
; ; XREFS: ; Screen_LoadBlocksHoriz ; Screen_WriteScrollHorizPPUTileData ;
[004d]Screen_ScrollHorizBlocks_PPUTileMapAddr_U:; [$004d] [004d].byte $00; [$004d] byte
; ; PPU tilemap address used when scrolling vertically. ; ; ; XREFS: ; Screen_LoadBlockDataVert ; Screen_WriteScrollVertPPUTileData ;
[004e]Screen_ScrollVertBlocks_PPUTileMapAddr_L:; [$004e] [004e].byte $00; [$004e] byte
; ; XREFS: ; Screen_LoadBlockDataVert ; Screen_WriteScrollVertPPUTileData ;
[004f]Screen_ScrollVertBlocks_PPUTileMapAddr_U:; [$004f] [004f].byte $00; [$004f] byte
; ; PPU attribute address used when scrolling horizontally. ; ; ; XREFS: ; Screen_LoadBlocksHoriz ; Screen_WriteScrollHorizPPUAttrData ;
[0050]Screen_ScrollHorizBlocks_PPUAttrAddr_L:; [$0050] [0050].byte $00; [$0050] byte
; ; XREFS: ; Screen_LoadBlocksHoriz ; Screen_WriteScrollHorizPPUAttrData ;
[0051]Screen_ScrollHorizBlocks_PPUAttrAddr_U:; [$0051] [0051].byte $00; [$0051] byte
; ; PPU attribute address used when scrolling vertically. ; ; ; XREFS: ; Screen_LoadBlockDataVert ; Screen_WriteScrollVertPPUAttrData ;
[0052]Screen_ScrollVertBlocks_PPUAttrAddr_L:; [$0052] [0052].byte $00; [$0052] byte
; ; XREFS: ; Screen_LoadBlockDataVert ; Screen_WriteScrollVertPPUAttrData ;
[0053]Screen_ScrollVertBlocks_PPUAttrAddr_U:; [$0053] [0053].byte $00; [$0053] byte
;============================================================================ ; The screen scrolling direction. ; ; 0 = Left ; 1 = Right ; 2 = Up ; 3 = Down ; ; XREFS: ; Area_LoadScrollDataRight ; Area_ScrollScreenRight ; GameLoop_UpdatePlayer ; Game_MainLoop ; Game_MovePlayerOnScroll ; Player_CheckHandleJump ; Screen_HandleScroll ; Screen_StopScrollAndLoadBlockProperties ; Screen_UpdateForScroll ;============================================================================
; ; XREFS: ; Area_LoadScrollDataRight ; Area_ScrollScreenRight ; GameLoop_UpdatePlayer ; Game_MainLoop ; Game_MovePlayerOnScroll ; Player_CheckHandleJump ; Screen_HandleScroll ; Screen_StopScrollAndLoadBlockProperties ; Screen_UpdateForScroll ;
[0054]Screen_ScrollDirection:; [$0054] [0054].byte $00; [$0054] Direction
;============================================================================ ; MOD NOTES: 2 unused bytes of RAM. ;============================================================================
[0055].byte $00,$00; [$0055] undefined
; ; The following are pending a deep-dive. A lot of these ; variables depend on each other. ; ; ; XREFS: ; Area_ScrollScreenRight ; Game_InitScreenAndMusic ; Screen_HandleScrollDown ; Screen_HandleScrollUp ; Screen_UpdateForScroll ;
[0057]PPU_ScrollY:; [$0057] [0057].byte $00; [$0057] byte
; ; XREFS: ; Player_DrawBody ; Player_SetInitialState ; Screen_HandleScrollDown ; Screen_HandleScrollUp ; Screen_LoadBlockDataVert ; Screen_SetupNew ;
[0058]PPU_ScrollScreenVert:; [$0058] [0058].byte $00; [$0058] byte
; ; XREFS: ; Area_LoadScrollDataRight ; Player_DrawBody ; Player_SetInitialState ; Screen_HandleScrollLeft ; Screen_HandleScrollRight ; Screen_LoadBlockDataVert ; Screen_LoadBlocksHoriz ; Screen_SetupNew ;
[0059]PPU_ScrollScreenHoriz:; [$0059] [0059].byte $00; [$0059] byte
;============================================================================ ; Default mode for the initial sprite when resetting sprite slots. ; ; This supports the following values: ; ; 0xFF = Don't add a default sprite 0. ; 0x00 = Add a default sprite 0 at X=8, Y=23 (used in game) ; 0x01 = Add a default sprite 0 at X=0, Y=72 (not used) ; ; XREFS: ; DEADCODE_Sprites_ResetForDefaultsMode1 ; PPU_HandleOnInterrupt ; Screen_ResetSpritesForGamePlay ; Screen_ResetSpritesForNonGame ; Sprites_Reset ;============================================================================
; ; XREFS: ; DEADCODE_Sprites_ResetForDefaultsMode1 ; PPU_HandleOnInterrupt ; Screen_ResetSpritesForGamePlay ; Screen_ResetSpritesForNonGame ; Sprites_Reset ;
[005a]Sprites_Sprite0Mode:; [$005a] [005a].byte $00; [$005a] Sprite0Mode
;============================================================================ ; Whether to force lower pattern tables when updating the PPU. ; ; XREFS: ; DEADCODE_Sprites_ResetForDefaultsMode1 ; Game_InitScreenAndMusic ; PPU_HandleOnInterrupt ; PPU_WaitUntilFlushed ; Screen_ResetSpritesForGamePlay ;============================================================================
; ; XREFS: ; DEADCODE_Sprites_ResetForDefaultsMode1 ; Game_InitScreenAndMusic ; PPU_HandleOnInterrupt ; PPU_WaitUntilFlushed ; Screen_ResetSpritesForGamePlay ;
[005b]PPU_ForceLowerPatternTables:; [$005b] [005b].byte $00; [$005b] bool
;============================================================================ ; Screen block loading state. ; ; XREFS: ; Area_LoadBlocks ;============================================================================
; ; Temporary variable used while loading blocks. ; ; ; XREFS: ; Area_LoadBlocks ;
[005c]Temp_LoadedBlockValue:; [$005c] [005c].byte $00; [$005c] byte
; ; Temporary variable used to store the loaded blocks count. ; ; ; XREFS: ; Area_LoadBlocks ;
[005d]Temp_LoadedBlocksCount:; [$005d] [005d].byte $00; [$005d] byte
; ; Current byte offset into the compressed screen data. ; ; ; XREFS: ; Area_LoadBlocks ; Area_LoadNextCompressedScreenBit ;
[005e]LoadCompressedScreenData_ByteOffset:; [$005e] [005e].byte $00; [$005e] byte
; ; Current bit offset into the current compressed screen byte. ; ; ; XREFS: ; Area_LoadBlocks ; Area_LoadNextCompressedScreenBit ;
[005f]LoadCompressedScreenData_BitOffset:; [$005f] [005f].byte $00; [$005f] byte
; ; Current compressed screen byte being loaded from. ; ; ; XREFS: ; Area_LoadNextCompressedScreenBit ;
[0060]LoadCompressedScreenData_CurByte:; [$0060] [0060].byte $00; [$0060] byte
;============================================================================ ; Player/equipment sprite addresses. ; ; This is used to store the address of each piece of ; equipment the player is wearing. That includes the ; player body/armor, the shield, and the weapon. ; ; XREFS: ; Player_LoadArmorSpriteTilesAddr ; Player_LoadShieldSpriteTileAddrs ; Player_LoadWeaponSpriteTileAddrs ; Player_LoadWeaponTile ;============================================================================
; ; XREFS: ; Player_LoadArmorSpriteTilesAddr ; Player_LoadShieldSpriteTileAddrs ; Player_LoadWeaponSpriteTileAddrs ; Player_LoadWeaponTile ;
[0061]Player_SpriteTileReadAddr_L:; [$0061] [0061].byte $00; [$0061] byte
; ; XREFS: ; Player_LoadArmorSpriteTilesAddr ; Player_LoadShieldSpriteTileAddrs ; Player_LoadWeaponSpriteTileAddrs ;
[0062]Player_SpriteTileReadAddr_U:; [$0062] [0062].byte $00; [$0062] byte
;============================================================================ ; Area/screen information. ; ; XREFS: ; Area_LoadScrollDataRight ; Area_ScrollScreenDown ; Area_ScrollScreenUp ; Debug_ChooseArea ; EndGame_MoveToKingsRoom ; GameLoop_CheckShowPlayerMenu ; Game_DropLadderToMascon ; Game_EnterAreaHandler ; Game_EnterBuilding ; Game_LoadCurrentArea ; Game_LoadFirstLevel ; Game_SpawnInTemple ; Player_CheckHandleClimbUp ; Player_CheckSwitchScreen_SwitchAreaHoriz ; Player_MoveDownScreen ; Player_TryMoveLeft ; Player_TryMoveRight ; Screen_LoadAllScreenInfo ; Screen_LoadBlockDataVert ; Screen_LoadBlocksHoriz ; Screen_SetupNew ;============================================================================
; ; The (outside) area the player is in. ; ; This is used to reference screens and other information, ; and to restore the appropriate area when exiting a ; building. ; ; ; XREFS: ; Area_LoadScrollDataRight ; Area_ScrollScreenDown ; Area_ScrollScreenUp ; Debug_ChooseArea ; EndGame_MoveToKingsRoom ; GameLoop_CheckShowPlayerMenu ; Game_DropLadderToMascon ; Game_EnterAreaHandler ; Game_EnterBuilding ; Game_LoadCurrentArea ; Game_LoadFirstLevel ; Game_SpawnInTemple ; Player_CheckHandleClimbUp ; Player_CheckSwitchScreen_SwitchAreaHoriz ; Player_MoveDownScreen ; Player_TryMoveLeft ; Player_TryMoveRight ; Screen_LoadAllScreenInfo ; Screen_LoadBlockDataVert ; Screen_LoadBlocksHoriz ; Screen_SetupNew ;
[0063]Area_CurrentScreen:; [$0063] [0063].byte $00; [$0063] byte
; ; The index of the screen being loaded. ; ; ; XREFS: ; EndGame_MoveToKingsRoom ; Game_EnterAreaHandler ; Game_ExitBuilding ; Game_LoadCurrentArea ; Game_LoadFirstLevel ; Game_SpawnInTemple ; Player_CheckSwitchScreen_SwitchAreaHoriz ; Player_EnterDoorToInside ; Player_EnterDoorToOutside ; Screen_SetupNew ;
[0064]Area_LoadingScreenIndex:; [$0064] [0064].byte $00; [$0064] byte
; ; TODO: The pallete for the current screen? ; ; Seems there's more to it than this. It might double as ; a building type in places. (Seems this is the case.) ; ; ; XREFS: ; EndGame_MoveToKingsRoom ; Game_ExitBuilding ; Game_LoadCurrentArea ; Game_LoadFirstLevel ; Game_SpawnInTemple ; Player_CheckHandleEnterDoor ; Player_CheckSwitchScreen_SwitchAreaHoriz ; Player_EnterDoorToInside ; Screen_SetupNew ;
[0065]Screen_DestPaletteOrIndex:; [$0065] [0065].byte $00; [$0065] Palette
; ; Screen to the left of the currently-visible screen. ; ; ; XREFS: ; Area_LoadScrollDataRight ; Player_TryMoveLeft ;
[0066]Area_ScreenToTheLeft:; [$0066] [0066].byte $00; [$0066] byte
; ; Screen to the right of the currently-visible screen. ; ; ; XREFS: ; Area_LoadScrollDataRight ; Player_TryMoveRight ;
[0067]Area_ScreenToTheRight:; [$0067] [0067].byte $00; [$0067] byte
; ; Screen above the currently-visible screen. ; ; ; XREFS: ; Area_LoadScrollDataRight ; Area_ScrollScreenUp ; Player_CheckHandleClimbUp ;
[0068]Area_ScreenAbove:; [$0068] [0068].byte $00; [$0068] byte
; ; Screen below the currently-visible screen. ; ; ; XREFS: ; Area_LoadScrollDataRight ; Area_ScrollScreenDown ; Player_MoveDownScreen ;
[0069]Area_ScreenBelow:; [$0069] [0069].byte $00; [$0069] byte
; ; Temporary variable used to store a block position. ; ; ; XREFS: ; Area_SetStateFromDoorDestination ;
[006a]Temp_BlockPos:; [$006a] [006a].byte $00; [$006a] byte
; ; Temporary variable used to store a block position. ; ; ; XREFS: ; Player_CheckHandleEnterDoor ;
[006b]Temp_BlockPos2:; [$006b] [006b].byte $00; [$006b] byte
; ; Starting position for a player when changing screens. ; ; This is in $YX position: ; ; Upper nibble = Y position ; Lower nibble = X position / 16 ; ; ; XREFS: ; EndGame_MoveToKingsRoom ; Game_ExitBuilding ; Game_LoadFirstLevel ; Game_SpawnInTemple ; Player_CheckSwitchScreen_SwitchAreaHoriz ; Player_EnterDoorToInside ; Screen_SetupNew ;
[006c]Screen_StartPosYX:; [$006c] [006c].byte $00; [$006c] byte
; ; XREFS: ; Area_ScrollScreenRight ; Screen_LoadBlockDataVert ; Screen_LoadBlocksHoriz ;
[006d]MaybeUnused_006d:; [$006d] [006d].byte $00; [$006d] byte
; ; The current operational mode during the scrolling process. ; ; This is managed when scrolling the screen horizontally or ; vertically. It has the following supported values: ; ; 0x00: Load blocks from the area blocks data. ; ; 0x01: Draw blocks to the screen. ; ; ; XREFS: ; Screen_LoadAttrsHoriz ; Screen_LoadAttrsVert ; Screen_LoadBlockDataVert ; Screen_LoadBlocksDown ; Screen_LoadBlocksHoriz ; Screen_LoadDataLeft ; Screen_LoadDataRight ; Screen_LoadDataUp ;
[006e]Screen_ScrollLoadMode:; [$006e] [006e].byte $00; [$006e] ScreenScrollLoadMode
; ; XREFS: ; Screen_LoadBlockDataVert ; Screen_LoadBlocksHoriz ;
[006f]CurrentArea_BlockData1CurAddr:; [$006f] [006f].byte $00; [$006f] byte
; ; XREFS: ; Screen_LoadBlockDataVert ; Screen_LoadBlocksHoriz ;
[0070]CurrentArea_BlockData2CurAddr:; [$0070] [0070].byte $00; [$0070] byte
; ; XREFS: ; Screen_LoadBlockDataVert ; Screen_LoadBlocksHoriz ;
[0071]CurrentArea_BlockData3CurAddr:; [$0071] [0071].byte $00; [$0071] byte
; ; XREFS: ; Screen_LoadBlockDataVert ; Screen_LoadBlocksHoriz ;
[0072]CurrentArea_BlockData4CurAddr:; [$0072] [0072].byte $00; [$0072] byte
; ; XREFS: ; Area_ScrollScreenRight ; Screen_LoadBlockDataVert ; Screen_RunWriteScrollDataHandler ;
[0073]Screen_NeighborBlocksLoadedByDirection:; [$0073] [0073].byte $00; [0]:
; ; XREFS: ; Area_ScrollScreenRight ; Screen_LoadBlocksHoriz ;
[0074]Screen_ScrollHorizBlocksLoaded:; [$0074] [0074].byte $00; [1]:
; ; XREFS: ; Area_ScrollScreenRight ; Screen_LoadBlockDataVert ;
[0075]Screen_MaybeUnused_0075:; [$0075] [0075].byte $00; [2]:
; ; XREFS: ; Area_ScrollScreenRight ; Screen_LoadBlocksHoriz ;
[0076]Screen_ScrollHorizAttrsLoaded:; [$0076] [0076].byte $00; [3]:
; ; XREFS: ; Area_ScrollScreenRight ; Screen_RunWriteScrollDataHandler ;
[0077]Screen_LoadBlocksStage:; [$0077] [0077].byte $00; [0]: [0078].byte $00; [1]: [0079].byte $00; [2]:
; ; XREFS: ; Area_LoadBlocks ; Game_LoadAreaTable ;
[007a]Area_ScreenBlocksOffset:; [$007a] [007a].byte $00; [$007a] byte
; ; XREFS: ; Game_LoadAreaTable ;
[007b]Area_ScreenBlocksOffset_U:; [$007b] [007b].byte $00; [$007b] byte
; ; XREFS: ; Game_LoadAreaTable ;
[007c]CurrentArea_TableAddr:; [$007c] [007c].byte $00; [$007c] byte
; ; XREFS: ; Game_LoadAreaTable ;
[007d]CurrentArea_TableAddr_U:; [$007d] [007d].byte $00; [$007d] byte
; ; XREFS: ; Area_SetBlocks_SetAttributes ; Game_LoadAreaTable ; Screen_LoadBlockDataVert ; Screen_LoadBlocksHoriz ; TextBox_GetBackingAttributeData ;
[007e]CurrentArea_BlockAttributesAddr:; [$007e] [007e].byte $00,$00; [$007e] byte
; ; XREFS: ; Area_SetBlocks_WriteBlockData12 ; Screen_LoadBlockDataVert ; Screen_LoadBlocksHoriz ;
[0080]CurrentArea_BlockData1StartAddr:; [$0080] [0080].byte $00,$00; [$0080] byte
; ; XREFS: ; Area_SetBlocks_WriteBlockData12 ; Screen_LoadBlockDataVert ; Screen_LoadBlocksHoriz ;
[0082]CurrentArea_BlockData2StartAddr:; [$0082] [0082].byte $00,$00; [$0082] byte
; ; XREFS: ; Area_SetBlocks_WriteBlockData34 ; Screen_LoadBlockDataVert ; Screen_LoadBlocksHoriz ;
[0084]CurrentArea_BlockData3StartAddr:; [$0084] [0084].byte $00,$00; [$0084] byte
; ; XREFS: ; Area_SetBlocks_WriteBlockData34 ; Screen_LoadBlockDataVert ; Screen_LoadBlocksHoriz ;
[0086]CurrentArea_BlockData4StartAddr:; [$0086] [0086].byte $00,$00; [$0086] byte
; ; XREFS: ; Area_LoadBlockProperties ; Game_LoadAreaTable ;
[0088]CurrentArea_BlockPropertiesAddr:; [$0088] [0088].byte $00; [$0088] byte
; ; XREFS: ; Game_LoadAreaTable ;
[0089]CurrentArea_BlockPropertiesAddr_U:; [$0089] [0089].byte $00; [$0089] byte
; ; XREFS: ; Area_LoadScrollDataRight ; Game_LoadAreaTable ;
[008a]CurrentArea_ScrollingDataAddr:; [$008a] [008a].byte $00; [$008a] byte
; ; XREFS: ; Area_LoadScrollDataRight ; Game_LoadAreaTable ;
[008b]ScrollingData_U:; [$008b] [008b].byte $00; [$008b] byte
; ; Current area's ROM bank. ; ; ; XREFS: ; Area_LoadScrollDataRight ; Game_EnterAreaHandler ; Game_EnterBuilding ; Game_ExitBuilding ; Game_LoadCurrentArea ; Game_LoadFirstLevel ;
[008c]CurrentArea_ROMBank:; [$008c] [008c].byte $00; [$008c] ROMBank
; ; XREFS: ; Area_SetStateFromDoorDestination ; Game_LoadAreaTable ;
[008d]CurrentArea_DoorLocationsAddr:; [$008d] [008d].byte $00; [$008d] byte
; ; XREFS: ; Area_SetStateFromDoorDestination ; Game_LoadAreaTable ;
[008e]CurrentArea_DoorLocationsAddr_U:; [$008e] [008e].byte $00; [$008e] byte
; ; XREFS: ; Game_LoadAreaTable ;
[008f]CurrentArea_DoorDestinationsAddr:; [$008f] [008f].byte $00; [$008f] byte
; ; XREFS: ; Game_LoadAreaTable ;
[0090]CurrentArea_DoorDestinationsAddr_U:; [$0090] [0090].byte $00; [$0090] byte
;============================================================================ ; Upper and lower bytes of a PPU address for player sprite rendering. ; ; This is used during sprite loading and drawing. These form ; the address in the PPU where the player body, armor, ; shield, or weapon tiles will be loaded. ; ; XREFS: ; Player_LoadArmorTilesToPPU ; Player_LoadShieldTilesToPPU ; Player_LoadWeaponTile ; Player_LoadWeaponTilesToPPU ;============================================================================
; ; XREFS: ; Player_LoadArmorTilesToPPU ; Player_LoadShieldTilesToPPU ; Player_LoadWeaponTile ; Player_LoadWeaponTilesToPPU ;
[0091]Player_SpriteSegmentPPUAddr_L:; [$0091] [0091].byte $00; [$0091] byte
; ; XREFS: ; Player_LoadArmorTilesToPPU ; Player_LoadShieldTilesToPPU ; Player_LoadWeaponTile ; Player_LoadWeaponTilesToPPU ;
[0092]Player_SpriteSegmentPPUAddr_U:; [$0092] [0092].byte $00; [$0092] byte
; ; XREFS: ; Area_LoadTiles ;
[0093]Area_TilesReadAddress:; [$0093] [0093].word $0000; [$0093] ushort
; ; XREFS: ; Area_LoadTiles ; Game_EnterAreaHandler ; Game_EnterBuilding ; Game_ExitBuilding ; Game_LoadCurrentArea ; Game_LoadFirstLevel ;
[0095]Area_TilesIndex:; [$0095] [0095].byte $00; [$0095] byte
;============================================================================ ; Image data addresses for the sprite being drawn. ; ; XREFS: ; CurrentSprite_LoadTilesInfo ; Sprites_LoadImageForCurrentSprite ;============================================================================
; ; XREFS: ; CurrentSprite_LoadTilesInfo ; Sprites_LoadImageForCurrentSprite ;
[0096]CurrentSprite_LoadTileAddr:; [$0096] [0096].byte $00; [$0096] byte
; ; XREFS: ; CurrentSprite_LoadTilesInfo ; Sprites_LoadImageForCurrentSprite ;
[0097]CurrentSprite_LoadTileAddr_U:; [$0097] [0097].byte $00; [$0097] byte
;============================================================================ ; PPU target address to draw sprite tiles. ; ; XREFS: ; CurrentSprite_ResetPPUTileOffset ; Sprites_LoadImageForCurrentSprite ;============================================================================
; ; XREFS: ; CurrentSprite_ResetPPUTileOffset ; Sprites_LoadImageForCurrentSprite ;
[0098]CurrentSprite_TargetPPUTileAddr:; [$0098] [0098].byte $00; [$0098] byte
; ; The PPU row of the next tile ; ; ; XREFS: ; CurrentSprite_ResetPPUTileOffset ; Sprites_LoadImageForCurrentSprite ;
[0099]CurrentSprite_TargetPPUTileAddr_U:; [$0099] [0099].byte $00; [$0099] byte
;============================================================================ ; PPU offset of the first tile in the sprite. ; ; This is used when loading a sprite. ; ; XREFS: ; GameLoop_LoadSpriteImages ; Sprites_LoadImageForCurrentSprite ;============================================================================
; ; XREFS: ; GameLoop_LoadSpriteImages ; Sprites_LoadImageForCurrentSprite ;
[009a]CurrentSprite_StartPPUTileOffset:; [$009a] [009a].byte $00; [$009a] byte
;============================================================================ ; Number of PPU tiles remaining to draw for the current sprite. ; ; XREFS: ; CurrentSprite_LoadTilesInfo ; Sprites_LoadImageForCurrentSprite ;============================================================================
; ; XREFS: ; CurrentSprite_LoadTilesInfo ; Sprites_LoadImageForCurrentSprite ;
[009b]CurrentSprite_LoadTileCount:; [$009b] [009b].byte $00; [$009b] byte
;============================================================================ ; MOD NOTES: 1 unused byte of RAM. ;============================================================================
[009c]UNUSED_009C:; [$009c] [009c].byte $00; [$009c] undefined
;============================================================================ ; Player information. ; ; XREFS: ; Player_TryMoveLeft ; Player_TryMoveRight ;============================================================================
; ; X position of the player (fractional points). ; ; ; XREFS: ; Player_TryMoveLeft ; Player_TryMoveRight ;
[009d]Player_PosX_Frac:; [$009d] [009d].byte $00; [$009d] byte
; ; X position of the player (full points). ; ; MAYBE: Outside only? See Game_SpawnInTemple. ; ; ; XREFS: ; BScript_Action_FacePlayerX ; CurrentSprite_CheckHitPlayer ; FUN_PRG14__9aa1 ; Maybe_Player_CalcAnimFrame ; Player_CastMagic ; Player_DrawShield ; Player_DrawWeapon ; SpriteBehavior_EnemyUnused43 ; SpriteBehavior_Ishiisu ; SpriteBehavior_Magman ; SpriteBehavior_Nash ; SpriteBehavior_Zorugeriru__9e13 ; Sprite_CalcDistanceXToPlayer ; Sprite_Maybe_AddFacingPosX ; Area_CanMoveImmediatelyRight ; Area_CanPlayerMoveLeft ; Area_CanPlayerMoveRight ; Area_CanPlayerMoveUp ; Area_CheckCanClimbAdjacent ; Area_LoadScrollDataRight ; Area_SetStateFromDoorDestination ; EndGame_MovePlayerTowardKing ; FUN_PRG15_MIRROR__ec58 ; Game_EnterBuilding ; Game_MovePlayerOnScroll ; Game_MovePlayerOnScrollLeft ; Game_SpawnInTemple ; Player_CheckHandleClimb ; Player_CheckHandleJump ; Player_CheckIfOnLadder ; Player_CheckIfPassable ; Player_CheckOnBreakableBlock ; Player_CheckPushingBlock ; Player_CheckSwitchScreen ; Player_DrawBody ; Player_IsClimbing ; Player_SetPosAtRightEdge ; Player_TryMoveLeft ; Player_TryMoveRight ; Player_UseMattock ; Screen_SetupNew ;
[009e]Player_PosX_Block:; [$009e] [009e].byte $00; [$009e] byte
; ; MAYBE: Some kind of counter used when scrolling a screen. ; ; When scrolling to the right, this increments by 2 (via a ; manual increment and by adding carry from updating the ; player position). ; ; When scrolling to the left, this decrements by 1 (via ; subtracting carry from updating player position). ; ; ; XREFS: ; CurrentSprite_UpdateState ; Player_DrawWeapon ; CastMagic_RunUpdateSpellHandler ; Game_MovePlayerOnScroll ; Game_MovePlayerOnScrollLeft ; Player_DrawBody ; Player_SetInitialState ; Player_TryMoveRight ; Screen_SetupNew ;
[009f]Screen_Maybe_ScrollXCounter:; [$009f] [009f].byte $00; [$009f] byte
; ; XREFS: ; Player_CheckHandleClimbDown ; Player_CheckHandleClimbMaybeSide ; Player_CheckHandleClimbUp ;
[00a0]BYTE_00a0:; [$00a0] [00a0].byte $00; [$00a0] byte
; ; Y position of the player ; ; MAYBE: Outside only? See Game_SpawnInTemple. ; ; ; XREFS: ; TextBox_SetCoordsForNPC ; BScript_Action_FacePlayerY ; CurrentSprite_CheckHitPlayer ; Player_CastMagic ; Player_DrawShield ; Player_DrawWeapon ; SpriteBehavior_EnemyUnused43 ; SpriteBehavior_Magman ; Sprite_CalcDistanceYToPlayer ; Area_CanMoveUp ; Area_CanPlayerMoveAtY ; Area_CanPlayerMoveLeft ; Area_CanPlayerMoveUp ; Area_CheckCanClimbAdjacent ; Area_LoadScrollDataRight ; Area_ScrollScreenDown ; Area_ScrollScreenUp ; Area_SetStateFromDoorDestination ; FUN_PRG15_MIRROR__ec58 ; Game_EnterBuilding ; Game_SpawnInTemple ; LAB_PRG15_MIRROR__e49a [$PRG15_MIRROR::e49a] ; LAB_PRG15_MIRROR__e4a2 [$PRG15_MIRROR::e4a2] ; Maybe_SetPlayerForScrollUp ; Player_CheckHandleClimbDown ; Player_CheckHandleClimbMaybeSide ; Player_CheckHandleClimbUp ; Player_CheckIfOnLadder ; Player_CheckIfPassable ; Player_CheckOnBreakableBlock ; Player_CheckPushingBlock ; Player_CheckSwitchScreen ; Player_ContinueHandleClimbOrJump ; Player_DrawBody ; Player_MoveDownScreen ; Player_SetPosAtBottomEdge ; Player_UseMattock ; Screen_SetupNew ;
[00a1]Player_PosY:; [$00a1] [00a1].byte $00; [$00a1] byte
; ; XREFS: ; CurrentSprite_UpdateState ; Player_DrawWeapon ; Area_ScrollScreenDown ; Area_ScrollScreenUp ; CastMagic_RunUpdateSpellHandler ; Player_CheckHandleClimbUp ; Player_DrawBody ; Player_MoveDownScreen ; Player_SetInitialState ; Screen_SetupNew ;
[00a2]Player_Something_ScrollPosY:; [$00a2] [00a2].byte $00; [$00a2] byte
; ; Tick counter that updates only while moving horizontally. ; ; This will update regardless of whether the player ; is moving horizontally or vertically. ; ; ; XREFS: ; Maybe_Player_CalcAnimFrame ; Area_ScrollTo ; Player_CheckHandleClimbDown ; Player_CheckHandleClimbUp ; Player_CheckHandleJump ; Player_GetBodySpriteFrameOffset ; Player_HandleDeath ;
[00a3]Player_MovementTick:; [$00a3] [00a3].byte $00; [$00a3] byte
; ; Current player flags. ; ; Bit 0: Jumping ; Bit 1: Holding to Climb (from jump/move) ; Bit 2: Falling off ledge/ladder ; Bit 3: Can climb ; Bit 4: Climbing ; Bit 5: Moving (actively walking or climbing) ; Bit 6: Facing right (1) or left (0) ; Bit 7: Attacking ; ; ; XREFS: ; Maybe_Player_CalcAnimFrame ; Player_CalculateVisibility ; Player_CastMagic ; Player_DrawShield ; Player_DrawWeapon ; Player_HitSpriteWithWeapon ; Player_SetDamagedBySprite ; SpriteBehavior_EnemyUnused43 ; SpriteBehavior_Ishiisu ; SpriteBehavior_Magman ; SpriteBehavior_Nash ; SpriteBehavior_SirGawaineWolfman ; EndGame_MoveToKingsRoom ; FUN_PRG15_MIRROR__ec58 ; GameLoop_CheckUseCurrentItem ; Game_BeginExitBuilding ; Game_SpawnInTemple ; LAB_PRG15_MIRROR__e42c [$PRG15_MIRROR::e42c] ; Maybe_SetPlayerForScrollUp ; Player_CheckHandleAttack ; Player_CheckHandleClimb ; Player_CheckHandleClimbDown ; Player_CheckHandleClimbMaybeSide ; Player_CheckHandleClimbUp ; Player_CheckHandleJump ; Player_CheckIfOnLadder ; Player_CheckOnBreakableBlock ; Player_CheckPushingBlock ; Player_ClearJumpingAndHoldingToClimb ; Player_ContinueHandleClimbOrJump ; Player_EnterDoorToInside ; Player_GetBodySpriteFrameOffset ; Player_HandleDeath ; Player_HandleKnockback ; Player_IsClimbing ; Player_KnockbackHoriz ; Player_SetFacingLeft ; Player_SetInitialState ; Player_StayOnLadderAndContinue ; Player_TryMoveLeft ; Player_TryMoveRight ; Player_UpdateAcceleration ; Player_UseMattock ;
[00a4]Player_Flags:; [$00a4] [00a4].byte $00; [$00a4] PlayerFlags
; ; Player status bits. ; ; Bit 0: Is attacking ; Bit 1: In knockback ; Bit 7: Wing boots active ; ; ; XREFS: ; Maybe_Player_CalcAnimFrame ; Player_SetDamagedBySprite ; SpriteBehavior_FlashScreenHitPlayer ; Game_DecWingBootsDuration ; Game_DrawScreenInFrozenState ; Player_CheckHandleAttack ; Player_CheckHandleClimb ; Player_CheckHandleClimbDown ; Player_CheckHandleClimbMaybeSide ; Player_CheckHandleClimbUp ; Player_CheckHandleJump ; Player_GetBodySpriteFrameOffset ; Player_HandleDeath ; Player_HandleIFrames ; Player_SetInitialState ; Player_UpdateAcceleration ;
[00a5]Player_StatusFlag:; [$00a5] [00a5].byte $00; [$00a5] PlayerStatusFlags
; ; XREFS: ; Area_Something_IncDAT00a6 ; [$PRG15_MIRROR::e4b1] ; Player_CheckHandleClimbMaybeSide ; Player_ContinueHandleClimbOrJump ;
[00a6]Something_Player_ClimbLadderCheckPos:; [$00a6] [00a6].byte $00; [$00a6] byte
; ; XREFS: ; Player_DrawWeapon ; Player_LoadArmorTilesToPPU ;
[00a7]Player_ArmorLookupIndex:; [$00a7] [00a7].byte $00; [$00a7] byte
; ; XREFS: ; Player_DrawSprite ; Player_DrawSpriteImmediately ; Player_LoadArmorTilesToPPU ; Player_LoadShieldTilesToPPU ; Player_LoadWeaponTile ; Player_LoadWeaponTilesToPPU ; Player_SetInitialState ;
[00a8]Player_DrawTileReadOffset:; [$00a8] [00a8].byte $00; [$00a8] byte
; ; Player's walk/run aceleration. ; ; Seems to start around 0xC0, end around 0x180. ; ; ; XREFS: ; Player_SetInitialState ; Player_SetStandardAcceleration ; Player_TryMoveLeft ; Player_TryMoveRight ; Player_UpdateAcceleration ; Player_UpdatePosFromKnockback ;
[00a9]Player_MoveAcceleration:; [$00a9] [00a9].byte $00; [$00a9] byte
; ; XREFS: ; Player_SetStandardAcceleration ; Player_TryMoveLeft ; Player_TryMoveRight ; Player_UpdateAcceleration ; Player_UpdatePosFromKnockback ;
[00aa]Player_MoveAcceleration_U:; [$00aa] [00aa].byte $00; [$00aa] byte
; ; XREFS: ; Player_SetInitialState ;
[00ab]Player_Unused_00ab:; [$00ab] [00ab].byte $00; [$00ab] byte
; ; Time spent in the current attack phase. ; ; ; XREFS: ; Player_CheckHandleAttack ;
[00ac]PlayerHitsPhaseTimer:; [$00ac] [00ac].byte $00; [$00ac] byte
; ; Remaining time of invincibility after player was hit by enemy. ; ; ; XREFS: ; Player_HandleTouchEnemy ; Player_HandleTouchEnemyMagic ; Player_SetDamagedBySprite ; SpriteBehavior_FlashScreenHitPlayer ; Player_HandleDeath ; Player_HandleIFrames ; Player_SetInitialState ;
[00ad]Player_InvincibilityPhase:; [$00ad] [00ad].byte $00; [$00ad] byte
; ; Current attack phase of the player. ; ; ; XREFS: ; Maybe_Player_CalcAnimFrame ; Player_HitSpriteWithWeapon ; FUN_PRG15_MIRROR__ec58 ; Player_CheckHandleAttack ; Player_GetBodySpriteFrameOffset ;
[00ae]PlayerHitsPhaseCounter:; [$00ae] [00ae].byte $00; [$00ae] byte
;============================================================================ ; MOD NOTES: 2 unused bytes of RAM. ;============================================================================
[00af].byte $00,$00; [$00af] undefined
; ; XREFS: ; Player_CheckHandleClimbMaybeSide ; Player_StayOnLadderAndContinue ;
[00b1]Maybe_ClimbLadderOffset:; [$00b1] [00b1].byte $00; [$00b1] byte
; ; Player X position managed during screen scroll. ; ; ; XREFS: ; Area_LoadScrollDataRight ; Game_MovePlayerOnScroll ; Game_MovePlayerOnScrollLeft ; Player_DrawBody ;
[00b2]Maybe_PlayerX_ForScroll:; [$00b2] [00b2].byte $00; [$00b2] byte
; ; Player Y position managed during screen scroll. ; ; ; XREFS: ; Area_LoadScrollDataRight ; Game_MovePlayerOnScroll ; Player_DrawBody ;
[00b3]Maybe_PlayerY_ForScroll:; [$00b3] [00b3].byte $00; [$00b3] byte
; ; Counter incrementing while the screen scrolls. ; ; This is used to update the player position at different ; points during a screen scroll. ; ; ; XREFS: ; Area_LoadScrollDataRight ; Game_MovePlayerOnScroll ; Game_MovePlayerOnScrollLeft ; Game_UpdatePlayerOnScroll ; Player_TryMoveLeft ; Player_TryMoveRight ;
[00b4]Screen_ScrollPlayerTransitionCounter:; [$00b4] [00b4].byte $00; [$00b4] byte
;============================================================================ ; Arguments and results for block-related lookups. ; ; XREFS: ; CastMagic_CheckDirection_Left ; CastMagic_CheckDirection_Right ; CurrentSprite_CalculateVisibility ; CurrentSprite_CanMoveInDirection ; FUN_PRG14__854c ; FUN_PRG14__86bd ; Player_CalculateVisibility ; SpriteBehavior_NecronAides ; Sprites_MoveRight ; Area_CanMoveImmediatelyRight ; Area_CanPlayerMoveLeft ; Area_CanPlayerMoveRight ; Area_CheckCanClimbAdjacent ; Area_ConvertPixelsToBlockPos ; Area_SetStateFromDoorDestination ; CastMagic_CalculateVisibility ; Player_CheckIfOnLadder ; Player_CheckOnBreakableBlock ; Player_CheckPushingBlock ; Player_CheckSwitchScreen ; Player_UseMattock ;============================================================================
; ; X coordinates of an object (see ; Area_ConvertPixelsToBlockPos). ; ; ; XREFS: ; CastMagic_CheckDirection_Left ; CastMagic_CheckDirection_Right ; CurrentSprite_CalculateVisibility ; CurrentSprite_CanMoveInDirection ; FUN_PRG14__854c ; FUN_PRG14__86bd ; Player_CalculateVisibility ; SpriteBehavior_NecronAides ; Sprites_MoveRight ; Area_CanMoveImmediatelyRight ; Area_CanPlayerMoveLeft ; Area_CanPlayerMoveRight ; Area_CheckCanClimbAdjacent ; Area_ConvertPixelsToBlockPos ; Area_SetStateFromDoorDestination ; CastMagic_CalculateVisibility ; Player_CheckIfOnLadder ; Player_CheckOnBreakableBlock ; Player_CheckPushingBlock ; Player_CheckSwitchScreen ; Player_UseMattock ;
[00b5]Arg_PixelPosX:; [$00b5] [00b5].byte $00; [$00b5] byte
; ; Y coordinates of an object (see ; Area_ConvertPixelsToBlockPos). ; ; ; XREFS: ; CastMagic_CheckDirection_CheckImpassable ; CurrentSprite_CalculateVisibility ; CurrentSprite_CanMoveInDirection ; FUN_PRG14__854c ; Player_CalculateVisibility ; SpriteBehavior_NecronAides ; Sprites_MoveRight__86c6 ; Area_CanPlayerMoveAtY ; Area_CanPlayerMoveUp ; Area_CheckCanClimbAdjacent ; Area_ConvertPixelsToBlockPos ; Area_SetStateFromDoorDestination ; CastMagic_CalculateVisibility ; Player_CheckIfOnLadder ; Player_CheckIfPassable ; Player_CheckOnBreakableBlock ; Player_CheckPushingBlock ; Player_CheckSwitchScreen ; Player_UseMattock ;
[00b6]Arg_PixelPosY:; [$00b6] [00b6].byte $00; [$00b6] byte
; ; Result from a block-related computation. ; ; This is used for many different types of operations. ; ; ; XREFS: ; CastMagic_CheckDirection ; CastMagic_CheckDirection_CheckImpassable ; CastMagic_SetShouldDisperse ; CastMagic_UpdateDeluge ; CastMagic_UpdateFire ; CurrentSprite_CanMoveInDirection ; CurrentSprite_HandleFall ; MoveSpriteHorizIfPossible ; MoveSpriteVerticalIfPossible ; Sprites_MoveRight__86c6 ; Sprites_SetBlockIsMovingResult ; Sprites_SetCurrentSpriteCanMove ; Area_CanMoveImmediatelyRight ; Area_CanMoveUp ; Area_CanPlayerMoveAtY ; Area_CanPlayerMoveLeft ; Area_CanPlayerMoveUp ; Area_CheckCanClimbAdjacent ; Area_HandleBreakableFloor ; Area_IsBlockClimbable ; Area_SetStateFromDoorDestination ; Area_StoreBlockIsAir ; Player_CheckHandleClimbMaybeSide ; Player_CheckHandleEnterDoor ; Player_CheckIfOnLadder ; Player_CheckIfPassable ; Player_CheckOnBreakableBlock ;
[00b7]Blocks_Result:; [$00b7] [00b7].byte $00; [$00b7] byte
;============================================================================ ; Sprite management. ; ; XREFS: ; CurrentSprite_CalculateVisibility ; Player_CalculateVisibility ; CastMagic_CalculateVisibility ;============================================================================
; ; Visibility status of the currently-moving sprite. ; ; 0 = Fully visible ; 1 = Trailing side of sprite obscured ; 2 = Leading side of sprite obscured ; 3 = Sprite fully obscured ; ; ; XREFS: ; CurrentSprite_CalculateVisibility ; Player_CalculateVisibility ; CastMagic_CalculateVisibility ;
[00b8]Temp_MovingSpriteVisibility:; [$00b8] [00b8].byte $00; [$00b8] MovingSpriteVisibility
; ; XREFS: ; CurrentSprite_CanMoveInDirection ; Sprites_MoveRight__86c6 ;
[00b9]Temp_HitBoxValue:; [$00b9] [00b9].byte $00; [$00b9] byte
; ; X coordinates of the current 8 active sprites. ; ; ; XREFS: ; BScript_Action_CastMagic ; BScript_Action_FacePlayerX ; CastMagic_HitHandler_Deluge ; CurrentSprite_CalculateVisibility ; CurrentSprite_UpdateState ; FUN_PRG14__844b ; FUN_PRG14__854c ; FUN_PRG14__9917 ; FUN_PRG14__9aa1 ; FUN_PRG14__a1cc ; Maybe_SpriteBody__99f3 ; Maybe_Sprite_HandleDeathDrop ; MoveSpriteHorizIfPossible ; SpriteBehavior_BossDeath ; SpriteBehavior_EnemyUnused18__9991 ; SpriteBehavior_EnemyUnused43 ; SpriteBehavior_ExecutionHood__a0ad ; SpriteBehavior_Ishiisu ; SpriteBehavior_KingGrieve_9f65 ; SpriteBehavior_Magman ; SpriteBehavior_Nash ; SpriteBehavior_Pakukame ; SpriteBehavior_Ripasheiku_CastMagicOrUpdatePos ; SpriteBehavior_ShadowEura__a077 ; SpriteBehavior_ShadowEura__a12d ; SpriteBehavior_Something_850d ; SpriteBehavior_Zorugeriru__9e13 ; SpriteUpdateHandler_Effect_LightningBall20 ; Sprite_AddPosX ; Sprite_CalcDistanceXToPlayer ; Sprite_CastMagic ; Sprite_CheckHitByCastMagic ; Sprite_Maybe_AddFacingPosX ; Sprite_Maybe_TurnAroundIfAtScreenEdgeHoriz ; Sprite_SubtractPosX ;
[00ba]CurrentSprites_XPos_Full:; [$00ba] [00ba].byte $00; [0]: [00bb].byte $00; [1]: [00bc].byte $00; [2]: [00bd].byte $00; [3]: [00be].byte $00; [4]: [00bf].byte $00; [5]: [00c0].byte $00; [6]:
; ; XREFS: ; Sprites_PopulateNextAvailableSprite ;
[00c1]CurrentSprites_XPos_Full_7_:; [$00c1] [00c1].byte $00; [7]:
; ; Y coordinates of the current 8 active sprites. ; ; ; XREFS: ; BScript_Action_CastMagic ; BScript_Action_FacePlayerY ; CurrentSprite_CalculateVisibility ; CurrentSprite_HandleFall ; CurrentSprite_UpdateState ; FUN_PRG14__9917 ; FUN_PRG14__9ac6 ; FUN_PRG14__a0a0 ; FUN_PRG14__a1cc ; Maybe_Sprite_HandleDeathDrop ; MoveSpriteVerticalIfPossible ; SpriteBehavior_BossDeath ; SpriteBehavior_EnemyUnused18__9991 ; SpriteBehavior_EnemyUnused43 ; SpriteBehavior_ExecutionHood__a093 ; SpriteBehavior_Garbled3 ; SpriteBehavior_GiantBees ; SpriteBehavior_KingGrieve_9f65 ; SpriteBehavior_KingGrieve_MoveDown ; SpriteBehavior_Magman ; SpriteBehavior_Pakukame ; SpriteBehavior_Ripasheiku ; SpriteBehavior_Ripasheiku_CastMagicOrUpdatePos ; SpriteBehavior_ShadowEura__a077 ; SpriteBehavior_ShadowEura__a12d ; SpriteBehavior_Zorugeriru__9e13 ; SpriteUpdateHandler_Effect_EnemyDeath ; SpriteUpdateHandler_Effect_LightningBall20 ; Sprite_CalcDistanceYToPlayer ; Sprite_CalculateNewVertPos ; Sprite_CanClimb ; Sprite_CapToBlockOppositeFalling ; Sprite_CastMagic ; Sprite_CheckHitByCastMagic ; Sprites_CanSpriteWalk ;
[00c2]CurrentSprites_YPos:; [$00c2] [00c2].byte $00; [0]: [00c3].byte $00; [1]: [00c4].byte $00; [2]: [00c5].byte $00; [3]: [00c6].byte $00; [4]: [00c7].byte $00; [5]: [00c8].byte $00; [6]:
; ; XREFS: ; GameLoop_LoadSpriteImages ; Sprites_PopulateNextAvailableSprite ;
[00c9]CurrentSprites_YPos_7_:; [$00c9] [00c9].byte $00; [7]:
; ; An address used to read sprite-related information. ; ; This is used for two purposes: ; ; 1. To store the address of the per-screen sprite ; information while loading sprites onto the screen. ; ; 2. To store the address of a sprite entity's behavior ; state when processing a sprite. ; ; ; XREFS: ; BScript_Op_AddToSpriteData ; BScript_Op_CheckDistanceToPlayer ; BScript_Op_GoTo ; BScript_Op_RunAction ; BScript_Op_SetPhase ; BScript_Op_SwitchBehavior ; BScripts_LoadNextOp ; SpriteBehavior_Hop ; SpriteBehavior_MoveTowardPlayer ; SpriteBehavior_MoveVertically ; SpriteBehavior_SomethingEyeball_17 ; SpriteBehavior_SomethingZoradohna_18 ; SpriteBehavior_WalkForward ; SpriteBehavior__a8d7 ; SpriteOp_CheckDistanceToPlayer_X ; SpriteOp_CheckDistanceToPlayer_Y ; Sprites_IncrementScriptAddr ; Sprites_MaybeDisableAndGoTo ; Sprites_UpdateBehavior ; Screen_LoadAllScreenInfo ; Screen_LoadSpriteInfo ;
[00ca]Sprites_ReadInfoAddr:; [$00ca] [00ca].byte $00; [$00ca] byte
; ; XREFS: ; BScript_Op_GoTo ; SpriteOp_CheckDistanceToPlayer_X ; SpriteOp_CheckDistanceToPlayer_Y ; Sprites_IncrementScriptAddr ; Sprites_MaybeDisableAndGoTo ; Sprites_UpdateBehavior ; Screen_LoadAllScreenInfo ; Screen_LoadSpriteInfo ;
[00cb]Sprites_ReadInfoAddr_U:; [$00cb] [00cb].byte $00; [$00cb] byte
; ; XREFS: ; Screen_LoadAllScreenInfo ; Screen_LoadSpecialEventID ; Sprites_LoadSpriteValue ;
[00cc]Screen_ExtraInfoAddr:; [$00cc] [00cc].byte $00; [$00cc] byte
; ; XREFS: ; Screen_LoadAllScreenInfo ; Sprites_LoadSpriteValue ;
[00cd]Screen_ExtraInfoAddr_U:; [$00cd] [00cd].byte $00; [$00cd] byte
; ; XREFS: ; Player_DrawWeapon ; Sprites_IsSpriteOutOfWeaponRange ;
[00ce]PlayerPosXPlus10:; [$00ce] [00ce].byte $00; [$00ce] byte
; ; XREFS: ; Player_DrawWeapon ;
[00cf]Maybe_Something_WeaponPosX:; [$00cf] [00cf].byte $00; [$00cf] byte
; ; XREFS: ; Player_DrawWeapon ; Sprites_IsSpriteOutOfWeaponRange ;
[00d0]Maybe_Something_WeaponPosY:; [$00d0] [00d0].byte $00; [$00d0] byte
; ; XREFS: ; Player_DrawWeapon ;
[00d1]DrawWeapon_Unused_00D1:; [$00d1] [00d1].byte $00; [$00d1] byte
;============================================================================ ; Range of the currently-selected weapon ; ; XREFS: ; Player_DrawWeapon ; Sprites_IsSpriteOutOfWeaponRange ;============================================================================
; ; XREFS: ; Player_DrawWeapon ; Sprites_IsSpriteOutOfWeaponRange ;
[00d2]Maybe_WeaponRange_X:; [$00d2] [00d2].byte $00; [$00d2] byte
; ; XREFS: ; Player_DrawWeapon ; Sprites_IsSpriteOutOfWeaponRange ;
[00d3]Maybe_WeaponRange_Y:; [$00d3] [00d3].byte $00; [$00d3] byte
;============================================================================ ; State for the blocked path to Mascon. ; ; This is normally completed by opening all fountains ; and clearing the final block, dropping down a ladder ; to Mascon. ; ; XREFS: ; Game_DropLadderToMascon ; Player_CheckPushingBlock ; ScreenEvents_HandlePathToMasconEvent ;============================================================================
; ; Whether the path to Mascon is currently being opened. ; ; This is set when opening the path. It's never read or ; otherwise used. ; ; ; XREFS: ; Game_DropLadderToMascon ; Player_CheckPushingBlock ; ScreenEvents_HandlePathToMasconEvent ;
[00d4]PathToMascon_Opening:; [$00d4] [00d4].byte $00; [$00d4] bool
; ; The position of the fountain covering block before Mascon. ; ; This is in $YX byte form. ; ; ; XREFS: ; Game_OpenPathToMascon ; Player_CheckPushingBlock ; ScreenEvents_HandlePathToMasconEvent ;
[00d5]PathToMascon_FountainCoverPos:; [$00d5] [00d5].byte $00; [$00d5] byte .byte $00; Unused
;============================================================================ ; Counts for how long the player pushed against the block before Mascon ; ; XREFS: ; Player_CheckPushingBlock ;============================================================================
; ; XREFS: ; Player_CheckPushingBlock ;
[00d7]BlockPushCounter:; [$00d7] [00d7].byte $00; [$00d7] byte
;============================================================================ ; State for animating the ladder on the path to Mascon. ; ; XREFS: ; Game_DropLadderToMascon ; Game_OpenPathToMascon ;============================================================================
; ; The current block position for the ladder on the path to ; Mascon. ; ; ; XREFS: ; Game_DropLadderToMascon ; Game_OpenPathToMascon ;
[00d8]PathToMascon_LadderPos:; [$00d8] [00d8].byte $00; [$00d8] byte
; ; The number of ladder blocks remaining to place when dropping ; down the ladder to Mascon. ; ; ; XREFS: ; Game_DropLadderToMascon ; Game_OpenPathToMascon ;
[00d9]PathToMascon_LadderBlocksRemaining:; [$00d9] [00d9].byte $00; [$00d9] byte
;============================================================================ ; An offset into Bank 14 used to generate a random value. ; ; This is used by GetRandom to help generate ; pseudo-random values based on the first 256 bytes of bank 14 ; XOR'd with the controller 1 bitmask. ; ; XREFS: ; GetRandom ;============================================================================
; ; XREFS: ; GetRandom ;
[00da]Random_Offset:; [$00da] [00da].byte $00; [$00da] byte
;============================================================================ ; IScript and cross-bank call invocation. ; ; XREFS: ; IScripts_Begin ; IScripts_JumpToNextAddr ; IScripts_LoadByte ; SplashAnimation_DrawScenery ; StartScreen_Draw ; PPU_WriteTilesFromCHRRAM ; UI_DrawHUDSprites ;============================================================================
; ; The address of either the IScript being executed or CHR ; data being loaded/drawn. ; ; ; XREFS: ; IScripts_Begin ; IScripts_JumpToNextAddr ; IScripts_LoadByte ; SplashAnimation_DrawScenery ; StartScreen_Draw ; PPU_WriteTilesFromCHRRAM ; UI_DrawHUDSprites ;
[00db]IScriptOrCHRAddr:; [$00db] [00db].byte $00; [$00db] byte
; ; XREFS: ; IScripts_Begin ; IScripts_JumpToNextAddr ; IScripts_LoadByte ; SplashAnimation_DrawScenery ; StartScreen_Draw ; PPU_WriteTilesFromCHRRAM ; UI_DrawHUDSprites ;
[00dc]IScriptOrCHRAddr_U:; [$00dc] [00dc].byte $00; [$00dc] byte
; ; The current offset into the IScript being executed. ; ; ; XREFS: ; IScripts_Begin ; IScripts_JumpToNextAddr ; IScripts_LoadByte ;
[00dd]IScriptOffset:; [$00dd] [00dd].byte $00; [$00dd] byte
; ; Contents of the "A" register saved before performing a ; banked call for an IScript or other operation. ; ; ; XREFS: ; MMC1_LoadBankAndJump ;
[00de]BankedCallSetup_SavedA:; [$00de] [00de].byte $00; [$00de] byte
; ; Contents of the "X" register saved before performing a ; banked call for an IScript or other operation. ; ; ; XREFS: ; MMC1_LoadBankAndJump ;
[00df]BankedCallSetup_SavedX:; [$00df] [00df].byte $00; [$00df] byte
; ; Contents of the "Y" register saved before performing a ; banked call for an IScript or other operation. ; ; ; XREFS: ; MMC1_LoadBankAndJump ;
[00e0]BankedCallSetup_SavedY:; [$00e0] [00e0].byte $00; [$00e0] byte
;============================================================================ ; MOD NOTES: 7 unused bytes of RAM. ;============================================================================
[00e1].byte $00,$00,$00,$00,$00,$00,$00; [$00e1] undefined
;============================================================================ ; PPU drawing-related state. ; ; XREFS: ; PasswordScreen_DrawMessage ; PasswordScreen_WriteCharTile ; SplashAnimation_DrawScenery ; StartScreen_Draw ; TextBox_DrawItemImage ; TextBox_FillBackground ; Area_SetBlocks ; Area_SetBlocks_SetAttributes ; Area_SetPPUAddrForBlockIndex ; DEADCODE_FUN_PRG15_MIRROR__c033 ; IScripts_DrawPortraitTileToPPU ; IScripts_LoadPortraitTiles ; PPUBuffer_QueueCommandOrLength ; PPU_IncrementAddrBy ; PPU_SetAddrForTextBoxPos ; PPU_WriteTilesFromCHRRAM ; Player_LoadWeaponTile ; Player_SetItem ; Sprites_LoadImageForCurrentSprite ; TextBox_ClearTextTiles ; TextBox_ShowMessage_Fill4Lines ; TextBox_WriteChar ; UI_ClearSelectedItemPic ; UI_DrawGoldValue ; UI_DrawHUDSprites ; UI_DrawManaOrHPBar ; UI_DrawPlayerExperience ; UI_DrawTimeValue ;============================================================================
; ; The target address in the PPU being drawn to. ; ; ; XREFS: ; PasswordScreen_DrawMessage ; PasswordScreen_WriteCharTile ; SplashAnimation_DrawScenery ; StartScreen_Draw ; TextBox_DrawItemImage ; TextBox_FillBackground ; Area_SetBlocks ; Area_SetBlocks_SetAttributes ; Area_SetPPUAddrForBlockIndex ; DEADCODE_FUN_PRG15_MIRROR__c033 ; IScripts_DrawPortraitTileToPPU ; IScripts_LoadPortraitTiles ; PPUBuffer_QueueCommandOrLength ; PPU_IncrementAddrBy ; PPU_SetAddrForTextBoxPos ; PPU_WriteTilesFromCHRRAM ; Player_LoadWeaponTile ; Player_SetItem ; Sprites_LoadImageForCurrentSprite ; TextBox_ClearTextTiles ; TextBox_ShowMessage_Fill4Lines ; TextBox_WriteChar ; UI_ClearSelectedItemPic ; UI_DrawGoldValue ; UI_DrawHUDSprites ; UI_DrawManaOrHPBar ; UI_DrawPlayerExperience ; UI_DrawTimeValue ;
[00e8]PPU_TargetAddr:; [$00e8] [00e8].byte $00; [$00e8] byte
; ; XREFS: ; PasswordScreen_DrawMessage ; PasswordScreen_WriteCharTile ; SplashAnimation_DrawScenery ; StartScreen_Draw ; TextBox_DrawItemImage ; TextBox_FillBackground ; Area_SetBlocks ; Area_SetBlocks_SetAttributes ; Area_SetPPUAddrForBlockIndex ; DEADCODE_FUN_PRG15_MIRROR__c033 ; IScripts_DrawPortraitTileToPPU ; IScripts_LoadPortraitTiles ; PPUBuffer_QueueCommandOrLength ; PPU_IncrementAddrBy ; PPU_SetAddrForTextBoxPos ; PPU_WriteTilesFromCHRRAM ; Player_LoadWeaponTile ; Player_SetItem ; Sprites_LoadImageForCurrentSprite ; TextBox_ClearTextTiles ; TextBox_ShowMessage_Fill4Lines ; TextBox_WriteChar ; UI_ClearSelectedItemPic ; UI_DrawGoldValue ; UI_DrawHUDSprites ; UI_DrawManaOrHPBar ; UI_DrawPlayerExperience ; UI_DrawTimeValue ;
[00e9]PPU_TargetAddr_U:; [$00e9] [00e9].byte $00; [$00e9] byte
; ; Tile X position where text or images will be drawn in a ; textbox. ; ; ; XREFS: ; DEADCODE_FUN_PRG12__9041 ; IScriptAction_AddInventoryItem ; IScriptAction_AddInventoryItem_ClearTextBox ; IScripts_PositionAndFillPlaceholderText ; PlayerMenu_DrawInventoryItems ; PlayerMenu_DrawStringLines ; PlayerMenu_ShowStatusMenu ; PlayerMenu_ShowSubmenu ; Shop_Draw ; SplashAnimation_FuncAA94 ; TextBox_Close ; TextBox_FillBackground ; TextBox_GetNextAttributeDataOffset ; TextBox_Open ; TextBox_SetNextAttributeData ; PPU_SetAddrForTextBoxPos ; TextBox_GetBackingAttributeData ; TextBox_ShowMessage_Fill4Lines ; Textbox_Maybe_GetAreaBehindTextbox ;
[00ea]TextBox_ContentsX:; [$00ea] [00ea].byte $00; [$00ea] byte
; ; Tile Y position where text or images will be drawn in a ; textbox. ; ; ; XREFS: ; IScriptAction_AddInventoryItem ; IScriptAction_AddInventoryItem_ClearTextBox ; IScripts_PositionAndFillPlaceholderText ; PlayerMenu_DrawInventoryItems ; PlayerMenu_DrawStringLines ; PlayerMenu_ShowStatusMenu ; PlayerMenu_ShowSubmenu ; Shop_Draw ; SplashAnimation_FuncAA94 ; TextBox_Close ; TextBox_FillBackground ; TextBox_GetNextAttributeDataOffset ; TextBox_Open ; TextBox_SetNextAttributeData ; PPU_SetAddrForTextBoxPos ; TextBox_GetBackingAttributeData ; TextBox_ShowMessage_Fill4Lines ; Textbox_Maybe_GetAreaBehindTextbox ;
[00eb]TextBox_ContentsY:; [$00eb] [00eb].byte $00; [$00eb] byte
;============================================================================ ; Additional temporary variables. ; ; XREFS: ; IScriptAction_OpenShop ; IScriptAction_ShowSellMenu ; IScriptAction_SpendGold ; IScripts_CheckEnoughMoney ; IScripts_ProgressivelyAddGold ; IScripts_ProgressivelySubtractGold ; IScripts_SellMenu_Something8704 ; Menu_UpdateAndDraw ; PasswordScreen_DrawMessage ; PasswordScreen_Show ; Password_DecodeValue ; Password_EncodeValue ; PlayerMenu_Show ; PlayerMenu_ShowInventoryMenu ; PlayerMenu_ShowStatusMenu ; PlayerMenu_ShowSubmenu ; Player_AddToInventory ; Player_LacksItem ; Player_RemoveItem ; Shop_Draw ; Shop_GetPlayerHasSelectedItem ; Shop_Populate ; SpashAnimation_SomethingOutro_aa20 ; SpashAnimation_SomethingOutro_aa46 ; SplashAnimation_A90F ; SplashAnimation_DrawScenery ; SplashAnimation_FuncAA94 ; SplashAnimation_Maybe_NextAnimState1 ; SplashAnimation_Maybe_NextAnimState2 ; StartScreen_Draw ; TextBox_DrawItemImage ; TextBox_DrawItemName ; TextBox_FillBackground ; TextBox_SetNextAttributeData ; UI_DrawString ; UI_DrawText ; Player_AddExperienceFromSprite ; MMC1_LoadBankAndJump ; Messages_Load ; PPUBuffer_WriteFromTemp ; PPU_LoadGlyphsForStrings ; PPU_WriteGlyphTile ; PPU_WriteTilesFromCHRRAM ; Player_Add100XP ; Player_AddGold ; Player_SubtractGold ; Player_UpdateExperience ; TextBox_DisplayMessage ; TextBox_GetBackingAttributeData ; TextBox_ShowMessage_LoadMessage ; TextBox_ShowMessage_Pause ; TextBox_ShowMessage_Space ; TextBox_WriteChar ; Textbox_Maybe_GetAreaBehindTextbox ; UI_DrawDigitsZeroPadded ; UI_DrawGoldValue ; UI_DrawManaOrHPBar ; UI_DrawPlayerExperience ; UI_DrawSelectedItem ; UI_DrawTimeValue ; UI_GetValueForDigit ; UI_Maybe_GetItemSpritePPUTileAddr ;============================================================================
; ; Temporary variable most often used for 24-bit values. ; ; This is not exclusive to 24-bit values. In some places, this ; is used for 16-bit values. In others, 8-bit values. ; ; ; XREFS: ; IScriptAction_OpenShop ; IScriptAction_ShowSellMenu ; IScriptAction_SpendGold ; IScripts_CheckEnoughMoney ; IScripts_ProgressivelyAddGold ; IScripts_ProgressivelySubtractGold ; IScripts_SellMenu_Something8704 ; Menu_UpdateAndDraw ; PasswordScreen_DrawMessage ; PasswordScreen_Show ; Password_DecodeValue ; Password_EncodeValue ; PlayerMenu_Show ; PlayerMenu_ShowInventoryMenu ; PlayerMenu_ShowStatusMenu ; PlayerMenu_ShowSubmenu ; Player_AddToInventory ; Player_LacksItem ; Player_RemoveItem ; Shop_Draw ; Shop_GetPlayerHasSelectedItem ; Shop_Populate ; SpashAnimation_SomethingOutro_aa20 ; SpashAnimation_SomethingOutro_aa46 ; SplashAnimation_A90F ; SplashAnimation_DrawScenery ; SplashAnimation_FuncAA94 ; SplashAnimation_Maybe_NextAnimState1 ; SplashAnimation_Maybe_NextAnimState2 ; StartScreen_Draw ; TextBox_DrawItemImage ; TextBox_DrawItemName ; TextBox_FillBackground ; TextBox_SetNextAttributeData ; UI_DrawString ; UI_DrawText ; Player_AddExperienceFromSprite ; MMC1_LoadBankAndJump ; Messages_Load ; PPUBuffer_WriteFromTemp ; PPU_LoadGlyphsForStrings ; PPU_WriteGlyphTile ; PPU_WriteTilesFromCHRRAM ; Player_Add100XP ; Player_AddGold ; Player_SubtractGold ; Player_UpdateExperience ; TextBox_DisplayMessage ; TextBox_GetBackingAttributeData ; TextBox_ShowMessage_LoadMessage ; TextBox_ShowMessage_Pause ; TextBox_ShowMessage_Space ; TextBox_WriteChar ; Textbox_Maybe_GetAreaBehindTextbox ; UI_DrawDigitsZeroPadded ; UI_DrawGoldValue ; UI_DrawManaOrHPBar ; UI_DrawPlayerExperience ; UI_DrawSelectedItem ; UI_DrawTimeValue ; UI_GetValueForDigit ; UI_Maybe_GetItemSpritePPUTileAddr ;
[00ec]Temp_Int24:; [$00ec] [00ec].byte $00; [$00ec] byte
; ; XREFS: ; IScriptAction_OpenShop ; IScriptAction_ShowSellMenu ; IScriptAction_SpendGold ; IScripts_CheckEnoughMoney ; IScripts_ProgressivelyAddGold ; IScripts_ProgressivelySubtractGold ; PasswordScreen_DrawMessage ; PasswordScreen_Show ; Password_EncodeValue ; PlayerMenu_Show ; PlayerMenu_ShowInventoryMenu ; PlayerMenu_ShowStatusMenu ; PlayerMenu_ShowSubmenu ; Player_AddToInventory ; Player_LacksItem ; Player_RemoveItem ; Shop_Draw ; Shop_GetPlayerHasSelectedItem ; SpashAnimation_SomethingOutro_aa20 ; SpashAnimation_SomethingOutro_aa46 ; SplashAnimation_DrawScenery ; SplashAnimation_FuncAA94 ; SplashAnimation_Maybe_NextAnimState1 ; SplashAnimation_Maybe_NextAnimState2 ; StartScreen_Draw ; TextBox_DrawItemName ; TextBox_GetNextAttributeDataOffset ; TextBox_SetNextAttributeData ; Player_AddExperienceFromSprite ; MMC1_LoadBankAndJump ; Messages_Load ; PPU_LoadGlyphsForStrings ; Player_Add100XP ; Player_AddGold ; Player_SubtractGold ; Player_UpdateExperience ; TextBox_ShowMessage_LoadMessage ; TextBox_ShowMessage_Pause ; TextBox_ShowMessage_Space ; TextBox_WriteChar ; Textbox_Maybe_GetAreaBehindTextbox ; UI_DrawGoldValue ; UI_DrawPlayerExperience ; UI_DrawTimeValue ; UI_GetValueForDigit ; UI_Maybe_GetItemSpritePPUTileAddr ;
[00ed]Temp_Int24_M:; [$00ed] [00ed].byte $00; [$00ed] byte
; ; XREFS: ; IScriptAction_ShowSellMenu ; Password_DecodeValueList ; Password_EncodeGameState ; Password_EncodeValueList ; Password_Load ; PlayerMenu_ShowStatusMenu ; Player_AddToInventory ; Player_RemoveItem ; Shop_Draw ; SplashAnimation_FuncAA94 ; StartScreen_Draw ; UI_DrawString ; MMC1_LoadBankAndJump ; TextBox_LoadItemSourceTiles ; UI_DrawGoldValue ; UI_DrawManaOrHPBar ; UI_DrawPlayerExperience ; UI_DrawTimeValue ; UI_GetValueForDigit ;
[00ee]Temp_Int24_U:; [$00ee] [00ee].byte $00; [$00ee] byte
; ; XREFS: ; IScriptAction_ShowSellMenu ; Password_EncodeGameState ; Password_Load ; Player_RemoveItem ; MMC1_LoadBankAndJump ; TextBox_LoadItemSourceTiles ; UI_DrawManaOrHPBar ;
[00ef]Maybe_Temp4:; [$00ef] [00ef].byte $00; [$00ef] byte
;============================================================================ ; MOD NOTES: 2 unused bytes of RAM. ;============================================================================
[00f0].byte $00,$00; [$00f0] undefined
;============================================================================ ; Current msuic script address for all 4 channels. ; ; XREFS: ; MScript_Op_BeginLoop ; MScript_Op_End ; MScript_Op_EndLoop ; MScript_Op_JumpSubroutine ; MScript_Op_NextLoopIfNCompleted ; MScript_Op_RestartChannel ; MScript_Op_RestoreAddr ; MScript_Op_Return ; MScript_Op_SaveAddr_Store ;============================================================================
; ; XREFS: ; MScript_Op_BeginLoop ; MScript_Op_End ; MScript_Op_EndLoop ; MScript_Op_JumpSubroutine ; MScript_Op_NextLoopIfNCompleted ; MScript_Op_RestartChannel ; MScript_Op_RestoreAddr ; MScript_Op_Return ; MScript_Op_SaveAddr_Store ;
[00f2]Music_CurrentScriptAddrs:; [$00f2] [00f2].word $0000; [0]: [00f4].word $0000; [1]: [00f6].word $0000; [2]:
; ; XREFS: ; Music_Load ;
[00f8]Music_CurrentScriptAddrs_3_:; [$00f8] [00f8].word $0000; [3]:
;============================================================================ ; The ID of the current music. ; ; If bit 7 (MSB) is set, then the music is currently ; playing. ; ; XREFS: ; SplashAnimation_RunIntro ; SplashAnimation_RunOutro ; StartScreen_Draw ; SpriteBehavior_ShadowEura ; Area_ScrollTo ; Game_EnterAreaHandler ; Game_EnterBuilding ; Game_ExitBuilding ; Game_LoadCurrentArea ; Game_LoadFirstLevel ; Game_ShowStartScreen ; Player_CheckHandleEnterDoor ; Player_HandleDeath ; Player_UseHourGlass ; ScreenEvents_HandleBoss ; ScreenEvents_HandleFinalBossKilled ; Audio_InitPlayingState ; Audio_ResetIfNothingSet ; MScript_Op_RestartChannel ; Music_HandleOnInterrupt ; Music_Load ; Music_PlayNext ;============================================================================
; ; XREFS: ; SplashAnimation_RunIntro ; SplashAnimation_RunOutro ; StartScreen_Draw ; SpriteBehavior_ShadowEura ; Area_ScrollTo ; Game_EnterAreaHandler ; Game_EnterBuilding ; Game_ExitBuilding ; Game_LoadCurrentArea ; Game_LoadFirstLevel ; Game_ShowStartScreen ; Player_CheckHandleEnterDoor ; Player_HandleDeath ; Player_UseHourGlass ; ScreenEvents_HandleBoss ; ScreenEvents_HandleFinalBossKilled ; Audio_InitPlayingState ; Audio_ResetIfNothingSet ; MScript_Op_RestartChannel ; Music_HandleOnInterrupt ; Music_Load ; Music_PlayNext ;
[00fa]Music_Current:; [$00fa] [00fa].byte $00; [$00fa] Music
;============================================================================ ; The ID of the current sound effect. ; ; If bit 7 (MSB) is set, then the sound effect is currently ; playing. ; ; XREFS: ; SoundEffect_SetCurrent ; Audio_InitPlayingState ; SoundEffects_HandleOnInterrupt ;============================================================================
; ; XREFS: ; SoundEffect_SetCurrent ; Audio_InitPlayingState ; SoundEffects_HandleOnInterrupt ;
[00fb]SoundEffect_Current:; [$00fb] [00fb].byte $00; [$00fb] byte
;============================================================================ ; MOD NOTES: 4 unused bytes of RAM. ;============================================================================
[00fc].byte $00,$00,$00; [$00fc] undefined [00ff]irq:; [$00ff] [00ff].byte $00; [$00ff] undefined
;============================================================================ ; The currently-loaded ROM bank used for logic. ; ; XREFS: ; Area_LoadBlockProperties ; Area_LoadScrollDataRight ; Area_LoadTiles ; Area_SetBlocks ; Area_SetStateFromDoorDestination ; CurrentSprite_LoadTilesInfo ; Game_DrawScreenInFrozenState ; Game_InitMMCAndBank ; Game_InitScreenAndMusic ; Game_LoadAreaTable ; IScripts_DrawPortraitTileToPPU ; IScripts_LoadPortraitTilesAddress ; MMC1_EnsurePRG ; MMC1_LoadBankAndJump ; MMC1_SaveROMBankAndUpdateTo ; MMC1_UpdateROMBank ; Messages_Load ; OnInterrupt ; PPU_LoadGlyphsForStrings ; PPU_WriteTilesFromCHRRAM ; Player_LoadArmorSpriteTilesAddr ; Player_LoadArmorTile ; Player_LoadShieldSpriteTileAddrs ; Player_LoadShieldTile ; Player_LoadWeaponSpriteTileAddrs ; Player_LoadWeaponTile ; Screen_HandleScrollDown ; Screen_HandleScrollLeft ; Screen_HandleScrollRight ; Screen_HandleScrollUp ; Screen_LoadSpriteInfo ; Screen_LoadUIPalette ; Screen_SetFadeOutPalette ; Screen_SetPaletteData ; Sprite_DrawPortraitPartAppearance ; Sprite_SetAppearanceAddrFromOffset ; Sprite_SetPlayerAppearanceAddr ; Sprites_LoadCommon ; Sprites_LoadImageForCurrentSprite ; Sprites_LoadSpriteValue ; TextBox_GetBackingAttributeData ; TextBox_LoadAndShowMessage ; TextBox_LoadItemSourceTiles ; TextBox_ShowNextChar ; TextBox_WriteChar ; Textbox_Maybe_GetAreaBehindTextbox ; UI_DrawSelectedItem ;============================================================================
; ; XREFS: ; Area_LoadBlockProperties ; Area_LoadScrollDataRight ; Area_LoadTiles ; Area_SetBlocks ; Area_SetStateFromDoorDestination ; CurrentSprite_LoadTilesInfo ; Game_DrawScreenInFrozenState ; Game_InitMMCAndBank ; Game_InitScreenAndMusic ; Game_LoadAreaTable ; IScripts_DrawPortraitTileToPPU ; IScripts_LoadPortraitTilesAddress ; MMC1_EnsurePRG ; MMC1_LoadBankAndJump ; MMC1_SaveROMBankAndUpdateTo ; MMC1_UpdateROMBank ; Messages_Load ; OnInterrupt ; PPU_LoadGlyphsForStrings ; PPU_WriteTilesFromCHRRAM ; Player_LoadArmorSpriteTilesAddr ; Player_LoadArmorTile ; Player_LoadShieldSpriteTileAddrs ; Player_LoadShieldTile ; Player_LoadWeaponSpriteTileAddrs ; Player_LoadWeaponTile ; Screen_HandleScrollDown ; Screen_HandleScrollLeft ; Screen_HandleScrollRight ; Screen_HandleScrollUp ; Screen_LoadSpriteInfo ; Screen_LoadUIPalette ; Screen_SetFadeOutPalette ; Screen_SetPaletteData ; Sprite_DrawPortraitPartAppearance ; Sprite_SetAppearanceAddrFromOffset ; Sprite_SetPlayerAppearanceAddr ; Sprites_LoadCommon ; Sprites_LoadImageForCurrentSprite ; Sprites_LoadSpriteValue ; TextBox_GetBackingAttributeData ; TextBox_LoadAndShowMessage ; TextBox_LoadItemSourceTiles ; TextBox_ShowNextChar ; TextBox_WriteChar ; Textbox_Maybe_GetAreaBehindTextbox ; UI_DrawSelectedItem ;
[0100]CurrentROMBank:; [$0100] [0100].byte $00; [$0100] ROMBank
;============================================================================ ; MOD NOTES: 31 unused bytes of RAM. ;============================================================================
[0101].byte $00,$00,$00,$00,$00,$00,$00,$00; [$0101] undefined [0109].byte $00,$00,$00,$00,$00,$00,$00,$00; [$0109] undefined [0111].byte $00,$00,$00,$00,$00,$00,$00,$00; [$0111] undefined [0119].byte $00,$00,$00,$00,$00,$00,$00; [$0119] undefined
;============================================================================ ; Whether audio is playing or paused. ; ; If bit 0 is set, the game has been paused. ; If bit 7 is set, then audio has been paused. ; ; Audio will be paused following the game being paused, ; at the next hardware interrupt. ; ; XREFS: ; GameLoop_CheckPauseGame ; Game_InitScreenAndMusic ; Audio_HandlePaused ; Audio_InitPlayingState ; Music_HandleOnInterrupt ;============================================================================
; ; XREFS: ; GameLoop_CheckPauseGame ; Game_InitScreenAndMusic ; Audio_HandlePaused ; Audio_InitPlayingState ; Music_HandleOnInterrupt ;
[0120]Game_PausedState:; [$0120] [0120].byte $00; [$0120] byte
;============================================================================ ; The ID of the highest-priority sound being played. ; ; This is an index into SOUND_PRIORITIES, and ; helps ; manage which sound effect should be playing based on ; its priority level. ; ; XREFS: ; SoundEffect_SetCurrent ; Audio_InitPlayingState ; SoundEffects_Init ; Sound_ResetCurrentSound ;============================================================================
; ; XREFS: ; SoundEffect_SetCurrent ; Audio_InitPlayingState ; SoundEffects_Init ; Sound_ResetCurrentSound ;
[0121]SoundEffect_Unused_PriorityID:; [$0121] [0121].byte $00; [$0121] byte
; ; XREFS: ; Audio_InitPlayingState ; SoundEffects_HandleOnInterrupt ; Sound_ResetCurrentSound ;
[0122]SoundEffect_HandlerIndex:; [$0122] [0122].byte $00; [$0122] byte
;============================================================================ ; Number of ticks remaining for sound effect playback. ; ; Each index corresponds to a channel: ; ; 0: SQ1 ; 1: SQ2 ; 2: Triangle ; 3: Noise ; ; XREFS: ; Music_ApplySQPitchEffectToLO ; Music_PlayForChannel ; Music_PlaySQEnvelopeModeCurveButHeld ; Music_PlaySQEnvelopeModeLinearTrailoff ; Music_PlaySQEnvelopeModePluck ; Music_PlayWave ; SoundEffect_PlayerDied_Setup ; SoundEffects_HandleOnInterrupt ; SoundEffects_Init ;============================================================================
; ; XREFS: ; Music_ApplySQPitchEffectToLO ; Music_PlayForChannel ; Music_PlaySQEnvelopeModeCurveButHeld ; Music_PlaySQEnvelopeModeLinearTrailoff ; Music_PlaySQEnvelopeModePluck ; Music_PlayWave ; SoundEffect_PlayerDied_Setup ; SoundEffects_HandleOnInterrupt ; SoundEffects_Init ;
[0123]SoundEffect_TicksRemaining:; [$0123] [0123].byte $00; [0]:
; ; XREFS: ; SoundEffect_0x48_OnTick ; SoundEffect_0x48_Setup ; SoundEffect_BreadTouched_Setup ; SoundEffect_CharacterInput_Setup ; SoundEffect_CoinDropped_Setup ; SoundEffect_CoinTouchedCommon_Setup ; SoundEffect_CursorMoved_Setup ; SoundEffect_FillHPOrMP_Setup ; SoundEffect_GoldAmountChanged_Setup ; SoundEffect_HitEnemy_Setup ; SoundEffect_HitPlayer_Setup ; SoundEffect_ItemPickedUp_Setup ; SoundEffect_Magic_Setup ; SoundEffect_Maybe_Typing_OnTick ; SoundEffect_Maybe_Typing_Setup ; SoundEffect_Maybe_UseSpecialItem2_Setup ; SoundEffect_OpenDoor_Setup ; SoundEffect_Pakukame_OnTick ; SoundEffect_Pakukame_Setup ; SoundEffect_PasswordCharInput_Setup ; SoundEffect_PlayerDied_Setup ; SoundEffect_ShieldHitByMagic_Setup ; SoundEffect_ShowPlayerMenu_Setup ; SoundEffect_Tilte_Setup ; SoundEffects_HandleOnInterrupt ; SoundEffects_Init ;
[0124]SoundEffect_TicksRemaining_1_:; [$0124] [0124].byte $00; [1]:
; ; XREFS: ; Audio_ResetIfNothingSet ; SoundEffect_PlayerDied_Setup ; SoundEffects_HandleOnInterrupt ; SoundEffects_Init ;
[0125]SoundEffect_TicksRemaining_2_:; [$0125] [0125].byte $00; [2]:
; ; XREFS: ; Audio_ResetIfNothingSet ; Music_PlayNoise ; SoundEffect_0x48_Setup ; SoundEffect_EnemyDied_Setup ; SoundEffect_HitEnemy_Setup ; SoundEffect_LadderDropped_Setup ; SoundEffect_MagicHitObstacle_Setup ; SoundEffect_Maybe_Step_Setup ; SoundEffect_Maybe_UseSpecialItem2_Setup ; SoundEffect_Message_Setup ; SoundEffect_OpenDoor_Setup ; SoundEffect_PlayerDied_Setup ; SoundEffect_PushBlock_Setup ; SoundEffect_Tilte_Setup ; SoundEffects_HandleOnInterrupt ; SoundEffects_Init ;
[0126]SoundEffect_TicksRemaining_3_:; [$0126] [0126].byte $00; [3]:
; ; XREFS: ; SoundEffect_0x48_OnTick ; SoundEffect_0x48_Setup ; SoundEffect_BreadTouched_OnTick ; SoundEffect_BreadTouched_Setup ; SoundEffect_CharacterInput_OnTick ; SoundEffect_CharacterInput_Setup ; SoundEffect_CoinDropped_OnTick ; SoundEffect_CoinDropped_Setup ; SoundEffect_CoinTouchedCommon_OnTick ; SoundEffect_CoinTouchedCommon_Setup ; SoundEffect_CursorMoved_OnTick ; SoundEffect_CursorMoved_Setup ; SoundEffect_EnemyDied_OnTick ; SoundEffect_EnemyDied_Setup ; SoundEffect_FillHPOrMP_OnTick ; SoundEffect_FillHPOrMP_Setup ; SoundEffect_GoldAmountChanged_Setup ; SoundEffect_HitEnemy_OnTick ; SoundEffect_HitEnemy_Setup ; SoundEffect_HitPlayer_OnTick ; SoundEffect_HitPlayer_Setup ; SoundEffect_ItemPickedUp_OnTick ; SoundEffect_ItemPickedUp_Setup ; SoundEffect_LadderDropped_OnTick ; SoundEffect_LadderDropped_Setup ; SoundEffect_MagicHitObstacle_OnTick ; SoundEffect_MagicHitObstacle_Setup ; SoundEffect_Magic_OnTick ; SoundEffect_Magic_Setup ; SoundEffect_Maybe_Step_OnTick ; SoundEffect_Maybe_Step_Setup ; SoundEffect_Maybe_Typing_OnTick ; SoundEffect_Maybe_Typing_Setup ; SoundEffect_Maybe_UseSpecialItem2_OnTick ; SoundEffect_Maybe_UseSpecialItem2_Setup ; SoundEffect_Message_OnTick ; SoundEffect_Message_Setup ; SoundEffect_OpenDoor_OnTick ; SoundEffect_OpenDoor_Setup ; SoundEffect_Pakukame_OnTick ; SoundEffect_Pakukame_Setup ; SoundEffect_PasswordCharInput_Setup ; SoundEffect_PlayerDied_OnTick ; SoundEffect_PlayerDied_Setup ; SoundEffect_PushBlock_OnTick ; SoundEffect_PushBlock_Setup ; SoundEffect_ShieldHitByMagic_OnTick ; SoundEffect_ShieldHitByMagic_Setup ; SoundEffect_ShowPlayerMenu_OnTick ; SoundEffect_ShowPlayerMenu_Setup ; SoundEffect_Tilte_OnTick ; SoundEffect_Tilte_Setup ; SoundEffects_DecrementCounter ;
[0127]SoundEffect_State_Counter:; [$0127] [0127].byte $00; [$0127] byte
; ; XREFS: ; SoundEffect_0x48_OnTick ; SoundEffect_0x48_Setup ; SoundEffect_BreadTouched_OnTick ; SoundEffect_BreadTouched_Setup ; SoundEffect_CoinTouchedCommon_OnTick ; SoundEffect_CoinTouchedCommon_Setup ; SoundEffect_CursorMoved_OnTick ; SoundEffect_EnemyDied_OnTick ; SoundEffect_EnemyDied_Setup ; SoundEffect_FillHPOrMP_OnTick ; SoundEffect_FillHPOrMP_Setup ; SoundEffect_ItemPickedUp_OnTick ; SoundEffect_ItemPickedUp_Setup ; SoundEffect_MagicHitObstacle_Setup ; SoundEffect_Magic_OnTick ; SoundEffect_Magic_Setup ; SoundEffect_Maybe_UseSpecialItem2_OnTick ; SoundEffect_Maybe_UseSpecialItem2_Setup ; SoundEffect_OpenDoor_Setup ; SoundEffect_PlayerDied_OnTick ; SoundEffect_PlayerDied_Setup ; SoundEffect_ShowPlayerMenu_OnTick ; SoundEffect_ShowPlayerMenu_Setup ; SoundEffect_Tilte_OnTick ; SoundEffect_Tilte_Setup ;
[0128]SoundEffect_State_0128:; [$0128] [0128].byte $00; [$0128] byte
; ; XREFS: ; SoundEffect_0x48_OnTick ; SoundEffect_0x48_Setup ; SoundEffect_BreadTouched_OnTick ; SoundEffect_BreadTouched_Setup ; SoundEffect_FillHPOrMP_OnTick ; SoundEffect_FillHPOrMP_Setup ; SoundEffect_Maybe_UseSpecialItem2_OnTick ; SoundEffect_Maybe_UseSpecialItem2_Setup ; SoundEffect_OpenDoor_OnTick ; SoundEffect_OpenDoor_Setup ; SoundEffect_ShowPlayerMenu_OnTick ; SoundEffect_ShowPlayerMenu_Setup ; SoundEffect_Tilte_OnTick ; SoundEffect_Tilte_Setup ;
[0129]SoundEffect_State_0129:; [$0129] [0129].byte $00; [$0129] byte
; ; XREFS: ; SoundEffect_CharacterInput_OnTick ; SoundEffect_HitEnemy_OnTick ; SoundEffect_HitPlayer_OnTick ; SoundEffect_ItemPickedUp_OnTick ; SoundEffect_Maybe_Typing_OnTick ; SoundEffect_Maybe_UseSpecialItem2_OnTick ; SoundEffect_PlayerDied_OnTick ; SoundEffect_SetNote ; SoundEffect_ShowPlayerMenu_OnTick ;
[012a]SoundEffect_Note_Low:; [$012a] [012a].byte $00; [$012a] byte
; ; XREFS: ; SoundEffect_CharacterInput_OnTick ; SoundEffect_HitEnemy_OnTick ; SoundEffect_HitPlayer_OnTick ; SoundEffect_ItemPickedUp_OnTick ; SoundEffect_Maybe_Typing_OnTick ; SoundEffect_Maybe_UseSpecialItem2_OnTick ; SoundEffect_PlayerDied_OnTick ; SoundEffect_SetNote ; SoundEffect_ShowPlayerMenu_OnTick ;
[012b]SoundEffect_Note_High:; [$012b] [012b].byte $00; [$012b] byte
; ; XREFS: ; MScripts_SetNoteLengthFromValue ; Music_Load ; Music_StoreNoteDuration ;
[012c]MScript_NoteDurations:; [$012c] [012c].byte $00; [0]:
; ; XREFS: ; Music_Load ;
[012d]MScript_NoteDurations_1_:; [$012d] [012d].byte $00; [1]:
; ; XREFS: ; Music_Load ;
[012e]MScript_NoteDurations_2_:; [$012e] [012e].byte $00; [2]:
; ; XREFS: ; Music_Load ;
[012f]MScript_NoteDurations_3_:; [$012f] [012f].byte $00; [3]:
; ; XREFS: ; MScript_Op_End ; Music_Load ; Music_PlayNext ; Music_StoreNoteDuration ;
[0130]Music_NoteTicksRemaining:; [$0130] [0130].byte $00; [0]:
; ; XREFS: ; Music_Load ; Music_PlayNext ;
[0131]Music_NoteTicksRemaining_1_:; [$0131] [0131].byte $00; [1]:
; ; XREFS: ; Music_Load ;
[0132]Music_NoteTicksRemaining_2_:; [$0132] [0132].byte $00; [2]:
; ; XREFS: ; Music_Load ;
[0133]Music_NoteTicksRemaining_3_:; [$0133] [0133].byte $00; [3]: [0134].byte $00,$00,$00,$00; [$0134] undefined
; ; XREFS: ; MScript_Op_BeginLoop ; MScript_Op_EndLoop ;
[0138]MScript_LoopStartAddrs:; [$0138] [0138].word $0000; [0]: [013a].word $0000; [1]: [013c].word $0000; [2]: [013e].word $0000; [3]:
; ; XREFS: ; MScript_Op_EndLoop ; MScript_Op_NextLoopIfNCompleted ;
[0140]MScript_LoopEndAddrs:; [$0140] [0140].word $0000; [0]: [0142].word $0000; [1]: [0144].word $0000; [2]: [0146].word $0000; [3]:
; ; XREFS: ; MScript_Op_BeginLoop ; MScript_Op_EndLoop ;
[0148]MScript_LoopLength:; [$0148] [0148].byte $00; [0]: [0149].byte $00; [1]: [014a].byte $00; [2]: [014b].byte $00; [3]:
; ; XREFS: ; MScript_Op_BeginLoop ; MScript_Op_EndLoop ; MScript_Op_NextLoopIfNCompleted ;
[014c]MScript_LoopCounter:; [$014c] [014c].byte $00; [0]: [014d].byte $00; [1]: [014e].byte $00; [2]: [014f].byte $00; [3]:
;============================================================================ ; The saved MScript addresses that can be restored back to. ; ; There is 1 address per channel. ; ; XREFS: ; MScript_Op_RestoreAddr ; MScript_Op_SaveAddr_Store ; Music_Load ;============================================================================
; ; XREFS: ; MScript_Op_RestoreAddr ; MScript_Op_SaveAddr_Store ; Music_Load ;
[0150]MScript_SavedAddr:; [$0150] [0150].word $0000; [0]: [0152].word $0000; [1]: [0154].word $0000; [2]: [0156].word $0000; [3]:
;============================================================================ ; Pushed MScript addresses for jumping to/returning from subroutines. ; ; There's one per channel. ; ; XREFS: ; MScript_Op_JumpSubroutine ; MScript_Op_Return ;============================================================================
; ; XREFS: ; MScript_Op_JumpSubroutine ; MScript_Op_Return ;
[0158]MScript_PushedAddrs:; [$0158] [0158].word $0000,$0000,$0000,$0000; [$0158] ushort
; ; XREFS: ; MScript_Op_SetGlobalTranspose ; Music_Load ; Music_SetNote ;
[0160]Music_Global_Transpose:; [$0160] [0160].byte $00; [$0160] byte
; ; XREFS: ; MScript_Op_SetChannelTranspose ; Music_Load ; Music_SetNote ;
[0161]Music_Channel_Transpose:; [$0161] [0161].byte $00; [0]:
; ; XREFS: ; Music_Load ;
[0162]Music_Channel_Transpose_1_:; [$0162] [0162].byte $00; [1]:
; ; XREFS: ; Music_Load ;
[0163]Music_Channel_Transpose_2_:; [$0163] [0163].byte $00; [2]:
; ; XREFS: ; MScripts_SetNoteLengthFromValue ; Music_Load ; Music_PlayWave ;
[0164]Music_SQ_Note_Lengths:; [$0164] [0164].byte $00; [0]:
; ; XREFS: ; Music_Load ; Music_PlayWave ;
[0165]Music_Note_Length_High:; [$0165] [0165].byte $00; [1]:
; ; XREFS: ; Music_Load ;
[0166]Music_Unused_0166:; [$0166] [0166].byte $00; [0]:
; ; XREFS: ; Music_Load ;
[0167]Music_Unused_0166_1_:; [$0167] [0167].byte $00; [1]:
; ; XREFS: ; Music_PlayNoise ; Music_PlayWaveOrNoise ;
[0168]Music_Noise_Index:; [$0168] [0168].byte $00; [$0168] byte
; ; XREFS: ; MScripts_InvokeNext ; Music_Load ; Music_PlayNoise ; Music_PlayWaveOrNoise ;
[0169]Music_Noise_Remaining:; [$0169] [0169].byte $00; [$0169] byte
;============================================================================ ; The index into the sound channel data. ; ; Sound channels are in the following order: ; ; 0 = Square wave 1 ; 1 = Square wave 2 ; 2 = Triangle wave ; 3 = Noise ; ; XREFS: ; MScript_Op_BeginLoop ; MScript_Op_End ; MScript_Op_EndLoop ; MScript_Op_JumpSubroutine ; MScript_Op_NextLoopIfNCompleted ; MScript_Op_RestoreAddr ; MScript_Op_Return ; MScript_Op_SaveAddr_Store ; MScript_Op_SetChannelTranspose ; MScript_Op_SetControlBits ; MScript_Op_SetSQEnvelopeMode ; MScript_Op_SetSQPitchEffectDepth ; MScript_Op_SetSQVol ; MScripts_GetNextValue ; MScripts_InvokeNext ; MScripts_SetNoteLengthFromValue ; Music_ApplySQPitchEffectToLO ; Music_PlayForChannel ; Music_PlayNext ; Music_PlaySQEnvelopeModeCurveButHeld ; Music_PlaySQEnvelopeModeLinearTrailoff ; Music_PlaySQEnvelopeModePluck ; Music_PlayWave ; Music_PlayWaveOrNoise ; Music_SetNote ; Music_StoreNoteDuration ; Music_UpdateSQVolRegister ;============================================================================
; ; XREFS: ; MScript_Op_BeginLoop ; MScript_Op_End ; MScript_Op_EndLoop ; MScript_Op_JumpSubroutine ; MScript_Op_NextLoopIfNCompleted ; MScript_Op_RestoreAddr ; MScript_Op_Return ; MScript_Op_SaveAddr_Store ; MScript_Op_SetChannelTranspose ; MScript_Op_SetControlBits ; MScript_Op_SetSQEnvelopeMode ; MScript_Op_SetSQPitchEffectDepth ; MScript_Op_SetSQVol ; MScripts_GetNextValue ; MScripts_InvokeNext ; MScripts_SetNoteLengthFromValue ; Music_ApplySQPitchEffectToLO ; Music_PlayForChannel ; Music_PlayNext ; Music_PlaySQEnvelopeModeCurveButHeld ; Music_PlaySQEnvelopeModeLinearTrailoff ; Music_PlaySQEnvelopeModePluck ; Music_PlayWave ; Music_PlayWaveOrNoise ; Music_SetNote ; Music_StoreNoteDuration ; Music_UpdateSQVolRegister ;
[016a]MScript_CurrentChannel:; [$016a] [016a].byte $00; [$016a] byte
;============================================================================ ; Number of channels completed for the current song. ; ; This starts at 0. Once it hits 4, playback finishes and ; Music_Current is cleared. ; ; XREFS: ; MScript_Op_End ; Music_PlayNext ;============================================================================
; ; XREFS: ; MScript_Op_End ; Music_PlayNext ;
[016b]Music_NumChannelsCompleted:; [$016b] [016b].byte $00; [$016b] byte
; ; XREFS: ; MScripts_InvokeNext ; MScripts_SetNoteLengthFromNext ; MScripts_SetNoteLengthFromValue ; Music_Load ; Music_PlayForChannel ; Music_PlaySQEnvelopeModeCurveButHeld ; Music_PlaySQEnvelopeModeLinearTrailoff ; Music_PlaySQEnvelopeModePluck ; Music_PlayTriangleWave ; Music_PlayWave ; Music_SetNote ; Music_UpdateSQVolRegister ;
[016c]MScript_CurValue:; [$016c] [016c].byte $00; [$016c] byte
; ; XREFS: ; Music_Load ; Music_PlayWave ; Music_SetNote ;
[016d]Music_Note_Period_Low:; [$016d] [016d].byte $00; [$016d] byte
; ; XREFS: ; Music_Load ; Music_PlayWave ; Music_SetNote ;
[016e]Music_Note_Period_High:; [$016e] [016e].byte $00; [$016e] byte
; ; XREFS: ; Music_Load ; Music_SetNote ;
[016f]MScript_Unused_RawValue:; [$016f] [016f].byte $00; [$016f] byte
;============================================================================ ; Value used for Square Wave envelope modes. ; ; This is used differently in the different modes: ; ; Mode 0: Fixed-point, with volume in the upper nibble. ; Mode 1: A volume value between 0-15 (in the lower nibble). ; Mode 2: A volume from the pre-built table (between 0-15). ; ; XREFS: ; Music_PlaySQEnvelopeModeCurveButHeld ; Music_PlaySQEnvelopeModeLinearTrailoff ; Music_PlayWave ;============================================================================
; ; XREFS: ; Music_PlaySQEnvelopeModeCurveButHeld ; Music_PlaySQEnvelopeModeLinearTrailoff ; Music_PlayWave ;
[0170]Music_SQEnvelope_Value:; [$0170] [0170].byte $00; [0]: [0171].byte $00; [1]:
; ; XREFS: ; MScript_Op_SetControlBits ; Music_Load ; Music_UpdateSQVolRegister ;
[0172]Music_SQ_ControlBits:; [$0172] [0172].byte $00; [0]:
; ; XREFS: ; Music_Load ;
[0173]Music_SQ_ControlBits_1_:; [$0173] [0173].byte $00; [1]:
; ; XREFS: ; MScript_Op_SetSQVol ; Music_Load ; Music_UpdateSQVolRegister ;
[0174]Music_SQ_Fades:; [$0174] [0174].byte $00; [0]:
; ; XREFS: ; Music_Load ;
[0175]Music_SQ_Fades_1_:; [$0175] [0175].byte $00; [1]:
;============================================================================ ; The envelope mode for each Square Wave channel. ; ; This supports the following values: ; ; 0: Volume decay ; ; Ramps down the volume smoothly ; ; 1: Curve but held ; ; Clamps the envelope into a range 0..15 and then slows the decay ; ; 2: Pre-built attack/decay curve ; ; Pitches up and then down in a set pattern ; ; XREFS: ; MScript_Op_SetSQEnvelopeMode ; Music_Load ; Music_PlayForChannel ;============================================================================
; ; XREFS: ; MScript_Op_SetSQEnvelopeMode ; Music_Load ; Music_PlayForChannel ;
[0176]Music_SQEnvelope_Mode:; [$0176] [0176].byte $00; [0]:
; ; XREFS: ; Music_Load ;
[0177]Music_SQEnvelope_Mode_1_:; [$0177] [0177].byte $00; [1]:
; ; XREFS: ; Music_ApplySQPitchEffectToLO ; Music_Load ; Music_PlayTriangleWave ;
[0178]Music_SQEffect_Delta:; [$0178] [0178].byte $00; [$0178] undefined1
; ; XREFS: ; Music_ApplySQPitchEffectToLO ; Music_Load ; Music_PlaySQEnvelopeModeCurveButHeld ; Music_PlaySQEnvelopeModePluck ; Music_PlayWave ;
[0179]Music_SQEnvelope_Phase:; [$0179] [0179].byte $00; [0]:
; ; XREFS: ; Music_Load ; Music_PlayWave ;
[017a]Music_SQEnvelope_Phase_1_:; [$017a] [017a].byte $00; [1]: [017b].byte $00; [$017b] undefined
; ; XREFS: ; Music_ApplySQPitchEffectToLO ; Music_Load ; Music_PlayWave ;
[017c]Music_Current_SQ_Low:; [$017c] [017c].byte $00; [0]:
; ; XREFS: ; Music_Load ; Music_PlayWave ;
[017d]Music_Current_SQ_Low_1_:; [$017d] [017d].byte $00; [1]:
; ; XREFS: ; Music_Load ; Music_PlayForChannel ; Music_PlayTriangleWave ;
[017e]Something_Music_Triangle_017e:; [$017e] [017e].byte $00; [$017e] byte
; ; XREFS: ; MScript_Op_SetSQPitchEffectDepth ; Music_ApplySQPitchEffectToLO ; Music_Load ;
[017f]Music_SQPitchDelta_Mask:; [$017f] [017f].byte $00; [0]:
; ; XREFS: ; Music_Load ;
[0180]Music_SQPitchDelta_Mask_1_:; [$0180] [0180].byte $00; [1]:
; ; XREFS: ; MScript_Op_SetSQ2Detune ; Music_Load ; Music_PlayWave ;
[0181]Music_SQ2_TimerLowBias:; [$0181] [0181].byte $00; [$0181] undefined
;============================================================================ ; MOD NOTES: 8 unused bytes of RAM. ;============================================================================
[0182].byte $00,$00,$00,$00,$00,$00,$00,$00; [$0182] undefined
;============================================================================ ; Data zero'd out during horizontal screen scroll. ; ; This is written to but never read or otherwise used. ; ; XREFS: ; Screen_LoadBlocksHoriz ;============================================================================
; ; XREFS: ; Screen_LoadBlocksHoriz ;
[018a]Screen_ScrollHoriz_ZeroData:; [$018a] [018a].byte $00; [0]: [018b].byte $00; [1]: [018c].byte $00; [2]: [018d].byte $00; [3]: [018e].byte $00; [4]: [018f].byte $00; [5]: [0190].byte $00; [6]: [0191].byte $00; [7]: [0192].byte $00,$00,$00,$00,$00,$00,$00,$00; [$0192] undefined [019a].byte $00,$00,$00,$00,$00,$00,$00,$00; [$019a] undefined [01a2].byte $00,$00,$00,$00,$00,$00,$00,$00; [$01a2] undefined [01aa].byte $00,$00,$00,$00,$00,$00,$00,$00; [$01aa] undefined [01b2].byte $00,$00,$00,$00,$00,$00,$00,$00; [$01b2] undefined [01ba].byte $00,$00,$00,$00,$00,$00,$00,$00; [$01ba] undefined [01c2].byte $00,$00,$00,$00,$00,$00,$00,$00; [$01c2] undefined [01ca].byte $00,$00,$00,$00,$00,$00,$00,$00; [$01ca] undefined [01d2].byte $00,$00,$00,$00,$00,$00,$00,$00; [$01d2] undefined [01da].byte $00,$00,$00,$00,$00,$00,$00,$00; [$01da] undefined [01e2].byte $00,$00,$00,$00,$00,$00,$00,$00; [$01e2] undefined [01ea].byte $00,$00,$00,$00,$00,$00,$00,$00; [$01ea] undefined [01f2].byte $00,$00,$00,$00,$00,$00,$00,$00; [$01f2] undefined [01fa].byte $00,$00,$00,$00,$00,$00; [$01fa] undefined
; ; XREFS: ; IScripts_Begin ; Game_Init ; Screen_LoadBlocksHoriz ; Screen_WriteScrollHorizPPUTileData ;
[0200]Temp_0200:; [$0200] [0200].byte $00; [$0200] byte
; ; XREFS: ; IScriptAction_EndScript ; IScripts_Begin ; IScripts_UpdatePortraitAnimation ; TextBox_SetCoordsForNPC ; Screen_LoadBlocksHoriz ; Screen_WriteScrollHorizPPUTileData ;
[0201]Temp_0201:; [$0201] [0201].byte $00; [$0201] byte
; ; XREFS: ; IScriptAction_AddGold ; IScriptAction_OpenShop ; IScriptAction_ShowSellMenu ; IScriptAction_SpendGold ; IScripts_ProgressivelyAddGold ; IScripts_ProgressivelySubtractGold ; Screen_LoadBlocksHoriz ;
[0202]Temp_0202:; [$0202] [0202].byte $00; [$0202] byte
; ; XREFS: ; IScriptAction_AddGold ; IScriptAction_OpenShop ; IScriptAction_ShowSellMenu ; IScriptAction_SpendGold ; IScripts_ProgressivelyAddGold ; IScripts_ProgressivelySubtractGold ; Screen_LoadBlocksHoriz ;
[0203]Temp_0203:; [$0203] [0203].byte $00; [$0203] byte .byte $00
; ; XREFS: ; IScriptAction_ShowSellMenu ;
[0205]Maybe_Shop_InventoryBitmask:; [$0205] [0205].byte $00; [$0205] byte
; ; XREFS: ; IScriptAction_AddHP ; IScriptAction_AddMP ;
[0206]IScript_HPOrMPValueToAdd:; [$0206] [0206].byte $00; [$0206] byte
; ; XREFS: ; IScriptAction_ShowPassword ;
[0207]IScripts_Unused_207:; [$0207] [0207].byte $00; [$0207] byte
;============================================================================ ; X tile position of a displayed textbox. ; ; XREFS: ; IScriptAction_AddInventoryItem ; IScriptAction_AddInventoryItem_ClearTextBox ; IScripts_PositionAndFillPlaceholderText ; PlayerMenu_Close ; PlayerMenu_DrawInventoryItems ; PlayerMenu_DrawStringLines ; PlayerMenu_Show ; PlayerMenu_ShowStatusMenu ; PlayerMenu_ShowSubmenu ; Shop_Draw ; TextBox_ClearForPortraitAndText ; TextBox_Close ; TextBox_DrawDownArrowTerminatorSymbol ; TextBox_DrawQuestionMarkTerminatorSymbol ; TextBox_DrawUpArrowTerminatorSymbol ; TextBox_FillBackground ; TextBox_GetXPixelCoord ; TextBox_Open ; TextBox_SetCoordsForNPC ; TextBox_SetCoordsForPortrait ; TextBox_ShowMessage_Fill4Lines ;============================================================================
; ; XREFS: ; IScriptAction_AddInventoryItem ; IScriptAction_AddInventoryItem_ClearTextBox ; IScripts_PositionAndFillPlaceholderText ; PlayerMenu_Close ; PlayerMenu_DrawInventoryItems ; PlayerMenu_DrawStringLines ; PlayerMenu_Show ; PlayerMenu_ShowStatusMenu ; PlayerMenu_ShowSubmenu ; Shop_Draw ; TextBox_ClearForPortraitAndText ; TextBox_Close ; TextBox_DrawDownArrowTerminatorSymbol ; TextBox_DrawQuestionMarkTerminatorSymbol ; TextBox_DrawUpArrowTerminatorSymbol ; TextBox_FillBackground ; TextBox_GetXPixelCoord ; TextBox_Open ; TextBox_SetCoordsForNPC ; TextBox_SetCoordsForPortrait ; TextBox_ShowMessage_Fill4Lines ;
[0208]TextBox_X:; [$0208] [0208].byte $00; [$0208] byte
;============================================================================ ; Y tile position of a displayed textbox. ; ; XREFS: ; IScriptAction_AddInventoryItem ; IScriptAction_AddInventoryItem_ClearTextBox ; IScripts_PositionAndFillPlaceholderText ; PlayerMenu_Close ; PlayerMenu_DrawInventoryItems ; PlayerMenu_DrawStringLines ; PlayerMenu_Show ; PlayerMenu_ShowStatusMenu ; PlayerMenu_ShowSubmenu ; Shop_Draw ; TextBox_ClearForPortraitAndText ; TextBox_Close ; TextBox_DrawDownArrowTerminatorSymbol ; TextBox_DrawQuestionMarkTerminatorSymbol ; TextBox_DrawUpArrowTerminatorSymbol ; TextBox_FillBackground ; TextBox_GetYPixelCoord ; TextBox_Open ; TextBox_SetCoordsForNPC ; TextBox_SetCoordsForPortrait ; TextBox_ShowMessage_Fill4Lines ;============================================================================
; ; XREFS: ; IScriptAction_AddInventoryItem ; IScriptAction_AddInventoryItem_ClearTextBox ; IScripts_PositionAndFillPlaceholderText ; PlayerMenu_Close ; PlayerMenu_DrawInventoryItems ; PlayerMenu_DrawStringLines ; PlayerMenu_Show ; PlayerMenu_ShowStatusMenu ; PlayerMenu_ShowSubmenu ; Shop_Draw ; TextBox_ClearForPortraitAndText ; TextBox_Close ; TextBox_DrawDownArrowTerminatorSymbol ; TextBox_DrawQuestionMarkTerminatorSymbol ; TextBox_DrawUpArrowTerminatorSymbol ; TextBox_FillBackground ; TextBox_GetYPixelCoord ; TextBox_Open ; TextBox_SetCoordsForNPC ; TextBox_SetCoordsForPortrait ; TextBox_ShowMessage_Fill4Lines ;
[0209]TextBox_Y:; [$0209] [0209].byte $00; [$0209] byte
;============================================================================ ; Width of a displayed textbox. ; ; XREFS: ; IScriptAction_AddInventoryItem_ClearTextBox ; PlayerMenu_Close ; PlayerMenu_Show ; PlayerMenu_ShowStatusMenu ; PlayerMenu_ShowSubmenu ; Shop_Draw ; TextBox_ClearForPortraitAndText ; TextBox_Close ; TextBox_FillBackground ; TextBox_SetCoordsForNPC ; TextBox_SetCoordsForPortrait ; TextBox_QueuePPUBufferTextBoxLength ;============================================================================
; ; XREFS: ; IScriptAction_AddInventoryItem_ClearTextBox ; PlayerMenu_Close ; PlayerMenu_Show ; PlayerMenu_ShowStatusMenu ; PlayerMenu_ShowSubmenu ; Shop_Draw ; TextBox_ClearForPortraitAndText ; TextBox_Close ; TextBox_FillBackground ; TextBox_SetCoordsForNPC ; TextBox_SetCoordsForPortrait ; TextBox_QueuePPUBufferTextBoxLength ;
[020a]TextBox_Width:; [$020a] [020a].byte $00; [$020a] byte
;============================================================================ ; Height of a displayed textbox. ; ; XREFS: ; IScriptAction_AddInventoryItem_ClearTextBox ; PlayerMenu_Close ; PlayerMenu_Show ; PlayerMenu_ShowStatusMenu ; PlayerMenu_ShowSubmenu ; Shop_Draw ; TextBox_ClearForPortraitAndText ; TextBox_Close ; TextBox_FillBackground ; TextBox_Open ; TextBox_SetCoordsForNPC ; TextBox_SetCoordsForPortrait ;============================================================================
; ; XREFS: ; IScriptAction_AddInventoryItem_ClearTextBox ; PlayerMenu_Close ; PlayerMenu_Show ; PlayerMenu_ShowStatusMenu ; PlayerMenu_ShowSubmenu ; Shop_Draw ; TextBox_ClearForPortraitAndText ; TextBox_Close ; TextBox_FillBackground ; TextBox_Open ; TextBox_SetCoordsForNPC ; TextBox_SetCoordsForPortrait ;
[020b]TextBox_Height:; [$020b] [020b].byte $00; [$020b] byte
;============================================================================ ; Whether the textbox is closed. ; ; 0 = Open ; 1 = Closed ; ; Note that at game startup, this may be a garbage value. ; ; XREFS: ; TextBox_Close ; TextBox_GetBackgroundAttributeData ; TextBox_Open ;============================================================================
; ; XREFS: ; TextBox_Close ; TextBox_GetBackgroundAttributeData ; TextBox_Open ;
[020c]TextBox_Closed:; [$020c] [020c].byte $00; [$020c] bool .byte $00; Unused
;============================================================================ ; Inventory corresponding to the Player Menu selection. ; ; XREFS: ; PlayerMenu_DrawInventoryItems ; PlayerMenu_EquipItem ; PlayerMenu_HandleInventoryMenuInput ; PlayerMenu_ShowSubmenu ;============================================================================
; ; XREFS: ; PlayerMenu_DrawInventoryItems ; PlayerMenu_EquipItem ; PlayerMenu_HandleInventoryMenuInput ; PlayerMenu_ShowSubmenu ;
[020e]PlayerMenu_SelectedInventory:; [$020e] [020e].byte $00; [$020e] byte .byte $00; Unused
;============================================================================ ; Temporary state for the new inventory item. ; ; This is used when equipping an item in Player_Equip ; to store the new item for the purpose of equipping it. ; ; XREFS: ; Player_Equip ;============================================================================
; ; XREFS: ; Player_Equip ;
[0210]Temp_EquipingItem:; [$0210] [0210].byte $00; [$0210] byte
;============================================================================ ; Temporary state for the previous inventory item. ; ; This is used when equipping an item in Player_Equip ; to store the previous item for the purpose of unequipping it. ; ; XREFS: ; Player_Equip ;============================================================================
; ; XREFS: ; Player_Equip ;
[0211]Temp_PrevInventoryItem:; [$0211] [0211].byte $00; [$0211] byte
; ; XREFS: ; TextBox_LoadAndShowMessage ; TextBox_ShowMessageWithSound ; TextBox_ShowNextChar ;
[0212]TextBox_PlayTextSound:; [$0212] [0212].byte $00; [$0212] bool
;============================================================================ ; ID of the message to show in a textbox. ; ; This would be a 1-based index into MESSAGE_STRINGS. ; ; XREFS: ; IScripts_UpdatePortraitAnimation ; TextBox_CheckShouldContinue ; TextBox_CheckShouldContinueOrDismissMessage ; TextBox_CheckShouldContinueOrDismissQuestion ; IScripts_LoadAndShowMessage ; Maybe_TextBox_ShowCurrentMessageID ; Messages_Load ; TextBox_ShowMessage_Pause ;============================================================================
; ; XREFS: ; IScripts_UpdatePortraitAnimation ; TextBox_CheckShouldContinue ; TextBox_CheckShouldContinueOrDismissMessage ; TextBox_CheckShouldContinueOrDismissQuestion ; IScripts_LoadAndShowMessage ; Maybe_TextBox_ShowCurrentMessageID ; Messages_Load ; TextBox_ShowMessage_Pause ;
[0213]MessageID:; [$0213] [0213].byte $00; [$0213] Message
;============================================================================ ; The number of bytes processed in a message string. ; ; XREFS: ; Messages_Load ; TextBox_ShowMessage_LoadMessage ; TextBox_ShowMessage_Pause ; TextBox_ShowMessage_Space ;============================================================================
; ; XREFS: ; Messages_Load ; TextBox_ShowMessage_LoadMessage ; TextBox_ShowMessage_Pause ; TextBox_ShowMessage_Space ;
[0214]Message_ProcessedLength:; [$0214] [0214].byte $00; [$0214] byte
; ; Flag indicating if a message display is paused. ; ; 0x00 = Message is not paused. ; 0xFF = Message is paused. ; ; ; XREFS: ; IScripts_UpdatePortraitAnimation ; TextBox_CheckForDismiss ; TextBox_CheckShouldContinue ; TextBox_CheckShouldContinueOrDismissQuestion ; TextBox_PrepareContinueMessage ; Maybe_TextBox_ShowCurrentMessageID ; TextBox_ClearPasswordSize ; TextBox_ShowMessage_Pause ;
[0215]TextBox_MessagePaused:; [$0215] [0215].byte $00; [$0215] byte
; ; XREFS: ; TextBox_ClearPasswordSize ; TextBox_ShowMessage_IncLineAndReset ; TextBox_ShowMessage_Newline ; TextBox_ShowMessage_Prepare4Lines ; TextBox_ShowMessage_Space ; TextBox_WriteChar ;
[0216]TextBox_CharPosForLine:; [$0216] [0216].byte $00; [$0216] byte
;============================================================================ ; Last drawn line number (0-based). ; ; XREFS: ; TextBox_ClearPasswordSize ; TextBox_ShowMessage_IncLineAndReset ; TextBox_WriteChar ;============================================================================
; ; XREFS: ; TextBox_ClearPasswordSize ; TextBox_ShowMessage_IncLineAndReset ; TextBox_WriteChar ;
[0217]TextBox_DrawnLineNum:; [$0217] [0217].byte $00; [$0217] byte
; ; XREFS: ; Messages_Load ; TextBox_ShowMessage_LoadMessage ; TextBox_ShowMessage_Pause ; TextBox_ShowMessage_Space ;
[0218]Message_StartAddr:; [$0218] [0218].byte $00; [$0218] byte
; ; XREFS: ; Messages_Load ; TextBox_ShowMessage_LoadMessage ; TextBox_ShowMessage_Pause ; TextBox_ShowMessage_Space ;
[0219]Message_StartAddr_U:; [$0219] [0219].byte $00; [$0219] byte
; ; XREFS: ; TextBox_ClearPasswordSize ; TextBox_ShowMessage_Fill4Lines ; TextBox_WriteChar ;
[021a]TextBox_LineScrollOffset:; [$021a] [021a].byte $00; [$021a] byte
; ; XREFS: ; TextBox_PrepareContinueMessage ; TextBox_ClearPasswordSize ;
[021b]Unused_Arg_Text_NumLines:; [$021b] [021b].byte $00; [$021b] byte
; ; Offset into the process of writing a player title in a ; textbox. ; ; This is a value from 0x81 to 0x90 that is incremented with ; every character of the player title written in a textbox. It's ; used for IScripts that list the player title using code 0xFB ; (namely, Guru title rank scripts). ; ; The values are indexes 1 through 16 (length of the player ; title strings), with the MSB set. ; ; ; XREFS: ; TextBox_ClearPasswordSize ; TextBox_DisplayMessage ; TextBox_ShowMessage_ShowPlayerTitle ;
[021c]Textbox_TitleCharOffset:; [$021c] [021c].byte $00; [$021c] byte
;============================================================================ ; Count-up timer used to control the rate at which ; characters are shown in textboxes. ; ; This will increment up by 1 every tick of the message box. ; Maybe_TextBox_ShowCurrentMessageID will AND this ; with ; 3 and only process/display the next character if the ; result is 0. ; ; XREFS: ; Maybe_TextBox_ShowCurrentMessageID ; Messages_Load ; TextBox_ShowNextChar ;============================================================================
; ; XREFS: ; Maybe_TextBox_ShowCurrentMessageID ; Messages_Load ; TextBox_ShowNextChar ;
[021d]TextBox_Timer:; [$021d] [021d].byte $00; [$021d] byte
; ; XREFS: ; IScriptAction_OpenShop ; IScriptAction_ShowBuySellMenu ; IScriptAction_ShowSellMenu ; Menu_UpdateAndDraw ; PlayerMenu_EquipItem ; PlayerMenu_HandleInventoryMenuInput ; PlayerMenu_Show ; PlayerMenu_ShowInventoryMenu ; PlayerMenu_ShowSubmenu ; Shop_Draw ; Shop_GetPlayerHasSelectedItem ; Shop_Populate ;
[021e]Menu_CursorPos:; [$021e] [021e].byte $00; [$021e] byte
; ; XREFS: ; IScriptAction_ShowBuySellMenu ; IScriptAction_ShowSellMenu ; Menu_UpdateAndDraw ; PlayerMenu_DrawInventoryItems ; PlayerMenu_DrawStringLines ; PlayerMenu_Show ; PlayerMenu_ShowInventoryMenu ; PlayerMenu_ShowStatusMenu ; Shop_Draw ; Shop_Populate ;
[021f]Arg_StringsCount:; [$021f] [021f].byte $00; [$021f] byte
;============================================================================ ; Temporary data used for multiple purposes: ; ; 1. Shop items ; 2. Player menu items ; 3. Vertical screen scroll PPU tile data ; ; For #3, the data will overflow through $0240. ; ; XREFS: ; IScriptAction_OpenShop ; IScriptAction_ShowSellMenu ; PlayerMenu_DrawInventoryItems ; PlayerMenu_DrawStringLines ; PlayerMenu_EquipItem ; PlayerMenu_HandleInventoryMenuInput ; PlayerMenu_Show ; PlayerMenu_ShowInventoryMenu ; PlayerMenu_ShowStatusMenu ; Shop_Draw ; Shop_GetPlayerHasSelectedItem ; Shop_Populate ; Screen_LoadBlockDataVert ; Screen_WriteScrollVertPPUTileData ;============================================================================
; ; XREFS: ; IScriptAction_OpenShop ; IScriptAction_ShowSellMenu ; PlayerMenu_DrawInventoryItems ; PlayerMenu_DrawStringLines ; PlayerMenu_EquipItem ; PlayerMenu_HandleInventoryMenuInput ; PlayerMenu_Show ; PlayerMenu_ShowInventoryMenu ; PlayerMenu_ShowStatusMenu ; Shop_Draw ; Shop_GetPlayerHasSelectedItem ; Shop_Populate ; Screen_LoadBlockDataVert ; Screen_WriteScrollVertPPUTileData ;
[0220]DataArray:; [$0220] [0220].byte $00; [0]:
; ; XREFS: ; PlayerMenu_Show ; PlayerMenu_ShowInventoryMenu ; PlayerMenu_ShowStatusMenu ; Screen_LoadBlockDataVert ; Screen_WriteScrollVertPPUTileData ;
[0221]DataArray_1_:; [$0221] [0221].byte $00; [1]:
; ; XREFS: ; PlayerMenu_Show ; PlayerMenu_ShowStatusMenu ; Screen_LoadBlockDataVert ;
[0222]DataArray_2_:; [$0222] [0222].byte $00; [2]:
; ; XREFS: ; PlayerMenu_Show ; PlayerMenu_ShowStatusMenu ; Screen_LoadBlockDataVert ;
[0223]DataArray_3_:; [$0223] [0223].byte $00; [3]:
; ; XREFS: ; PlayerMenu_Show ; PlayerMenu_ShowStatusMenu ;
[0224]DataArray_4_:; [$0224] [0224].byte $00; [4]:
; ; XREFS: ; PlayerMenu_Show ; PlayerMenu_ShowStatusMenu ;
[0225]DataArray_5_:; [$0225] [0225].byte $00; [5]:
; ; XREFS: ; PlayerMenu_ShowStatusMenu ;
[0226]DataArray_6_:; [$0226] [0226].byte $00; [6]: [0227].byte $00; [7]:
;============================================================================ ; Lower byte of costs of items currently shown in the shop. ; ; XREFS: ; IScriptAction_OpenShop ; IScriptAction_ShowSellMenu ; Shop_Draw ; Shop_Populate ;============================================================================
; ; XREFS: ; IScriptAction_OpenShop ; IScriptAction_ShowSellMenu ; Shop_Draw ; Shop_Populate ;
[0228]ShopItemCostsL:; [$0228] [0228].byte $00; [0]: [0229].byte $00; [1]: [022a].byte $00; [2]: [022b].byte $00; [3]: [022c].byte $00; [4]: [022d].byte $00; [5]: [022e].byte $00; [6]: [022f].byte $00; [7]:
;============================================================================ ; Upper byte of costs of items currently shown in the shop. ; ; XREFS: ; IScriptAction_OpenShop ; IScriptAction_ShowSellMenu ; Shop_Draw ; Shop_Populate ;============================================================================
; ; XREFS: ; IScriptAction_OpenShop ; IScriptAction_ShowSellMenu ; Shop_Draw ; Shop_Populate ;
[0230]ShopItemCostsU:; [$0230] [0230].byte $00; [0]: [0231].byte $00; [1]: [0232].byte $00; [2]: [0233].byte $00; [3]: [0234].byte $00; [4]: [0235].byte $00; [5]: [0236].byte $00; [6]: [0237].byte $00; [7]:
;============================================================================ ; ASCII digits to render in the Gold or Experience area. ; ; Each digit corresponds to a single digit, populating based ; on the gold or experience. ; ; XREFS: ; UI_DrawDigitsZeroPadded ; UI_PopulateDigitsNoLeadingZeroes ;============================================================================
; ; XREFS: ; UI_DrawDigitsZeroPadded ; UI_PopulateDigitsNoLeadingZeroes ;
[0238]UI_DigitsToRender:; [$0238] [0238].byte $00,$00,$00,$00,$00,$00; [$0238] char
; ; XREFS: ; UI_PopulateDigits ;
[023e]CHAR_ARRAY_023e:; [$023e] [023e].byte $00,$00,$00,$00; [$023e] char
; ; PPU Attribute Data for a textbox. ; ; XREFS: ; DEADCODE_FUN_PRG12__9041 ; TextBox_FillBackground ; TextBox_SetNextAttributeData ;
[0242]TextBox_AttributeData:; [$0242] [0242].byte $00; [0]: [0243].byte $00; [1]: [0244].byte $00; [2]: [0245].byte $00; [3]: [0246].byte $00; [4]: [0247].byte $00; [5]: [0248].byte $00; [6]: [0249].byte $00; [7]: [024a]ScreenBlocks:; [$024a] [024a].byte $00,$00,$00,$00,$00,$00,$00,$00; [$024a] byte [0252].byte $00,$00,$00,$00,$00,$00,$00,$00; [$0252] byte [025a].byte $00,$00,$00,$00,$00,$00,$00,$00; [$025a] byte [0262].byte $00,$00,$00,$00,$00,$00,$00,$00; [$0262] byte [026a].byte $00,$00,$00,$00,$00,$00,$00,$00; [$026a] byte [0272].byte $00,$00,$00,$00,$00,$00,$00,$00; [$0272] byte [027a].byte $00,$00,$00,$00,$00,$00,$00,$00; [$027a] byte
; ; XREFS: ; Screen_LoadBlocksHoriz ; Screen_WriteScrollHorizPPUAttrData ;
[0282]Screen_ScrollHorizPPUAttrData:; [$0282] [0282].byte $00; [0]:
; ; XREFS: ; Screen_LoadBlocksHoriz ; Screen_WriteScrollHorizPPUAttrData ;
[0283]Screen_ScrollHorizPPUAttrData_1_:; [$0283] [0283].byte $00; [1]: [0284].byte $00; [2]: [0285].byte $00; [3]: [0286].byte $00; [4]: [0287].byte $00; [5]: [0288].byte $00; [6]: [0289].byte $00; [7]:
; ; XREFS: ; Screen_LoadBlockDataVert ; Screen_WriteScrollVertPPUAttrData ;
[028a]Screen_ScrollVertPPUAttrData:; [$028a] [028a].byte $00; [0]:
; ; XREFS: ; Screen_LoadBlockDataVert ; Screen_WriteScrollVertPPUAttrData ;
[028b]Screen_ScrollVertPPUAttrData_1_:; [$028b] [028b].byte $00; [1]: [028c].byte $00; [2]: [028d].byte $00; [3]: [028e].byte $00; [4]: [028f].byte $00; [5]: [0290].byte $00; [6]: [0291].byte $00; [7]: [0292].byte $00; [$0292] undefined
; ; XREFS: ; PPUBuffer_DrawCommand_WritePalette ;
[0293]Screen_PaletteData_Tiles:; [$0293] [0293].byte $00; [0]:
; ; XREFS: ; PPUBuffer_DrawCommand_WritePalette ;
[0294]Screen_PaletteData_Tiles_1_:; [$0294] [0294].byte $00; [1]: [0295].byte $00; [2]: [0296].byte $00; [3]: [0297].byte $00; [4]: [0298].byte $00; [5]: [0299].byte $00; [6]: [029a].byte $00; [7]: [029b].byte $00; [8]: [029c].byte $00; [9]: [029d].byte $00; [10]: [029e].byte $00; [11]: [029f].byte $00; [12]: [02a0].byte $00; [13]: [02a1].byte $00; [14]:
; ; XREFS: ; Screen_SetFadeOutPalette ;
[02a2]Screen_PaletteData_Tiles_15_:; [$02a2] [02a2].byte $00; [15]: [02a3]Screen_PaletteData_Sprites:; [$02a3] [02a3].byte $00; [0]: [02a4].byte $00; [1]: [02a5].byte $00; [2]: [02a6].byte $00; [3]: [02a7].byte $00; [4]: [02a8].byte $00; [5]: [02a9].byte $00; [6]: [02aa].byte $00; [7]: [02ab].byte $00; [8]: [02ac].byte $00; [9]: [02ad].byte $00; [10]: [02ae].byte $00; [11]: [02af].byte $00; [12]: [02b0].byte $00; [13]:
; ; XREFS: ; PasswordScreen_Show ; SplashAnimation_DrawScenery ; SplashAnimation_Intro_SomethingA708 ; StartScreen_Draw ; Screen_SetPaletteData ;
[02b1]Screen_PaletteData_Sprites_14_:; [$02b1] [02b1].byte $00; [14]:
; ; XREFS: ; PasswordScreen_Show ; SplashAnimation_DrawScenery ; SplashAnimation_Intro_SomethingA708 ; StartScreen_Draw ; Screen_SetPaletteData ;
[02b2]Screen_PaletteData_Sprites_15_:; [$02b2] [02b2].byte $00; [15]:
;============================================================================ ; Magic-related variables. ; ; XREFS: ; CastMagic_CheckDirection_CheckImpassable ; CastMagic_CheckDirection_Right ; CastMagic_Clear ; CastMagic_HitHandler_Death ; CastMagic_HitHandler_Deluge ; CastMagic_HitHandler_Fire ; CastMagic_HitHandler_Thunder ; CastMagic_HitHandler_Tilte ; CastMagic_RunSpellHandler ; CastMagic_Unused_UpdateDelugeAfterFirstHit ; CastMagic_Unused_UpdateHitWallEffect ; CastMagic_UpdateDeathAfterFirstHit ; CastMagic_UpdateDeluge ; CastMagic_UpdateFire ; CastMagic_UpdateFireAfterFirstHit ; CastMagic_UpdateThunderAfterFirstHit ; CastMagic_UpdateTilteAfterFirstHit ; CastMagic_UpdateXPosition ; Player_CastMagic ; Player_ClearVisibleMagic ; Sprite_CheckHitByCastMagic ; Area_ScrollTo ; CastMagic_RunUpdateSpellHandler ; CastMagic_SetAppearance ;============================================================================
; ; The type of magic currently on screen. ; ; This may also contain results of a spell, including ; explosion effects. ; ; ; XREFS: ; CastMagic_CheckDirection_CheckImpassable ; CastMagic_CheckDirection_Right ; CastMagic_Clear ; CastMagic_HitHandler_Death ; CastMagic_HitHandler_Deluge ; CastMagic_HitHandler_Fire ; CastMagic_HitHandler_Thunder ; CastMagic_HitHandler_Tilte ; CastMagic_RunSpellHandler ; CastMagic_Unused_UpdateDelugeAfterFirstHit ; CastMagic_Unused_UpdateHitWallEffect ; CastMagic_UpdateDeathAfterFirstHit ; CastMagic_UpdateDeluge ; CastMagic_UpdateFire ; CastMagic_UpdateFireAfterFirstHit ; CastMagic_UpdateThunderAfterFirstHit ; CastMagic_UpdateTilteAfterFirstHit ; CastMagic_UpdateXPosition ; Player_CastMagic ; Player_ClearVisibleMagic ; Sprite_CheckHitByCastMagic ; Area_ScrollTo ; CastMagic_RunUpdateSpellHandler ; CastMagic_SetAppearance ;
[02b3]CastMagic_Type:; [$02b3] [02b3].byte $00; [$02b3] SelectedMagic
; ; Flags dictating direction and movement for a cast magic spell. ; ; ; XREFS: ; CastMagic_UpdateFire ; CastMagic_UpdateTilte ; CastMagic_UpdateXPosition ; CastMagic_UpdateYPosition ; Player_CastMagic ; Sprite_CheckHitByCastMagic ; CastMagic_CalculateVisibility ; CastMagic_UpdateSpriteDirection ;
[02b4]CastMagic_Flags:; [$02b4] [02b4].byte $00; [$02b4] CastMagicFlags
; ; The fractional (lower byte) X position of any visible magic. ; ; ; XREFS: ; CastMagic_UpdateXPosition ; Player_CastMagic ;
[02b5]CastMagic_XPos_Frac:; [$02b5] [02b5].byte $00; [$02b5] byte
; ; The block (upper byte) X position of any visible magic. ; ; ; XREFS: ; CastMagic_CheckDirection_Left ; CastMagic_CheckDirection_Right ; CastMagic_HitHandler_Deluge ; CastMagic_UpdateFire ; CastMagic_UpdateXPosition ; Player_CastMagic ; Sprite_CheckHitByCastMagic ; CastMagic_CalculateVisibility ; CastMagic_FinishHandler_TilteAfterFirstHit ; CastMagic_RunUpdateSpellHandler ;
[02b6]CastMagic_XPos_Full:; [$02b6] [02b6].byte $00; [$02b6] byte
; ; The fractional (lower byte) Y position of any visible magic. ; ; ; XREFS: ; CastMagic_UpdateYPosition ; Player_CastMagic ;
[02b7]CastMagic_YPos_Frac:; [$02b7] [02b7].byte $00; [$02b7] byte
; ; The block (upper byte) Y position of any visible magic. ; ; ; XREFS: ; CastMagic_CheckDirection_CheckImpassable ; CastMagic_UpdateYPosition ; Player_CastMagic ; Sprite_CheckHitByCastMagic ; CastMagic_CalculateVisibility ; CastMagic_FinishHandler_HitWallEffect ; CastMagic_FinishHandler_TilteAfterFirstHit ; CastMagic_RunUpdateSpellHandler ;
[02b8]CastMagic_YPos_Full:; [$02b8] [02b8].byte $00; [$02b8] byte
; ; XREFS: ; CastMagic_HitHandler_Deluge ; CastMagic_HitHandler_Fire ; CastMagic_HitHandler_Thunder ; CastMagic_HitHandler_Tilte ; CastMagic_Unused_UpdateDelugeAfterFirstHit ; CastMagic_UpdateFireAfterFirstHit ; CastMagic_UpdateThunderAfterFirstHit ; CastMagic_UpdateTilte ; CastMagic_UpdateTilteAfterFirstHit ; Player_CastMagic ; CastMagic_FinishHandler_TilteAfterFirstHit ;
[02b9]CastMagic_Counter:; [$02b9] [02b9].byte $00; [$02b9] byte
; ; The phase of the current spell. ; ; This is spell-dependent. ; ; ; XREFS: ; CastMagic_UpdateTilte ; Player_CastMagic ; CastMagic_FinishHandler_Tilte ;
[02ba]CastMagic_Phase:; [$02ba] [02ba].byte $00; [$02ba] byte
; ; Relative Y position used for the magic's Hit Wall effect. ; ; This is set but never actually used in Faxanadu. The game ; wired it off, but it was intended for the Deluge and Fire ; spells. It would be the center Y position of the explosion ; relative to the magic's Y position. ; ; It can be enabled via these Game Genie codes: ; ; ZAVLOUNN ; ZEUUSUNN ; ; ; XREFS: ; CastMagic_UpdateDeluge ; CastMagic_UpdateFire ; CastMagic_FinishHandler_HitWallEffect ;
[02bb]CastMagic_Unused_HitWallDeltaPosY:; [$02bb] [02bb].byte $00; [$02bb] byte
; ; XREFS: ; Sprite_AddPosX ; Sprite_SubtractPosX ;
[02bc]CurrentSprites_XPos_Frac:; [$02bc] [02bc].byte $00; [0]: [02bd].byte $00; [1]: [02be].byte $00; [2]: [02bf].byte $00; [3]: [02c0].byte $00; [4]: [02c1].byte $00; [5]: [02c2].byte $00; [6]: [02c3].byte $00; [7]:
; ; XREFS: ; Sprite_CalculateNewVertPos ;
[02c4]CurrentSprites_YPos_Frac:; [$02c4] [02c4].byte $00; [0]: [02c5].byte $00; [1]: [02c6].byte $00; [2]: [02c7].byte $00; [3]: [02c8].byte $00; [4]: [02c9].byte $00; [5]: [02ca].byte $00; [6]: [02cb].byte $00; [7]:
;============================================================================ ; Sprite IDs of the 8 active sprites ; ; XREFS: ; BScript_Action_CastMagic ; CurrentSprite_CheckHitPlayer ; CurrentSprite_HandleFall ; CurrentSprite_UpdateState ; FUN_PRG14__a1cc ; Player_AddExperienceFromSprite ; Player_ApplyDamage ; Player_CheckShieldHitByMagic ; Player_HandleHitByMagic ; Player_HandleShieldHitByMagic ; Player_HandleTouchBreadOrCoin ; Player_HandleTouchEnemy ; Player_HandleTouchEnemyMagic ; Player_HandleTouchItem ; Player_HitEnemyWithMagic ; Player_HitSpriteWithWeapon ; SpriteBehavior_BossDeath ; SpriteBehavior_EnemyMagic ; SpriteBehavior_EnemyUnused18__9991 ; SpriteBehavior_ExecutionHood__a0ad ; SpriteBehavior_Garbled3 ; SpriteBehavior_LightningBallOrCharron ; SpriteBehavior_MaybeFallingRocks__ClearEntity ; SpriteBehavior_Pakukame ; SpriteBehavior_ShadowEura__a12d ; SpriteBehavior_Unknown_29 ; SpriteBehavior_Zorugeriru__9e13 ; SpriteBehavior_a25f_ClearEntity ; Sprite_CastMagic ; Sprite_CheckHitByCastMagic ; Sprite_EnterNextAppearancePhase ; Sprite_GetBounds ; Sprite_Maybe_ResetState ; Sprite_ReplaceWithDroppedItem ; Sprite_ReplaceWithMattock ; Sprite_SetDeathEntity ; Sprites_HasAnyEnemyOnScreen ; Sprites_IsSpriteOutOfWeaponRange ; Sprites_Remove ; Sprites_UpdateBehavior ;============================================================================
; ; XREFS: ; BScript_Action_CastMagic ; CurrentSprite_CheckHitPlayer ; CurrentSprite_HandleFall ; CurrentSprite_UpdateState ; FUN_PRG14__a1cc ; Player_AddExperienceFromSprite ; Player_ApplyDamage ; Player_CheckShieldHitByMagic ; Player_HandleHitByMagic ; Player_HandleShieldHitByMagic ; Player_HandleTouchBreadOrCoin ; Player_HandleTouchEnemy ; Player_HandleTouchEnemyMagic ; Player_HandleTouchItem ; Player_HitEnemyWithMagic ; Player_HitSpriteWithWeapon ; SpriteBehavior_BossDeath ; SpriteBehavior_EnemyMagic ; SpriteBehavior_EnemyUnused18__9991 ; SpriteBehavior_ExecutionHood__a0ad ; SpriteBehavior_Garbled3 ; SpriteBehavior_LightningBallOrCharron ; SpriteBehavior_MaybeFallingRocks__ClearEntity ; SpriteBehavior_Pakukame ; SpriteBehavior_ShadowEura__a12d ; SpriteBehavior_Unknown_29 ; SpriteBehavior_Zorugeriru__9e13 ; SpriteBehavior_a25f_ClearEntity ; Sprite_CastMagic ; Sprite_CheckHitByCastMagic ; Sprite_EnterNextAppearancePhase ; Sprite_GetBounds ; Sprite_Maybe_ResetState ; Sprite_ReplaceWithDroppedItem ; Sprite_ReplaceWithMattock ; Sprite_SetDeathEntity ; Sprites_HasAnyEnemyOnScreen ; Sprites_IsSpriteOutOfWeaponRange ; Sprites_Remove ; Sprites_UpdateBehavior ;
[02cc]CurrentSprites_Entities:; [$02cc] [02cc].byte $00; [0]: [02cd].byte $00; [1]: [02ce].byte $00; [2]: [02cf].byte $00; [3]: [02d0].byte $00; [4]: [02d1].byte $00; [5]:
; ; XREFS: ; SpriteBehavior_Pakukame__9d78 ; SpriteBehavior_Zorugeriru__9df7 ; Sprites_ClearAllEntities ; Sprites_HasAnyEnemyOnScreen ; Sprites_HasMaxOnScreen ; _Sprites_ReplaceWithMattock_HasMaxOnScreen ; GameLoop_LoadSpriteImages ; Maybe_IsSpriteEntityNotOnScreen ; Screen_ClearSprites ; Sprites_HasBoss ; Sprites_HasCurrentSprites ; Sprites_HasSpritesNotOfType ; Sprites_PopulateNextAvailableSprite ;
[02d2]CurrentSprites_Entities_6_:; [$02d2] [02d2].byte $00; [6]:
; ; XREFS: ; SpriteBehavior_Pakukame__9d78 ; SpriteBehavior_Zorugeriru__9df7 ; Sprites_ClearAllEntities ; Sprites_HasAnyEnemyOnScreen ; Sprites_HasMaxOnScreen ; _Sprites_ReplaceWithMattock_HasMaxOnScreen ; GameLoop_LoadSpriteImages ; Maybe_IsSpriteEntityNotOnScreen ; Screen_ClearSprites ; Sprites_HasBoss ; Sprites_HasCurrentSprites ; Sprites_HasSpritesNotOfType ; Sprites_PopulateNextAvailableSprite ;
[02d3]CurrentSprites_Entities_7_:; [$02d3] [02d3].byte $00; [7]:
;============================================================================ ; Subtype of the currently-active sprites ; ; XREFS: ; BScript_Op_GoTo ; BScript_Op_MaybeDisableAndGoTo ; BScript_Op_RunAction ; BScript_Op_SetPhase ; BScript_Op_SwitchBehavior ; BScripts_LoadNextOp ; SpriteOp_CheckDistanceToPlayer_X ; SpriteOp_CheckDistanceToPlayer_Y ; Sprite_FinishBehavior ; Sprite_Maybe_ResetState ; Sprite_ReplaceWithDroppedItem ; Sprite_ReplaceWithMattock ; Sprite_SetDeathEntity ; Sprites_UpdateBehavior ;============================================================================
; ; XREFS: ; BScript_Op_GoTo ; BScript_Op_MaybeDisableAndGoTo ; BScript_Op_RunAction ; BScript_Op_SetPhase ; BScript_Op_SwitchBehavior ; BScripts_LoadNextOp ; SpriteOp_CheckDistanceToPlayer_X ; SpriteOp_CheckDistanceToPlayer_Y ; Sprite_FinishBehavior ; Sprite_Maybe_ResetState ; Sprite_ReplaceWithDroppedItem ; Sprite_ReplaceWithMattock ; Sprite_SetDeathEntity ; Sprites_UpdateBehavior ;
[02d4]CurrentSprites_Behaviors:; [$02d4] [02d4].byte $00; [0]: [02d5].byte $00; [1]: [02d6].byte $00; [2]: [02d7].byte $00; [3]: [02d8].byte $00; [4]: [02d9].byte $00; [5]:
; ; XREFS: ; Screen_ClearSprites ;
[02da]CurrentSprites_Behaviors_6_:; [$02da] [02da].byte $00; [6]:
; ; XREFS: ; Screen_ClearSprites ; Sprites_PopulateNextAvailableSprite ;
[02db]CurrentSprites_Behaviors_7_:; [$02db] [02db].byte $00; [7]:
; ; XREFS: ; BScript_Action_CastMagic ; BScript_Action_FacePlayerX ; BScript_Action_FacePlayerY ; BScript_Action_FlipXDirection ; BScript_Action_FlipYDirection ; BScript_Action_RandomlyFlipXDirection ; BScript_Action_RandomlyFlipYDirection ; BScript_Action_RiseUp ; CurrentSpriteFlags_SetBit5 ; CurrentSprite_CalculateVisibility ; CurrentSprite_HandleFall ; CurrentSprite_UpdateFlipMask ; FUN_PRG14__844b ; FUN_PRG14__849a ; FUN_PRG14__854c ; FUN_PRG14__a1cc ; MoveSpriteHorizIfPossible ; MoveSpriteVerticalIfPossible ; Player_HitSpriteWithWeapon ; Player_SetDamagedBySprite ; SpriteBehavior_BounceAndExpire ; SpriteBehavior_EnemyUnused43 ; SpriteBehavior_ExecutionHood__a0ad ; SpriteBehavior_Garbled3 ; SpriteBehavior_GiantBees ; SpriteBehavior_Hop ; SpriteBehavior_Ishiisu ; SpriteBehavior_KingGrieve ; SpriteBehavior_KingGrieve_9f65 ; SpriteBehavior_KingGrieve_MoveDown ; SpriteBehavior_Lilith ; SpriteBehavior_MoveTowardPlayer ; SpriteBehavior_Naga ; SpriteBehavior_NecronAides ; SpriteBehavior_Pakukame ; SpriteBehavior_Ripasheiku ; SpriteBehavior_Ripasheiku_CastMagicOrUpdatePos ; SpriteBehavior_ShadowEura__a077 ; SpriteBehavior_ShadowEura__a12d ; SpriteBehavior_SomethingZoradohna_18 ; SpriteBehavior_Something_850d ; SpriteBehavior_Unknown_29 ; SpriteBehavior_Zorugeriru__9e13 ; SpriteBehavior__a8d7 ; SpriteBehavior__a91e ; Sprite_CalculateNewVertPos ; Sprite_CapToBlockOppositeFalling ; Sprite_CastMagic ; Sprite_CheckHitByCastMagic ; Sprite_ClearFlags ; Sprite_IsBehaviorNotReady ; Sprite_Maybe_AddFacingPosX ; Sprite_Maybe_ResetState ; Sprite_Maybe_TurnAroundIfAtScreenEdgeHoriz ; Sprite_Maybe_TurnAroundIfAtScreenEdgeVert ; Sprite_MoveHorizAndTurnAroundIfNeeded ; Sprite_MoveVertAndFlipIfNeeded ; Sprite_SetBehaviorNotReady ; Sprite_SetBehaviorReady ; Sprite_SetVisible ; Sprites_HideSprite ; Sprites_IsSpriteHidden ; Sprites_SetCurrentSpriteCanMove ;
[02dc]CurrentSprites_Flags:; [$02dc] [02dc].byte $00; [0]: [02dd].byte $00; [1]: [02de].byte $00; [2]: [02df].byte $00; [3]: [02e0].byte $00; [4]: [02e1].byte $00; [5]: [02e2].byte $00; [6]:
; ; XREFS: ; Sprites_PopulateNextAvailableSprite ;
[02e3]CurrentSprites_Flags_7_:; [$02e3] [02e3].byte $00; [7]:
; ; XREFS: ; BScript_Op_GoTo ; BScript_Op_SetPhase ; BScript_Op_SwitchBehavior ; FUN_PRG14__9693 ; FUN_PRG14__9699 ; FUN_PRG14__9917 ; FUN_PRG14__9a3c ; FUN_PRG14__9a61 ; FUN_PRG14__9ac6 ; Player_HandleTouchEnemy ; Player_HitEnemyWithMagic ; Player_HitSpriteWithWeapon ; SpriteBehavior_BattleHelmetDroppedByZoradohna ; SpriteBehavior_BattleSuitDroppedByZoradohna ; SpriteBehavior_BlackOnyxDropFromZoradohna ; SpriteBehavior_Borabohra ; SpriteBehavior_BossDeath ; SpriteBehavior_BounceAndExpire ; SpriteBehavior_BuzzAround ; SpriteBehavior_DragonSlayerDroppedByKingGrieve ; SpriteBehavior_EnemyUnused18 ; SpriteBehavior_EnemyUnused18__994a ; SpriteBehavior_EnemyUnused36 ; SpriteBehavior_EnemyUnused39 ; SpriteBehavior_EnemyUnused43 ; SpriteBehavior_ExecutionHood ; SpriteBehavior_Garbled3 ; SpriteBehavior_GiantBees ; SpriteBehavior_Ishiisu ; SpriteBehavior_KingGrieve ; SpriteBehavior_KingGrieve_9f86 ; SpriteBehavior_KingGrieve_MoveDown ; SpriteBehavior_Lilith ; SpriteBehavior_Magman ; SpriteBehavior_MattockDroppedFromRipasheiku ; SpriteBehavior_Naga ; SpriteBehavior_Nash ; SpriteBehavior_NecronAides ; SpriteBehavior_Pakukame ; SpriteBehavior_PendantDroppedFromRipasheiku ; SpriteBehavior_Ripasheiku ; SpriteBehavior_Ripasheiku_CastMagicOrUpdatePos ; SpriteBehavior_ShadowEura ; SpriteBehavior_SirGawaineWolfman ; SpriteBehavior_SpringOfFortress ; SpriteBehavior_SpringOfJoker ; SpriteBehavior_SpringOfSky ; SpriteBehavior_Springs_UpdateFlowing ; SpriteBehavior_Tamazutsu ; SpriteBehavior_WingBootsDroppedByZorugeriru ; SpriteBehavior_Yareeka ; SpriteBehavior_Zorugeriru ; SpriteBehavior_Zorugeriru__9e13 ; SpriteUpdateHandler_Boss_Borabohra ; SpriteUpdateHandler_Boss_KingGrieve ; SpriteUpdateHandler_Boss_Pakukame ; SpriteUpdateHandler_Boss_Ripasheiku ; SpriteUpdateHandler_Boss_Zorugeriru ; SpriteUpdateHandler_Effect_BossDeath ; SpriteUpdateHandler_Effect_Spring ; SpriteUpdateHandler_Enemy_Charron ; SpriteUpdateHandler_Enemy_ExecutionHood ; SpriteUpdateHandler_Enemy_FireGiant ; SpriteUpdateHandler_Enemy_Geributa ; SpriteUpdateHandler_Enemy_GiantStrider ; SpriteUpdateHandler_Enemy_Grimlock ; SpriteUpdateHandler_Enemy_Ishiisu ; SpriteUpdateHandler_Enemy_Magman ; SpriteUpdateHandler_Enemy_Maskman ; SpriteUpdateHandler_Enemy_Myconid ; SpriteUpdateHandler_Enemy_Nash ; SpriteUpdateHandler_Enemy_NecronAides ; SpriteUpdateHandler_Enemy_Raiden ; SpriteUpdateHandler_Enemy_SirGawaine_Wolfman ; SpriteUpdateHandler_Enemy_Snowman ; SpriteUpdateHandler_Enemy_Tamazutsu ; SpriteUpdateHandler_Enemy_Unused29 ; SpriteUpdateHandler_Enemy_Unused_CurlyTail ; SpriteUpdateHandler_Garbled03 ; SpriteUpdateHandler_NPC_King ; SpriteUpdateHandler_NPC_Walking ; Sprite_GetBounds ; Sprite_GetPreviousSpritePhase ; Sprite_Maybe_ResetState ; Sprite_SetPhase2 ; Sprites_MaybeResetPhaseAndEnable ;
[02e4]CurrentSprites_Phases:; [$02e4] [02e4].byte $00; [0]: [02e5].byte $00; [1]: [02e6].byte $00; [2]: [02e7].byte $00; [3]: [02e8].byte $00; [4]: [02e9].byte $00; [5]: [02ea].byte $00; [6]:
; ; XREFS: ; Sprites_PopulateNextAvailableSprite ;
[02eb]CurrentSprites_Phases_7_:; [$02eb] [02eb].byte $00; [7]:
; ; XREFS: ; FUN_PRG14__9593 ; FUN_PRG14__9699 ; FUN_PRG14__9917 ; FUN_PRG14__9a61 ; FUN_PRG14__9a87 ; FUN_PRG14__9aa1 ; FUN_PRG14__9ac6 ; LAB_PRG14__9735 [$PRG14::9735] ; Maybe_SpriteBody__99f3 ; SpriteBehavior_Bihoruda ; SpriteBehavior_Borabohra ; SpriteBehavior_BossDeath ; SpriteBehavior_BuzzAround ; SpriteBehavior_EnemyUnused18__994a ; SpriteBehavior_EnemyUnused18__9991 ; SpriteBehavior_EnemyUnused36 ; SpriteBehavior_EnemyUnused39 ; SpriteBehavior_ExecutionHood ; SpriteBehavior_FlashScreenHitPlayer ; SpriteBehavior_Garbled3 ; SpriteBehavior_GiantBees ; SpriteBehavior_Ishiisu ; SpriteBehavior_KingGrieve ; SpriteBehavior_KingGrieve_9f86 ; SpriteBehavior_KingGrieve_MoveDown ; SpriteBehavior_LightningBallOrCharron ; SpriteBehavior_Lilith ; SpriteBehavior_Magman ; SpriteBehavior_MoveTowardPlayer ; SpriteBehavior_Nash ; SpriteBehavior_NecronAides ; SpriteBehavior_Pakukame ; SpriteBehavior_Ripasheiku ; SpriteBehavior_Ripasheiku_CastMagicOrUpdatePos ; SpriteBehavior_ShadowEura ; SpriteBehavior_Springs_UpdateFlowing ; SpriteBehavior_Tamazutsu ; SpriteBehavior_WalkForward ; SpriteBehavior_Yareeka ; SpriteBehavior_Yuinaru ; SpriteBehavior_Zorugeriru ; SpriteBehavior__8f9a [$PRG14::8f9a] ; SpriteBehavior__a8d7 ; SpriteBehavior__a91e ; SpriteUpdateHandler_Boss_Borabohra ; SpriteUpdateHandler_Effect_EnemyDeath ; SpriteUpdateHandler_Effect_LightningBall20 ; SpriteUpdateHandler_Effect_Spring ; SpriteUpdateHandler_Enemy_Bihoruda ; SpriteUpdateHandler_Enemy_Ishiisu ; SpriteUpdateHandler_Enemy_Nash ; SpriteUpdateHandler_Enemy_Tamazutsu ; SpriteUpdateHandler_Enemy_Yuinaru ; SpriteUpdateHandler_Garbled03 ; Sprite_SetDeathEntity ;
[02ec]CurrentSprites_BehaviorData2:; [$02ec] [02ec].byte $00; [0]: [02ed].byte $00; [1]: [02ee].byte $00; [2]: [02ef].byte $00; [3]: [02f0].byte $00; [4]: [02f1].byte $00; [5]: [02f2].byte $00; [6]: [02f3].byte $00; [7]:
;============================================================================ ; Tick counter used for some behaviors. ; ; XREFS: ; FUN_PRG14__9917 ; FUN_PRG14__9aa1 ; FUN_PRG14__9ac6 ; LAB_PRG14__8fb7 [$PRG14::8fb7] ; SpriteBehavior_Bihoruda ; SpriteBehavior_BounceAndExpire ; SpriteBehavior_EnemyUnused18 ; SpriteBehavior_EnemyUnused36 ; SpriteBehavior_EnemyUnused43 ; SpriteBehavior_ExecutionHood ; SpriteBehavior_Garbled3 ; SpriteBehavior_GiantBees ; SpriteBehavior_Hop ; SpriteBehavior_KingGrieve ; SpriteBehavior_KingGrieve_9f86 ; SpriteBehavior_Lilith ; SpriteBehavior_MoveTowardPlayer ; SpriteBehavior_Naga ; SpriteBehavior_NecronAides ; SpriteBehavior_Ripasheiku ; SpriteBehavior_Ripasheiku_CastMagicOrUpdatePos ; SpriteBehavior_ShadowEura ; SpriteBehavior_SomethingZoradohna_18 ; SpriteBehavior_Springs_UpdateFlowing ; SpriteBehavior_WalkForward ; SpriteBehavior_Yuinaru ; SpriteBehavior__a8d7 ; SpriteBehavior__a91e ; SpriteUpdateHandler_Enemy_Unused_SnakeRoundPart ;============================================================================
; ; XREFS: ; FUN_PRG14__9917 ; FUN_PRG14__9aa1 ; FUN_PRG14__9ac6 ; LAB_PRG14__8fb7 [$PRG14::8fb7] ; SpriteBehavior_Bihoruda ; SpriteBehavior_BounceAndExpire ; SpriteBehavior_EnemyUnused18 ; SpriteBehavior_EnemyUnused36 ; SpriteBehavior_EnemyUnused43 ; SpriteBehavior_ExecutionHood ; SpriteBehavior_Garbled3 ; SpriteBehavior_GiantBees ; SpriteBehavior_Hop ; SpriteBehavior_KingGrieve ; SpriteBehavior_KingGrieve_9f86 ; SpriteBehavior_Lilith ; SpriteBehavior_MoveTowardPlayer ; SpriteBehavior_Naga ; SpriteBehavior_NecronAides ; SpriteBehavior_Ripasheiku ; SpriteBehavior_Ripasheiku_CastMagicOrUpdatePos ; SpriteBehavior_ShadowEura ; SpriteBehavior_SomethingZoradohna_18 ; SpriteBehavior_Springs_UpdateFlowing ; SpriteBehavior_WalkForward ; SpriteBehavior_Yuinaru ; SpriteBehavior__a8d7 ; SpriteBehavior__a91e ; SpriteUpdateHandler_Enemy_Unused_SnakeRoundPart ;
[02f4]CurrentSprites_BehaviorData3:; [$02f4] [02f4].byte $00; [0]: [02f5].byte $00; [1]: [02f6].byte $00; [2]: [02f7].byte $00; [3]: [02f8].byte $00; [4]: [02f9].byte $00; [5]: [02fa].byte $00; [6]: [02fb].byte $00; [7]:
;============================================================================ ; XXX Some lookup map. ; ; XREFS: ; FUN_PRG14__9aa1 ; Maybe_SpriteBody__99f3 ; Maybe_Sprite_HandleDeathDrop ; SpriteBehavior_BounceAndExpire ; SpriteBehavior_EnemyUnused18__994a ; SpriteBehavior_EnemyUnused18__9991 ; SpriteBehavior_Hop ; SpriteBehavior_Lilith ; SpriteBehavior_Ripasheiku ; SpriteBehavior_ShadowEura ; SpriteBehavior_SomethingZoradohna_18 ; SpriteBehavior_Unknown_29 ; SpriteUpdateHandler_Boss_ShadowEura ; SpriteUpdateHandler_Coin ; SpriteUpdateHandler_Magic_83 ; Sprite_SetDeathEntity ;============================================================================
; ; XREFS: ; FUN_PRG14__9aa1 ; Maybe_SpriteBody__99f3 ; Maybe_Sprite_HandleDeathDrop ; SpriteBehavior_BounceAndExpire ; SpriteBehavior_EnemyUnused18__994a ; SpriteBehavior_EnemyUnused18__9991 ; SpriteBehavior_Hop ; SpriteBehavior_Lilith ; SpriteBehavior_Ripasheiku ; SpriteBehavior_ShadowEura ; SpriteBehavior_SomethingZoradohna_18 ; SpriteBehavior_Unknown_29 ; SpriteUpdateHandler_Boss_ShadowEura ; SpriteUpdateHandler_Coin ; SpriteUpdateHandler_Magic_83 ; Sprite_SetDeathEntity ;
[02fc]CurrentSprites_InternalBehaviorStates:; [$02fc] [02fc].byte $00; [0]: [02fd].byte $00; [1]: [02fe].byte $00; [2]: [02ff].byte $00; [3]:
; ; XREFS: ; Game_Init ;
[0300]CurrentSprites_InternalBehaviorStates_4_:; [$0300] [0300].byte $00; [4]: [0301].byte $00; [5]: [0302].byte $00; [6]: [0303].byte $00; [7]:
; ; XREFS: ; CurrentSprite_CanMoveInDirection ; FUN_PRG14__9917 ; SpriteBehavior_Borabohra ; SpriteBehavior_Garbled3 ; SpriteBehavior_KingGrieve ; SpriteBehavior_Pakukame ; SpriteBehavior_Ripasheiku ; SpriteBehavior_ShadowEura ; SpriteBehavior_Zorugeriru ; Sprite_CalcDistanceXToPlayer ; Sprite_CanClimb ; Sprite_CheckHitByCastMagic ; Sprite_Maybe_ResetState ; Sprite_ReplaceWithDroppedItem ; Sprite_ReplaceWithMattock ; Sprites_CanSpriteWalk ; Sprites_MoveRight ; Sprites_MoveRight__86c6 ;
[0304]CurrentSprites_HitBoxTypes:; [$0304] [0304].byte $00; [0]: [0305].byte $00; [1]:
; ; XREFS: ; Screen_LoadBlockDataVert ;
[0306]CurrentSprites_HitBoxTypes_2_:; [$0306] [0306].byte $00; [2]:
; ; XREFS: ; Screen_LoadBlockDataVert ;
[0307]CurrentSprites_HitBoxTypes_3_:; [$0307] [0307].byte $00; [3]: [0308].byte $00; [4]: [0309].byte $00; [5]: [030a].byte $00; [6]:
; ; XREFS: ; Sprites_PopulateNextAvailableSprite ;
[030b]CurrentSprites_HitBoxTypes_7_:; [$030b] [030b].byte $00; [7]:
;============================================================================ ; XXX Some lookup map. ; ; XREFS: ; FUN_PRG14__8398 ; FUN_PRG14__83a8 ; SpriteBehavior_Hop ; SpriteBehavior_SomethingEyeball_17 ; SpriteBehavior_SomethingZoradohna_18 ; SpriteBehavior_Unknown_29 ; SpriteBehavior_Unknown_29_SomeSetup ;============================================================================
; ; XREFS: ; FUN_PRG14__8398 ; FUN_PRG14__83a8 ; SpriteBehavior_Hop ; SpriteBehavior_SomethingEyeball_17 ; SpriteBehavior_SomethingZoradohna_18 ; SpriteBehavior_Unknown_29 ; SpriteBehavior_Unknown_29_SomeSetup ;
[030c]CurrentSprites_BehaviorState_XFull:; [$030c] [030c].byte $00; [0]: [030d].byte $00; [1]: [030e].byte $00; [2]: [030f].byte $00; [3]: [0310].byte $00; [4]: [0311].byte $00; [5]: [0312].byte $00; [6]: [0313].byte $00; [7]:
;============================================================================ ; XXX Some lookup map. ; ; XREFS: ; FUN_PRG14__8398 ; FUN_PRG14__83a8 ; SpriteBehavior_MoveVertically ; SpriteBehavior_SomethingEyeball_17 ; SpriteBehavior_Unknown_29 ; SpriteBehavior_Unknown_29_SomeSetup ;============================================================================
; ; XREFS: ; FUN_PRG14__8398 ; FUN_PRG14__83a8 ; SpriteBehavior_MoveVertically ; SpriteBehavior_SomethingEyeball_17 ; SpriteBehavior_Unknown_29 ; SpriteBehavior_Unknown_29_SomeSetup ;
[0314]CurrentSprites_BehaviorState_YFull:; [$0314] [0314].byte $00; [0]: [0315].byte $00; [1]: [0316].byte $00; [2]: [0317].byte $00; [3]: [0318].byte $00; [4]: [0319].byte $00; [5]: [031a].byte $00; [6]: [031b].byte $00; [7]:
;============================================================================ ; XXX Some sprites lookup map. ; ; XREFS: ; FUN_PRG14__8398 ; FUN_PRG14__83a8 ; SpriteBehavior_Hop ; SpriteBehavior_SomethingEyeball_17 ; SpriteBehavior_SomethingZoradohna_18 ; SpriteBehavior_Unknown_29 ; SpriteBehavior_Unknown_29_SomeSetup ;============================================================================
; ; XREFS: ; FUN_PRG14__8398 ; FUN_PRG14__83a8 ; SpriteBehavior_Hop ; SpriteBehavior_SomethingEyeball_17 ; SpriteBehavior_SomethingZoradohna_18 ; SpriteBehavior_Unknown_29 ; SpriteBehavior_Unknown_29_SomeSetup ;
[031c]CurrentSprites_BehaviorState_XFrac:; [$031c] [031c].byte $00; [0]: [031d].byte $00; [1]: [031e].byte $00; [2]: [031f].byte $00; [3]: [0320].byte $00; [4]: [0321].byte $00; [5]: [0322].byte $00; [6]: [0323].byte $00; [7]:
;============================================================================ ; XXX Some lookup map. ; ; XREFS: ; FUN_PRG14__8398 ; FUN_PRG14__83a8 ; SpriteBehavior_MoveVertically ; SpriteBehavior_SomethingEyeball_17 ; SpriteBehavior_Unknown_29 ; SpriteBehavior_Unknown_29_SomeSetup ;============================================================================
; ; XREFS: ; FUN_PRG14__8398 ; FUN_PRG14__83a8 ; SpriteBehavior_MoveVertically ; SpriteBehavior_SomethingEyeball_17 ; SpriteBehavior_Unknown_29 ; SpriteBehavior_Unknown_29_SomeSetup ;
[0324]CurrentSprites_BehaviorState_YFrac:; [$0324] [0324].byte $00; [0]: [0325].byte $00; [1]: [0326].byte $00; [2]: [0327].byte $00; [3]: [0328].byte $00; [4]: [0329].byte $00; [5]: [032a].byte $00; [6]: [032b].byte $00; [7]:
;============================================================================ ; Loaded PPU offsets where the first tile of the sprite is stored. ; ; XREFS: ; BScript_Action_CastMagic ; CurrentSprite_UpdateState ; FUN_PRG14__a1cc ; SpriteBehavior_BounceAndExpire ; SpriteBehavior_ExecutionHood__a0ad ; SpriteBehavior_Pakukame ; SpriteBehavior_ShadowEura__a12d ; SpriteBehavior_Zorugeriru__9e13 ; SpriteUpdateHandler_Enemy_Unused_SnakeRoundPart ; Sprite_CastMagic ; Sprite_ReplaceWithMattock ;============================================================================
; ; XREFS: ; BScript_Action_CastMagic ; CurrentSprite_UpdateState ; FUN_PRG14__a1cc ; SpriteBehavior_BounceAndExpire ; SpriteBehavior_ExecutionHood__a0ad ; SpriteBehavior_Pakukame ; SpriteBehavior_ShadowEura__a12d ; SpriteBehavior_Zorugeriru__9e13 ; SpriteUpdateHandler_Enemy_Unused_SnakeRoundPart ; Sprite_CastMagic ; Sprite_ReplaceWithMattock ;
[032c]CurrentSprites_PPUOffsets:; [$032c] [032c].byte $00; [0]: [032d].byte $00; [1]: [032e].byte $00; [2]: [032f].byte $00; [3]: [0330].byte $00; [4]: [0331].byte $00; [5]: [0332].byte $00; [6]:
; ; XREFS: ; GameLoop_LoadSpriteImages ;
[0333]CurrentSprites_PPUOffsets_7_:; [$0333] [0333].byte $00; [7]:
;============================================================================ ; Magic type the sprite was hit by ; ; $FF = Not hit by magic ; ; XREFS: ; Maybe_Sprite_HandleDeathDrop ; SpriteBehavior_Zorugeriru__9e13 ; Sprite_CheckHitByCastMagic ; Sprite_Maybe_ResetState ; Sprite_SetDeathEntity ; Sprites_Maybe_UpdateHitByMagic ;============================================================================
; ; XREFS: ; Maybe_Sprite_HandleDeathDrop ; SpriteBehavior_Zorugeriru__9e13 ; Sprite_CheckHitByCastMagic ; Sprite_Maybe_ResetState ; Sprite_SetDeathEntity ; Sprites_Maybe_UpdateHitByMagic ;
[0334]CurrentSprites_HitByMagicBehavior:; [$0334] [0334].byte $00; [0]: [0335].byte $00; [1]: [0336].byte $00; [2]: [0337].byte $00; [3]: [0338].byte $00; [4]: [0339].byte $00; [5]: [033a].byte $00; [6]:
; ; XREFS: ; Sprites_PopulateNextAvailableSprite ;
[033b]CurrentSprites_HitByMagicBehavior_7_:; [$033b] [033b].byte $00; [7]:
; ; XREFS: ; Sprite_CheckHitByCastMagic ; Sprites_Maybe_UpdateHitByMagic ;
[033c]CurrentSprites_HitByMagicIFrames:; [$033c] [033c].byte $00; [0]: [033d].byte $00; [1]: [033e].byte $00; [2]: [033f].byte $00; [3]: [0340].byte $00; [4]: [0341].byte $00; [5]: [0342].byte $00; [6]: [0343].byte $00; [7]:
; ; XREFS: ; Player_HitEnemyWithMagic ; Player_HitSpriteWithWeapon ; SpriteBehavior_Pakukame ;
[0344]CurrentSprites_HP:; [$0344] [0344].byte $00; [0]: [0345].byte $00; [1]: [0346].byte $00; [2]: [0347].byte $00; [3]: [0348].byte $00; [4]: [0349].byte $00; [5]:
; ; XREFS: ; Screen_ClearSprites ;
[034a]CurrentSprites_HP_6_:; [$034a] [034a].byte $00; [6]:
; ; XREFS: ; Screen_ClearSprites ; Sprites_PopulateNextAvailableSprite ;
[034b]CurrentSprites_HP_7_:; [$034b] [034b].byte $00; [7]:
;============================================================================ ; Counter used after sprite was hit ; ; XREFS: ; CurrentSprite_UpdateState ; Maybe_Sprite_HandleDeathDrop ; Player_HitSpriteWithWeapon ; _handleHit [$PRG14::804e] ;============================================================================
; ; XREFS: ; CurrentSprite_UpdateState ; Maybe_Sprite_HandleDeathDrop ; Player_HitSpriteWithWeapon ; _handleHit [$PRG14::804e] ;
[034c]CurrentSprites_HitCounter:; [$034c] [034c].byte $00; [0]: [034d].byte $00; [1]: [034e].byte $00; [2]: [034f].byte $00; [3]: [0350].byte $00; [4]: [0351].byte $00; [5]:
; ; XREFS: ; Screen_ClearSprites ;
[0352]CurrentSprites_HitCounter_6_:; [$0352] [0352].byte $00; [6]:
; ; XREFS: ; _handleHit [$PRG14::804e] ; Screen_ClearSprites ;
[0353]CurrentSprites_HitCounter_7_:; [$0353] [0353].byte $00; [7]:
; ; XREFS: ; Sprite_Maybe_ResetState ; Sprite_ReplaceWithDroppedItem ; Sprite_ReplaceWithMattock ; Sprite_SetDeathEntity ; Sprites_UpdateBehavior ;
[0354]CurrentSprites_BehaviorAddrs_L:; [$0354] [0354].byte $00; [0]: [0355].byte $00; [1]: [0356].byte $00; [2]: [0357].byte $00; [3]: [0358].byte $00; [4]: [0359].byte $00; [5]: [035a].byte $00; [6]:
; ; XREFS: ; Sprites_PopulateNextAvailableSprite ;
[035b]CurrentSprites_BehaviorAddrs_L_7_:; [$035b] [035b].byte $00; [7]:
; ; XREFS: ; Sprite_Maybe_ResetState ; Sprite_ReplaceWithDroppedItem ; Sprite_ReplaceWithMattock ; Sprite_SetDeathEntity ; Sprites_UpdateBehavior ;
[035c]CurrentSprites_BehaviorAddrs_U:; [$035c] [035c].byte $00; [0]: [035d].byte $00; [1]: [035e].byte $00; [2]: [035f].byte $00; [3]: [0360].byte $00; [4]: [0361].byte $00; [5]: [0362].byte $00; [6]:
; ; XREFS: ; Sprites_PopulateNextAvailableSprite ;
[0363]CurrentSprites_BehaviorAddrs_U_7_:; [$0363] [0363].byte $00; [7]:
; ; XREFS: ; BScript_Op_SwitchBehavior ; SpriteBehavior_Hop ; Sprites_CountdownBehavior ;
[0364]CurrentSprites_BehaviorArg1:; [$0364] [0364].byte $00; [0]: [0365].byte $00; [1]: [0366].byte $00; [2]: [0367].byte $00; [3]: [0368].byte $00; [4]: [0369].byte $00; [5]: [036a].byte $00; [6]: [036b].byte $00; [7]:
;============================================================================ ; Message IDs of the NPC messages ; ; XREFS: ; Maybe_Sprite_HandleDeathDrop ; Player_CheckHandlePressUpOnNPC ; Player_HandleTouchBread ; Player_HandleTouchCoin ; Player_HandleTouchNPC ; Sprites_LoadSpriteValue ;============================================================================
; ; XREFS: ; Maybe_Sprite_HandleDeathDrop ; Player_CheckHandlePressUpOnNPC ; Player_HandleTouchBread ; Player_HandleTouchCoin ; Player_HandleTouchNPC ; Sprites_LoadSpriteValue ;
[036c]CurrentSprites_Values:; [$036c] [036c].byte $00; [0]: [036d].byte $00; [1]: [036e].byte $00; [2]: [036f].byte $00; [3]: [0370].byte $00; [4]: [0371].byte $00; [5]: [0372].byte $00; [6]:
; ; XREFS: ; Sprites_LoadSpriteValue ;
[0373]CurrentSprites_Values_7_:; [$0373] [0373].byte $00; [7]:
; ; XREFS: ; CastMagic_UpdateDeluge ; CastMagic_UpdateFire ; CastMagic_UpdateThunderOrDeath ; CastMagic_UpdateTilte ; CastMagic_UpdateXPosition ; FUN_PRG14__83a8 ; FUN_PRG14__848a ; SpriteBehavior_BuzzAround ; SpriteBehavior_EnemyMagic ; SpriteBehavior_EnemyUnused36 ; SpriteBehavior_EnemyUnused43 ; SpriteBehavior_ExecutionHood ; SpriteBehavior_GiantBees ; SpriteBehavior_Hop ; SpriteBehavior_Ishiisu ; SpriteBehavior_KingGrieve ; SpriteBehavior_Lilith ; SpriteBehavior_NecronAides ; SpriteBehavior_ShadowEura ; SpriteBehavior_SirGawaineWolfman ; SpriteBehavior_SomethingEyeball_17 ; SpriteBehavior_SomethingZoradohna_18 ; SpriteBehavior_Unknown_29 ; SpriteBehavior_WalkForward ; SpriteBehavior_Yareeka ; SpriteBehavior__a91e ; Sprite_AddPosX ; Sprite_MoveHorizOneBlockOrTurnAround ; Sprite_SubtractPosX ; Sprites_CalcHorizSpriteMovement ; Sprites_Maybe_UpdateHitByMagic ;
[0374]Arg_DeltaX_Frac:; [$0374] [0374].byte $00; [$0374] byte
; ; XREFS: ; CastMagic_UpdateDeluge ; CastMagic_UpdateFire ; CastMagic_UpdateThunderOrDeath ; CastMagic_UpdateTilte ; CastMagic_UpdateXPosition ; FUN_PRG14__83a8 ; FUN_PRG14__848a ; FUN_PRG14__9593 ; SpriteBehavior_Bihoruda ; SpriteBehavior_BuzzAround ; SpriteBehavior_EnemyMagic ; SpriteBehavior_EnemyUnused36 ; SpriteBehavior_EnemyUnused43 ; SpriteBehavior_ExecutionHood ; SpriteBehavior_GiantBees ; SpriteBehavior_Hop ; SpriteBehavior_Ishiisu ; SpriteBehavior_KingGrieve ; SpriteBehavior_Lilith ; SpriteBehavior_NecronAides ; SpriteBehavior_ShadowEura ; SpriteBehavior_SirGawaineWolfman ; SpriteBehavior_SomethingEyeball_17 ; SpriteBehavior_SomethingZoradohna_18 ; SpriteBehavior_Unknown_29 ; SpriteBehavior_WalkForward ; SpriteBehavior_Yareeka ; SpriteBehavior_Yuinaru ; SpriteBehavior__a91e ; Sprite_AddPosX ; Sprite_MoveHorizOneBlockOrTurnAround ; Sprite_SubtractPosX ; Sprites_CalcHorizSpriteMovement ; Sprites_Maybe_UpdateHitByMagic ;
[0375]Arg_DeltaX_Full:; [$0375] [0375].byte $00; [$0375] byte
; ; XREFS: ; CastMagic_UpdateTilte ; CastMagic_UpdateYPosition ; FUN_PRG14__83a8 ; SpriteBehavior_BounceAndExpire ; SpriteBehavior_BuzzAround ; SpriteBehavior_EnemyUnused43 ; SpriteBehavior_GiantBees ; SpriteBehavior_KingGrieve_MoveDown ; SpriteBehavior_MoveVertically ; SpriteBehavior_Naga ; SpriteBehavior_NecronAides ; SpriteBehavior_Ripasheiku ; SpriteBehavior_SomethingEyeball_17 ; SpriteBehavior_Unknown_29 ; Sprite_CalculateNewVertPos ; Sprites_CalcVerticalSpriteMovement ;
[0376]Arg_DeltaY_Frac:; [$0376] [0376].byte $00; [$0376] byte
; ; XREFS: ; CastMagic_UpdateTilte ; CastMagic_UpdateYPosition ; FUN_PRG14__83a8 ; SpriteBehavior_Bihoruda ; SpriteBehavior_BounceAndExpire ; SpriteBehavior_BuzzAround ; SpriteBehavior_EnemyUnused36 ; SpriteBehavior_EnemyUnused43 ; SpriteBehavior_ExecutionHood ; SpriteBehavior_GiantBees ; SpriteBehavior_KingGrieve_MoveDown ; SpriteBehavior_MoveVertically ; SpriteBehavior_Naga ; SpriteBehavior_NecronAides ; SpriteBehavior_Ripasheiku ; SpriteBehavior_SomethingEyeball_17 ; SpriteBehavior_Unknown_29 ; SpriteBehavior_Yuinaru ; Sprite_CalculateNewVertPos ; Sprites_CalcVerticalSpriteMovement ;
[0377]Arg_DeltaY_Full:; [$0377] [0377].byte $00; [$0377] byte
;============================================================================ ; Currently-active sprite ; ; XREFS: ; BScript_Action_RandomlyFlipXDirection ; BScript_Action_RandomlyFlipYDirection ; CastMagic_HitHandler_Deluge ; CastMagic_HitHandler_Fire ; CurrentSprite_CalculateVisibility ; CurrentSprite_CanMoveInDirection ; CurrentSprite_CheckHitPlayer ; CurrentSprite_HandleFall ; CurrentSprite_UpdateState ; FUN_PRG14__84f4 ; FUN_PRG14__9a61 ; LAB_PRG14__8043 [$PRG14::8043] ; MoveSpriteHorizIfPossible ; MoveSpriteVerticalIfPossible ; Player_AddExperienceFromSprite ; Player_CheckHandlePressUpOnNPC ; Player_CheckShieldHitByMagic ; Player_HandleHitByMagic ; Player_HandleShieldHitByMagic ; Player_HandleTouchBread ; Player_HandleTouchCoin ; Player_HandleTouchEnemyMagic ; Player_HandleTouchItem ; Player_HitSpriteWithWeapon ; SpriteBehavior_EnemyUnused18__9991 ; SpriteBehavior_FlashScreenHitPlayer ; SpriteBehavior_NecronAides ; SpriteBehavior_Pakukame ; SpriteBehavior_RestoreXRegister ; SpriteBehavior_Something_850d ; SpriteUpdateHandler_Effect_EnemyDeath ; SpriteUpdateHandler_Effect_LightningBall20 ; SpriteUpdateHandler_Enemy_Unused_SnakeRoundPart ; Sprite_CheckHitByCastMagic ; Sprite_HandleDeathDropIfPossible ; Sprites_HasAnyEnemyOnScreen ; Sprites_MoveRight__86c6 ; Sprites_SetBlockIsMovingResult ; Sprites_SetCurrentSpriteCanMove ; Sprites_UpdateAllStates ; Sprites_UpdateBehavior ; _afterFarJump [$PRG14::89ff] ; _updateSpriteLoop [$PRG14::8011] ; CastMagic_CalculateVisibility ; GameLoop_LoadSpriteImages ; Player_PickUpRedPotion ; Sprites_PopulateNextAvailableSprite ;============================================================================
; ; XREFS: ; BScript_Action_RandomlyFlipXDirection ; BScript_Action_RandomlyFlipYDirection ; CastMagic_HitHandler_Deluge ; CastMagic_HitHandler_Fire ; CurrentSprite_CalculateVisibility ; CurrentSprite_CanMoveInDirection ; CurrentSprite_CheckHitPlayer ; CurrentSprite_HandleFall ; CurrentSprite_UpdateState ; FUN_PRG14__84f4 ; FUN_PRG14__9a61 ; LAB_PRG14__8043 [$PRG14::8043] ; MoveSpriteHorizIfPossible ; MoveSpriteVerticalIfPossible ; Player_AddExperienceFromSprite ; Player_CheckHandlePressUpOnNPC ; Player_CheckShieldHitByMagic ; Player_HandleHitByMagic ; Player_HandleShieldHitByMagic ; Player_HandleTouchBread ; Player_HandleTouchCoin ; Player_HandleTouchEnemyMagic ; Player_HandleTouchItem ; Player_HitSpriteWithWeapon ; SpriteBehavior_EnemyUnused18__9991 ; SpriteBehavior_FlashScreenHitPlayer ; SpriteBehavior_NecronAides ; SpriteBehavior_Pakukame ; SpriteBehavior_RestoreXRegister ; SpriteBehavior_Something_850d ; SpriteUpdateHandler_Effect_EnemyDeath ; SpriteUpdateHandler_Effect_LightningBall20 ; SpriteUpdateHandler_Enemy_Unused_SnakeRoundPart ; Sprite_CheckHitByCastMagic ; Sprite_HandleDeathDropIfPossible ; Sprites_HasAnyEnemyOnScreen ; Sprites_MoveRight__86c6 ; Sprites_SetBlockIsMovingResult ; Sprites_SetCurrentSpriteCanMove ; Sprites_UpdateAllStates ; Sprites_UpdateBehavior ; _afterFarJump [$PRG14::89ff] ; _updateSpriteLoop [$PRG14::8011] ; CastMagic_CalculateVisibility ; GameLoop_LoadSpriteImages ; Player_PickUpRedPotion ; Sprites_PopulateNextAvailableSprite ;
[0378]CurrentSpriteIndex:; [$0378] [0378].byte $00; [$0378] byte
; ; XREFS: ; FUN_PRG14__9917 ; Maybe_BodyHandler__9a57 ; Maybe_BodyHandler__9a7a ; Maybe_SpriteBody__99f3 ; SpriteBehavior_EnemyUnused18__9991 ; SpriteUpdateHandler_Enemy_Unused_SnakeRoundPart ;
[0379]Sprite12BodyPartHandler:; [$0379] [0379].byte $00; [0]:
; ; XREFS: ; FUN_PRG14__9917 ; Maybe_SpriteBody__99f3 ; SpriteUpdateHandler_Enemy_Unused_SnakeRoundPart ;
[037a]Sprite12BodyPartHandler_1_:; [$037a] [037a].byte $00; [1]:
; ; XREFS: ; FUN_PRG14__9917 ; Maybe_SpriteBody__99f3 ; SpriteBehavior_EnemyUnused18__994a ; SpriteUpdateHandler_Enemy_Unused_SnakeRoundPart ;
[037b]Sprite12BodyPartHandler_2_:; [$037b] [037b].byte $00; [2]:
; ; XREFS: ; FUN_PRG14__9917 ; SpriteBehavior_EnemyUnused18__9991 ; SpriteUpdateHandler_Enemy_Unused_SnakeRoundPart ;
[037c]Sprite12BodyPartHandler_3_:; [$037c] [037c].byte $00; [3]:
; ; XREFS: ; FUN_PRG14__9917 ; SpriteUpdateHandler_Enemy_Unused_SnakeRoundPart ;
[037d]Sprite12BodyPartHandler_4_:; [$037d] [037d].byte $00; [4]:
; ; XREFS: ; FUN_PRG14__9917 ; FUN_PRG14__9ac6 ; SpriteBehavior_EnemyUnused18__994a ; SpriteUpdateHandler_Enemy_Unused_SnakeRoundPart ;
[037e]Sprite12BodyPartHandler_5_:; [$037e] [037e].byte $00; [5]:
; ; XREFS: ; Player_HitSpriteWithWeapon ; Sprites_IsSpriteOutOfWeaponRange ;
[037f]Something_Maybe_WeaponDistanceX:; [$037f] [037f].byte $00; [$037f] byte
; ; XREFS: ; Player_HitSpriteWithWeapon ; Sprites_IsSpriteOutOfWeaponRange ;
[0380]Something_Maybe_WeaponDistanceY:; [$0380] [0380].byte $00; [$0380] byte [0382].byte $00,$00; [$0382] undefined
; ; XREFS: ; FUN_PRG14__a2eb ; SpriteBehavior_KingGrieve_9f65 ; SpriteBehavior_NecronAides ; SpriteBehavior_Pakukame ; SpriteBehavior_Ripasheiku_CastMagicOrUpdatePos ; SpriteBehavior_SirGawaineWolfman ; SpriteBehavior_Unknown_29 ; SpriteUpdateHandler_Boss_Borabohra ; SpriteUpdateHandler_Boss_KingGrieve ; SpriteUpdateHandler_Boss_Ripasheiku ; SpriteUpdateHandler_Boss_Rokusutahn ; SpriteUpdateHandler_Boss_Zoradohna ; SpriteUpdateHandler_Boss_Zorugeriru ; SpriteUpdateHandler_Effect_EnemyDeath ; SpriteUpdateHandler_Effect_Fountain ; SpriteUpdateHandler_Effect_LightningBall20 ; SpriteUpdateHandler_EnemyMagic ; SpriteUpdateHandler_Enemy_Charron ; SpriteUpdateHandler_Enemy_ExecutionHood ; SpriteUpdateHandler_Enemy_FireGiant ; SpriteUpdateHandler_Enemy_Geributa ; SpriteUpdateHandler_Enemy_GiantBees ; SpriteUpdateHandler_Enemy_GiantStrider ; SpriteUpdateHandler_Enemy_Grimlock ; SpriteUpdateHandler_Enemy_Hornet ; SpriteUpdateHandler_Enemy_Ikeda ; SpriteUpdateHandler_Enemy_Ishiisu ; SpriteUpdateHandler_Enemy_Lamprey ; SpriteUpdateHandler_Enemy_Lilith ; SpriteUpdateHandler_Enemy_Magman ; SpriteUpdateHandler_Enemy_Maskman ; SpriteUpdateHandler_Enemy_MuppetGuy ; SpriteUpdateHandler_Enemy_Myconid ; SpriteUpdateHandler_Enemy_Naga ; SpriteUpdateHandler_Enemy_Nash ; SpriteUpdateHandler_Enemy_NecronAides ; SpriteUpdateHandler_Enemy_Raiden ; SpriteUpdateHandler_Enemy_Snowman ; SpriteUpdateHandler_Enemy_Sugata ; SpriteUpdateHandler_Enemy_Unused29 ; SpriteUpdateHandler_Enemy_Unused_CurlyTail ; SpriteUpdateHandler_Enemy_Unused_SnakeRoundPart ; SpriteUpdateHandler_Enemy_Unused_WingedSkeleton ; SpriteUpdateHandler_Enemy_Yareeka ; SpriteUpdateHandler_Enemy_Zombie ; SpriteUpdateHandler_Magic_81 ; SpriteUpdateHandler_NPC_ArmorSalesman ; SpriteUpdateHandler_NPC_King ; SpriteUpdateHandler_NPC_MagicTeacher ; SpriteUpdateHandler_NPC_MartialArts ; SpriteUpdateHandler_NPC_Priest ; SpriteUpdateHandler_NPC_Walking ; SpriteUpdateHandler_TODO_Garbled10 ; Sprites_UpdateAll ;
[0383]SpriteUpdateCounter:; [$0383] [0383].byte $00; [$0383] byte
; ; XREFS: ; FUN_PRG14__a1cc ; SpriteBehavior_KingGrieve_9f65 ; SpriteBehavior_Ripasheiku_CastMagicOrUpdatePos ; SpriteBehavior_ShadowEura__a077 ; SpriteBehavior_ShadowEura__a12d ; Sprite_CastMagic ;
[0384]CurrentSprite_Arg_CastMagicX:; [$0384] [0384].byte $00; [$0384] byte
; ; XREFS: ; FUN_PRG14__a1cc ; SpriteBehavior_KingGrieve_9f65 ; SpriteBehavior_Ripasheiku_CastMagicOrUpdatePos ; SpriteBehavior_ShadowEura__a077 ; SpriteBehavior_ShadowEura__a12d ; Sprite_CastMagic ;
[0385]CurrentSprite_Arg_CastMagicY:; [$0385] [0385].byte $00; [$0385] byte
;============================================================================ ; ROM bank where images of the current sprite can be found. ; ; This is set based on the table in ; SPRITE_IMAGE_BANKS. ; ; XREFS: ; CurrentSprite_LoadTilesInfo ; Sprites_LoadImageForCurrentSprite ; Sprites_StoreBankForCurrentSprite ;============================================================================
; ; XREFS: ; CurrentSprite_LoadTilesInfo ; Sprites_LoadImageForCurrentSprite ; Sprites_StoreBankForCurrentSprite ;
[0386]CurrentSprite_TilesBank:; [$0386] [0386].byte $00; [$0386] byte [0388].byte $00,$00; [$0388] undefined
;============================================================================ ; X coordinate of the sprite being processed. ; ; XREFS: ; Screen_LoadSpriteInfo ; Sprites_PopulateNextAvailableSprite ;============================================================================
; ; XREFS: ; Screen_LoadSpriteInfo ; Sprites_PopulateNextAvailableSprite ;
[0389]CurrentSprite_XPos:; [$0389] [0389].byte $00; [$0389] byte
;============================================================================ ; Y coordinate of the sprite being processed. ; ; XREFS: ; Screen_LoadSpriteInfo ; Sprites_PopulateNextAvailableSprite ;============================================================================
; ; XREFS: ; Screen_LoadSpriteInfo ; Sprites_PopulateNextAvailableSprite ;
[038a]CurrentSprite_YPos:; [$038a] [038a].byte $00; [$038a] byte
;============================================================================ ; Entity ID of the sprite being processed. ; ; XREFS: ; CurrentSprite_LoadTilesInfo ; GameLoop_LoadSpriteImages ; Screen_LoadSpriteInfo ; Sprites_PopulateNextAvailableSprite ; Sprites_StoreBankForCurrentSprite ;============================================================================
; ; XREFS: ; CurrentSprite_LoadTilesInfo ; GameLoop_LoadSpriteImages ; Screen_LoadSpriteInfo ; Sprites_PopulateNextAvailableSprite ; Sprites_StoreBankForCurrentSprite ;
[038b]CurrentSprite_Entity:; [$038b] [038b].byte $00; [$038b] SpriteEntity
;============================================================================ ; Numeric value of the sprite being processed. ; ; For items like coins and bread, this will contain the value ; to add to the player's gold and HP, respectively. ; ; For NPCs, this will be the IScript entrypoint index to ; activate upon interaction. ; ; XREFS: ; Player_CheckHandlePressUpOnNPC ; Player_HandleTouchNPC ;============================================================================
; ; XREFS: ; Player_CheckHandlePressUpOnNPC ; Player_HandleTouchNPC ;
[038c]CurrentSprite_Value:; [$038c] [038c].byte $00; [$038c] byte
;============================================================================ ; Index into HUD_ATTRIBUTE_DATA_BY_INDEX where the ; HUD palette can be found. ; ; XREFS: ; TextBox_GetBackgroundAttributeData ; Screen_LoadUIPalette ; UI_SetHUDPPUAttributes ;============================================================================
; ; XREFS: ; TextBox_GetBackgroundAttributeData ; Screen_LoadUIPalette ; UI_SetHUDPPUAttributes ;
[038d]UI_AttributeDataIndex:; [$038d] [038d].byte $00; [$038d] byte [038f].byte $00,$00; [$038f] undefined
;============================================================================ ; The player's experience as a 16-bit value. ; ; This is in Lower, Upper byte order. ; ; XREFS: ; Player_SetInitialExpAndGold ; Player_SetStartGameState ; Game_Start ; Player_CheckReachedNextTitle ; Player_UpdateExperience ; UI_DrawPlayerExperience ;============================================================================
; ; XREFS: ; Player_SetInitialExpAndGold ; Player_SetStartGameState ; Game_Start ; Player_CheckReachedNextTitle ; Player_UpdateExperience ; UI_DrawPlayerExperience ;
[0390]Experience:; [$0390] [0390].byte $00; [$0390] byte
;============================================================================ ; Upper byte of player's experience ; ; XREFS: ; Player_SetInitialExpAndGold ; Player_SetStartGameState ; Game_Start ; Player_CheckReachedNextTitle ; Player_UpdateExperience ; UI_DrawPlayerExperience ;============================================================================
; ; XREFS: ; Player_SetInitialExpAndGold ; Player_SetStartGameState ; Game_Start ; Player_CheckReachedNextTitle ; Player_UpdateExperience ; UI_DrawPlayerExperience ;
[0391]Experience_U:; [$0391] [0391].byte $00; [$0391] byte
;============================================================================ ; The player's gold as a 24-bit value. ; ; This is in Lower, Middle, Upper byte order. ; ; XREFS: ; IScriptAction_IfPlayerHasGold ; IScripts_CheckEnoughMoney ; Player_SetInitialExpAndGold ; Player_SetStartGameState ; Player_HandleTouchCoin ; Player_AddGold ; Player_SubtractGold ; UI_DrawGoldValue ;============================================================================
; ; XREFS: ; IScriptAction_IfPlayerHasGold ; IScripts_CheckEnoughMoney ; Player_SetInitialExpAndGold ; Player_SetStartGameState ; Player_HandleTouchCoin ; Player_AddGold ; Player_SubtractGold ; UI_DrawGoldValue ;
[0392]Gold:; [$0392] [0392].byte $00; [$0392] byte
;============================================================================ ; Middle byte of player's gold ; ; XREFS: ; IScriptAction_IfPlayerHasGold ; IScripts_CheckEnoughMoney ; Player_SetInitialExpAndGold ; Player_SetStartGameState ; Player_HandleTouchCoin ; Player_AddGold ; Player_SubtractGold ; UI_DrawGoldValue ;============================================================================
; ; XREFS: ; IScriptAction_IfPlayerHasGold ; IScripts_CheckEnoughMoney ; Player_SetInitialExpAndGold ; Player_SetStartGameState ; Player_HandleTouchCoin ; Player_AddGold ; Player_SubtractGold ; UI_DrawGoldValue ;
[0393]Gold_M:; [$0393] [0393].byte $00; [$0393] byte
;============================================================================ ; Upper byte of player's gold ; ; XREFS: ; IScriptAction_IfPlayerHasGold ; IScripts_CheckEnoughMoney ; Player_SetInitialExpAndGold ; Player_SetStartGameState ; Player_HandleTouchCoin ; Player_AddGold ; Player_SubtractGold ; UI_DrawGoldValue ;============================================================================
; ; XREFS: ; IScriptAction_IfPlayerHasGold ; IScripts_CheckEnoughMoney ; Player_SetInitialExpAndGold ; Player_SetStartGameState ; Player_HandleTouchCoin ; Player_AddGold ; Player_SubtractGold ; UI_DrawGoldValue ;
[0394]Gold_U:; [$0394] [0394].byte $00; [$0394] byte [0396].byte $00,$00,$00,$00; [$0396] undefined
;============================================================================ ; Temporary variable used when adding or showing player HP. ; ; XREFS: ; IScriptAction_AddHP ; UI_DrawPlayerHPValue ;============================================================================
; ; XREFS: ; IScriptAction_AddHP ; UI_DrawPlayerHPValue ;
[0399]Temp_AddedHPValue:; [$0399] [0399].byte $00; [$0399] byte
;============================================================================ ; The player's available MP. ; ; XREFS: ; IScriptAction_AddMP ; Game_Start ; Player_AddMP ; Player_FillHPAndMP ; Player_ReduceMP ; Player_SetMP ; Player_Spawn ; UI_DrawHUD ;============================================================================
; ; XREFS: ; IScriptAction_AddMP ; Game_Start ; Player_AddMP ; Player_FillHPAndMP ; Player_ReduceMP ; Player_SetMP ; Player_Spawn ; UI_DrawHUD ;
[039a]Player_MP:; [$039a] [039a].byte $00; [$039a] byte
; ; XREFS: ; Player_CheckShieldHitByMagic ; Player_DrawShield ;
[039b]Player_ShieldPositionX:; [$039b] [039b].byte $00; [$039b] byte
; ; XREFS: ; Player_CheckShieldHitByMagic ; Player_DrawShield ;
[039c]Player_ShieldPositionY:; [$039c] [039c].byte $00; [$039c] byte
;============================================================================ ; Inventory of the player's weapons. ; ; They can have up to 4 weapons in the inventory. ; ; XREFS: ; INVENTORY_CATEGORY_L [$PRG12::9b29] ; SpriteBehavior_DragonSlayerDroppedByKingGrieve ; Player_PickUpDragonSlayer ;============================================================================
; ; XREFS: ; INVENTORY_CATEGORY_L [$PRG12::9b29] ; SpriteBehavior_DragonSlayerDroppedByKingGrieve ; Player_PickUpDragonSlayer ;
[039d]WeaponInventory:; [$039d] [039d].byte $00; [0]: [039e].byte $00; [1]: [039f].byte $00; [2]:
; ; XREFS: ; Player_PickUpDragonSlayer ;
[03a0]WeaponInventory_3_:; [$03a0] [03a0].byte $00; [3]:
;============================================================================ ; Inventory of the player's armor. ; ; They can have up to 4 armors in the inventory. ; ; XREFS: ; INVENTORY_CATEGORY_L [$PRG12::9b2a] ; SpriteBehavior_BattleSuitDroppedByZoradohna ; Player_PickUpBattleSuit ;============================================================================
; ; XREFS: ; INVENTORY_CATEGORY_L [$PRG12::9b2a] ; SpriteBehavior_BattleSuitDroppedByZoradohna ; Player_PickUpBattleSuit ;
[03a1]ArmorInventory:; [$03a1] [03a1].byte $00; [0]: [03a2].byte $00; [1]: [03a3].byte $00; [2]:
; ; XREFS: ; Player_PickUpBattleSuit ;
[03a4]ArmorInventory_3_:; [$03a4] [03a4].byte $00; [3]:
;============================================================================ ; Inventory of the player's shields. ; ; They can have up to 4 shields in the inventory. ; ; XREFS: ; INVENTORY_CATEGORY_L [$PRG12::9b2b] ; SpriteBehavior_BattleHelmetDroppedByZoradohna ; Player_PickUpBattleHelmet ;============================================================================
; ; XREFS: ; INVENTORY_CATEGORY_L [$PRG12::9b2b] ; SpriteBehavior_BattleHelmetDroppedByZoradohna ; Player_PickUpBattleHelmet ;
[03a5]ShieldInventory:; [$03a5] [03a5].byte $00; [0]: [03a6].byte $00; [1]: [03a7].byte $00; [2]:
; ; XREFS: ; Player_PickUpBattleHelmet ;
[03a8]ShieldInventory_3_:; [$03a8] [03a8].byte $00; [3]:
;============================================================================ ; Inventory of the player's magic spells. ; ; They can have up to 5 magic spells in the inventory. ; ; XXX It seems there's only room for 4 though? Check on this. ; ; XREFS: ; INVENTORY_CATEGORY_L [$PRG12::9b2c] ;============================================================================
; ; XREFS: ; INVENTORY_CATEGORY_L [$PRG12::9b2c] ;
[03a9]MagicInventory:; [$03a9] [03a9].byte $00; [0]: [03aa].byte $00; [1]: [03ab].byte $00; [2]: [03ac].byte $00; [3]:
;============================================================================ ; Inventory of the player's items. ; ; XREFS: ; INVENTORY_CATEGORY_L [$PRG12::9b2d] ; Player_PickUpItem ;============================================================================
; ; XREFS: ; INVENTORY_CATEGORY_L [$PRG12::9b2d] ; Player_PickUpItem ;
[03ad]ItemInventory:; [$03ad] [03ad].byte $00; [0]: [0]: [03ae].byte $00; [0]: [1]: [03af].byte $00; [0]: [2]: [03b0].byte $00; [0]: [3]: [03b1].byte $00; [0]: [4]: [03b2].byte $00; [0]: [5]: [03b3].byte $00; [0]: [6]: [03b4].byte $00; [0]: [7]: [03b5].byte $00; [1]: [0]: [03b6].byte $00; [1]: [1]: [03b7].byte $00; [1]: [2]: [03b8].byte $00; [1]: [3]: [03b9].byte $00; [1]: [4]: [03ba].byte $00; [1]: [5]: [03bb].byte $00; [1]: [6]: [03bc].byte $00; [1]: [7]:
;============================================================================ ; The currently-selected weapon: ; ; 0 = Hand Dagger ; 1 = Long Sword ; 2 = Giant Blade ; 3 = Dragon Slayer ; ; XREFS: ; Password_EncodeGameState ; Password_Load ; PlayerMenu_HandleInventoryMenuInput ; PlayerMenu_ShowStatusMenu ; Player_Equip ; Player_LacksItem ; Player_SetStartGameState ; Shop_GetPlayerHasSelectedItem ; PlayerDeath_ResetSelectedItemState ; Game_ExitBuilding ; Player_HandleDeath ; Player_SetWeapon ;============================================================================
; ; XREFS: ; Password_EncodeGameState ; Password_Load ; PlayerMenu_HandleInventoryMenuInput ; PlayerMenu_ShowStatusMenu ; Player_Equip ; Player_LacksItem ; Player_SetStartGameState ; Shop_GetPlayerHasSelectedItem ; PlayerDeath_ResetSelectedItemState ; Game_ExitBuilding ; Player_HandleDeath ; Player_SetWeapon ;
[03bd]Inventories:; [$03bd] [03bd]SelectedWeapon: [03bd].byte $00; [$03bd] WeaponInventory
;============================================================================ ; The currently-selected armor: ; ; 0 = Leather Armor ; 1 = Studded Mail ; 2 = Full Plate ; 3 = Battle Suit ; ; XREFS: ; Password_EncodeGameState ; Password_Load ; Player_SetStartGameState ; PlayerDeath_ResetSelectedItemState ; Player_ApplyDamage ; SpriteBehavior_BattleSuitDroppedByZoradohna ; FUN_PRG15_MIRROR__ec58 ; Player_DrawBody ; Player_HandleDeath ; Player_LoadArmorTilesToPPU ; Player_SetArmor ;============================================================================
; ; XREFS: ; Password_EncodeGameState ; Password_Load ; Player_SetStartGameState ; PlayerDeath_ResetSelectedItemState ; Player_ApplyDamage ; SpriteBehavior_BattleSuitDroppedByZoradohna ; FUN_PRG15_MIRROR__ec58 ; Player_DrawBody ; Player_HandleDeath ; Player_LoadArmorTilesToPPU ; Player_SetArmor ;
[03be]SelectedArmor:; [$03be] [03be].byte $00; [$03be] ArmorInventory
;============================================================================ ; The currently-selected shield. ; ; 0 = Small Shield ; 1 = Large Shield ; 2 = Magic Shield ; 3 = Battle Helmet ; ; XREFS: ; Password_EncodeGameState ; Password_Load ; Player_SetStartGameState ; PlayerDeath_ResetSelectedItemState ; Player_CheckShieldHitByMagic ; Player_DrawShield ; Player_HandleHitByMagic ; SpriteBehavior_BattleHelmetDroppedByZoradohna ; FUN_PRG15_MIRROR__ec58 ; Player_DrawBody ; Player_HandleDeath ; Player_LoadArmorTilesToPPU ; Player_LoadShieldTilesToPPU ; Player_SetShield ;============================================================================
; ; XREFS: ; Password_EncodeGameState ; Password_Load ; Player_SetStartGameState ; PlayerDeath_ResetSelectedItemState ; Player_CheckShieldHitByMagic ; Player_DrawShield ; Player_HandleHitByMagic ; SpriteBehavior_BattleHelmetDroppedByZoradohna ; FUN_PRG15_MIRROR__ec58 ; Player_DrawBody ; Player_HandleDeath ; Player_LoadArmorTilesToPPU ; Player_LoadShieldTilesToPPU ; Player_SetShield ;
[03bf]SelectedShield:; [$03bf] [03bf].byte $00; [$03bf] ShieldInventory
;============================================================================ ; The currently-selected magic spell. ; ; 0x00 = Deluge ; 0x01 = Thunder ; 0x02 = Fire ; 0x03 = Death ; 0x04 = Tilte ; 0xFF = None ; ; XREFS: ; Password_EncodeGameState ; Password_Load ; Player_SetMagic ; Player_SetStartGameState ; PlayerDeath_ResetSelectedItemState ; Player_CastMagic ; Player_HandleDeath ; Player_ReduceMP ;============================================================================
; ; XREFS: ; Password_EncodeGameState ; Password_Load ; Player_SetMagic ; Player_SetStartGameState ; PlayerDeath_ResetSelectedItemState ; Player_CastMagic ; Player_HandleDeath ; Player_ReduceMP ;
[03c0]SelectedMagic:; [$03c0] [03c0].byte $00; [$03c0] SelectedMagic
;============================================================================ ; The currently-selected item: ; ; 0x00 = Ring of Elf ; 0x01 = Ring of Ruby ; 0x02 = Ring of Dworf ; 0x03 = Demons Ring ; 0x04 = Key A ; 0x05 = Key K ; 0x06 = Key Q ; 0x07 = Key J ; 0x08 = Key Jo ; 0x09 = Mattock ; 0x0A = Magical Rod ; 0x0B = Crystal ; 0x0C = Lamp ; 0x0D = Hour Glass ; 0x0E = Book ; 0x0F = Wing Boots ; 0x10 = Red Potion ; 0x11 = Poison ; 0x12 = Elixir ; 0x13 = Pendant ; 0x14 = Black Onyx ; 0x15 = Fire Crystal ; ; XREFS: ; Password_EncodeGameState ; Password_Load ; Player_SetStartGameState ; PlayerDeath_ResetSelectedItemState ; GameLoop_CheckUseCurrentItem ; Game_OpenDoorWithAKey ; Game_OpenDoorWithJKey ; Game_OpenDoorWithJoKey ; Game_OpenDoorWithKKey ; Game_OpenDoorWithQKey ; Game_UnlockDoorWithUsableItem ; Player_ClearSelectedItem ; Player_HandleDeath ; Player_SetItem ; UI_DrawSelectedItem ;============================================================================
; ; XREFS: ; Password_EncodeGameState ; Password_Load ; Player_SetStartGameState ; PlayerDeath_ResetSelectedItemState ; GameLoop_CheckUseCurrentItem ; Game_OpenDoorWithAKey ; Game_OpenDoorWithJKey ; Game_OpenDoorWithJoKey ; Game_OpenDoorWithKKey ; Game_OpenDoorWithQKey ; Game_UnlockDoorWithUsableItem ; Player_ClearSelectedItem ; Player_HandleDeath ; Player_SetItem ; UI_DrawSelectedItem ;
[03c1]SelectedItem:; [$03c1] [03c1].byte $00; [$03c1] ItemInventory
;============================================================================ ; Number of weapons in the player's inventory ; ; XREFS: ; IScriptAction_OpenShop ; IScriptAction_ShowSellMenu ; Password_EncodeGameState ; Password_Load ; PlayerMenu_ShowSubmenu ; Player_AddToInventory ; Player_LacksItem ; Player_RemoveItem ; Player_SetStartGameState ; Shop_GetPlayerHasSelectedItem ; Player_InitInventoryState ; SpriteBehavior_DragonSlayerDroppedByKingGrieve ; Player_PickUpBattleSuit ; Player_PickUpDragonSlayer ;============================================================================
; ; XREFS: ; IScriptAction_OpenShop ; IScriptAction_ShowSellMenu ; Password_EncodeGameState ; Password_Load ; PlayerMenu_ShowSubmenu ; Player_AddToInventory ; Player_LacksItem ; Player_RemoveItem ; Player_SetStartGameState ; Shop_GetPlayerHasSelectedItem ; Player_InitInventoryState ; SpriteBehavior_DragonSlayerDroppedByKingGrieve ; Player_PickUpBattleSuit ; Player_PickUpDragonSlayer ;
[03c2]AllInventories:; [$03c2] [03c2]NumberOfWeapons: [03c2].byte $00; [$03c2] byte
;============================================================================ ; Number of armors in the player's inventory ; ; XREFS: ; Password_EncodeGameState ; Password_Load ; Player_SetStartGameState ; Player_InitInventoryState ; SpriteBehavior_BattleSuitDroppedByZoradohna ; Player_PickUpBattleSuit ; Player_PickUpDragonSlayer ;============================================================================
; ; XREFS: ; Password_EncodeGameState ; Password_Load ; Player_SetStartGameState ; Player_InitInventoryState ; SpriteBehavior_BattleSuitDroppedByZoradohna ; Player_PickUpBattleSuit ; Player_PickUpDragonSlayer ;
[03c3]NumberOfArmors:; [$03c3] [03c3].byte $00; [$03c3] byte
;============================================================================ ; Number of shields in the player's inventory ; ; XREFS: ; Password_EncodeGameState ; Password_Load ; Player_SetStartGameState ; Player_InitInventoryState ; SpriteBehavior_BattleHelmetDroppedByZoradohna ; Player_PickUpBattleHelmet ;============================================================================
; ; XREFS: ; Password_EncodeGameState ; Password_Load ; Player_SetStartGameState ; Player_InitInventoryState ; SpriteBehavior_BattleHelmetDroppedByZoradohna ; Player_PickUpBattleHelmet ;
[03c4]NumberOfShields:; [$03c4] [03c4].byte $00; [$03c4] byte
;============================================================================ ; Number of magic spells in the player's inventory ; ; XREFS: ; Password_EncodeGameState ; Password_Load ; Player_SetStartGameState ; Player_InitInventoryState ;============================================================================
; ; XREFS: ; Password_EncodeGameState ; Password_Load ; Player_SetStartGameState ; Player_InitInventoryState ;
[03c5]NumberOfMagicSpells:; [$03c5] [03c5].byte $00; [$03c5] byte
;============================================================================ ; Number of items in the player's inventory ; ; XREFS: ; IScriptAction_ShowSellMenu ; Password_EncodeGameState ; Password_Load ; Player_SetStartGameState ; Player_InitInventoryState ; Player_PickUpItem ;============================================================================
; ; XREFS: ; IScriptAction_ShowSellMenu ; Password_EncodeGameState ; Password_Load ; Player_SetStartGameState ; Player_InitInventoryState ; Player_PickUpItem ;
[03c6]NumberOfItems:; [$03c6] [03c6].byte $00; [$03c6] byte
;============================================================================ ; The loaded portrait ID from an IScript. ; ; This will be 0xFF if unset. ; ; If set, the player won't be drawn, and instead portrait ; data will be loaded, displayed, and animated. ; ; XREFS: ; IScriptAction_ShowSellMenu ; CurrentSprite_UpdateState ; Player_DrawShield ; Player_DrawWeapon ; IScripts_ClearPortraitImage ; IScripts_DrawPortraitAnimationFrame ; IScripts_GetPortraitOffset ; IScripts_LoadPortraitTiles ; IScripts_LoadPortraitTilesAddress ; Player_DrawBody ; Screen_ClearSprites ;============================================================================
; ; XREFS: ; IScriptAction_ShowSellMenu ; CurrentSprite_UpdateState ; Player_DrawShield ; Player_DrawWeapon ; IScripts_ClearPortraitImage ; IScripts_DrawPortraitAnimationFrame ; IScripts_GetPortraitOffset ; IScripts_LoadPortraitTiles ; IScripts_LoadPortraitTilesAddress ; Player_DrawBody ; Screen_ClearSprites ;
[03c7]IScript_PortraitID:; [$03c7] [03c7].byte $00; [$03c7] byte
; ; XREFS: ; PlayerDeath_ResetSelectedItemState ; Player_DrawWeapon ; Player_GetNormalizedWeaponID ; Player_HitSpriteWithWeapon ; SpriteBehavior_DragonSlayerDroppedByKingGrieve ; Game_EnterBuilding ; Game_ExitBuilding ; Player_LoadWeaponTilesToPPU ; Player_SetWeapon ;
[03c8]Player_CurWeapon:; [$03c8] [03c8].byte $00; [$03c8] WeaponInventory
; ; XREFS: ; Area_HandleBreakableFloor ; Area_SetBlocks ; Area_SetBlocks_SetAttributes ; Area_SetBlocks_WriteBlockData12 ; Area_SetBlocks_WriteBlockData34 ; Player_UseMattock ;
[03c9]Arg_BlockAttributesIndex:; [$03c9] [03c9].byte $00; [$03c9] byte [03cb].byte $00,$00,$00,$00; [$03cb] undefined
; ; XREFS: ; SpriteBehavior_EnemyUnused18__9991 ; SpriteBehavior_EnemyUnused18_SomethingSetBlocks ;
[03ce]Something_UnusedSprite_BlockOffset:; [$03ce] [03ce].byte $00; [$03ce] byte
; ; XREFS: ; SpriteBehavior_EnemyUnused18__9991 ; SpriteBehavior_EnemyUnused18_SomethingSetBlocks ;
[03cf]Something_UnusedSprite_ScreenBufferOffset:; [$03cf] [03cf].byte $00; [$03cf] byte
; ; XREFS: ; Fog_OnTick ; Game_EnterBuilding ; Game_SpawnInTemple ; Player_HandleDeath ; Screen_NextTransitionState ; Screen_SetupNew ; UNUSED_WriteCurrentBackgroundPalette ;
[03d0]Screen_PaletteIndex:; [$03d0] [03d0].byte $00; [$03d0] Palette
; ; XREFS: ; Area_ScrollTo ; EndGame_MoveToKingsRoom ; Game_BeginExitBuilding ; Game_EnterAreaHandler ; Game_EnterBuilding ; Game_ExitBuilding ; Game_LoadCurrentArea ; Game_LoadFirstLevel ; Game_SpawnInTemple ; Player_CheckHandleEnterDoor ; Player_EnterDoorToInside ; ScreenEvents_HandleBoss ; _afterFarJump [$PRG15_MIRROR::c603] ;
[03d1]Areas_DefaultMusic:; [$03d1] [03d1].byte $00; [$03d1] Music
; ; XREFS: ; Game_BeginExitBuilding ; Game_SpawnInTemple ; Player_EnterDoorToInside ;
[03d2]Area_Music_Outside:; [$03d2] [03d2].byte $00; [$03d2] byte
;============================================================================ ; Palette index data. ; ; XREFS: ; IScripts_ClearPortraitImage ; IScripts_LoadPortraitTiles ;============================================================================
; ; The saved palette index, when temporarily switching to ; a new one. ; ; This is used in IScripts. ; ; ; XREFS: ; IScripts_ClearPortraitImage ; IScripts_LoadPortraitTiles ;
[03d3]Palette_SavedIndex:; [$03d3] [03d3].byte $00; [$03d3] byte
; ; The current palette index. ; ; This is set when loading a new palette, and used ; exclusively for the process of restoring palette state ; after showing portraits in IScripts. ; ; ; XREFS: ; IScripts_LoadPortraitTiles ; Screen_LoadSpritePalette ;
[03d4]Palette_SpritePaletteIndex:; [$03d4] [03d4].byte $00; [$03d4] byte
;============================================================================ ; Region and screen information. ; ; XREFS: ; Game_EnterBuilding ; Game_ExitBuilding ;============================================================================
; ; XREFS: ; Game_EnterBuilding ; Game_ExitBuilding ;
[03d5]Area_SavedArea:; [$03d5] [03d5].byte $00; [$03d5] byte
; ; XREFS: ; Game_EnterBuilding ; Game_ExitBuilding ;
[03d6]Area_SavedScreen:; [$03d6] [03d6].byte $00; [$03d6] byte
; ; XREFS: ; Game_EnterBuilding ; Game_ExitBuilding ;
[03d7]Screen_SavedPalette:; [$03d7] [03d7].byte $00; [$03d7] byte
; ; XREFS: ; Game_EnterBuilding ; Game_ExitBuilding ;
[03d8]Player_SavedPosXY:; [$03d8] [03d8].byte $00; [$03d8] byte
; ; XREFS: ; EndGame_MoveToKingsRoom ; Game_EnterBuilding ; Game_SpawnInTemple ; Player_EnterDoorToInside ;
[03d9]Building_TilesIndex:; [$03d9] [03d9].byte $00; [$03d9] byte
; ; XREFS: ; EndGame_MoveToKingsRoom ; Game_EnterBuilding ; Game_SpawnInTemple ; Player_EnterDoorToInside ;
[03da]Area_DestScreen:; [$03da] [03da].byte $00; [$03da] byte
; ; XREFS: ; Player_HandleDeath ; Screen_NextTransitionState ;
[03db]Screen_TransitionCounter:; [$03db] [03db].byte $00; [$03db] byte
; ; XREFS: ; Screen_NextTransitionState ;
[03dc]Screen_FadeOutCounter:; [$03dc] [03dc].byte $00; [$03dc] byte
; ; XREFS: ; Player_DrawDeathAnimation ; Player_HandleDeath ;
[03dd]Player_DeathAnimationPhase:; [$03dd] [03dd].byte $00; [$03dd] byte
; ; XREFS: ; Player_DrawDeathAnimation ; Player_HandleDeath ;
[03de]Player_DeathAnimationCounter:; [$03de] [03de].byte $00; [$03de] byte [03e0].byte $00,$00,$00; [$03e0] undefined
; ; XREFS: ; CurrentSprite_CheckHitPlayer ; Player_CheckShieldHitByMagic ;
[03e2]SpriteBox_Left:; [$03e2] [03e2].byte $00; [$03e2] byte
; ; XREFS: ; CurrentSprite_CheckHitPlayer ; Player_CheckShieldHitByMagic ;
[03e3]SpriteBox_Top:; [$03e3] [03e3].byte $00; [$03e3] byte
; ; XREFS: ; CurrentSprite_CheckHitPlayer ; Player_CheckShieldHitByMagic ;
[03e4]SpriteBox_Width:; [$03e4] [03e4].byte $00; [$03e4] byte
; ; XREFS: ; CurrentSprite_CheckHitPlayer ; Player_CheckShieldHitByMagic ;
[03e5]SpriteBox_Height:; [$03e5] [03e5].byte $00; [$03e5] byte
;============================================================================ ; IDs of blocks in the last column of screen to the left ; ; XREFS: ; Area_CanPlayerMoveLeft ; Area_LoadScrollDataRight ;============================================================================
; ; XREFS: ; Area_CanPlayerMoveLeft ; Area_LoadScrollDataRight ;
[03e6]LastColumnLeftScreen:; [$03e6] [03e6].byte $00; [0]:
; ; XREFS: ; Area_LoadScrollDataRight ;
[03e7]LastColumnLeftScreen_1_:; [$03e7] [03e7].byte $00; [1]: [03e8].byte $00; [2]: [03e9].byte $00; [3]: [03ea].byte $00; [4]: [03eb].byte $00; [5]: [03ec].byte $00; [6]: [03ed].byte $00; [7]: [03ee].byte $00; [8]: [03ef].byte $00; [9]: [03f0].byte $00; [10]: [03f1].byte $00; [11]: [03f2].byte $00; [12]: [03f3].byte $00; [13]: [03f4].byte $00; [14]: [03f5].byte $00; [15]:
;============================================================================ ; IDs of blocks in the first column of screen to the right ; ; XREFS: ; Area_CanMoveUp ; Area_LoadScrollDataRight ;============================================================================
; ; XREFS: ; Area_CanMoveUp ; Area_LoadScrollDataRight ;
[03f6]FirstColumnInRightScreen:; [$03f6] [03f6].byte $00; [0]:
; ; XREFS: ; Area_LoadScrollDataRight ;
[03f7]FirstColumnInRightScreen_1_:; [$03f7] [03f7].byte $00; [1]: [03f8].byte $00; [2]: [03f9].byte $00; [3]: [03fa].byte $00; [4]: [03fb].byte $00; [5]: [03fc].byte $00; [6]: [03fd].byte $00; [7]: [03fe].byte $00; [8]: [03ff].byte $00; [9]:
; ; XREFS: ; Game_Init ;
[0400]FirstColumnInRightScreen_10_:; [$0400] [0400].byte $00; [10]: [0401].byte $00; [11]: [0402].byte $00; [12]: [0403].byte $00; [13]: [0404].byte $00; [14]: [0405].byte $00; [15]:
;============================================================================ ; IDs of blocks in the last row of screen above ; ; XREFS: ; Area_CanPlayerMoveUp ; Area_LoadScrollDataRight ;============================================================================
; ; XREFS: ; Area_CanPlayerMoveUp ; Area_LoadScrollDataRight ;
[0406]LastRowAboveScreen:; [$0406] [0406].byte $00; [0]:
; ; XREFS: ; Area_LoadScrollDataRight ;
[0407]LastRowAboveScreen_1_:; [$0407] [0407].byte $00; [1]: [0408].byte $00; [2]: [0409].byte $00; [3]: [040a].byte $00; [4]: [040b].byte $00; [5]: [040c].byte $00; [6]: [040d].byte $00; [7]: [040e].byte $00; [8]: [040f].byte $00; [9]: [0410].byte $00; [10]: [0411].byte $00; [11]: [0412].byte $00; [12]: [0413].byte $00; [13]: [0414].byte $00; [14]: [0415].byte $00; [15]:
;============================================================================ ; IDs of blocks in the first row of screen below ; ; XREFS: ; Area_LoadScrollDataRight ; Player_CheckIfPassable ;============================================================================
; ; XREFS: ; Area_LoadScrollDataRight ; Player_CheckIfPassable ;
[0416]FirstRowBelowScreen:; [$0416] [0416].byte $00; [0]:
; ; XREFS: ; Area_LoadScrollDataRight ;
[0417]FirstRowBelowScreen_1_:; [$0417] [0417].byte $00; [1]: [0418].byte $00; [2]: [0419].byte $00; [3]: [041a].byte $00; [4]: [041b].byte $00; [5]: [041c].byte $00; [6]: [041d].byte $00; [7]: [041e].byte $00; [8]: [041f].byte $00; [9]: [0420].byte $00; [10]: [0421].byte $00; [11]: [0422].byte $00; [12]: [0423].byte $00; [13]: [0424].byte $00; [14]: [0425].byte $00; [15]:
;============================================================================ ; Flag indicating whether updates to sprites are paused. ; ; This prevents sprite movement or collision handling when ; set. ; ; XREFS: ; Sprites_UpdateAll ; Game_DrawScreenInFrozenState ;============================================================================
; ; XREFS: ; Sprites_UpdateAll ; Game_DrawScreenInFrozenState ;
[0426]Sprites_UpdatesPaused:; [$0426] [0426].byte $00; [$0426] bool
;============================================================================ ; Duration of the pointment ; ; XREFS: ; Player_HandleTouchEnemy ; Player_HandleTouchEnemyMagic ; SpriteBehavior_Ointment ; Game_ClearTimedItems ; Game_DecOintmentDuration ; LimitItemDurations ; Player_PickUpOintment ;============================================================================
; ; XREFS: ; Player_HandleTouchEnemy ; Player_HandleTouchEnemyMagic ; SpriteBehavior_Ointment ; Game_ClearTimedItems ; Game_DecOintmentDuration ; LimitItemDurations ; Player_PickUpOintment ;
[0427]DurationOintment:; [$0427] [0427].byte $00; [$0427] byte
;============================================================================ ; Duration of the gloves ; ; XREFS: ; Player_HitSpriteWithWeapon ; SpriteBehavior_Glove ; Game_ClearTimedItems ; Game_DecGloveDuration ; Player_PickUpGlove ;============================================================================
; ; XREFS: ; Player_HitSpriteWithWeapon ; SpriteBehavior_Glove ; Game_ClearTimedItems ; Game_DecGloveDuration ; Player_PickUpGlove ;
[0428]DurationGlove:; [$0428] [0428].byte $00; [$0428] byte
;============================================================================ ; Duration of the wing boots ; ; XREFS: ; Game_ClearTimedItems ; Game_DecWingBootsDuration ; Player_UseWingBoots ;============================================================================
; ; XREFS: ; Game_ClearTimedItems ; Game_DecWingBootsDuration ; Player_UseWingBoots ;
[0429]DurationWingBoots:; [$0429] [0429].byte $00; [$0429] byte
;============================================================================ ; Duration of the active hour glass ; ; XREFS: ; Sprites_UpdateAll ; Sprites_UpdateBehavior ; Game_ClearTimedItems ; Game_DecHourGlassDuration ; LimitItemDurations ; Player_UseHourGlass ;============================================================================
; ; XREFS: ; Sprites_UpdateAll ; Sprites_UpdateBehavior ; Game_ClearTimedItems ; Game_DecHourGlassDuration ; LimitItemDurations ; Player_UseHourGlass ;
[042a]DurationHourGlass:; [$042a] [042a].byte $00; [$042a] byte
;============================================================================ ; Key requirement for the current door ; ; XREFS: ; Game_RunDoorRequirementHandler ; Game_UnlockDoor ; Player_CheckHandleEnterDoor ; Player_EnterDoorToOutside ;============================================================================
; ; XREFS: ; Game_RunDoorRequirementHandler ; Game_UnlockDoor ; Player_CheckHandleEnterDoor ; Player_EnterDoorToOutside ;
[042b]CurrentDoor_KeyRequirement:; [$042b] [042b].byte $00; [$042b] byte
;============================================================================ ; 0x01 = Black Onyx ; 0x02 = Pendant ; 0x04 = Magical Rod ; 0x08 = Elixir ; 0x10 = Demons Ring ; 0x20 = Ring of Dworf ; 0x40 = Ring of Ruby ; 0x80 = Ring of Elf ; ; XREFS: ; Password_EncodeGameState ; Password_Load ; PlayerMenu_ShowStatusMenu ; Player_AddSpecialItem ; Player_LacksItem ; Player_RemoveItem ; Player_SetStartGameState ; Shop_GetPlayerHasSelectedItem ; Player_ApplyDamage ; Player_HitEnemyWithMagic ; Player_HitSpriteWithWeapon ; SpriteBehavior_BlackOnyxDropFromZoradohna ; SpriteBehavior_PendantDroppedFromRipasheiku ; SpriteBehavior_ShowMagicalRod ; Game_OpenDoorWithDemonsRing ; Game_OpenDoorWithRingOfDworf ; Game_OpenDoorWithRingOfElf ; Player_CheckPushingBlock ; Player_PickUpBlackOnyx ; Player_PickUpElixir ; Player_ReduceHP ; Player_UseElixir ;============================================================================
; ; XREFS: ; Password_EncodeGameState ; Password_Load ; PlayerMenu_ShowStatusMenu ; Player_AddSpecialItem ; Player_LacksItem ; Player_RemoveItem ; Player_SetStartGameState ; Shop_GetPlayerHasSelectedItem ; Player_ApplyDamage ; Player_HitEnemyWithMagic ; Player_HitSpriteWithWeapon ; SpriteBehavior_BlackOnyxDropFromZoradohna ; SpriteBehavior_PendantDroppedFromRipasheiku ; SpriteBehavior_ShowMagicalRod ; Game_OpenDoorWithDemonsRing ; Game_OpenDoorWithRingOfDworf ; Game_OpenDoorWithRingOfElf ; Player_CheckPushingBlock ; Player_PickUpBlackOnyx ; Player_PickUpElixir ; Player_ReduceHP ; Player_UseElixir ;
[042c]SpecialItems:; [$042c] [042c].byte $00; [$042c] SpecialItemsBits
;============================================================================ ; Special flags for objectives. ; ; 0x01 = Spring of Trunk has been completed (maybe?) ; 0x02 = Spring of Trunk quest has started (maybe?) ; 0x10 = Mattock collected ; 0x20 = Path to Mascon was opened ; ; XREFS: ; IScriptAction_IfQuestCompleted ; IScriptAction_SetQuestComplete ; Password_EncodeGameState ; Password_Load ; Player_SetStartGameState ; SpriteBehavior_Fountain ; SpriteBehavior_MattockDroppedFromRipasheiku ; SpriteBehavior_SpringOfFortress ; SpriteBehavior_SpringOfJoker ; SpriteBehavior_SpringOfSky ; SpriteBehavior_WingBootsDroppedByZorugeriru ; Game_DropLadderToMascon ; Game_OpenPathToMascon ; Player_CheckPushingBlock ; Player_PickUpMattockWithQuest ; Player_PickUpWingBootsWithQuest ; Player_Spawn ; ScreenEvents_HandlePathToMasconEvent ;============================================================================
; ; XREFS: ; IScriptAction_IfQuestCompleted ; IScriptAction_SetQuestComplete ; Password_EncodeGameState ; Password_Load ; Player_SetStartGameState ; SpriteBehavior_Fountain ; SpriteBehavior_MattockDroppedFromRipasheiku ; SpriteBehavior_SpringOfFortress ; SpriteBehavior_SpringOfJoker ; SpriteBehavior_SpringOfSky ; SpriteBehavior_WingBootsDroppedByZorugeriru ; Game_DropLadderToMascon ; Game_OpenPathToMascon ; Player_CheckPushingBlock ; Player_PickUpMattockWithQuest ; Player_PickUpWingBootsWithQuest ; Player_Spawn ; ScreenEvents_HandlePathToMasconEvent ;
[042d]Quests:; [$042d] [042d].byte $00; [$042d] Quests
;============================================================================ ; The loaded special event ID for the current screen. ; ; This controls which custom logic is run for a screen, ; and the state around that logic. ; ; Bits 0-2 define the handler in a lookup table (count of ; 0-2), but in theory could be extended for more handlers. ; ; Bit 7 is reserved for the handler's use. ; ; If 0xFF, this is unset. Handlers may set this after ; use. ; ; XREFS: ; Area_ScrollTo ; GameLoop_RunScreenEventHandlers ; ScreenEvents_HandleBoss ; ScreenEvents_HandlePathToMasconEvent ; Screen_LoadSpecialEventID ; Screen_SetNoSpecialEventID ; UNUSED_ClearScreenSpecialEventID ;============================================================================
; ; XREFS: ; Area_ScrollTo ; GameLoop_RunScreenEventHandlers ; ScreenEvents_HandleBoss ; ScreenEvents_HandlePathToMasconEvent ; Screen_LoadSpecialEventID ; Screen_SetNoSpecialEventID ; UNUSED_ClearScreenSpecialEventID ;
[042e]CurrentScreen_SpecialEventID:; [$042e] [042e].byte $00; [$042e] byte
; ; XREFS: ; Game_InitScreenAndMusic ; Game_InitStateForSpawn ; Game_MainLoop ;
[042f]Maybe_Game_Ready:; [$042f] [042f].byte $00; [$042f] bool
;============================================================================ ; The current phase of the screen fade-out. ; ; This is a value between 0 and 3 (inclusive) that indicates ; the phase when fading out the screen (used during screen ; transitions or death). This is used as a counter as an index ; into a palette delta table, ; FADE_OUT_DELTA_TABLE. ; ; XREFS: ; Player_HandleDeath ; Screen_FadeToBlack ; Screen_NextTransitionState ; Screen_SetFadeOutPalette ; UNUSED_Screen_ClearFadeOutStage ;============================================================================
; ; XREFS: ; Player_HandleDeath ; Screen_FadeToBlack ; Screen_NextTransitionState ; Screen_SetFadeOutPalette ; UNUSED_Screen_ClearFadeOutStage ;
[0430]Screen_FadeOutStage:; [$0430] [0430].byte $00; [$0430] byte
;============================================================================ ; Player's health (full) ; ; XREFS: ; Game_LoadFirstLevel ; Player_AddHP ; Player_FillHPAndMP ; Player_ReduceHP ; Player_Spawn ; Player_UseHourGlass ; Player_UseRedPotion ; UI_DrawPlayerHP ; UI_DrawPlayerHPValue ;============================================================================
; ; XREFS: ; Game_LoadFirstLevel ; Player_AddHP ; Player_FillHPAndMP ; Player_ReduceHP ; Player_Spawn ; Player_UseHourGlass ; Player_UseRedPotion ; UI_DrawPlayerHP ; UI_DrawPlayerHPValue ;
[0431]Player_HP_U:; [$0431] [0431].byte $00; [$0431] byte
;============================================================================ ; Player's health (fraction) ; ; XREFS: ; Player_ReduceHP ; Player_UseHourGlass ;============================================================================
; ; XREFS: ; Player_ReduceHP ; Player_UseHourGlass ;
[0432]Player_HP_L:; [$0432] [0432].byte $00; [$0432] byte [0434].byte $00,$00; [$0434] undefined
; ; XREFS: ; Debug_ChooseArea ; EndGame_MoveToKingsRoom ; FUN_PRG15_MIRROR__daf6 ; Game_DropLadderToMascon ; Game_InitStateForStartScreen ; Game_SetupAndLoadOutsideArea ; Game_SpawnInTemple ; Player_EnterDoorToOutside ;
[0435]Area_Region:; [$0435] [0435].byte $00; [$0435] AreasRegion
;============================================================================ ; Temporary storage for a sound ID. ; ; The sound ID to play (the A register) is stored here ; in PlaySound() while registers get pushed onto the ; stack. It's then loaded from here before calling ; PlaySoundInner(). ; ; This is not used outside of this. ; ; XREFS: ; Sound_PlayEffect ;============================================================================
; ; XREFS: ; Sound_PlayEffect ;
[0436]Temp_SoundIDToPlay:; [$0436] [0436].byte $00; [$0436] SoundID
;============================================================================ ; Player's current title ; ; XREFS: ; IScriptAction_CheckUpdatePlayerTitle ; IScriptAction_IfPlayerHasTitle ; Password_EncodeGameState ; Password_Load ; PlayerMenu_ShowStatusMenu ; Player_SetInitialExpAndGold ; Player_SetStartGameState ; Player_UpdateAcceleration ; Player_UseWingBoots ; TextBox_DisplayMessage ; TextBox_ShowMessage_ShowPlayerTitle ;============================================================================
; ; XREFS: ; IScriptAction_CheckUpdatePlayerTitle ; IScriptAction_IfPlayerHasTitle ; Password_EncodeGameState ; Password_Load ; PlayerMenu_ShowStatusMenu ; Player_SetInitialExpAndGold ; Player_SetStartGameState ; Player_UpdateAcceleration ; Player_UseWingBoots ; TextBox_DisplayMessage ; TextBox_ShowMessage_ShowPlayerTitle ;
[0437]PlayerTitle:; [$0437] [0437].byte $00; [$0437] byte
;============================================================================ ; 0x00 = Player is alive ; 0x01 = Player is dead ; ; XREFS: ; Game_InitStateForSpawn ; Game_MainLoop ; Player_HandleDeath ; Player_ReduceHP ;============================================================================
; ; XREFS: ; Game_InitStateForSpawn ; Game_MainLoop ; Player_HandleDeath ; Player_ReduceHP ;
[0438]PlayerIsDead:; [$0438] [0438].byte $00; [$0438] bool
;============================================================================ ; The temple in which the player will be spawned upon death. ; ; XREFS: ; IScriptAction_SetSpawnPoint ; Password_EncodeGameState ; Password_Load ; Player_SetStartGameState ; Game_SpawnInTemple ;============================================================================
; ; XREFS: ; IScriptAction_SetSpawnPoint ; Password_EncodeGameState ; Password_Load ; Player_SetStartGameState ; Game_SpawnInTemple ;
[0439]TempleSpawnPoint:; [$0439] [0439].byte $00; [$0439] Temple
;============================================================================ ; A rotating counter tracking a visits to certain screens. ; ; This is used for screens that only show an item once out ; of every 4 visits. It's incremented and then checked by ; Screen_Is3Of4Visits, which is called by some ; item BScripts, to determine whether to hide or show items. ; ; XREFS: ; Screen_Is3Of4Visits ;============================================================================
; ; XREFS: ; Screen_Is3Of4Visits ;
[043a]Screen_TrackedVisitCount:; [$043a] [043a].byte $00,$00; [$043a] undefined
;============================================================================ ; Block properties of the currently-active screen ; ; XREFS: ; Area_GetBlockProperty ; Area_LoadBlockProperties ;============================================================================
; ; XREFS: ; Area_GetBlockProperty ; Area_LoadBlockProperties ;
[043c]BlockProperties:; [$043c] [043c].byte $00; [0]:
; ; XREFS: ; Area_LoadBlockProperties ;
[043d]BlockProperties_1_:; [$043d] [043d].byte $00; [1]: [043e].byte $00; [2]: [043f].byte $00; [3]: [0440].byte $00; [4]: [0441].byte $00; [5]: [0442].byte $00; [6]: [0443].byte $00; [7]: [0444].byte $00; [8]: [0445].byte $00; [9]: [0446].byte $00; [10]: [0447].byte $00; [11]: [0448].byte $00; [12]: [0449].byte $00; [13]: [044a].byte $00; [14]: [044b].byte $00; [15]: [044c].byte $00; [16]: [044d].byte $00; [17]: [044e].byte $00; [18]: [044f].byte $00; [19]: [0450].byte $00; [20]: [0451].byte $00; [21]: [0452].byte $00; [22]: [0453].byte $00; [23]: [0454].byte $00; [24]: [0455].byte $00; [25]: [0456].byte $00; [26]: [0457].byte $00; [27]: [0458].byte $00; [28]: [0459].byte $00; [29]: [045a].byte $00; [30]: [045b].byte $00; [31]: [045c].byte $00; [32]: [045d].byte $00; [33]: [045e].byte $00; [34]: [045f].byte $00; [35]: [0460].byte $00; [36]: [0461].byte $00; [37]: [0462].byte $00; [38]: [0463].byte $00; [39]: [0464].byte $00; [40]: [0465].byte $00; [41]: [0466].byte $00; [42]: [0467].byte $00; [43]: [0468].byte $00; [44]: [0469].byte $00; [45]: [046a].byte $00; [46]: [046b].byte $00; [47]: [046c].byte $00; [48]: [046d].byte $00; [49]: [046e].byte $00; [50]: [046f].byte $00; [51]: [0470].byte $00; [52]: [0471].byte $00; [53]: [0472].byte $00; [54]: [0473].byte $00; [55]: [0474].byte $00; [56]: [0475].byte $00; [57]: [0476].byte $00; [58]: [0477].byte $00; [59]: [0478].byte $00; [60]: [0479].byte $00; [61]: [047a].byte $00; [62]: [047b].byte $00; [63]: [047c].byte $00; [64]: [047d].byte $00; [65]: [047e].byte $00; [66]: [047f].byte $00; [67]: [0480].byte $00; [68]: [0481].byte $00; [69]: [0482].byte $00; [70]: [0483].byte $00; [71]: [0484].byte $00; [72]: [0485].byte $00; [73]: [0486].byte $00; [74]: [0487].byte $00; [75]: [0488].byte $00; [76]: [0489].byte $00; [77]: [048a].byte $00; [78]: [048b].byte $00; [79]: [048c].byte $00; [80]: [048d].byte $00; [81]: [048e].byte $00; [82]: [048f].byte $00; [83]: [0490].byte $00; [84]: [0491].byte $00; [85]: [0492].byte $00; [86]: [0493].byte $00; [87]: [0494].byte $00; [88]: [0495].byte $00; [89]: [0496].byte $00; [90]: [0497].byte $00; [91]: [0498].byte $00; [92]: [0499].byte $00; [93]: [049a].byte $00; [94]: [049b].byte $00; [95]: [049c].byte $00; [96]: [049d].byte $00; [97]: [049e].byte $00; [98]: [049f].byte $00; [99]: [04a0].byte $00; [100]: [04a1].byte $00; [101]: [04a2].byte $00; [102]: [04a3].byte $00; [103]: [04a4].byte $00; [104]: [04a5].byte $00; [105]: [04a6].byte $00; [106]: [04a7].byte $00; [107]: [04a8].byte $00; [108]: [04a9].byte $00; [109]: [04aa].byte $00; [110]: [04ab].byte $00; [111]: [04ac].byte $00; [112]: [04ad].byte $00; [113]: [04ae].byte $00; [114]: [04af].byte $00; [115]: [04b0].byte $00; [116]: [04b1].byte $00; [117]: [04b2].byte $00; [118]: [04b3].byte $00; [119]: [04b4].byte $00; [120]: [04b5].byte $00; [121]: [04b6].byte $00; [122]: [04b7].byte $00; [123]: [04b8].byte $00; [124]: [04b9].byte $00; [125]: [04ba].byte $00; [126]: [04bb].byte $00; [127]:
; ; XREFS: ; Player_ApplyDamage ; Player_HandleHitByMagic ; SpriteBehavior_FlashScreenHitPlayer ; SpriteBehavior_Unknown_29_SomeSetup ; Player_ReduceHP ; Player_Something_ChangeHP ;
[04bc]Arg_PlayerHealthDelta_L:; [$04bc] [04bc].byte $00; [$04bc] byte
; ; XREFS: ; Player_ApplyDamage ; Player_HandleHitByMagic ; SpriteBehavior_FlashScreenHitPlayer ; SpriteBehavior_Unknown_29_SomeSetup ; Player_ReduceHP ; Player_Something_ChangeHP ;
[04bd]Arg_PlayerHealthDelta_U:; [$04bd] [04bd].byte $00; [$04bd] byte
; ; XREFS: ; SpriteBehavior_Unknown_29_SomeSetup ; Player_Something_ChangeHP ;
[04be]SpriteBehaviorUnknown20_SomethingXOrY:; [$04be] [04be].byte $00; [$04be] byte
; ; XREFS: ; SpriteBehavior_Unknown_29_SomeSetup ; Player_Something_ChangeHP ;
[04bf]BYTE_04bf:; [$04bf] [04bf].byte $00; [$04bf] byte
; ; XREFS: ; Player_Something_ChangeHP ;
[04c0]Temp1_SomethingChangedHP:; [$04c0] [04c0].byte $00; [$04c0] byte
; ; XREFS: ; Player_Something_ChangeHP ;
[04c1]Temp2_SomethingChangedHP:; [$04c1] [04c1].byte $00; [$04c1] byte
; ; XREFS: ; PasswordScreen_GetDPadBits ; PasswordScreen_Show ;
[04c2]Password_DPadBits:; [$04c2] [04c2].byte $00; [$04c2] ButtonBitmask
;============================================================================ ; A counter used to wait after holding down a direction before auto-repeating ; the cursor movement. ; ; See PasswordScreen_GetDPadBits for usage. ; ; XREFS: ; PasswordScreen_GetDPadBits ; PasswordScreen_Show ;============================================================================
; ; XREFS: ; PasswordScreen_GetDPadBits ; PasswordScreen_Show ;
[04c3]Password_CounterBeforeAutoRepeatMove:; [$04c3] [04c3].byte $00,$00,$00; [$04c3] byte
; ; XREFS: ; Password_EncodeValueList ;
[04c6]Password_TempY:; [$04c6] [04c6].byte $00; [$04c6] byte
; ; XREFS: ; Password_DecodeValueList ; Password_EncodeValueList ;
[04c7]Password_TempX:; [$04c7] [04c7].byte $00; [$04c7] byte
; ; XREFS: ; Password_DecodeValueList ; Password_EncodeValueList ;
[04c8]Password_TempA:; [$04c8] [04c8].byte $00; [$04c8] byte
; ; XREFS: ; Password_DecodeValue ; Password_EncodeValue ; Password_GenerateState ; Password_GenerateStateAndReset ; Password_Load ; Password_Maybe_CheckPasswordLength ;
[04c9]Password_ByteCounter:; [$04c9] [04c9].byte $00; [$04c9] byte
; ; XREFS: ; Password_DecodeValue ; Password_EncodeValue ; Password_GenerateState ; Password_GenerateStateAndReset ; Password_Load ; Password_Maybe_CheckPasswordLength ;
[04ca]Password_BitCounter:; [$04ca] [04ca].byte $00; [$04ca] byte
; ; XREFS: ; Password_GenerateState ; Password_GetNext6Bits ;
[04cb]Password_6BitCount:; [$04cb] [04cb].byte $00; [$04cb] byte
; ; XREFS: ; Password_EncodeValue ; Password_GenerateState ; Password_Maybe_CheckPasswordLength ;
[04cc]Password_Checksum:; [$04cc] [04cc].byte $00; [$04cc] byte
; ; XREFS: ; Password_DecodeValue ; Password_EncodeValue ; Password_GenerateState ;
[04cd]Password_EncodedState:; [$04cd] [04cd].byte $00; [0]:
; ; XREFS: ; Password_Maybe_CheckPasswordLength ;
[04ce]Password_EncodedState_1_:; [$04ce] [04ce].byte $00; [1]: [04cf].byte $00; [2]: [04d0].byte $00; [3]: [04d1].byte $00; [4]: [04d2].byte $00; [5]: [04d3].byte $00; [6]: [04d4].byte $00; [7]: [04d5].byte $00; [8]: [04d6].byte $00; [9]: [04d7].byte $00; [10]: [04d8].byte $00; [11]: [04d9].byte $00; [12]: [04da].byte $00; [13]: [04db].byte $00; [14]: [04dc].byte $00; [15]: [04dd].byte $00; [16]: [04de].byte $00; [17]: [04df].byte $00; [18]: [04e0].byte $00; [19]: [04e1].byte $00; [20]: [04e2].byte $00; [21]: [04e3].byte $00; [22]: [04e4].byte $00; [23]: [04e5].byte $00; [24]: [04e6].byte $00; [25]: [04e7].byte $00; [26]: [04e8].byte $00; [27]: [04e9].byte $00; [28]: [04ea].byte $00; [29]: [04eb].byte $00; [30]: [04ec].byte $00; [31]:
;============================================================================ ; Title the player will get in the next guru visit. ; ; XREFS: ; IScriptAction_CheckUpdatePlayerTitle ; PlayerMenu_ShowStatusMenu ; Player_SetInitialExpAndGold ; Player_SetStartGameState ; Player_CheckReachedNextTitle ;============================================================================
; ; XREFS: ; IScriptAction_CheckUpdatePlayerTitle ; PlayerMenu_ShowStatusMenu ; Player_SetInitialExpAndGold ; Player_SetStartGameState ; Player_CheckReachedNextTitle ;
[04ed]NextPlayerTitle:; [$04ed] [04ed].byte $00; [$04ed] byte
;============================================================================ ; Width of the HP/MP bar. ; ; This gets set when loading a screen, and is used to draw ; the screen width. ; ; It's possible that this was at one point meant to be ; updated based on progression or some other state. Pure ; speculation. ; ; XREFS: ; UI_DrawHUDSprites ; UI_DrawManaOrHPBar ;============================================================================
; ; XREFS: ; UI_DrawHUDSprites ; UI_DrawManaOrHPBar ;
[04ee]UI_MPAndHPBarWidth:; [$04ee] [04ee].byte $00; [$04ee] byte [04f0].byte $00,$00,$00,$00,$00,$00,$00,$00; [$04f0] undefined [04f7].byte $00,$00,$00,$00,$00,$00,$00,$00; [$04f7] undefined [04ff].byte $00; [$04ff] undefined
;============================================================================ ; Buffer of state to write to the PPU. ; ; Entries are in the order of: ; ; 1. Control + length byte ; ; Bit 7 controls whether to set PPUCTRL to ; VRAM_INC_ADD32_DOWN mode (if set). ; ; The rest controls how many bytes to write from the buffer (remaining ; bits). ; ; 2. Upper byte of PPUADDR to write. ; ; 3. Lower byte of PPUADDR to write. ; ; 4...N. Up to <length> bytes of PPUDATA to write. ; ; XREFS: ; Area_SetBlocks_SetAttributes ; Area_SetBlocks_WriteBlockData12 ; Area_SetBlocks_WriteBlockData34 ; DEADCODE_FUN_PRG15_MIRROR__c033 ; Fog_UpdateTiles ; Game_Init ; PPUBuffer_Draw ; PPUBuffer_DrawCommand_RemoveVerticalLines ; PPUBuffer_DrawCommand_RotateTilesRight1Pixel ; PPUBuffer_QueueCommandOrLength ; PPUBuffer_Set ; PPUBuffer_WritePalette ; Player_DrawDeathAnimation ; Sprites_LoadImageForCurrentSprite ;============================================================================
; ; XREFS: ; Area_SetBlocks_SetAttributes ; Area_SetBlocks_WriteBlockData12 ; Area_SetBlocks_WriteBlockData34 ; DEADCODE_FUN_PRG15_MIRROR__c033 ; Fog_UpdateTiles ; Game_Init ; PPUBuffer_Draw ; PPUBuffer_DrawCommand_RemoveVerticalLines ; PPUBuffer_DrawCommand_RotateTilesRight1Pixel ; PPUBuffer_QueueCommandOrLength ; PPUBuffer_Set ; PPUBuffer_WritePalette ; Player_DrawDeathAnimation ; Sprites_LoadImageForCurrentSprite ;
[0500]PPUBuffer:; [$0500] [0500].byte $00; [0]: [0501].byte $00; [1]: [0502].byte $00; [2]: [0503].byte $00; [3]:
; ; XREFS: ; UI_ClearSelectedItemPic ;
[0504]PPUBuffer_4_:; [$0504] [0504].byte $00; [4]:
; ; XREFS: ; UI_ClearSelectedItemPic ;
[0505]PPUBuffer_5_:; [$0505] [0505].byte $00; [5]: [0506].byte $00; [6]: [0507].byte $00; [7]:
; ; XREFS: ; IScripts_DrawPortraitTileToPPU ; Player_LoadWeaponTile ;
[0508]PPUBuffer_8_:; [$0508] [0508].byte $00; [8]:
; ; XREFS: ; IScripts_DrawPortraitTileToPPU ; Player_LoadWeaponTile ;
[0509]PPUBuffer_9_:; [$0509] [0509].byte $00; [9]: [050a].byte $00; [10]: [050b].byte $00; [11]: [050c].byte $00; [12]: [050d].byte $00; [13]: [050e].byte $00; [14]: [050f].byte $00; [15]: [0510].byte $00; [16]: [0511].byte $00; [17]: [0512].byte $00; [18]: [0513].byte $00; [19]: [0514].byte $00; [20]: [0515].byte $00; [21]: [0516].byte $00; [22]: [0517].byte $00; [23]: [0518].byte $00; [24]: [0519].byte $00; [25]: [051a].byte $00; [26]: [051b].byte $00; [27]: [051c].byte $00; [28]: [051d].byte $00; [29]: [051e].byte $00; [30]: [051f].byte $00; [31]: [0520].byte $00; [32]: [0521].byte $00; [33]: [0522].byte $00; [34]: [0523].byte $00; [35]: [0524].byte $00; [36]: [0525].byte $00; [37]: [0526].byte $00; [38]: [0527].byte $00; [39]: [0528].byte $00; [40]: [0529].byte $00; [41]: [052a].byte $00; [42]: [052b].byte $00; [43]: [052c].byte $00; [44]: [052d].byte $00; [45]: [052e].byte $00; [46]: [052f].byte $00; [47]: [0530].byte $00; [48]: [0531].byte $00; [49]: [0532].byte $00; [50]: [0533].byte $00; [51]: [0534].byte $00; [52]: [0535].byte $00; [53]: [0536].byte $00; [54]: [0537].byte $00; [55]: [0538].byte $00; [56]: [0539].byte $00; [57]: [053a].byte $00; [58]: [053b].byte $00; [59]: [053c].byte $00; [60]: [053d].byte $00; [61]: [053e].byte $00; [62]: [053f].byte $00; [63]: [0540].byte $00; [64]: [0541].byte $00; [65]: [0542].byte $00; [66]: [0543].byte $00; [67]: [0544].byte $00; [68]: [0545].byte $00; [69]: [0546].byte $00; [70]: [0547].byte $00; [71]: [0548].byte $00; [72]: [0549].byte $00; [73]: [054a].byte $00; [74]: [054b].byte $00; [75]: [054c].byte $00; [76]: [054d].byte $00; [77]: [054e].byte $00; [78]: [054f].byte $00; [79]: [0550].byte $00; [80]: [0551].byte $00; [81]: [0552].byte $00; [82]: [0553].byte $00; [83]: [0554].byte $00; [84]: [0555].byte $00; [85]: [0556].byte $00; [86]: [0557].byte $00; [87]: [0558].byte $00; [88]: [0559].byte $00; [89]: [055a].byte $00; [90]: [055b].byte $00; [91]: [055c].byte $00; [92]: [055d].byte $00; [93]: [055e].byte $00; [94]: [055f].byte $00; [95]: [0560].byte $00; [96]: [0561].byte $00; [97]: [0562].byte $00; [98]: [0563].byte $00; [99]: [0564].byte $00; [100]: [0565].byte $00; [101]: [0566].byte $00; [102]: [0567].byte $00; [103]: [0568].byte $00; [104]: [0569].byte $00; [105]: [056a].byte $00; [106]: [056b].byte $00; [107]: [056c].byte $00; [108]: [056d].byte $00; [109]: [056e].byte $00; [110]: [056f].byte $00; [111]: [0570].byte $00; [112]: [0571].byte $00; [113]: [0572].byte $00; [114]: [0573].byte $00; [115]: [0574].byte $00; [116]: [0575].byte $00; [117]: [0576].byte $00; [118]: [0577].byte $00; [119]: [0578].byte $00; [120]: [0579].byte $00; [121]: [057a].byte $00; [122]: [057b].byte $00; [123]: [057c].byte $00; [124]: [057d].byte $00; [125]: [057e].byte $00; [126]: [057f].byte $00; [127]: [0580].byte $00; [128]: [0581].byte $00; [129]: [0582].byte $00; [130]: [0583].byte $00; [131]: [0584].byte $00; [132]: [0585].byte $00; [133]: [0586].byte $00; [134]: [0587].byte $00; [135]: [0588].byte $00; [136]: [0589].byte $00; [137]: [058a].byte $00; [138]: [058b].byte $00; [139]: [058c].byte $00; [140]: [058d].byte $00; [141]: [058e].byte $00; [142]: [058f].byte $00; [143]: [0590].byte $00; [144]: [0591].byte $00; [145]: [0592].byte $00; [146]: [0593].byte $00; [147]: [0594].byte $00; [148]: [0595].byte $00; [149]: [0596].byte $00; [150]: [0597].byte $00; [151]: [0598].byte $00; [152]: [0599].byte $00; [153]: [059a].byte $00; [154]: [059b].byte $00; [155]: [059c].byte $00; [156]: [059d].byte $00; [157]: [059e].byte $00; [158]: [059f].byte $00; [159]: [05a0].byte $00; [160]: [05a1].byte $00; [161]: [05a2].byte $00; [162]: [05a3].byte $00; [163]: [05a4].byte $00; [164]: [05a5].byte $00; [165]: [05a6].byte $00; [166]: [05a7].byte $00; [167]: [05a8].byte $00; [168]: [05a9].byte $00; [169]: [05aa].byte $00; [170]: [05ab].byte $00; [171]: [05ac].byte $00; [172]: [05ad].byte $00; [173]: [05ae].byte $00; [174]: [05af].byte $00; [175]: [05b0].byte $00; [176]: [05b1].byte $00; [177]: [05b2].byte $00; [178]: [05b3].byte $00; [179]: [05b4].byte $00; [180]: [05b5].byte $00; [181]: [05b6].byte $00; [182]: [05b7].byte $00; [183]: [05b8].byte $00; [184]: [05b9].byte $00; [185]: [05ba].byte $00; [186]: [05bb].byte $00; [187]: [05bc].byte $00; [188]: [05bd].byte $00; [189]: [05be].byte $00; [190]: [05bf].byte $00; [191]: [05c0].byte $00; [192]: [05c1].byte $00; [193]: [05c2].byte $00; [194]: [05c3].byte $00; [195]: [05c4].byte $00; [196]: [05c5].byte $00; [197]: [05c6].byte $00; [198]: [05c7].byte $00; [199]: [05c8].byte $00; [200]: [05c9].byte $00; [201]: [05ca].byte $00; [202]: [05cb].byte $00; [203]: [05cc].byte $00; [204]: [05cd].byte $00; [205]: [05ce].byte $00; [206]: [05cf].byte $00; [207]: [05d0].byte $00; [208]: [05d1].byte $00; [209]: [05d2].byte $00; [210]: [05d3].byte $00; [211]: [05d4].byte $00; [212]: [05d5].byte $00; [213]: [05d6].byte $00; [214]: [05d7].byte $00; [215]: [05d8].byte $00; [216]: [05d9].byte $00; [217]: [05da].byte $00; [218]: [05db].byte $00; [219]: [05dc].byte $00; [220]: [05dd].byte $00; [221]: [05de].byte $00; [222]: [05df].byte $00; [223]: [05e0].byte $00; [224]: [05e1].byte $00; [225]: [05e2].byte $00; [226]: [05e3].byte $00; [227]: [05e4].byte $00; [228]: [05e5].byte $00; [229]: [05e6].byte $00; [230]: [05e7].byte $00; [231]: [05e8].byte $00; [232]: [05e9].byte $00; [233]: [05ea].byte $00; [234]: [05eb].byte $00; [235]: [05ec].byte $00; [236]: [05ed].byte $00; [237]: [05ee].byte $00; [238]: [05ef].byte $00; [239]: [05f0].byte $00; [240]: [05f1].byte $00; [241]: [05f2].byte $00; [242]: [05f3].byte $00; [243]: [05f4].byte $00; [244]: [05f5].byte $00; [245]: [05f6].byte $00; [246]: [05f7].byte $00; [247]: [05f8].byte $00; [248]: [05f9].byte $00; [249]: [05fa].byte $00; [250]: [05fb].byte $00; [251]: [05fc].byte $00; [252]: [05fd].byte $00; [253]: [05fe].byte $00; [254]: [05ff].byte $00; [255]:
;============================================================================ ; Uncompressed block data of the current screen. ; ; The screen data can be up to 256 bytes. ; ; This section is also used for other places of the game, ; such as the password screen management and intro/outro ; animatinos. ; ; XREFS: ; PasswordScreen_DrawAtCursorPosition ; PasswordScreen_HandleDeleteAtCursor ; PasswordScreen_HandleDeleteLastChar ; PasswordScreen_HandleInputChar ; Password_Maybe_CheckPasswordLength ; Area_HandleBreakableFloor ; Area_IsBlockImpassableOrLadder ; Area_LoadBlocks ; Area_LoadScrollDataRight ; Area_SetStateFromDoorDestination ; Area_StoreBlockIsAir ; Game_Init ; Game_OpenPathToMascon ; Player_CheckIfOnLadder ; Player_CheckOnBreakableBlock ; Player_CheckPushingBlock ; Player_UseMattock ; ScreenBuffer_Clear ; ScreenBuffer_IsBlockImpassable ; ScreenBuffer_LoadBlockProperty ; SpriteBehavior_EnemyUnused18_SomethingSetBlocks ; TextBox_GetBackingAttributeData ; Textbox_Maybe_GetAreaBehindTextbox ;============================================================================
; ; XREFS: ; PasswordScreen_DrawAtCursorPosition ; PasswordScreen_HandleDeleteAtCursor ; PasswordScreen_HandleDeleteLastChar ; PasswordScreen_HandleInputChar ; Password_Maybe_CheckPasswordLength ; Area_HandleBreakableFloor ; Area_IsBlockImpassableOrLadder ; Area_LoadBlocks ; Area_LoadScrollDataRight ; Area_SetStateFromDoorDestination ; Area_StoreBlockIsAir ; Game_Init ; Game_OpenPathToMascon ; Player_CheckIfOnLadder ; Player_CheckOnBreakableBlock ; Player_CheckPushingBlock ; Player_UseMattock ; ScreenBuffer_Clear ; ScreenBuffer_IsBlockImpassable ; ScreenBuffer_LoadBlockProperty ; SpriteBehavior_EnemyUnused18_SomethingSetBlocks ; TextBox_GetBackingAttributeData ; Textbox_Maybe_GetAreaBehindTextbox ;
[0600]Password_EnteredChars:; [$0600] [0600]ScreenBuffer: [0600].byte $00; [$0600] byte
; ; XREFS: ; PasswordScreen_HandleDeleteAtCursor ; Password_Maybe_CheckPasswordLength ; Area_LoadScrollDataRight ; ScreenBuffer_Clear ;
[0601]DAT_0601:; [$0601] [0601].byte $00; [$0601] undefined
; ; XREFS: ; Password_Maybe_CheckPasswordLength ;
[0602]DAT_0602:; [$0602] [0602].byte $00; [$0602] undefined
; ; XREFS: ; Password_Maybe_CheckPasswordLength ;
[0603]DAT_0603:; [$0603] [0603].byte $00; [$0603] undefined
; ; XREFS: ; Password_Maybe_CheckPasswordLength ;
[0604]DAT_0604:; [$0604] [0604].byte $00,$00,$00,$00,$00,$00,$00,$00; [$0604] undefined [060c].byte $00,$00,$00; [$060c] undefined
; ; XREFS: ; Area_LoadScrollDataRight ;
[060f]DAT_060f:; [$060f] [060f].byte $00; [$060f] undefined
; ; XREFS: ; Area_LoadScrollDataRight ;
[0610]DAT_0610:; [$0610] [0610].byte $00,$00,$00,$00,$00,$00,$00,$00; [$0610] undefined [0618].byte $00,$00,$00,$00,$00,$00; [$0618] undefined
; ; XREFS: ; PasswordScreen_Show ;
[061e]DAT_061e:; [$061e] [061e].byte $00; [$061e] undefined
; ; XREFS: ; PasswordScreen_Show ; Area_LoadScrollDataRight ;
[061f]DAT_061f:; [$061f] [061f].byte $00,$00,$00; [$061f] undefined
; ; XREFS: ; Game_DropLadderToMascon ;
[0622]DAT_0622:; [$0622] [0622].byte $00,$00,$00,$00,$00,$00,$00,$00; [$0622] undefined [062a].byte $00,$00,$00,$00,$00,$00,$00,$00; [$062a] undefined [0632].byte $00,$00,$00,$00,$00,$00,$00,$00; [$0632] undefined [063a].byte $00,$00,$00,$00,$00,$00,$00,$00; [$063a] undefined [0642].byte $00,$00,$00,$00,$00,$00,$00,$00; [$0642] undefined [064a].byte $00,$00,$00,$00,$00,$00,$00,$00; [$064a] undefined [0652].byte $00,$00,$00,$00,$00,$00,$00,$00; [$0652] undefined [065a].byte $00,$00,$00,$00,$00,$00,$00,$00; [$065a] undefined
;============================================================================ ; Password screen state. ; ; XREFS: ; PasswordScreen_DrawSelectionCursor ; PasswordScreen_IsCursorSpotInvalid ; PasswordScreen_SetCursorCol ; PasswordScreen_Show ; PasswordScreen_UpdateCursorMovedFromLastRow ; PasswordScreen_UpdateCursorMovedToLastRow ; Password_HandleDPadInput ;============================================================================
; ; The input cursor column in the password screen. ; ; ; XREFS: ; PasswordScreen_DrawSelectionCursor ; PasswordScreen_IsCursorSpotInvalid ; PasswordScreen_SetCursorCol ; PasswordScreen_Show ; PasswordScreen_UpdateCursorMovedFromLastRow ; PasswordScreen_UpdateCursorMovedToLastRow ; Password_HandleDPadInput ;
[0662]Password_CursorCol:; [$0662] [0662].byte $00; [$0662] byte
; ; The input cursor row in the password screen. ; ; ; XREFS: ; PasswordScreen_DrawSelectionCursor ; PasswordScreen_IsCursorSpotInvalid ; PasswordScreen_Show ; Password_HandleDPadInput ;
[0663]Password_CursorRow:; [$0663] [0663].byte $00; [$0663] byte
; ; The position of the selection cursor in the password field. ; ; ; XREFS: ; PasswordScreen_DrawAtCursorPosition ; PasswordScreen_HandleDeleteAtCursor ; PasswordScreen_HandleDeleteLastChar ; PasswordScreen_HandleInputChar ; PasswordScreen_HandleMoveCursorLeft ; PasswordScreen_HandleMoveCursorRight ; PasswordScreen_Show ; PasswordScreen_WriteCharTile ;
[0664]Password_FieldCursorPos:; [$0664] [0664].byte $00; [$0664] byte
; ; Maximum number of characters allowed for the password. ; ; ; XREFS: ; PasswordScreen_HandleInputChar ; PasswordScreen_HandleMoveCursorLeft ; PasswordScreen_HandleMoveCursorRight ; PasswordScreen_Show ;
[0665]Password_MaxChars:; [$0665] [0665].byte $00; [$0665] byte
; ; The number of password characters entered. ; ; ; XREFS: ; PasswordScreen_HandleDeleteAtCursor ; PasswordScreen_HandleDeleteLastChar ; PasswordScreen_HandleInputChar ; PasswordScreen_HandleMoveCursorLeft ; PasswordScreen_HandleMoveCursorRight ; PasswordScreen_Show ; PasswordScreen_WaitForInput ; Password_Maybe_CheckPasswordLength ;
[0666]Password_EnteredCharsLength:; [$0666] [0666].byte $00; [$0666] byte [0668].byte $00,$00,$00,$00,$00,$00,$00,$00; [$0668] undefined [066f].byte $00,$00,$00,$00,$00,$00,$00,$00; [$066f] undefined [0677].byte $00,$00,$00,$00,$00,$00,$00,$00; [$0677] undefined [067f].byte $00,$00,$00,$00,$00,$00,$00,$00; [$067f] undefined
; ; XREFS: ; StartScreen_CheckHandleInput ; StartScreen_Draw ; Game_ShowStartScreen ;
[0687]DAT_0687:; [$0687] [0687].byte $00; [$0687] undefined
; ; XREFS: ; SplashAnimation_FuncAA94 ; SplashAnimation_SomethingUpdateState ;
[0688]SplashAnimation_0688:; [$0688] [0688].byte $00; [$0688] undefined
; ; XREFS: ; SplashAnimation_A90F ; SplashAnimation_FuncAA94 ; SplashAnimation_UpdateOutro ;
[0689]SplashAnimation_0689:; [$0689] [0689].byte $00; [$0689] byte
; ; XREFS: ; SplashAnimation_A90F ; SplashAnimation_FuncAA94 ; SplashAnimation_UpdateOutro ;
[068a]SplashAnimation_068a:; [$068a] [068a].byte $00; [$068a] byte
; ; XREFS: ; SplashAnimation_FuncAA94 ;
[068b]DAT_068b:; [$068b] [068b].byte $00; [$068b] undefined
; ; XREFS: ; Maybe_SplashAnimation_InitIntroState ; Maybe_SplashAnimation_InitOutroState ; SplashAnimation_A90F ; SplashAnimation_Maybe_AnimPlayerStep ;
[068c]SplashAnimation_068c:; [$068c] [068c].byte $00; [$068c] undefined
;============================================================================ ; Counter indicating the player size scale in the intro animation. ; ; This goes from 0 to 4. The larger the number, the smaller ; the player. ; ; XREFS: ; Maybe_SplashAnimation_InitIntroState ; Maybe_SplashAnimation_InitOutroState ; SplashAnimation_A90F ; SplashAnimation_Maybe_AnimPlayerStep ; SplashAnimation_Maybe_CalcPlayerAnimSize ; SplashAnimation_Maybe_CalcPlayerAnimState ; SplashAnimation_RunIntro ;============================================================================
; ; XREFS: ; Maybe_SplashAnimation_InitIntroState ; Maybe_SplashAnimation_InitOutroState ; SplashAnimation_A90F ; SplashAnimation_Maybe_AnimPlayerStep ; SplashAnimation_Maybe_CalcPlayerAnimSize ; SplashAnimation_Maybe_CalcPlayerAnimState ; SplashAnimation_RunIntro ;
[068d]IntroAnimation_PlayerSizeCounter:; [$068d] [068d].byte $00; [$068d] byte
; ; XREFS: ; Maybe_SplashAnimation_InitIntroState ; Maybe_SplashAnimation_InitOutroState ; SplashAnimation_A90F ; SplashAnimation_Maybe_NextAnimState1 ;
[068e]SplashAnimation_068e:; [$068e] [068e].byte $00; [$068e] byte
; ; XREFS: ; Maybe_SplashAnimation_InitIntroState ; Maybe_SplashAnimation_InitOutroState ; SplashAnimation_A90F ; SplashAnimation_Maybe_NextAnimState2 ; SplashAnimation_RunOutro ;
[068f]SplashAnimation_068f:; [$068f] [068f].byte $00; [$068f] byte
; ; XREFS: ; Maybe_SplashAnimation_InitIntroState ; Maybe_SplashAnimation_InitOutroState ; SplashAnimation_Maybe_NextAnimState1 ;
[0690]SplashAnimation_0690:; [$0690] [0690].byte $00; [$0690] byte
; ; XREFS: ; Maybe_SplashAnimation_InitIntroState ; Maybe_SplashAnimation_InitOutroState ; SplashAnimation_Maybe_NextAnimState2 ;
[0691]SplashAnimation_0691:; [$0691] [0691].byte $00; [$0691] byte
; ; XREFS: ; Maybe_SplashAnimation_InitIntroState ; Maybe_SplashAnimation_InitOutroState ; SplashAnimation_Maybe_CalcPlayerAnimSize ; SplashAnimation_Maybe_CalcPlayerAnimState ; SplashAnimation_Maybe_NextAnimState1 ;
[0692]SplashAnimation_0692:; [$0692] [0692].byte $00; [$0692] byte
; ; XREFS: ; Maybe_SplashAnimation_InitIntroState ; Maybe_SplashAnimation_InitOutroState ; SplashAnimation_Maybe_CalcPlayerAnimSize ; SplashAnimation_Maybe_CalcPlayerAnimState ; SplashAnimation_Maybe_NextAnimState2 ;
[0693]SplashAnimation_0693:; [$0693] [0693].byte $00; [$0693] byte
; ; XREFS: ; LAB_PRG12__a9f8 [$PRG12::a9f8] ; SpashAnimation_SomethingOutro_a9a2 ;
[0694]SplashAnimation_0694:; [$0694] [0694].byte $00; [0]:
; ; XREFS: ; LAB_PRG12__a9f8 [$PRG12::a9f8] ; SpashAnimation_SomethingOutro_a9a2 ;
[0695]SplashAnimation_0695:; [$0695] [0695].byte $00; [1]:
; ; XREFS: ; SpashAnimation_SomethingOutro_a9a2 ;
[0696]SplashAnimation_0696:; [$0696] [0696].byte $00; [0]:
; ; XREFS: ; SpashAnimation_SomethingOutro_a9a2 ;
[0697]SplashAnimation_0697:; [$0697] [0697].byte $00; [1]:
; ; XREFS: ; SpashAnimation_SomethingOutro_a9a2 ; SpashAnimation_SomethingOutro_aa20 ;
[0698]SplashAnimation_0698:; [$0698] [0698].byte $00; [0]:
; ; XREFS: ; SpashAnimation_SomethingOutro_a9a2 ;
[0699]SplashAnimation_0698_1_:; [$0699] [0699].byte $00; [1]:
; ; XREFS: ; SpashAnimation_SomethingOutro_a9a2 ; SpashAnimation_SomethingOutro_aa46 ;
[069a]SplashAnimation_069a:; [$069a] [069a].byte $00; [0]:
; ; XREFS: ; SpashAnimation_SomethingOutro_a9a2 ;
[069b]SplashAnimation_069a_1_:; [$069b] [069b].byte $00; [1]:
; ; XREFS: ; SpashAnimation_SomethingOutro_a9a2 ; SpashAnimation_SomethingOutro_aa20 ;
[069c]SplashAnimation_069c:; [$069c] [069c].byte $00; [0]:
; ; XREFS: ; SpashAnimation_SomethingOutro_a9a2 ;
[069d]SplashAnimation_069c_1_:; [$069d] [069d].byte $00; [1]:
; ; XREFS: ; SpashAnimation_SomethingOutro_a9a2 ; SpashAnimation_SomethingOutro_aa46 ;
[069e]SplashAnimation_069e:; [$069e] [069e].byte $00; [0]:
; ; XREFS: ; SpashAnimation_SomethingOutro_a9a2 ;
[069f]SplashAnimation_069e_1_:; [$069f] [069f].byte $00; [1]:
; ; XREFS: ; SpashAnimation_SomethingOutro_a9a2 ; SpashAnimation_SomethingOutro_aa20 ;
[06a0]SplashAnimation_06a0:; [$06a0] [06a0].byte $00; [0]:
; ; XREFS: ; SpashAnimation_SomethingOutro_a9a2 ;
[06a1]SplashAnimation_06a0_1_:; [$06a1] [06a1].byte $00; [1]:
; ; XREFS: ; SpashAnimation_SomethingOutro_a9a2 ; SpashAnimation_SomethingOutro_aa46 ;
[06a2]SplashAnimation_06a2:; [$06a2] [06a2].byte $00; [0]:
; ; XREFS: ; SpashAnimation_SomethingOutro_a9a2 ;
[06a3]SplashAnimation_06a2_1_:; [$06a3] [06a3].byte $00; [1]:
; ; XREFS: ; SplashAnimation_Intro_SomethingA708 ; SplashAnimation_RunIntro ;
[06a4]SplashAnimation_PaletteStage:; [$06a4] [06a4].byte $00; [$06a4] byte
; ; XREFS: ; SplashAnimation_DrawScenery ;
[06a5]SplashAnimation_SceneIndex:; [$06a5] [06a5].byte $00; [$06a5] byte [06a7].byte $00,$00,$00,$00,$00,$00,$00,$00; [$06a7] undefined [06ae].byte $00,$00,$00,$00,$00,$00,$00,$00; [$06ae] undefined [06b6].byte $00,$00,$00,$00,$00,$00,$00,$00; [$06b6] undefined [06be].byte $00,$00; [$06be] undefined
; ; XREFS: ; Area_LoadScrollDataRight ;
[06c0]DAT_06c0:; [$06c0] [06c0].byte $00; [$06c0] undefined
; ; XREFS: ; Area_LoadScrollDataRight ;
[06c1]DAT_06c1:; [$06c1] [06c1].byte $00,$00,$00,$00,$00,$00,$00,$00; [$06c1] undefined [06c9].byte $00,$00,$00,$00,$00,$00,$00,$00; [$06c9] undefined [06d1].byte $00,$00,$00,$00,$00,$00,$00,$00; [$06d1] undefined [06d9].byte $00,$00,$00,$00,$00,$00,$00,$00; [$06d9] undefined [06e1].byte $00,$00,$00,$00,$00,$00,$00,$00; [$06e1] undefined [06e9].byte $00,$00,$00,$00,$00,$00,$00; [$06e9] undefined
; ; XREFS: ; Area_LoadBlocks ;
[06f0]DAT_06f0:; [$06f0] [06f0].byte $00; [$06f0] undefined
; ; XREFS: ; Area_LoadBlocks ;
[06f1]DAT_06f1:; [$06f1] [06f1].byte $00,$00,$00,$00,$00,$00,$00,$00; [$06f1] undefined [06f9].byte $00,$00,$00,$00,$00,$00,$00; [$06f9] undefined
; ; XREFS: ; SplashAnimation_FuncAA94 ; SplashAnimation_SomethingUpdateState ; Game_Init ; Sprite_Draw_FlippedHoriz ; Sprite_Draw_Standard ; Sprites_Reset ;
[0700]SPRITE0_Y:; [$0700] [0700]SPRITE_0_RANGE_1_START: [0700].byte $00; [$0700] byte
; ; XREFS: ; SplashAnimation_FuncAA94 ; Sprites_Reset ;
[0701]SPRITE0_TILE:; [$0701] [0701].byte $00; [$0701] byte
; ; XREFS: ; SplashAnimation_FuncAA94 ; Sprites_Reset ;
[0702]SPRITE0_ATTRS:; [$0702] [0702].byte $00; [$0702] byte
; ; XREFS: ; SplashAnimation_FuncAA94 ; Sprites_Reset ;
[0703]SPRITE0_X:; [$0703] [0703].byte $00; [$0703] byte
; ; XREFS: ; SplashAnimation_SomethingUpdateState ; Sprites_FlipRanges ; Sprites_Reset ;
[0704]SPRITE_1_RANGE_1_START:; [$0704] [0704].byte $00; [$0704] byte
; ; XREFS: ; Sprites_FlipRanges ;
[0705]BYTE_0705:; [$0705] [0705].byte $00,$00,$00; [$0705] byte
; ; XREFS: ; Sprites_Reset ;
[0708]BYTE_0708:; [$0708] [0708].byte $00,$00,$00,$00,$00,$00,$00,$00; [$0708] byte [0710].byte $00,$00,$00,$00,$00,$00,$00,$00; [$0710] byte [0718].byte $00,$00,$00,$00,$00,$00,$00,$00; [$0718] byte [0720].byte $00,$00,$00,$00,$00,$00,$00,$00; [$0720] byte [0728].byte $00,$00,$00,$00,$00,$00,$00,$00; [$0728] byte [0730].byte $00,$00,$00,$00,$00,$00,$00,$00; [$0730] byte [0738].byte $00,$00,$00,$00,$00,$00,$00,$00; [$0738] byte [0740].byte $00,$00,$00,$00,$00,$00,$00,$00; [$0740] byte [0748].byte $00,$00,$00,$00,$00,$00,$00,$00; [$0748] byte [0750].byte $00,$00,$00,$00,$00,$00,$00,$00; [$0750] byte [0758].byte $00,$00,$00,$00,$00,$00,$00,$00; [$0758] byte [0760].byte $00,$00,$00,$00,$00,$00,$00,$00; [$0760] byte [0768].byte $00,$00,$00,$00,$00,$00,$00,$00; [$0768] byte [0770].byte $00,$00,$00,$00,$00,$00,$00,$00; [$0770] byte [0778].byte $00,$00,$00,$00,$00,$00,$00,$00; [$0778] byte [0780]SPRITE_0_RANGE_2_START:; [$0780] [0780].byte $00,$00,$00,$00; [$0780] byte
; ; XREFS: ; Sprites_FlipRanges ;
[0784]SPRITE_1_RANGE_2_START:; [$0784] [0784].byte $00; [$0784] byte
; ; XREFS: ; Sprites_FlipRanges ;
[0785]BYTE_0785:; [$0785] [0785].byte $00,$00,$00,$00,$00,$00,$00,$00; [$0785] byte [078d].byte $00,$00,$00,$00,$00,$00,$00,$00; [$078d] byte [0795].byte $00,$00,$00,$00,$00,$00,$00,$00; [$0795] byte [079d].byte $00,$00,$00,$00,$00,$00,$00,$00; [$079d] byte [07a5].byte $00,$00,$00,$00,$00,$00,$00,$00; [$07a5] byte [07ad].byte $00,$00,$00,$00,$00,$00,$00,$00; [$07ad] byte [07b5].byte $00,$00,$00,$00,$00,$00,$00,$00; [$07b5] byte [07bd].byte $00,$00,$00,$00,$00,$00,$00,$00; [$07bd] byte [07c5].byte $00,$00,$00,$00,$00,$00,$00,$00; [$07c5] byte [07cd].byte $00,$00,$00,$00,$00,$00,$00,$00; [$07cd] byte [07d5].byte $00,$00,$00,$00,$00,$00,$00,$00; [$07d5] byte [07dd].byte $00,$00,$00,$00,$00,$00,$00,$00; [$07dd] byte [07e5].byte $00,$00,$00,$00,$00,$00,$00,$00; [$07e5] byte [07ed].byte $00,$00,$00,$00,$00,$00,$00,$00; [$07ed] byte [07f5].byte $00,$00,$00,$00,$00,$00,$00,$00; [$07f5] byte [07fd].byte $00,$00,$00; [$07fd] byte