diff --git a/LTTP_RND_GeneralBugfixes.asm b/LTTP_RND_GeneralBugfixes.asm index 32cb0b9..00d628e 100644 --- a/LTTP_RND_GeneralBugfixes.asm +++ b/LTTP_RND_GeneralBugfixes.asm @@ -137,7 +137,6 @@ incsrc goalitem.asm incsrc quickswap.asm incsrc endingsequence.asm incsrc cuccostorm.asm -incsrc compression.asm incsrc retro.asm incsrc controllerjank.asm incsrc boots.asm diff --git a/accessibility.asm b/accessibility.asm index 7f1484f..85df32e 100644 --- a/accessibility.asm +++ b/accessibility.asm @@ -43,7 +43,7 @@ WhitenLoopReal: LDA.l $7EC3F0 : JSL Filter_Majorly_Whiten_Color : STA.l $7EC5F0 LDA.l $7EC3F2 : JSL Filter_Majorly_Whiten_Color : STA.l $7EC5F2 LDA.l $7EC3F4 : JSL Filter_Majorly_Whiten_Color : STA.l $7EC5F4 - LDA.b $10 : CMP.w #$0007 : BNE + + LDA.b GameMode : CMP.w #$0007 : BNE + LDA.w $048E CMP.w #$003C : BEQ ++ CMP.w #$009D : BEQ ++ @@ -89,7 +89,7 @@ WhitenLoopDummy: LDA.l $7EC3F0 : JSL Filter_Majorly_Whiten_Color : LDA.l $7EC5F0 LDA.l $7EC3F2 : JSL Filter_Majorly_Whiten_Color : LDA.l $7EC5F2 LDA.l $7EC3F4 : JSL Filter_Majorly_Whiten_Color : LDA.l $7EC5F4 - LDA.b $10 : CMP.w #$0007 : BNE + ; only light invisifloor if we're in dungeon submodule + LDA.b GameMode : CMP.w #$0007 : BNE + ; only light invisifloor if we're in dungeon submodule LDA.w $048E CMP.w #$003C : BEQ ++ ; hookshot cave CMP.w #$009D : BEQ ++ ; gt right diff --git a/bookofmudora.asm b/bookofmudora.asm index 0c5954c..7cd0796 100644 --- a/bookofmudora.asm +++ b/bookofmudora.asm @@ -3,19 +3,19 @@ ;-------------------------------------------------------------------------------- LoadLibraryItemGFX: %GetPossiblyEncryptedItem(LibraryItem, SpriteItemValues) - STA.w $0E80, X ; Store item type + STA.w SpriteItemType, X ; Store item type JSL.l PrepDynamicTile RTL ;-------------------------------------------------------------------------------- DrawLibraryItemGFX: PHA - LDA.w $0E80, X ; Retrieve stored item type + LDA.w SpriteItemType, X ; Retrieve stored item type JSL.l DrawDynamicTile PLA RTL ;-------------------------------------------------------------------------------- SetLibraryItem: - LDY.w $0E80, X ; Retrieve stored item type + LDY.w SpriteItemType, X ; Retrieve stored item type JSL.l ItemSet_Library ; contains thing we wrote over RTL ;-------------------------------------------------------------------------------- diff --git a/boots.asm b/boots.asm index 6171334..3943a43 100644 --- a/boots.asm +++ b/boots.asm @@ -8,7 +8,7 @@ ModifyBoots: + : CMP.b #$02 : BNE + PLA : AND.l AbilityFlags : AND.b #$FB : RTL ; no boots + : LDA.l FakeBoots : CMP.b #$01 : BNE + - LDA.b $5B : BEQ ++ : LDA.b $59 : BNE + ; hover check + LDA.b LinkSlipping : BEQ ++ : LDA.b $59 : BNE + ; hover check ++ : PLA : AND.l AbilityFlags : ORA.b #$04 : RTL ; yes boots, not hovering + PLA @@ -44,7 +44,7 @@ BonkRockPile: LDA.l BootsEquipment : BNE + ; Check for Boots LDA.b #$00 : RTL + - LDA.w $02EF : AND.b #$70 ; things we wrote over + LDA.w TileActBE : AND.b #$70 ; things we wrote over RTL ;-------------------------------------------------------------------------------- GravestoneHook: @@ -60,17 +60,17 @@ JumpDownLedge: LDA.l BootsModifier : CMP.b #$01 : BEQ + LDA.l BootsEquipment : BNE + ; Check for Boots ; Disarm Waterwalk - LDA.b $5B : CMP.b #$01 : BNE + - STZ.b $5B + LDA.b LinkSlipping : CMP.b #$01 : BNE + + STZ.b LinkSlipping + - LDA.b $1B : BNE .done : LDA.b #$02 : STA.b $EE ; things we wrote over + LDA.b IndoorsFlag : BNE .done : LDA.b #$02 : STA.b LinkLayer ; things we wrote over .done RTL ;-------------------------------------------------------------------------------- BonkRecoil: LDA.l BootsModifier : CMP.b #$01 : BEQ + LDA.l BootsEquipment : BNE + ; Check for Boots - LDA.b #$16 : STA.b $29 : RTL + LDA.b #$16 : STA.b LinkRecoilZ : RTL + - LDA.b #$24 : STA.b $29 ; things we wrote over + LDA.b #$24 : STA.b LinkRecoilZ ; things we wrote over RTL diff --git a/bugfixes.asm b/bugfixes.asm index 7a6e912..26f18cc 100644 --- a/bugfixes.asm +++ b/bugfixes.asm @@ -22,7 +22,7 @@ RTL ;0 = Reset Music ;1 = Don't Reset Music MSMusicReset: - LDA.b $8A : CMP.b #$80 : BNE + + LDA.b OverworldIndex : CMP.b #$80 : BNE + LDA.b $23 + RTL @@ -46,9 +46,9 @@ RTL DecideIfBunnyByScreenIndex: ; If indoors we don't have a screen index. Return non-bunny to make mirror-based ; superbunny work - LDA.b $1B : BNE .done + LDA.b IndoorsFlag : BNE .done LDA.l MoonPearlEquipment : BNE .done - LDA.b $8A : AND.b #$40 : PHA + LDA.b OverworldIndex : AND.b #$40 : PHA LDA.l InvertedMode : BNE .inverted .normal PLA : EOR #$40 @@ -59,10 +59,10 @@ DecideIfBunnyByScreenIndex: RTL ;-------------------------------------------------------------------------------- FixBunnyOnExitToLightWorld: - LDA.w $02E0 : BEQ + + LDA.w BunnyFlag : BEQ + JSL.l DecideIfBunny : BEQ + - STZ.b $5D ; set player mode to Normal - STZ.w $02E0 : STZ.b $56 ; return player graphics to normal + STZ.b LinkState ; set player mode to Normal + STZ.w BunnyFlag : STZ.b BunnyFlagDP ; return player graphics to normal + RTS ;-------------------------------------------------------------------------------- @@ -80,10 +80,10 @@ FixAga2Bunny: ++ JSL DecideIfBunny : BNE + JSR MakeBunny - LDA.b #$04 : STA.w $012C ; play bunny music + LDA.b #$04 : STA.w MusicControlRequest ; play bunny music BRA .done + - LDA.b #$09 : STA.w $012C ; what we wrote over + LDA.b #$09 : STA.w MusicControlRequest ; what we wrote over .done RTL ;-------------------------------------------------------------------------------- @@ -91,8 +91,8 @@ RTL ;-------------------------------------------------------------------------------- MakeBunny: PHX : PHY - LDA.b #$17 : STA.b $5D ; set player mode to permabunny - LDA.b #$01 : STA.w $02E0 : STA.b $56 ; make player look like bunny + LDA.b #$17 : STA.b LinkState ; set player mode to permabunny + LDA.b #$01 : STA.w BunnyFlag : STA.b BunnyFlagDP ; make player look like bunny JSL LoadGearPalettes_bunny PLY : PLX RTS @@ -157,7 +157,7 @@ RTL ;-------------------------------------------------------------------------------- ; Fix Bunny Palette Map Bug LoadGearPalette_safe_for_bunny: -LDA.b $10 +LDA.b GameMode CMP.w #$030E : BEQ .new ; opening dungeon map CMP.w #$070E : BEQ .new ; opening overworld map .original @@ -184,15 +184,15 @@ RTL ; Fix pedestal pull overlay PedestalPullOverlayFix: LDA.b #$09 : STA.w $039F, X ; the thing we wrote over -LDA.b $1B : BNE + - LDA.b $8A : CMP.b #$80 : BNE + - LDA.b $8C : CMP.b #$97 +LDA.b IndoorsFlag : BNE + + LDA.b OverworldIndex : CMP.b #$80 : BNE + + LDA.b OverlayID : CMP.b #$97 + RTL ;-------------------------------------------------------------------------------- FixJingleGlitch: - LDA.b $11 + LDA.b GameSubMode BEQ .set_doors LDA.l AllowAccidentalMajorGlitch @@ -200,7 +200,7 @@ FixJingleGlitch: .set_doors LDA.b #$05 - STA.b $11 + STA.b GameSubMode .exit RTL @@ -216,3 +216,32 @@ SetOverworldTransitionFlags: STA.w $0ABF ; used by witch STA.w $021B ; used by race game RTL +;-------------------------------------------------------------------------------- +ParadoxCaveGfxFix: + ; Always upload line unless you're moving into paradox cave (0x0FF) from above (0x0EF) + LDA.b IndoorsFlag : BEQ .uploadLine + LDX.b RoomIndex : CPX.w #$00FF : BNE .uploadLine + LDX.b PreviousRoom : CPX.w #$00EF : BNE .uploadLine + + ;Ignore uploading four specific lines of tiles to VRAM + LDX.w $0118 + ; Line 1 + CPX.w #$1800 : BEQ .skipMostOfLine + ; Line 2 + CPX.w #$1A00 : BEQ .skipMostOfLine + ; Line 3 + CPX.w #$1C00 : BEQ .uploadLine + ; Line 4 + CPX.w #$1E00 : BEQ .uploadLine + +.uploadLine + LDA.b #$01 : STA.w MDMAEN + +.skipLine + RTL + +.skipMostOfLine + ; Set line length to 192 bytes (the first 6 8x8 tiles in the line) + LDX.w #$00C0 : STX.w DAS0L + BRA .uploadLine +;-------------------------------------------------------------------------------- diff --git a/catfish.asm b/catfish.asm index 9cb8a72..bedaded 100644 --- a/catfish.asm +++ b/catfish.asm @@ -6,7 +6,7 @@ LoadCatfishItemGFX: JML PrepDynamicTile ;-------------------------------------------------------------------------------- DrawThrownItem: - LDA.b $8A : CMP.b #$81 : BNE .catfish + LDA.b OverworldIndex : CMP.b #$81 : BNE .catfish .zora LDA.b #$01 : STA.l RedrawFlag LDA.l $1DE1C3 ; location randomizer writes zora item to @@ -18,7 +18,7 @@ DrawThrownItem: ;-------------------------------------------------------------------------------- MarkThrownItem: JSL Link_ReceiveItem ; thing we wrote over - LDA.b $8A : CMP.b #$81 : BNE .catfish + LDA.b OverworldIndex : CMP.b #$81 : BNE .catfish .zora JML ItemSet_ZoraKing .catfish diff --git a/compasses.asm b/compasses.asm index 7e5f1b7..56502b0 100644 --- a/compasses.asm +++ b/compasses.asm @@ -1,9 +1,9 @@ DrawDungeonCompassCounts: - LDX.b $1B : BNE + : RTL : + ; Skip if outdoors + LDX.b IndoorsFlag : BNE + : RTL : + ; Skip if outdoors ; extra hard safeties for getting dungeon ID to prevent crashes PHA - LDA.w $040C : AND.w #$00FE : TAX ; force dungeon ID to be multiple of 2 + LDA.w DungeonID : AND.w #$00FE : TAX ; force dungeon ID to be multiple of 2 PLA CPX.b #$1B : BCS .done ; Skip if not in a valid dungeon ID diff --git a/compression.asm b/compression.asm deleted file mode 100644 index 32831d4..0000000 --- a/compression.asm +++ /dev/null @@ -1,29 +0,0 @@ -;-------------------------------------------------------------------------------- -ParadoxCaveGfxFix: - ; Always upload line unless you're moving into paradox cave (0x0FF) from above (0x0EF) - LDA.b $1B : BEQ .uploadLine - LDX.b RoomIndex : CPX.w #$00FF : BNE .uploadLine - LDX.b $A2 : CPX.w #$00EF : BNE .uploadLine - - ;Ignore uploading four specific lines of tiles to VRAM - LDX.w $0118 - ; Line 1 - CPX.w #$1800 : BEQ .skipMostOfLine - ; Line 2 - CPX.w #$1A00 : BEQ .skipMostOfLine - ; Line 3 - CPX.w #$1C00 : BEQ .uploadLine - ; Line 4 - CPX.w #$1E00 : BEQ .uploadLine - -.uploadLine - LDA.b #$01 : STA.w MDMAEN - -.skipLine - RTL - -.skipMostOfLine - ; Set line length to 192 bytes (the first 6 8x8 tiles in the line) - LDX.w #$00C0 : STX.w DAS0L - BRA .uploadLine -;-------------------------------------------------------------------------------- diff --git a/cuccostorm.asm b/cuccostorm.asm index 8b89eac..d01f282 100644 --- a/cuccostorm.asm +++ b/cuccostorm.asm @@ -9,7 +9,7 @@ CuccoStorm: SEP #$30 ; set 8-bit accumulator index registers LDA.l CuccoStormer : BEQ + ; only if storm is on - LDA.b $10 : CMP.b #$09 : BNE + ; only if outdoors + LDA.b GameMode : CMP.b #$09 : BNE + ; only if outdoors LDA.l LoopFrames : AND.b #$7F : BNE + ; check every 128 frames - diff --git a/darkworldspawn.asm b/darkworldspawn.asm index be2bfc1..98339a8 100644 --- a/darkworldspawn.asm +++ b/darkworldspawn.asm @@ -27,8 +27,8 @@ SetDeathWorldChecked: LDA.l InvertedMode : BEQ + JMP SetDeathWorldChecked_Inverted + - LDA.b $1B : BEQ .outdoors - LDA.w $040C : CMP.b #$FF : BNE .dungeon + LDA.b IndoorsFlag : BEQ .outdoors + LDA.w DungeonID : CMP.b #$FF : BNE .dungeon LDA.b RoomIndex : ORA.b RoomIndex+1 : BNE ++ LDA.l GanonPyramidRespawn : BNE .pyramid ; if flag is set, force respawn at pyramid on death to ganon ++ @@ -63,8 +63,8 @@ DoWorldFix_Inverted: RTL ;-------------------------------------------------------------------------------- SetDeathWorldChecked_Inverted: - LDA.b $1B : BEQ .outdoors - LDA.w $040C : CMP.b #$FF : BNE .dungeon + LDA.b IndoorsFlag : BEQ .outdoors + LDA.w DungeonID : CMP.b #$FF : BNE .dungeon LDA.b RoomIndex : ORA.b RoomIndex+1 : BNE ++ LDA.l GanonPyramidRespawn : BNE .castle ; if flag is set, force respawn at pyramid on death to ganon ++ @@ -86,7 +86,7 @@ RTL ;-------------------------------------------------------------------------------- FakeWorldFix: LDA.l FixFakeWorld : BEQ + - LDA.b $8A : AND.b #$40 : STA.l CurrentWorld + LDA.b OverworldIndex : AND.b #$40 : STA.l CurrentWorld + RTL ;-------------------------------------------------------------------------------- diff --git a/dialog.asm b/dialog.asm index 3b910c8..f07f9f1 100644 --- a/dialog.asm +++ b/dialog.asm @@ -6,11 +6,11 @@ DialogOverride: LDA.l DialogBuffer, X ; use alternate buffer RTL .skip - LDA.l $7F1200, X + LDA.l DecompressionBuffer+$1200, X RTL ResetDialogPointer: - STZ.w $1CF0 : STZ.w $1CF1 ; reset decompression buffer + STZ.w TextID : STZ.w TextID+1 ; reset decompression buffer LDA.b #$00 : STA.l AltTextFlag ; zero out the alternate flag LDA.b #$1C : STA.w $1CE9 ; thing we wrote over RTL @@ -23,7 +23,7 @@ macro LoadDialogAddress(address) REP #$10 ; set 16-bit index registers PEI.b ($00) LDA.b Scrap02 : PHA - STZ.w $1CF0 : STZ.w $1CF1 ; reset decompression buffer + STZ.w TextID : STZ.w TextID+1 ; reset decompression buffer LDA.b #$01 : STA.l AltTextFlag ; set flag %CopyDialog(
) PLA : STA.b Scrap02 @@ -55,7 +55,7 @@ macro CopyDialogIndirect() endmacro ;-------------------------------------------------------------------------------- LoadDialogAddressIndirect: - STZ.w $1CF0 : STZ.w $1CF1 ; reset decompression buffer + STZ.w TextID : STZ.w TextID+1 ; reset decompression buffer LDA.b #$01 : STA.l AltTextFlag ; set flag %CopyDialogIndirect() RTL @@ -119,7 +119,6 @@ FreeDungeonItemNotice: LDA.w ScratchBufferV : AND.b #$F0 : CMP.b #$A0 : BNE + ; small key of... LDA.w ScratchBufferV : CMP.b #$AF : BNE ++ : JMP .skip : ++ %CopyDialog(Notice_SmallKeyOf) - PLA : AND.b #$0F : STA.w ScratchBufferV : LDA.b #$0F : !SUB.w ScratchBufferV : PHA LDA.b #$01 : STA.w ScratchBufferNV ; set up a flip for small keys BRA .dungeon + @@ -170,7 +169,7 @@ FreeDungeonItemNotice: + .done - STZ.w $1CF0 : STZ.w $1CF1 ; reset decompression buffer + STZ.w TextID : STZ.w TextID+1 ; reset decompression buffer LDA.b #$01 : STA.l AltTextFlag ; set alternate dialog flag STA.l TextBoxDefer @@ -211,7 +210,7 @@ DialogFairyThrow: ORA.l BottleContentsTwo : ORA.l BottleContentsThree : ORA.l BottleContentsFour : BNE .normal .noInventory - LDA.w $0D80, X : !ADD #$08 : STA.w $0D80, X + LDA.w SpriteUnknown, X : !ADD #$08 : STA.w SpriteUnknown, X LDA.b #$51 LDY.b #$01 RTL @@ -226,7 +225,7 @@ DialogGanon1: LDA.w #$018C BCC + LDA.w #$016D -+ STA.w $1CF0 ++ STA.w TextID SEP #$20 JSL.l Sprite_ShowMessageMinimal_Alt RTL @@ -262,18 +261,18 @@ DialogGanon2: + LDA.w #$016E ++ - STA.w $1CF0 + STA.w TextID SEP #$20 JSL.l Sprite_ShowMessageMinimal_Alt RTL ;-------------------------------------------------------------------------------- DialogEtherTablet: PHA - LDA.w $0202 : CMP.b #$0F : BEQ + ; Show normal text if book is not equipped + LDA.w ItemCursor : CMP.b #$0F : BEQ + ; Show normal text if book is not equipped - PLA : JML Sprite_ShowMessageUnconditional ; Wacky Hylian Text + - BIT $F4 : BVC - ; Show normal text if Y is not pressed + BIT.b Joy1A_New : BVC - ; Show normal text if Y is not pressed LDA.l AllowHammerTablets : BEQ ++ LDA.l HammerEquipment : BEQ .yesText : BRA .noText ++ @@ -291,11 +290,11 @@ RTL ;-------------------------------------------------------------------------------- DialogBombosTablet: PHA - LDA.w $0202 : CMP.b #$0F : BEQ + ; Show normal text if book is not equipped + LDA.w ItemCursor : CMP.b #$0F : BEQ + ; Show normal text if book is not equipped - PLA : JML Sprite_ShowMessageUnconditional ; Wacky Hylian Text + - BIT $F4 : BVC - ; Show normal text if Y is not pressed + BIT.b Joy1A_New : BVC - ; Show normal text if Y is not pressed LDA.l AllowHammerTablets : BEQ ++ LDA.l HammerEquipment : BEQ .yesText : BRA .noText ++ @@ -339,16 +338,16 @@ AgahnimAsksAboutPed: BNE .vanilla LDA.b #$8C ; message 018C for no ped - STA.w $1CF0 + STA.w TextID .vanilla JML $05FA8E ; Sprite_ShowMessageMinimal ;-------------------------------------------------------------------------------- Main_ShowTextMessage_Alt: ; Are we in text mode? If so then end the routine. - LDA.b $10 : CMP.b #$0E : BEQ .already_in_text_mode + LDA.b GameMode : CMP.b #$0E : BEQ .already_in_text_mode Sprite_ShowMessageMinimal_Alt: - STZ.b $11 + STZ.b GameSubMode PHX : PHY PEI.b (Scrap00) @@ -356,7 +355,7 @@ Sprite_ShowMessageMinimal_Alt: LDA.b #$1C : STA.b Scrap02 REP #$30 - LDA.w $1CF0 : ASL : TAX + LDA.w TextID : ASL : TAX LDA.l $7F71C0, X STA.b Scrap00 SEP #$30 @@ -376,13 +375,13 @@ Sprite_ShowMessageMinimal_Alt: STZ.w $1CD8 ; Initialize the step in the submodule ; Go to text display mode (as opposed to maps, etc) - LDA.b #$02 : STA.b $11 + LDA.b #$02 : STA.b GameSubMode ; Store the current module in the temporary location. - LDA.b $10 : STA.w $010C + LDA.b GameMode : STA.w GameModeCache ; Switch the main module ($10) to text mode. - LDA.b #$0E : STA.b $10 + LDA.b #$0E : STA.b GameMode .end PLA : STA.b Scrap02 PLA : STA.b Scrap01 @@ -398,15 +397,15 @@ CalculateSignIndex: ; And we do this in a way that will likely give the right value even ; with major glitches. - LDA.b $8A : ASL A : TAY ;what we wrote over + LDA.b OverworldIndex : ASL A : TAY ;what we wrote over LDA.w $0712 : BEQ .done ; If a small map, we can skip these calculations. - LDA.b $21 : AND.w #$0002 : ASL #2 : EOR $8A : AND.w #$0008 : BEQ + + LDA.b $21 : AND.w #$0002 : ASL #2 : EOR.b OverworldIndex : AND.w #$0008 : BEQ + TYA : !ADD.w #$0010 : TAY ;add 16 if we are in lower half of big screen. + - LDA.b $23 : AND.w #$0002 : LSR : EOR.b $8A : AND.w #$0001 : BEQ + + LDA.b $23 : AND.w #$0002 : LSR : EOR.b OverworldIndex : AND.w #$0001 : BEQ + TYA : INC #2 : TAY ;add 16 if we are in lower half of big screen. + ; ensure even if things go horribly wrong, we don't read the sign out of bounds and crash: @@ -420,26 +419,26 @@ RTL ;================================================================ Sprite_ShowSolicitedMessageIfPlayerFacing_Alt: { - STA.w $1CF0 - STY.w $1CF1 + STA.w TextID + STY.w TextID+1 JSL Sprite_CheckDamageToPlayerSameLayerLong : BCC .alpha JSL Sprite_CheckIfPlayerPreoccupied : BCS .alpha - LDA.b $F6 : BPL .alpha + LDA.b Joy1B_New : BPL .alpha LDA.w $0F10, X : BNE .alpha - LDA.b $4D : CMP.b #$02 : BEQ .alpha + LDA.b LinkJumping : CMP.b #$02 : BEQ .alpha JSL Sprite_DirectionToFacePlayerLong : PHX : TYX ; Make sure that the sprite is facing towards the player, otherwise ; talking can't happen. (What sprites actually use this???) - LDA.l $05E1A3, X : PLX : CMP.b $2F : BNE .not_facing_each_other + LDA.l $05E1A3, X : PLX : CMP.b LinkDirection : BNE .not_facing_each_other PHY - LDA.w $1CF0 - LDY.w $1CF1 + LDA.w TextID + LDY.w TextID+1 ; Check what room we're in so we know which npc we're talking to LDA.b RoomIndex @@ -483,15 +482,15 @@ Sprite_ShowSolicitedMessageIfPlayerFacing_PreserveMessage: JSL Sprite_CheckDamageToPlayerSameLayerLong : BCC .alpha JSL Sprite_CheckIfPlayerPreoccupied : BCS .alpha - LDA.b $F6 : BPL .alpha + LDA.b Joy1B_New : BPL .alpha LDA.w $0F10, X : BNE .alpha - LDA.b $4D : CMP.b #$02 : BEQ .alpha + LDA.b LinkJumping : CMP.b #$02 : BEQ .alpha JSL Sprite_DirectionToFacePlayerLong : PHX : TYX ; Make sure that the sprite is facing towards the player, otherwise ; talking can't happen. (What sprites actually use this???) - LDA.l $05E1A3, X : PLX : CMP.b $2F : BNE .not_facing_each_other + LDA.l $05E1A3, X : PLX : CMP.b LinkDirection : BNE .not_facing_each_other PLA : XBA : PLA diff --git a/dungeondrops.asm b/dungeondrops.asm index ad4d4a8..aaeb8f7 100644 --- a/dungeondrops.asm +++ b/dungeondrops.asm @@ -2,7 +2,7 @@ ; Dungeon & Boss Drop Fixes ;-------------------------------------------------------------------------------- DropSafeDungeon: - LDA.w $040C : CMP.b #$08 : BEQ + + LDA.w DungeonID : CMP.b #$08 : BEQ + LDA.l $01C6FC, X : JML Sprite_SpawnFallingItem + RTL diff --git a/dungeonmap.asm b/dungeonmap.asm index 76bc86c..43c7d73 100644 --- a/dungeonmap.asm +++ b/dungeonmap.asm @@ -9,7 +9,7 @@ DoDungeonMapBossIcon: .dungeonmap - LDX.w $040C + LDX.w DungeonID BMI .cave ; get dungeon boss room diff --git a/elder.asm b/elder.asm index 88b8653..3f5993e 100644 --- a/elder.asm +++ b/elder.asm @@ -1,6 +1,6 @@ NewElderCode: { -LDA.b $8A : CMP.b #$1B : BEQ .newCodeContinue +LDA.b OverworldIndex : CMP.b #$1B : BEQ .newCodeContinue ;Restore Jump we can keep the RTL so JML JML $05F0CD .newCodeContinue @@ -19,7 +19,7 @@ RTL LDA.b #$02 : STA.b Scrap06 : STZ.b Scrap07 ;Number of Tiles - LDA.w $0DC0, X : ASL #04 + LDA.w SpriteGFXControl, X : ASL #04 ADC.b #.animation_states : STA.b Scrap08 LDA.b #.animation_states>>8 : ADC.b #$00 : STA.b Scrap09 @@ -46,11 +46,11 @@ RTL LDA.l TurnInGoalItems : AND.w #$00FF : BNE + .despawn SEP #$20 - STZ.w $0DD0, X ; despawn self + STZ.w SpriteAITable, X ; despawn self RTS + SEP #$20 - LDA.b $11 + LDA.b GameSubMode BNE .done LDA.b #$96 LDY.b #$01 @@ -66,6 +66,6 @@ RTL .done SEP #$20 - LDA.b $1A : LSR #5 : AND.b #$01 : STA.w $0DC0, X + LDA.b FrameCounter : LSR #5 : AND.b #$01 : STA.w SpriteGFXControl, X RTS } diff --git a/entrances.asm b/entrances.asm index 5e1d9e9..32bc8c6 100644 --- a/entrances.asm +++ b/entrances.asm @@ -149,10 +149,10 @@ JML.l AllowStartFromExitReturn LDA.l $02D8D3, X : STA.b RoomIndex+1 ; Go to pre-overworld mode - LDA.b #$08 : STA.b $10 + LDA.b #$08 : STA.b GameMode - STZ.b $11 - STZ.b $B0 + STZ.b GameSubMode + STZ.b SubSubModule STZ.w $010A @@ -168,7 +168,7 @@ CheckHole: .nextHoleClassic LDA.b Scrap00 : CMP.l $1BB800, X BNE .wrongMap16Classic - LDA.w $040A : CMP.l $1BB826, X + LDA.b OverworldIndex : CMP.l $1BB826, X BEQ .matchedHoleClassic .wrongMap16Classic DEX #2 : BPL .nextHoleClassic @@ -177,7 +177,7 @@ CheckHole: .nextHoleExtra LDA.b Scrap00 : CMP.l ExtraHole_Map16, X BNE .wrongMap16Extra - LDA.w $040A : CMP.l ExtraHole_Area, X + LDA.b OverworldIndex : CMP.l ExtraHole_Area, X BEQ .matchedHoleExtra .wrongMap16Extra DEX #2 : BPL .nextHoleExtra @@ -194,8 +194,8 @@ JML Overworld_Hole_End PreventEnterOnBonk: STA.b Scrap00 ; part of what we wrote over LDA.l InvertedMode : AND.w #$00FF : BEQ .done - LDA.l $5D : AND.w #$00FF : CMP.w #$0014 : BNE .done ;in mirror mode? - LDA.b $8A : AND.w #$0040 : CMP.b $7B : BEQ .done ; Are we bonking, or doing the superbunny glitch? + LDA.b LinkState : AND.w #$00FF : CMP.w #$0014 : BNE .done ;in mirror mode? + LDA.b OverworldIndex : AND.w #$0040 : CMP.b $7B : BEQ .done ; Are we bonking, or doing the superbunny glitch? ; If in inverted, are in mirror mode, and are bonking then do not enter JML.l PreventEnterOnBonk_BRANCH_IX @@ -206,7 +206,7 @@ JML.l PreventEnterOnBonk_return ;-------------------------------------------------------------------------------- TurtleRockEntranceFix: LDA.l TurtleRockAutoOpenFix : BEQ .done - LDA.b $8A : CMP.b #$47 : BNE .done + LDA.b OverworldIndex : CMP.b #$47 : BNE .done ;If exiting to turtle rock ensure the entrance is open LDA.l OverworldEventDataWRAM+$47 : ORA.b #$20 : STA.l OverworldEventDataWRAM+$47 .done @@ -215,14 +215,14 @@ RTL AnimatedEntranceFix: ;when an entrance animation tries to start PHA LDA.l InvertedMode : BEQ + ;If we are in inverted mode - LDA.b $8A : AND.b #$40 : BNE + ;and in the light world + LDA.b OverworldIndex : AND.b #$40 : BNE + ;and in the light world PLA - STZ.w $04C6 ; skip it. + STZ.w OWEntranceCutscene ; skip it. LDA.b #$00 RTL + PLA - STA.w $02E4 ;what we wrote over - STA.w $0FC1 ;what we wrote over - STA.w $0710 ;what we wrote over + STA.w CutsceneFlag ;what we wrote over + STA.w FreezeSprites ;what we wrote over + STA.w SkipOAM ;what we wrote over RTL diff --git a/events.asm b/events.asm index 363524a..1ac3159 100644 --- a/events.asm +++ b/events.asm @@ -1,5 +1,5 @@ OnPrepFileSelect: - LDA.b $11 : CMP.b #$03 : BNE + + LDA.b GameSubMode : CMP.b #$03 : BNE + LDA.b #$06 : STA.b $14 ; thing we wrote over RTL + @@ -33,7 +33,7 @@ OnDungeonExit: JSL.l SQEGFix PLP : PLA - STA.w $040C : STZ.w $04AC ; thing we wrote over + STA.w DungeonID : STZ.w $04AC ; thing we wrote over PHA : PHP JSL.l HUD_RebuildLong @@ -84,15 +84,15 @@ OnFileCreation: ; Copy initial SRAM state from ROM to cart SRAM ; If the inital SRAM table is move these addresses must be changed PHB - LDA.w #$03D7 ; \ - LDX.w #$B000 ; | Copies from beginning of inital sram table up to file name - LDY.w #$0000 ; | (exclusively) - MVN SRAMBank, SRAMTableBank ; / - ; Skip file name and validity value - LDA.w #$010C ; \ - LDX.w #$B3E3 ; | Rando-Specific Assignments & Game Stats block - LDY.w #$03E3 ; | - MVN SRAMBank, SRAMTableBank ; / + LDA.w #$03D7 ; \ + LDX.w #$B000 ; | Copies from beginning of inital sram table up to file name + LDY.w #$0000 ; | (exclusively) + MVN !SRAMBank, !SRAMTableBank ; / + ; Skip file name and validity value + LDA.w #$010C ; \ + LDX.w #$B3E3 ; | Rando-Specific Assignments & Game Stats block + LDY.w #$03E3 ; | + MVN !SRAMBank, !SRAMTableBank ; / PLB ; resolve instant post-aga if standard @@ -104,7 +104,7 @@ OnFileCreation: REP #$20 ; Set validity value and do some cleanup. Jump to checksum. - LDA.w #$55AA : STA.l $7003E1 + LDA.w #$55AA : STA.l FileValiditySRAM STZ.b Scrap00 STZ.b Scrap01 LDX.b Scrap00 @@ -167,7 +167,6 @@ RTL OnLinkDamaged: JSL.l IncrementDamageTakenCounter_Arb JML.l OHKOTimer - ;-------------------------------------------------------------------------------- ;OnEnterWater: ; JSL.l UnequipCapeQuiet ; what we wrote over @@ -178,18 +177,17 @@ OnLinkDamagedFromPit: LDA.l AllowAccidentalMajorGlitch BEQ ++ --- LDA.b #$14 : STA.b $11 ; thing we wrote over +-- LDA.b #$14 : STA.b GameSubMode ; thing we wrote over RTL -++ LDA.b $10 : CMP.b #$12 : BNE -- +++ LDA.b GameMode : CMP.b #$12 : BNE -- - STZ.b $11 + STZ.b GameSubMode RTL ;-------------------------------------------------------------------------------- OnLinkDamagedFromPitOutdoors: JML.l OHKOTimer ; make sure this is last - ;-------------------------------------------------------------------------------- OnOWTransition: JSL.l FloodGateReset @@ -204,13 +202,11 @@ OnLoadDuckMap: LDA.l DuckMapFlag BNE + INC : STA.l DuckMapFlag - JSL OverworldMap_InitGfx : DEC $0200 - + JSL OverworldMap_InitGfx : DEC.w SubModuleInterface RTL + LDA.b #$00 : STA.l DuckMapFlag JML OverworldMap_DarkWorldTilemap - ;-------------------------------------------------------------------------------- PreItemGet: LDA.b #$01 : STA.l BusyItem ; mark item as busy @@ -224,16 +220,16 @@ PostItemAnimation: LDA.b #$00 : STA.l BusyItem ; mark item as finished LDA.l TextBoxDefer : BEQ + - STZ.w $1CF0 : STZ.w $1CF1 ; reset decompression buffer + STZ.w TextID : STZ.w TextID+1 ; reset decompression buffer JSL.l Main_ShowTextMessage_Alt LDA.b #$00 : STA.l TextBoxDefer + - LDA.w $02E9 : CMP.b #$01 : BNE + - LDA.b $2F : BEQ + + LDA.w ItemReceiptMethod : CMP.b #$01 : BNE + + LDA.b LinkDirection : BEQ + JSL.l IncrementChestTurnCounter + - STZ.w $02E9 : LDA.w $0C5E, X ; thing we wrote over to get here + STZ.w ItemReceiptMethod : LDA.w $0C5E, X ; thing we wrote over to get here RTL ;-------------------------------------------------------------------------------- diff --git a/failure.asm b/failure.asm index 8e31978..64f6f52 100644 --- a/failure.asm +++ b/failure.asm @@ -130,12 +130,12 @@ Crashed: LDA.w #$0C78>>1 STA.b VMADDL - LDA.l $10 + LDA.l GameMode AND.w #$00FF ORA.w #$0100 STA.b VMDATAL - LDA.l $11 + LDA.l GameSubMode AND.w #$00FF ORA.w #$0100 STA.b VMDATAL diff --git a/fairyfixes.asm b/fairyfixes.asm index 3d8e9e9..2043796 100644 --- a/fairyfixes.asm +++ b/fairyfixes.asm @@ -35,16 +35,16 @@ FairyPond_Init: LDA.l BottleContentsThree : CMP.b #$02 : BNE ++ : LDA.b #$1E : PHA : BRA .emptyBottle : ++ LDA.l BottleContentsFour : CMP.b #$02 : BNE ++ : LDA.b #$1F : PHA : BRA .emptyBottle : ++ .noInventory - LDA.b #$0A : STA.w $0D80, X + LDA.b #$0A : STA.w SpriteUnknown, X LDA.b #$51 LDY.b #$01 JSL.l Sprite_ShowMessageFromPlayerContact JMP .cleanup .emptyBottle - LDA.b #$02 : STA.w $0D80, X - STZ $2F - LDA.b #$01 : STA.w $02E4 + LDA.b #$02 : STA.w SpriteUnknown, X + STZ.b LinkDirection + LDA.b #$01 : STA.w CutsceneFlag PLA : STA.w $1CE8 .cleanup STZ.w $0EB0, X ; Clear the sprite's item-given variable @@ -60,26 +60,26 @@ HappinessPond_Check: LDA.b #$72 JSL Sprite_SpawnDynamically - LDA.w $0FD8 : STA.w $0D10, Y - LDA.w $0FD9 : STA.w $0D30, Y + LDA.w SpriteCoordCacheX : STA.w SpritePosXLow, Y + LDA.w SpriteCoordCacheX+1 : STA.w SpritePosXHigh, Y - LDA.w $0FDA : !SUB.b #$40 : STA.w $0D00, Y - LDA.w $0FDB : SBC.b #$00 : STA.w $0D20, Y + LDA.w SpriteCoordCacheY : !SUB.b #$40 : STA.w SpritePosYLow, Y + LDA.w SpriteCoordCacheY+1 : SBC.b #$00 : STA.w SpritePosYHigh, Y - LDA.b #$01 : STA.w $0DA0, Y + LDA.b #$01 : STA.w SpriteAuxTable, Y LDA.b #$BB JSL Sprite_SpawnDynamically - LDA.b #$08 : STA.w $0DD0, Y ; ensure we run prep for the shopkeeper + LDA.b #$08 : STA.w SpriteAITable, Y ; ensure we run prep for the shopkeeper - LDA.w $0FD8 : STA.w $0D10, Y - LDA.w $0FD9 : STA.w $0D30, Y + LDA.w SpriteCoordCacheX : STA.w SpritePosXLow, Y + LDA.w SpriteCoordCacheX+1 : STA.w SpritePosXHigh, Y - LDA.w $0FDA : !SUB.b #$20 : STA.w $0D00, Y - LDA.w $0FDB : SBC.b #$00 : STA.w $0D20, Y + LDA.w SpriteCoordCacheY : !SUB.b #$20 : STA.w SpritePosYLow, Y + LDA.w SpriteCoordCacheY+1 : SBC.b #$00 : STA.w SpritePosYHigh, Y - STZ.w $0DD0, X ; self terminate + STZ.w SpriteAITable, X ; self terminate PLP .done diff --git a/fastcredits.asm b/fastcredits.asm index 70be896..4d39a83 100644 --- a/fastcredits.asm +++ b/fastcredits.asm @@ -1,21 +1,21 @@ ;=================================================================================================== FastCreditsCutsceneTimer: - BIT.b $F2-1 : BVC .slow + BIT.b Joy1B_All-1 : BVC .slow LDA.w #$0001 : STA.b $50 - LDA.b $C8 + LDA.b ScrapBufferBD+$0B CLC ADC.w #$0004 AND.w #$FFFE - STA.b $C8 + STA.b ScrapBufferBD+$0B SEP #$20 RTL .slow - INC.b $C8 + INC.b ScrapBufferBD+$0B SEP #$20 RTL @@ -60,7 +60,7 @@ FastCreditsCutsceneScroll: BCC ++ ; scroll if carry not set LDA.w #$0000 -++ BIT.b $F2-1 : BVC .slow ; check for X held +++ BIT.b Joy1B_All-1 : BVC .slow ; check for X held AND.w #$FFFF ; get sign of A BPL .positive @@ -90,8 +90,8 @@ FastCreditsCutsceneScroll: FastCreditsCutsceneUnderworldX: JSR FastCreditsCutsceneScrollX CLC - ADC.b $E2 - STA.b $E2 + ADC.b BG2H + STA.b BG2H RTL @@ -99,15 +99,15 @@ FastCreditsCutsceneUnderworldX: FastCreditsCutsceneUnderworldY: JSR FastCreditsCutsceneScrollY CLC - ADC.b $E8 - STA.b $E8 + ADC.b BG2V + STA.b BG2V RTL FastTextScroll: - LDA.b $1A - BIT.b $F2-1 : BVC .slow + LDA.b FrameCounter + BIT.b Joy1B_All-1 : BVC .slow AND.w #$0000 RTL diff --git a/fileselect.asm b/fileselect.asm index 0387cc7..0eca417 100644 --- a/fileselect.asm +++ b/fileselect.asm @@ -82,42 +82,42 @@ JMP DrawItemGray DrawBottle: AND.w #$00FF : BNE + - LDX #FileSelectItems_empty_bottle + LDX.w #FileSelectItems_empty_bottle JMP DrawItemGray + : DEC #2 : BNE + - LDX #FileSelectItems_empty_bottle + LDX.w #FileSelectItems_empty_bottle JMP DrawItem + : DEC : BNE + - LDX #FileSelectItems_red_potion + LDX.w #FileSelectItems_red_potion JMP DrawItem + : DEC : BNE + - LDX #FileSelectItems_green_potion + LDX.w #FileSelectItems_green_potion JMP DrawItem + : DEC : BNE + - LDX #FileSelectItems_blue_potion + LDX.w #FileSelectItems_blue_potion JMP DrawItem + : DEC : BNE + - LDX #FileSelectItems_fairy_bottle + LDX.w #FileSelectItems_fairy_bottle JMP DrawItem + : DEC : BNE + - LDX #FileSelectItems_bee_bottle + LDX.w #FileSelectItems_bee_bottle JMP DrawItem + - LDX #FileSelectItems_good_bee_bottle + LDX.w #FileSelectItems_good_bee_bottle JMP DrawItem DrawPlayerFile: - LDA.b $1A : AND.w #$0001 : BNE .normal + LDA.b FrameCounter : AND.w #$0001 : BNE .normal JSR DrawPlayerFileShared - INC $0710 ; Suppress animated tile updates for this frame + INC.w SkipOAM ; Suppress animated tile updates for this frame ; re-enable Stripe Image format upload on this frame ; Value loaded must match what gets set by AltBufferTable LDA.w #$0161 : STA.w $1002 BRA .done .normal - STZ $0710 ; ensure core animated tile updates are not suppressed + STZ.w SkipOAM ; ensure core animated tile updates are not suppressed LDA.w #$FFFF : STA.w $1002 ; Suppress Stripe Image format upload on this frame .done LDA.w #$0004 : STA.b Scrap02 ; thing we wrote over @@ -642,7 +642,7 @@ AltBufferTable: LDA.w #$00FF : STA.w $1402 ; Draw Unlock option if applicable - LDA.b $10 : AND.w #$00FF : CMP.w #$0001 : BNE + + LDA.b GameMode : AND.w #$00FF : CMP.w #$0001 : BNE + LDA.l IsEncrypted : AND.w #$00FF : CMP.w #$0002 : BNE + PHP : SEP #$30 : PHX : PHY : JSL ValidatePassword : PLY : PLX : PLP AND.w #$00FF : BNE + @@ -754,7 +754,7 @@ RTL ;-------------------------------------------------------------------------------- SetFileSelectPalette: - LDA.b $10 : CMP.b #$04 : BNE + + LDA.b GameMode : CMP.b #$04 : BNE + ; load the vanilla file select screen BG3 palette for naming screen LDA.b #$01 : STA.w $0AB2 JSL.l Palette_Hud @@ -814,7 +814,7 @@ DrawPlayerFile_credits: RTL ;-------------------------------------------------------------------------------- FSCursorUp: - LDA.b $C8 : BNE + + LDA.b FileSelectPosition : BNE + LDA.b #$04 ; up from file becomes delete BRA .done + : CMP.b #$03 : BNE + @@ -828,11 +828,11 @@ FSCursorUp: + LDA.b #$00 ;otherwise up from delete is file .done - STA.b $C8 + STA.b FileSelectPosition RTL FSCursorDown: - LDA.b $C8 : BNE + + LDA.b FileSelectPosition : BNE + LDA.l IsEncrypted : CMP.b #$02 : BNE ++ LDA.l ValidKeyLoaded : BNE ++ LDA.b #$03 ; down from file is unlock for password protected seeds @@ -846,23 +846,23 @@ FSCursorDown: + LDA.b #$00 ; down from delete is file .done - STA.b $C8 + STA.b FileSelectPosition RTL ;-------------------------------------------------------------------------------- FSSelectFile: LDA.l IsEncrypted : CMP.b #$02 : BNE .normal - STZ $012E ; temporarily cancel file screen selection sound + STZ.w SFX2 ; temporarily cancel file screen selection sound PHX : PHY JSL ValidatePassword : BEQ .must_unlock PLY : PLX - LDA.b #$2C : STA.w $012E ;file screen selection sound + LDA.b #$2C : STA.w SFX2 ;file screen selection sound .normal - LDA.b #$F1 : STA.w $012C + LDA.b #$F1 : STA.w MusicControlRequest JML FSSelectFile_continue .must_unlock PLY : PLX - LDA.b #$03 : STA.b $C8 ;set cursor to unlock - LDA.b #$3C : STA.w $012E ; play error sound + LDA.b #$03 : STA.b FileSelectPosition ;set cursor to unlock + LDA.b #$3C : STA.w SFX2 ; play error sound JML FSSelectFile_return ;-------------------------------------------------------------------------------- MaybeForceFileName: diff --git a/flipperkill.asm b/flipperkill.asm index 3072056..1d0debf 100644 --- a/flipperkill.asm +++ b/flipperkill.asm @@ -38,7 +38,7 @@ protectff: ; Remove dark world bit ; in game table that converts coordinates to actual screen ID ; special case for other areas - LDA.b $8A + LDA.b OverworldIndex BMI .special_overworld AND.b #$3F @@ -47,17 +47,17 @@ protectff: .protect LDA.b #$15 - STA.b $5D + STA.b LinkState STZ.b $2E STZ.b $67 LDA.b #$02 - STA.b $2F + STA.b LinkDirection - STZ.w $0112 - STZ.w $02E4 - STZ.w $0FFC + STZ.w MedallionFlag + STZ.w CutsceneFlag + STZ.w NoMenu ++ RTL diff --git a/flute.asm b/flute.asm index 6684953..faf10e3 100644 --- a/flute.asm +++ b/flute.asm @@ -2,18 +2,18 @@ ; Randomize Flute Dig Item ;-------------------------------------------------------------------------------- SpawnHauntedGroveItem: - LDA.b $8A : CMP.b #$2A : BEQ + : RTL : + ; Skip if not the haunted grove - LDA.b $1B : BEQ + : RTL : + ; Skip if indoors + LDA.b OverworldIndex : CMP.b #$2A : BEQ + : RTL : + ; Skip if not the haunted grove + LDA.b IndoorsFlag : BEQ + : RTL : + ; Skip if indoors %GetPossiblyEncryptedItem(HauntedGroveItem, HeartPieceOutdoorValues) JSL.l PrepDynamicTile LDA.b #$EB - STA.l $7FFE00 + STA.l MiniGameTime JSL Sprite_SpawnDynamically LDX.b #$00 - LDA.b $2F : CMP.b #$04 : BEQ + : INX : + + LDA.b LinkDirection : CMP.b #$04 : BEQ + : INX : + LDA.l .x_speeds, X : STA.w $0D50, Y @@ -32,7 +32,7 @@ SpawnHauntedGroveItem: LDA.b #$00 : STA.w $0F20, Y TYX - LDX.b $8A ; haunted grove (208D0A) + LDX.b OverworldIndex ; haunted grove (208D0A) LDA.l OverworldEventDataWRAM, X : AND.b #$40 : BNE + LDA.b #$1B : JSL Sound_SetSfx3PanLong + @@ -52,11 +52,11 @@ RTL } ;-------------------------------------------------------------------------------- FluteBoy: - LDA.b $10 : CMP.b #$1A : BEQ + + LDA.b GameMode : CMP.b #$1A : BEQ + LDA.b #$01 : STA.w $0FDD JML.l FluteBoy_Abort + - LDA.w $0D80, X : CMP.b #$03 ; thing we wrote over + LDA.w SpriteUnknown, X : CMP.b #$03 ; thing we wrote over JML.l FluteBoy_Continue ;-------------------------------------------------------------------------------- FreeDuckCheck: @@ -64,7 +64,7 @@ FreeDuckCheck: LDA.l FluteEquipment : CMP.b #$03 : BEQ .done ; flute is already active ; check the area, is it #$18 = 30? - LDA.b $8A : CMP.b #$18 : BNE .done + LDA.b OverworldIndex : CMP.b #$18 : BNE .done REP #$20 @@ -84,7 +84,7 @@ FreeDuckCheck: SEP #$20 ; Apparently a special Overworld mode for doing this? - LDA.b #$2D : STA.b $11 + LDA.b #$2D : STA.b GameSubMode ; Trigger the sequence to start the weathervane explosion. LDY.b #$00 diff --git a/framehook.asm b/framehook.asm index 24434e6..129cd35 100644 --- a/framehook.asm +++ b/framehook.asm @@ -13,7 +13,7 @@ FrameHookAction: LDA.l LoopFrames : INC : STA.l LoopFrames : BNE + LDA.l LoopFrames+2 : INC : STA.l LoopFrames+2 + - LDA.l $10 : CMP.w #$010E : BNE + ; move this to nmi hook? + LDA.l GameMode : CMP.w #$010E : BNE + ; move this to nmi hook? LDA.l MenuFrames : INC : STA.l MenuFrames : BNE + LDA.l MenuFrames+2 : INC : STA.l MenuFrames+2 + diff --git a/glitched.asm b/glitched.asm index ce40b7e..cfbe597 100644 --- a/glitched.asm +++ b/glitched.asm @@ -70,10 +70,10 @@ GetAgahnimLightning: ;1 = Forbid AllowJoypadInput: LDA.l PermitSQFromBosses : BEQ .fullCheck - LDA.w $0403 : AND.b #$80 : BEQ .fullCheck - LDA.w $0112 : ORA.w $02E4 ; we have heart container, do short check + LDA.w ItemsTaken : AND.b #$80 : BEQ .fullCheck + LDA.w MedallionFlag : ORA.w CutsceneFlag ; we have heart container, do short check RTL .fullCheck - LDA.w $0112 : ORA.w $02E4 : ORA.w $0FFC + LDA.w MedallionFlag : ORA.w CutsceneFlag : ORA.w NoMenu RTL ;-------------------------------------------------------------------------------- diff --git a/goalitem.asm b/goalitem.asm index 1de1e88..2fca733 100644 --- a/goalitem.asm +++ b/goalitem.asm @@ -1,14 +1,14 @@ GoalItemGanonCheck: - LDA.w $0E20, X : CMP.b #$D6 : BNE .success ; skip if not ganon + LDA.w SpriteTypeTable, X : CMP.b #$D6 : BNE .success ; skip if not ganon JSL.l CheckGanonVulnerability BCS .success .fail - LDA.w $0D80, X : CMP.b #17 : !BLT .success ; decmial 17 because Acmlm's chart is decimal + LDA.w SpriteUnknown, X : CMP.b #17 : !BLT .success ; decmial 17 because Acmlm's chart is decimal LDA.b #$00 RTL .success - LDA.b $44 : CMP.b #$80 ; thing we wrote over + LDA.b OAMOffsetY : CMP.b #$80 ; thing we wrote over RTL ;-------------------------------------------------------------------------------- ;Carry clear = ganon invincible @@ -143,8 +143,8 @@ CheckAgaForPed: RTL .force_blue_ball - LDA.b #$01 : STA.w $0DA0, Y - LDA.b #$20 : STA.w $0DF0, Y + LDA.b #$01 : STA.w SpriteAuxTable, Y + LDA.b #$20 : STA.w SpriteTimer, Y CLC ; skip the RNG check RTL diff --git a/halfmagicbat.asm b/halfmagicbat.asm index 1de2b42..fca8950 100644 --- a/halfmagicbat.asm +++ b/halfmagicbat.asm @@ -6,7 +6,7 @@ GetMagicBatItem: %GetPossiblyEncryptedItem(MagicBatItem, SpriteItemValues) CMP.b #$FF : BEQ .normalLogic TAY - STZ.b $02E9 ; 0 = Receiving item from an NPC or message + STZ.b ItemReceiptMethod ; 0 = Receiving item from an NPC or message JML.l Link_ReceiveItem .normalLogic LDA.l HalfMagic diff --git a/hardmode.asm b/hardmode.asm index 49b35e3..fe04a02 100644 --- a/hardmode.asm +++ b/hardmode.asm @@ -16,7 +16,7 @@ CalculateSpikeFloorDamage: RTL ;-------------------------------------------------------------------------------- CalculateByrnaUsage: - LDA.b $1B : BEQ ++ + LDA.b IndoorsFlag : BEQ ++ REP #$20 ; set 16-bit accumulator LDA.b RoomIndex ; these are all decimal because i got them that way CMP.w #95 : BEQ + ; Ice Palace Spike Room @@ -36,7 +36,7 @@ CalculateByrnaUsage: JML IncrementMagicUseCounterByrna ;-------------------------------------------------------------------------------- CalculateCapeUsage: - LDA.b $1B : BEQ ++ + LDA.b IndoorsFlag : BEQ ++ REP #$20 ; set 16-bit accumulator LDA.b RoomIndex ; these are all decimal because i got them that way CMP.w #95 : BEQ + ; Ice Palace Spike Room @@ -54,7 +54,7 @@ CalculateCapeUsage: JML IncrementMagicUseCounterOne ;-------------------------------------------------------------------------------- ActivateInvulnerabilityOrDont: - LDA.b $1B : BEQ .nowhere_special + LDA.b IndoorsFlag : BEQ .nowhere_special REP #$20 ; set 16-bit accumulator LDA.b RoomIndex ; these are all decimal because i got them that way CMP.w #95 : BEQ .somewhere_cool ; Ice Palace Spike Room diff --git a/heartbeep.asm b/heartbeep.asm index 95429e1..64a8925 100644 --- a/heartbeep.asm +++ b/heartbeep.asm @@ -3,10 +3,10 @@ ;================================================================================ BeepLogic: LDA.l HeartBeep : BEQ + - STA.w $04CA - LDA.b #$2B : STA.w $012E + STA.w HeartBeepTimer + LDA.b #$2B : STA.w SFX2 RTL + - LDA.b #$FF : STA.w $04CA + LDA.b #$FF : STA.w HeartBeepTimer RTL ;================================================================================ diff --git a/heartpieces.asm b/heartpieces.asm index 7d8b881..6bcbc72 100644 --- a/heartpieces.asm +++ b/heartpieces.asm @@ -3,7 +3,7 @@ ;-------------------------------------------------------------------------------- HeartPieceGet: PHX : PHY - LDY.w $0E80, X ; load item value into Y register + LDY.w SpriteItemType, X ; load item value into Y register BNE + ; if for any reason the item value is 0 reload it, just in case JSL.l LoadHeartPieceRoomValue : TAY @@ -12,7 +12,7 @@ HeartPieceGet: .skipLoad - STZ.w $02E9 ; 0 = Receiving item from an NPC or message + STZ.w ItemReceiptMethod ; 0 = Receiving item from an NPC or message CPY.b #$26 : BNE .notHeart ; don't add a 1/4 heart if it's not a heart piece LDA.l HeartPieceQuarter : INC A : AND.b #$03 : STA.l HeartPieceQuarter : BNE .unfinished_heart ; add up heart quarters @@ -36,7 +36,7 @@ RTL HeartContainerGet: PHX : PHY JSL.l AddInventory_incrementBossSwordLong - LDY $0E80, X ; load item value into Y register + LDY.w SpriteItemType, X ; load item value into Y register BNE + ; if for any reason the item value is 0 reload it, just in case JSL.l LoadHeartContainerRoomValue : TAY @@ -54,7 +54,7 @@ DrawHeartPieceGFX: JMP .done ; don't draw on the init frame .skipInit - LDA.w $0E80, X ; Retrieve stored item type + LDA.w SpriteItemType, X ; Retrieve stored item type .skipLoad @@ -83,7 +83,7 @@ DrawHeartContainerGFX: BRA DrawHeartPieceGFX_done ; don't draw on the init frame .skipInit - LDA.w $0E80, X ; Retrieve stored item type + LDA.w SpriteItemType, X ; Retrieve stored item type BRA DrawHeartPieceGFX_skipLoad ;-------------------------------------------------------------------------------- @@ -122,11 +122,11 @@ HeartPieceSpritePrep: LDA.l ServerRequestMode : BEQ + : : + LDA.b #$01 : STA.l RedrawFlag - LDA.b $5D : CMP.b #$14 : BEQ .skip ; skip if we're mid-mirror + LDA.b LinkState : CMP.b #$14 : BEQ .skip ; skip if we're mid-mirror LDA.b #$00 : STA.l RedrawFlag JSL.l LoadHeartPieceRoomValue ; load item type - STA.w $0E80, X ; Store item type + STA.w SpriteItemType, X ; Store item type JSL.l PrepDynamicTile .skip @@ -138,14 +138,14 @@ HeartContainerSpritePrep: LDA.b #$00 : STA.l RedrawFlag JSL.l LoadHeartContainerRoomValue ; load item type - STA.w $0E80, X ; Store item type + STA.w SpriteItemType, X ; Store item type JSL.l PrepDynamicTile PLA RTL ;-------------------------------------------------------------------------------- LoadHeartPieceRoomValue: - LDA.b $1B : BEQ .outdoors ; check if we're indoors or outdoors + LDA.b IndoorsFlag : BEQ .outdoors ; check if we're indoors or outdoors .indoors JSL.l LoadIndoorValue JMP .done @@ -161,9 +161,9 @@ RTL ;-------------------------------------------------------------------------------- MaybeMarkDigSpotCollected: PHA : PHP - LDA.b $1B : BNE + + LDA.b IndoorsFlag : BNE + REP #$20 ; set 16-bit accumulator - LDA.b $8A + LDA.b OverworldIndex CMP.w #$2A : BNE + LDA.l HasGroveItem : ORA.w #$0001 : STA.l HasGroveItem + @@ -237,7 +237,7 @@ RTL LoadOutdoorValue: PHP REP #$20 ; set 16-bit accumulator - LDA.b $8A + LDA.b OverworldIndex CMP.w #$03 : BNE + LDA.b $22 : CMP.w #1890 : !BLT ++ %GetPossiblyEncryptedItem(HeartPiece_Spectacle, HeartPieceOutdoorValues) diff --git a/hooks.asm b/hooks.asm index 2e0adb9..e68f1be 100755 --- a/hooks.asm +++ b/hooks.asm @@ -1637,12 +1637,12 @@ NOP #8 ;================================================================================ org $028B8F ; <- 10B8F - Bank02.asm:2236 (LDA $7EF374 : LSR A : BCS BRANCH_BETA) JSL CheckHeraBossDefeated : BNE + : NOP -LDX.b #$F1 : STX.w $012C +LDX.b #$F1 : STX.w MusicControlRequest + ;================================================================================ org $029090 ; <- 11090 - Bank02.asm:3099 (LDA $7EF374 : LSR A : BCS BRANCH_GAMMA) JSL CheckHeraBossDefeated : BNE + : NOP -STX.w $012C ; DON'T MOVE THIS FORWARD OR MADNESS AWAITS +STX.w MusicControlRequest ; DON'T MOVE THIS FORWARD OR MADNESS AWAITS + ;================================================================================ org $029798 ; <- 11798 - Bank02.asm:4287 (CMP $02895C, X : BNE BRANCH_ALPHA) diff --git a/icepalacegraphics.asm b/icepalacegraphics.asm index af932ec..987c803 100644 --- a/icepalacegraphics.asm +++ b/icepalacegraphics.asm @@ -3,7 +3,7 @@ ShouldOverrideFileLoad: CPY #$0A ; 0A = Ice/Mire floor file BNE .no - LDA.w $040C ; Dungeon number + LDA.w DungeonID ; Dungeon number CMP #$12 ; Ice Palace BEQ .yes .no diff --git a/init.asm b/init.asm index 3d7f30c..5968bec 100644 --- a/init.asm +++ b/init.asm @@ -53,7 +53,7 @@ Init_Primary: LDA.b #$01 : STA.w MEMSEL ; enable fastrom access on upper banks STA.l OneMindId - LDA.b #$10 : STA.b $BC ; set default player sprite bank + LDA.b #$10 : STA.b PlayerSpriteBank ; set default player sprite bank LDA.b #$81 : STA.w NMITIMEN ; thing we wrote over, turn on NMI & gamepad RTL diff --git a/inventory.asm b/inventory.asm index 0b17d4e..b7935f6 100644 --- a/inventory.asm +++ b/inventory.asm @@ -28,14 +28,14 @@ ; out: Carry - 0 = No Button, 1 = Yes Button ;-------------------------------------------------------------------------------- ProcessMenuButtons: - LDA.b $F4 : BIT.b #$40 : BNE .y_pressed ; check for P1 Y-button + LDA.b Joy1A_New : BIT.b #$40 : BNE .y_pressed ; check for P1 Y-button BIT #$20 : BNE .sel_pressed ; check for P1 Select button - LDA.b $F0 : BIT.b #$20 : BNE .sel_held + LDA.b Joy1A_All : BIT.b #$20 : BNE .sel_held .sel_unheld LDA.l HudFlag : AND.b #$20 : BEQ + LDA.l HudFlag : AND.b #$DF : STA.l HudFlag ; select is released, unset hud flag - LDA.b $1B : BEQ + ; skip if outdoors - LDA.b #$20 : STA.w $012F ; menu select sound + LDA.b IndoorsFlag : BEQ + ; skip if outdoors + LDA.b #$20 : STA.w SFX3 ; menu select sound + JSL.l ResetEquipment + @@ -44,16 +44,16 @@ ProcessMenuButtons: RTL .sel_pressed LDA.l HudFlag : ORA.b #$20 : STA.l HudFlag ; set hud flag - LDA.b #$20 : STA.w $012F ; menu select sound + LDA.b #$20 : STA.w SFX3 ; menu select sound JSL.l ResetEquipment RTL .y_pressed ; Note: used as entry point by quickswap code. Must preserve X. - LDA.b #$10 : STA.w $0207 - LDA.w $0202 ; check selected item + LDA.b #$10 : STA.w MenuBlink + LDA.w ItemCursor ; check selected item CMP.b #$02 : BNE + ; boomerang LDA.l InventoryTracking : AND.b #$C0 : CMP.b #$C0 : BNE .errorJump ; make sure we have both boomerangs LDA.l BoomerangEquipment : EOR.b #$03 : STA.l BoomerangEquipment ; swap blue & red boomerang - LDA.b #$20 : STA.w $012F ; menu select sound + LDA.b #$20 : STA.w SFX3 ; menu select sound JMP .captured + CMP #$01 : BNE + ; bow LDA.l BowTracking : AND.b #$C0 : CMP.b #$C0 : BNE .errorJump ; make sure we have both bows @@ -70,7 +70,7 @@ RTL BRA .errorJump2 ++ LDA.l BowEquipment : !SUB #$01 : EOR.b #$02 : !ADD #$01 : STA.l BowEquipment ; swap bows - LDA.b #$20 : STA.w $012F ; menu select sound + LDA.b #$20 : STA.w SFX3 ; menu select sound JMP .captured + BRA + .errorJump @@ -78,7 +78,7 @@ RTL + CMP #$05 : BNE + ; powder LDA.l InventoryTracking : AND.b #$30 : CMP.b #$30 : BNE .errorJump ; make sure we have mushroom & magic powder LDA.l PowderEquipment : EOR.b #$03 : STA.l PowderEquipment ; swap mushroom & magic powder - LDA.b #$20 : STA.w $012F ; menu select sound + LDA.b #$20 : STA.w SFX3 ; menu select sound JMP .captured + BRA + .errorJump2 @@ -99,7 +99,7 @@ RTL LDA.b #$01 ; set shovel .fluteSuccess STA.l FluteEquipment ; store set item - LDA.b #$20 : STA.w $012F ; menu select sound + LDA.b #$20 : STA.w SFX3 ; menu select sound BRA .captured + CMP.b #$10 : BNE .error : JSL.l ProcessBottleMenu : BRA .captured : + @@ -107,7 +107,7 @@ RTL RTL .midShovel .error - LDA.b #$3C : STA.w $012E ; error sound + LDA.b #$3C : STA.w SFX2 ; error sound .captured SEC RTL @@ -124,13 +124,13 @@ ProcessBottleMenu: TAX : LDA.l BottleContents-1, X ; check bottle BNE + : LDX.b #$01 : + ; wrap if we reached the last bottle TXA : STA.l BottleIndex ; set bottle index - LDA.b #$20 : STA.w $012F ; menu select sound + LDA.b #$20 : STA.w SFX3 ; menu select sound PLX .no_bottles LDA.b #$00 ; pretend like the controller state was 0 from the overridden load RTL ; .y_not_pressed -; LDA.b $F4 : AND.b #$0C ; thing we wrote over - load controller state +; LDA.b Joy1A_New : AND.b #$0C ; thing we wrote over - load controller state ;RTL ;-------------------------------------------------------------------------------- @@ -138,33 +138,27 @@ RTL ;OpenBottleMenu: ;-------------------------------------------------------------------------------- OpenBottleMenu: - LDA.b $F6 : AND.b #$40 : BEQ .x_not_pressed ; skip if X is not down - LDA.b #$10 : STA.w $0207 ; set 16 frame cool off - LDA.b #$20 : STA.w $012F ; make menu sound - LDA.b #$07 : STA.w $0200 ; thing we wrote over - opens bottle menu + LDA.b Joy1B_New : AND.b #$40 : BEQ .x_not_pressed ; skip if X is not down + LDA.b #$10 : STA.w MenuBlink ; set 16 frame cool off + LDA.b #$20 : STA.w SFX3 ; make menu sound + LDA.b #$07 : STA.w SubModuleInterface ; thing we wrote over - opens bottle menu .x_not_pressed RTL -;-------------------------------------------------------------------------------- - ;-------------------------------------------------------------------------------- ;CloseBottleMenu: ;-------------------------------------------------------------------------------- CloseBottleMenu: - LDA.b $F6 : AND.b #$40 : BEQ .x_not_pressed ; skip if X is not down + LDA.b Joy1B_New : AND.b #$40 : BEQ .x_not_pressed ; skip if X is not down + LDA.b #$10 : STA.w MenuBlink ; set 16 frame cool off + LDA.b #$20 : STA.w SFX3 ; make menu sound - LDA.b #$10 : STA.w $0207 ; set 16 frame cool off - LDA.b #$20 : STA.w $012F ; make menu sound - - INC.w $0200 ; return to normal menu - STZ.w $0205 - - LDA.b #$00 + INC.w SubModuleInterface ; return to normal menu + STZ.w BottleMenuCounter + LDA.b #$00 RTL - .x_not_pressed - LDA.b $F4 : AND.b #$0C ; thing we wrote over (probably) + .x_not_pressed + LDA.b Joy1A_New : AND.b #$0C ; thing we wrote over (probably) RTL -;-------------------------------------------------------------------------------- - ;-------------------------------------------------------------------------------- ; AddInventory: ;-------------------------------------------------------------------------------- @@ -253,8 +247,8 @@ AddInventory: + CPY.b #$3B : BNE + : JMP .dungeonCounts : + ; Silver Arrow Bow - Skip Shop/Fairy Check for Silver Arrow Bow - LDA.b $1B : BEQ ++ ; skip shop check if outdoors - LDA.w $02E9 : CMP.b #$01 : BEQ ++ ; skip shop check for chests + LDA.b IndoorsFlag : BEQ ++ ; skip shop check if outdoors + LDA.w ItemReceiptMethod : CMP.b #$01 : BEQ ++ ; skip shop check for chests PHP : REP #$20 ; set 16-bit accumulator LDA.w $048E CMP.w #274 : BNE + : JMP .shop : + ; dark world death mountain shop, ornamental shield shop @@ -274,10 +268,10 @@ AddInventory: ++ .dungeonCounts - LDA.b $1B : BNE + : JMP .fullItemCounts : + + LDA.b IndoorsFlag : BNE + : JMP .fullItemCounts : + SEP #$20 ; Set 8-bit Accumulator - LDA.w $040C ; get dungeon id + LDA.w DungeonID ; get dungeon id CMP.b #$FF : BEQ .fullItemCounts CMP.l BallNChainDungeon : BNE + @@ -370,7 +364,7 @@ AddInventory: + CPY.b #$1D : BNE + ; Book of Mudora - LEAVE THIS ABOVE THE 1B-1F CONDITION - kkat JSR .incrementY JMP .done - + CPY.b #$1B : !BLT + ; Items $1B - $1F + + CPY.b #$1B : !BLT + ; Items IndoorsFlag - $1F CPY.b #$20 : !BGE + JSR .incrementA JMP .done @@ -442,7 +436,7 @@ AddInventory: JSR .incrementY JMP .done + CPY.b #$49 : BNE + ; Fighter's Sword - LDX #$01 + LDX.b #$01 JSR .incrementSword JMP .done + CPY.b #$4A : BNE + ; Flute (Active) @@ -462,15 +456,15 @@ AddInventory: JSR .incrementCapacity JMP .done + CPY.b #$50 : BNE + ; Master Sword (Safe) - LDX #$02 + LDX.b #$02 JSR .incrementSword JMP .done + CPY.b #$51 : BNE + ; 5 Bomb Capacity Upgrade - LDX #$02 + LDX.b #$02 JSR .maybeIncrementBombs JMP .done + CPY.b #$52 : BNE + ; 10 Bomb Capacity Upgrade - LDX #$02 + LDX.b #$02 JSR .maybeIncrementBombs JMP .done + CPY.b #$51 : !BLT + ; Items $51 - $54 - Capacity Upgrades @@ -671,7 +665,7 @@ RTL RTS .setDungeonCompletion - LDX $040C : BMI + + LDX.w DungeonID : BMI + REP #$20 ; 16 bit LDA.l DungeonMask, X ORA.l DungeonsCompleted : STA.l DungeonsCompleted @@ -701,10 +695,10 @@ RTL ;-------------------------------------------------------------------------------- HandleBombAbsorbtion: STA.l BombsFiller ; thing we wrote over - LDA.w $0303 : BNE + ; skip if we already have some item selected + LDA.w CurrentYItem : BNE + ; skip if we already have some item selected LDA.l BombCapacity : BEQ + ; skip if we can't have bombs - LDA.b #$04 : STA.w $0202 ; set selected item to bombs - LDA.b #$01 : STA.w $0303 ; set selected item to bombs + LDA.b #$04 : STA.w ItemCursor ; set selected item to bombs + LDA.b #$01 : STA.w CurrentYItem ; set selected item to bombs JSL.l HUD_RebuildLong + RTL @@ -714,7 +708,7 @@ RTL ; AddYMarker: ;-------------------------------------------------------------------------------- AddYMarker: - LDA.w $0202 : AND.w #$FF ; load item value + LDA.w ItemCursor : AND.w #$FF ; load item value CMP.w #$02 : BNE + ; boomerang LDA.l InventoryTracking : AND.w #$C0 : CMP.w #$C0 : BEQ .drawYBubble : BRA .drawNormal + CMP.w #$01 : BNE + ; bow @@ -732,7 +726,7 @@ AddYMarker: BRA .drawTile .drawJarMarker - LDA.w $0207 : AND.w #$0020 : BNE .drawXBubble + LDA.w MenuBlink : AND.w #$0020 : BNE .drawXBubble .drawYBubble LDA.w #$3D4F @@ -785,7 +779,7 @@ RTL ;-------------------------------------------------------------------------------- CheckKeys: LDA.l GenericKeys : BEQ + : RTL : + - LDA.w $040C : CMP.b #$FF + LDA.w DungeonID : CMP.b #$FF RTL ;-------------------------------------------------------------------------------- @@ -856,7 +850,7 @@ RTL LoadPowder: JSL.l Sprite_SpawnDynamically ; thing we wrote over %GetPossiblyEncryptedItem(WitchItem, SpriteItemValues) - STA.w $0DA0, Y ; Store item type + STA.w SpriteAuxTable, Y ; Store item type JSL.l PrepDynamicTile RTL ;-------------------------------------------------------------------------------- @@ -880,12 +874,12 @@ RTL DrawPowder: LDA.w $02DA : BNE .defer ; defer if link is buying a potion LDA.l RedrawFlag : BEQ + - LDA.w $0DA0, X ; Retrieve stored item type + LDA.w SpriteAuxTable, X ; Retrieve stored item type JSL.l PrepDynamicTile LDA.b #$00 : STA.l RedrawFlag ; reset redraw flag BRA .defer + - LDA.w $0DA0, X ; Retrieve stored item type + LDA.w SpriteAuxTable, X ; Retrieve stored item type JSL.l DrawDynamicTile .defer RTL @@ -895,17 +889,17 @@ RTL ; LoadMushroom: ;-------------------------------------------------------------------------------- LoadMushroom: - LDA.b #$00 : STA.w $0DC0, X ; thing we wrote over + LDA.b #$00 : STA.w SpriteGFXControl, X ; thing we wrote over .justGFX PHA LDA.b #$01 : STA.l RedrawFlag - LDA.b $5D : CMP.b #$14 : BEQ .skip ; skip if we're mid-mirror + LDA.b LinkState : CMP.b #$14 : BEQ .skip ; skip if we're mid-mirror LDA.b #$00 : STA.l RedrawFlag %GetPossiblyEncryptedItem(MushroomItem, SpriteItemValues) - STA.w $0E80, X ; Store item type + STA.w SpriteItemType, X ; Store item type JSL.l PrepDynamicTile .skip @@ -923,7 +917,7 @@ DrawMushroom: BRA .done ; don't draw on the init frame .skipInit - LDA.w $0E80, X ; Retrieve stored item type + LDA.w SpriteItemType, X ; Retrieve stored item type JSL.l DrawDynamicTile .done @@ -935,12 +929,12 @@ RTL ; CollectPowder: ;-------------------------------------------------------------------------------- CollectPowder: - LDY $0DA0, X ; Retrieve stored item type + LDY.w SpriteAuxTable, X ; Retrieve stored item type BNE + ; if for any reason the item value is 0 reload it, just in case %GetPossiblyEncryptedItem(WitchItem, SpriteItemValues) : TAY + - STZ $02E9 ; item from NPC + STZ.w ItemReceiptMethod ; item from NPC JSL.l Link_ReceiveItem ;JSL.l FullInventoryExternal JSL.l ItemSet_Powder @@ -981,9 +975,9 @@ RTL ; SpawnShovelGamePrizeSFX: ;-------------------------------------------------------------------------------- SpawnShovelGamePrizeSFX: - STA.l $7FFE00 ; thing we wrote over + STA.l MiniGameTime ; thing we wrote over PHA - LDA.b #$1B : STA.w $012F ; play puzzle sound + LDA.b #$1B : STA.w SFX3 ; play puzzle sound PLA RTL ;-------------------------------------------------------------------------------- @@ -995,9 +989,9 @@ SpawnChestGamePrizeSFX: CPX.b #$07 : BNE .normal LDA.b RoomIndex : CMP.b #$06 : BNE .normal .prize - LDA.b #$1B : STA.w $012F : RTL ; play puzzle sound + LDA.b #$1B : STA.w SFX3 : RTL ; play puzzle sound .normal - LDA.b #$0E : STA.w $012F ; play chest sound + LDA.b #$0E : STA.w SFX3 ; play chest sound RTL ;-------------------------------------------------------------------------------- @@ -1012,15 +1006,15 @@ SpawnShovelItem: JMP .skip + - LDA.w $035B : AND.b #$01 : BNE + : JMP .skip : + ; corner dig fix + LDA.w TileActDig : AND.b #$01 : BNE + : JMP .skip : + ; corner dig fix PHY : PHP PHB : PHK : PLB SEP #$30 ; set 8-bit accumulator and index registers - LDA.b $1B : BEQ + : JMP .no_drop : + ; skip if indoors + LDA.b IndoorsFlag : BEQ + : JMP .no_drop : + ; skip if indoors - LDA.b $8A : CMP.b #$2A : BEQ .no_drop ; don't drop in the haunted grove + LDA.b OverworldIndex : CMP.b #$2A : BEQ .no_drop ; don't drop in the haunted grove CMP.b #$68 : BEQ .no_drop ; don't drop in the digging game area JSL GetRandomInt : BIT.b #$03 : BNE .no_drop ; drop with 1/4 chance @@ -1031,25 +1025,25 @@ SpawnShovelItem: ;most of this part below is copied from the digging game - STA.l $7FFE00 + STA.l MiniGameTime JSL Sprite_SpawnDynamically LDX.b #$00 - LDA.b $2F : CMP.b #$04 : BEQ + : INX : + + LDA.b LinkDirection : CMP.b #$04 : BEQ + : INX : + - LDA.l .x_speeds, X : STA.w $0D50, Y + LDA.l .x_speeds, X : STA.w SpriteVelocityX, Y - LDA.b #$00 : STA.w $0D40, Y + LDA.b #$00 : STA.w SpriteVelocityY, Y LDA.b #$18 : STA.w $0F80, Y LDA.b #$FF : STA.w $0B58, Y LDA.b #$30 : STA.w $0F10, Y LDA.b $22 : !ADD.l .x_offsets, X - AND.b #$F0 : STA.w $0D10, Y - LDA.b $23 : ADC.b #$00 : STA.w $0D30, Y + AND.b #$F0 : STA.w SpritePosXLow, Y + LDA.b $23 : ADC.b #$00 : STA.w SpritePosXHigh, Y - LDA.b $20 : !ADD.b #$16 : AND.b #$F0 : STA.w $0D00, Y - LDA.b $21 : ADC.b #$00 : STA.w $0D20, Y + LDA.b $20 : !ADD.b #$16 : AND.b #$F0 : STA.w SpritePosYLow, Y + LDA.b $21 : ADC.b #$00 : STA.w SpritePosYHigh, Y LDA.b #$00 : STA.w $0F20, Y TYX diff --git a/inverted.asm b/inverted.asm index 1b1cdd2..4880a1b 100644 --- a/inverted.asm +++ b/inverted.asm @@ -67,13 +67,13 @@ Overworld_CreatePyramidHoleModified: LDA.w #$FFFF : STA.w $1012, Y .ending - LDA.w #$3515 : STA.w $012D + LDA.w #$3515 : STA.w SFX1 SEP #$30 LDA.l OverworldEventDataWRAM+$5B : ORA.b #$20 : STA.l OverworldEventDataWRAM+$5B - LDA.b #$03 : STA.w $012F + LDA.b #$03 : STA.w SFX3 LDA.b #$01 : STA.b $14 @@ -138,26 +138,27 @@ RTL GanonTowerAnimation: - LDA.l InvertedMode : BEQ .done - LDA.b #$1B : STA.w $012F - STZ.w $04C6 - STZ.b $B0 - STZ.w $0710 - STZ.w $02E4 - - STZ.w $0FC1 - - STZ.w $011A - STZ.w $011B - STZ.w $011C - STZ.w $011D - LDA.b #$02 : STA.w $012C - LDA.b #$09 : STA.w $012D - RTL - .done - LDA.b #$05 : STA.w $04C6 ;what we wrote over - STZ.b $B0 ; (continued) - STZ.b $C8 ; (continued) + LDA.l InvertedMode : BEQ .done + LDA.b #$1B : STA.w SFX3 + STZ.w OWEntranceCutscene + STZ.b SubSubModule + STZ.w SkipOAM + STZ.w CutsceneFlag + + STZ.w FreezeSprites + + STZ.w BG1ShakeV + STZ.w BG1ShakeV+1 + STZ.w BG1ShakeH + STZ.w BG1ShakeH+1 + LDA.b #$02 : STA.w MusicControlRequest + LDA.b #$09 : STA.w SFX1 + RTL + + .done + LDA.b #$05 : STA.w OWEntranceCutscene ; what we wrote over + STZ.b SubSubModule ; (continued) + STZ.b ScrapBufferBD+$0B ; (continued) RTL GanonTowerInvertedCheck: @@ -166,7 +167,7 @@ GanonTowerInvertedCheck: LDA.b #$01 ; Load a random value so it doesn't BEQ RTL .done - LDA.b $8A : CMP.b #$43 ;what we wrote over + LDA.b OverworldIndex : CMP.b #$43 ;what we wrote over RTL } @@ -177,7 +178,7 @@ HardcodedRocks: LDA.l InvertedMode : AND.w #$00FF : BEQ .normalrocks BRA .noRock2 .normalrocks - LDA.w #$020F : LDX $8A : CPX.w #$0033 : BNE .noRock + LDA.w #$020F : LDX.b OverworldIndex : CPX.w #$0033 : BNE .noRock STA.l $7E22A8 .noRock CPX.w #$002F : BNE .noRock2 @@ -202,9 +203,9 @@ MirrorBonk: ; otherwise fall through to .normal PHX : PHP PHB : PHK : PLB - LDA.b $8A : AND.b #$40 : BEQ .endLoop ;World we're in? branch if we are in LW we don't want bonks + LDA.b OverworldIndex : AND.b #$40 : BEQ .endLoop ;World we're in? branch if we are in LW we don't want bonks REP #$30 - LDX #$0000 + LDX.w #$0000 .loop LDA.l .bonkRectanglesTable, X ;Load X1 CMP $22 : !BGE ++ diff --git a/invertedmaps.asm b/invertedmaps.asm index b49c922..040ff03 100644 --- a/invertedmaps.asm +++ b/invertedmaps.asm @@ -1,19 +1,19 @@ Overworld_LoadNewTiles: { ; add sign to EDM for OWG people to read - LDA.w $040A : AND.w #$00FF : CMP.w #$0005 : BNE + + LDA.b OverworldIndex : AND.w #$00FF : CMP.w #$0005 : BNE + LDA.w #$0101 : STA.l $7E2E18 ; #$0101 is the sign tile16 id, $7E2D98 is the position of the tile16 on map + ; GT sign LDA.l InvertedMode : AND.w #$00FF : BNE + - LDA.w $040A : AND.w #$00FF : CMP.w #$0043 : BNE + + LDA.b OverworldIndex : AND.w #$00FF : CMP.w #$0043 : BNE + LDA.w #$0101 : STA.l $7E2550 + ; Pyramid sign LDA.l InvertedMode : AND.w #$00FF : BNE + - LDA.w $040A : AND.w #$00FF : CMP.w #$005B : BNE + + LDA.b OverworldIndex : AND.w #$00FF : CMP.w #$005B : BNE + LDA.w #$0101 : STA.w $7E27B6 ; Moved sign near statue LDA.w #$05C2 : STA.w $7E27B4 ; added a pyramid peg on the left of the sign + @@ -26,7 +26,7 @@ Overworld_LoadNewTiles: LDA.b #$7E : PHA : PLB REP #$30 ; Use it as an index into a jump table. - LDA.b $8A : CMP.w #$0080 : !BGE .noData + LDA.b OverworldIndex : CMP.w #$0080 : !BGE .noData ASL A : TAX JSR (Overworld_NewTilesTable, X) diff --git a/invertedstatic.asm b/invertedstatic.asm index 88b125c..60efb83 100644 --- a/invertedstatic.asm +++ b/invertedstatic.asm @@ -1,7 +1,7 @@ ;Statically mapped at $A1A000 Referenced by the front end. Do not move without coordination. InvertedTileAttributeLookup: SEP #$20 - LDA.b $8A : CMP.b #$47 : BEQ .turtleRock + LDA.b OverworldIndex : CMP.b #$47 : BEQ .turtleRock LDA.l Overworld_TileAttr, X JML.l Overworld_GetTileAttrAtLocation_continue .turtleRock diff --git a/lampmantlecone.asm b/lampmantlecone.asm index 3eb5ee1..8c4243a 100644 --- a/lampmantlecone.asm +++ b/lampmantlecone.asm @@ -11,7 +11,7 @@ LampCheck: LDA.l CurrentWorld : BNE + .lightWorld - LDA.w $040C : BNE ++ ; check if we're in sewers + LDA.w DungeonID : BNE ++ ; check if we're in sewers LDA.l LampConeSewers : BRA .done ++ LDA.l LampConeLightWorld : BRA .done diff --git a/maidencrystals.asm b/maidencrystals.asm index 20ce70a..7dcd6df 100644 --- a/maidencrystals.asm +++ b/maidencrystals.asm @@ -10,7 +10,7 @@ MaidenCrystalScript: STZ.w $02D8 STZ.w $02DA STZ.b $2E - LDA.b #$02 : STA.w $2F + LDA.b #$02 : STA.w LinkDirection LDA.l CrystalsField : AND.b #$7F : CMP.b #$7F : BNE + ; check if we have all crystals LDA.b #$08 : STA.l MapIcons ; Update the map icon to just be Ganon's Tower + diff --git a/medallions.asm b/medallions.asm index 9c3bbd5..fcfe259 100644 --- a/medallions.asm +++ b/medallions.asm @@ -3,7 +3,7 @@ ;-------------------------------------------------------------------------------- TryOpenMire: ; Checks if we're in the Swamp of Evil. - LDA.b $8A : CMP.b #$70 : BNE .untriggered + LDA.b OverworldIndex : CMP.b #$70 : BNE .untriggered ; Checks whether the Misery Mire dungeon is already revealed. LDA.l OverworldEventDataWRAM+$70 : AND.b #$20 : BNE .untriggered @@ -12,17 +12,17 @@ TryOpenMire: LDY.b #$02 : JSL.l Ancilla_CheckIfEntranceTriggered : BCC .untriggered ; Do the 3rd animation for opening entrances - LDA.b #$03 : STA.w $04C6 + LDA.b #$03 : STA.w OWEntranceCutscene - STZ.b $B0 ; reset the sub-submodule index - STZ.b $C8 ; reset this other index. + STZ.b SubSubModule ; reset the sub-submodule index + STZ.b ScrapBufferBD+$0B ; reset this other index. .untriggered RTL ;-------------------------------------------------------------------------------- TryOpenTRock: ; Checks if we're at Turtle Rock. - LDA.b $8A : CMP.b #$47 : BNE .untriggered + LDA.b OverworldIndex : CMP.b #$47 : BNE .untriggered ; Checks whether the Turtle Rock dungeon is already revealed. LDA.l OverworldEventDataWRAM+$47 : AND.b #$20 : BNE .untriggered @@ -31,17 +31,17 @@ TryOpenTRock: LDY.b #$03 : JSL.l Ancilla_CheckIfEntranceTriggered : BCC .untriggered ; Do the 4rd animation for opening entrances - LDA.b #$04 : STA.w $04C6 + LDA.b #$04 : STA.w OWEntranceCutscene - STZ.b $B0 ; reset the sub-submodule index - STZ.b $C8 ; reset this other index. + STZ.b SubSubModule ; reset the sub-submodule index + STZ.b ScrapBufferBD+$0B ; reset this other index. .untriggered RTL ;-------------------------------------------------------------------------------- MedallionTrigger_Bombos: STZ.b $50 ; stuff we wrote over - STZ.w $0FC1 + STZ.w FreezeSprites PHA LDA.l MireRequiredMedallion : BNE + diff --git a/msu.asm b/msu.asm index d42f647..0b46d28 100644 --- a/msu.asm +++ b/msu.asm @@ -208,7 +208,7 @@ CheckMusicLoadRequest: CMP.b #21 : BNE .check_fallback ;.boss - LDA.w $040C : LSR : !ADD.b #45 + LDA.w DungeonID : LSR : !ADD.b #45 BRA .check_fallback-3 .lightworld PHA @@ -226,14 +226,14 @@ CheckMusicLoadRequest: PHA LDA.l CrystalsField : CMP.b #$7F : BEQ - LDA.l CurrentWorld : BEQ -- - LDA.b $8A : CMP #$40 : BNE -- + LDA.b OverworldIndex : CMP #$40 : BNE -- PLA LDA.b #15 : BRA .check_fallback-3 .castle - LDA.w $040C + LDA.w DungeonID CMP.b #$08 : BNE .check_fallback ; Hyrule Castle 2 .dungeon - LDA.w $040C : LSR : !ADD.b #33 : STA.w MusicControlRequest + LDA.w DungeonID : LSR : !ADD.b #33 : STA.w MusicControlRequest .check_fallback LDX.w MusicControlRequest @@ -267,7 +267,7 @@ CheckMusicLoadRequest: .dungeon_fallback PHB : REP #$10 - LDX $040C + LDX.w DungeonID LDA.b #Music_Eastern>>16 : PHA : PLB ; Set bank to music pointers LDY.b Scrap00 : PHY REP #$20 @@ -291,7 +291,7 @@ CheckMusicLoadRequest: LDA.w MusicControlRequest : CMP.b #08 : BEQ .done+3 ; No SFX during warp track - LDA.b $10 + LDA.b GameMode CMP.b #$07 : BEQ .sfx_indoors CMP.b #$0E : BEQ .sfx_indoors CMP.b #$09 : BNE .done @@ -300,7 +300,7 @@ CheckMusicLoadRequest: SEP #$10 LDX.b #$09 - LDA.b $8A ; Dark Death Mountain + LDA.b OverworldIndex ; Dark Death Mountain CMP.b #$43 : BEQ + : CMP.b #$45 : BEQ + : CMP.b #$47 : BEQ + LDX.b #$05 + @@ -313,7 +313,7 @@ CheckMusicLoadRequest: .rain LDX.b #$01 + - STX.w $012D + STX.w SFX1 REP #$10 .done @@ -323,7 +323,7 @@ CheckMusicLoadRequest: .sfx_indoors LDA.w MusicControlRequest : STA.w MusicControl : STZ.w MusicControlRequest - SEP #$20 : LDA.b #$05 : STA.w $012D + SEP #$20 : LDA.b #$05 : STA.w SFX1 REP #$30 : PLY : PLX : PLA : PLD : PLB : PLP JML Module_PreDungeon_setAmbientSfx ;-------------------------------------------------------------------------------- @@ -660,7 +660,7 @@ MSUMain: LDA.b #$00 : STA.w MSUResumeTrack + CPX #07 : BNE + ; Kakariko Village - LDA.b $10 : CMP #$07 : BNE + + LDA.b GameMode : CMP #$07 : BNE + ; we're in link's house -> ignore LDA.b #$00 BRA ++ @@ -680,7 +680,7 @@ MSUMain: CMP.b #47 : !BGE .done + : PHB : REP #$10 - LDX $040C + LDX.w DungeonID LDA.b #Music_Eastern>>16 : PHA : PLB ; Set bank to music pointers LDY.b Scrap00 : PHY REP #$20 @@ -763,7 +763,7 @@ CrystalFanfareWait: ; Delay input scanning on startup/S&Q to avoid hard-lock from button mashing ;-------------------------------------------------------------------------------- StartupWait: - LDA.b $11 : CMP.b #$04 : BCC .done ; thing we wrote over + LDA.b GameSubMode : CMP.b #$04 : BCC .done ; thing we wrote over LDA.w APUIO0 : BEQ .done-1 CMP.b #$01 : BEQ .done CLC diff --git a/music.asm b/music.asm index e13df10..b536dd7 100644 --- a/music.asm +++ b/music.asm @@ -9,7 +9,7 @@ PreOverworld_LoadProperties_ChooseMusic: LDX.b #$02 ; Default light world theme - LDA.b $8A : ORA.b #$40 ; check both light and dark world DM at the same time + LDA.b OverworldIndex : ORA.b #$40 ; check both light and dark world DM at the same time CMP.b #$43 : BEQ .endOfLightWorldChecks CMP.b #$45 : BEQ .endOfLightWorldChecks CMP.b #$47 : BEQ .endOfLightWorldChecks @@ -17,12 +17,12 @@ PreOverworld_LoadProperties_ChooseMusic: LDY.b #$5A ; Main overworld animated tileset ; Skip village and lost woods checks if entering dark world or a special area - LDA.b $8A : CMP.b #$40 : !BGE .notVillageOrWoods + LDA.b OverworldIndex : CMP.b #$40 : !BGE .notVillageOrWoods LDX.b #$07 ; Default village theme ; Check if we're entering the village - LDA.b $8A : CMP.b #$18 : BEQ .endOfLightWorldChecks + LDA.b OverworldIndex : CMP.b #$18 : BEQ .endOfLightWorldChecks ; For NA release would we also branch on indexes #$22 #$28 #$29 LDX.b #$05 ; Lost woods theme @@ -33,7 +33,7 @@ PreOverworld_LoadProperties_ChooseMusic: + ; check if we are entering lost woods - LDA.b $8A : BEQ .endOfLightWorldChecks + LDA.b OverworldIndex : BEQ .endOfLightWorldChecks .notVillageOrWoods ; Use the normal overworld (light world) music @@ -52,7 +52,7 @@ PreOverworld_LoadProperties_ChooseMusic: LDX.b #$0F ; dark woods theme ; This music is used in dark woods - LDA.b $8A + LDA.b OverworldIndex CMP.b #$40 : BEQ + LDX.b #$0D ; dark death mountain theme @@ -118,7 +118,7 @@ Overworld_FinishMirrorWarp: LDX.b #$09 ; default dark world theme - LDA.b $8A : CMP.b #$40 : !BGE .endOfLightWorldChecks + LDA.b OverworldIndex : CMP.b #$40 : !BGE .endOfLightWorldChecks LDX.b #$02 ; hyrule field theme @@ -136,9 +136,9 @@ Overworld_FinishMirrorWarp: LDX.b #$07 ; Default village theme (phase <3) .endOfLightWorldChecks - STX.w $012C + STX.w MusicControlRequest - LDA.b $8A : CMP.b #$40 : BNE + + LDA.b OverworldIndex : CMP.b #$40 : BNE + LDX.b #$0F ; dark woods theme BRA .bunny + @@ -148,7 +148,7 @@ Overworld_FinishMirrorWarp: CMP.b #$47 : BNE .notDarkMountain .darkMountain - LDA.b #$09 : STA.w $012D ; set storm ambient SFX + LDA.b #$09 : STA.w SFX1 ; set storm ambient SFX LDX.b #$0D ; dark mountain theme .bunny @@ -156,16 +156,16 @@ Overworld_FinishMirrorWarp: LDX.b #$04 ; bunny theme + - STX.w $012C + STX.w MusicControlRequest .notDarkMountain - LDA.b $11 : STA.w $010C + LDA.b GameSubMode : STA.w GameSubModeCache ; GameModeCache - STZ.b $11 - STZ.b $B0 - STZ.w $0200 - STZ.w $0710 + STZ.b GameSubMode + STZ.b SubSubModule + STZ.w SubModuleInterface + STZ.w SkipOAM RTL ;-------------------------------------------------------------------------------- @@ -173,17 +173,17 @@ Overworld_FinishMirrorWarp: ;-------------------------------------------------------------------------------- BirdTravel_LoadTargetAreaMusic: ; Skip village and lost woods checks if entering dark world or a special area - LDA.b $8A : CMP.b #$43 : BEQ .endOfLightWorldChecks + LDA.b OverworldIndex : CMP.b #$43 : BEQ .endOfLightWorldChecks CMP.b #$40 : !BGE .notVillageOrWoods LDX.b #$07 ; Default village theme ; Check if we're entering the village - LDA.b $8A : CMP.b #$18 : BEQ .endOfLightWorldChecks + LDA.b OverworldIndex : CMP.b #$18 : BEQ .endOfLightWorldChecks ; For NA release would we also branch on indexes #$22 #$28 #$29 ; check if we are entering lost woods - LDA.b $8A : BEQ .endOfLightWorldChecks + LDA.b OverworldIndex : BEQ .endOfLightWorldChecks .notVillageOrWoods ; Use the normal overworld (light world) music @@ -201,24 +201,24 @@ BirdTravel_LoadTargetAreaMusic: LDX.b #$09 ; dark overworld theme - LDA.b $8A + LDA.b OverworldIndex ; Misery Mire rain SFX CMP.b #$70 : BNE ++ LDA.l OverworldEventDataWRAM+$70 : AND.b #$20 : BNE ++ LDA.b #$01 : CMP.w $0131 : BEQ + - STA.w $012D + STA.w SFX1 + : BRA .checkInverted ++ ; This music is used in dark death mountain CMP.b #$43 : BEQ .darkMountain - LDA.b #$05 : STA.w $012D + LDA.b #$05 : STA.w SFX1 BRA .checkInverted .darkMountain LDA.l CrystalsField : CMP.b #$7F : BEQ + LDX.b #$0D ; dark death mountain theme - + : LDA.b #$09 : STA.w $012D + + : LDA.b #$09 : STA.w SFX1 ; if not inverted and light world, or inverted and dark world, skip moon pearl check .checkInverted @@ -237,8 +237,8 @@ BirdTravel_LoadTargetAreaMusic: ;0 = Is Kakariko Overworld ;1 = Not Kakariko Overworld PsychoSolder_MusicCheck: - LDA.w $040A : CMP.b #$18 : BNE .done ; thing we overwrote - check if overworld location is Kakariko - LDA.b $1B ; Also check that we are outdoors + LDA.b OverworldIndex : CMP.b #$18 : BNE .done ; thing we overwrote - check if overworld location is Kakariko + LDA.b IndoorsFlag ; Also check that we are outdoors .done RTL ;-------------------------------------------------------------------------------- @@ -258,7 +258,7 @@ Overworld_MosaicDarkWorldChecks: LDA.l CrystalsField : CMP.b #$7F : BEQ .done .doFade - LDA.b #$F1 : STA.w $012C ; thing we wrote over, fade out music + LDA.b #$F1 : STA.w MusicControlRequest ; thing we wrote over, fade out music .done RTL diff --git a/musicvolumes.asm b/musicvolumes.asm index ee8f3c2..7cb61de 100644 --- a/musicvolumes.asm +++ b/musicvolumes.asm @@ -4,1206 +4,1206 @@ ;== Music volume (set everything to 0 for a no-music seed) == -VOLUME_00 = $00 -VOLUME_14 = $14 -VOLUME_3C = $3C -VOLUME_50 = $50 -VOLUME_5A = $5A -VOLUME_64 = $64 -VOLUME_78 = $78 -VOLUME_82 = $82 -VOLUME_8C = $8C -VOLUME_A0 = $A0 -VOLUME_AA = $AA -VOLUME_B4 = $B4 -VOLUME_C8 = $C8 -VOLUME_D2 = $D2 -VOLUME_DC = $DC -VOLUME_E6 = $E6 -VOLUME_F0 = $F0 -VOLUME_FA = $FA -VOLUME_FF = $FF +!VOLUME_00 = $00 +!VOLUME_14 = $14 +!VOLUME_3C = $3C +!VOLUME_50 = $50 +!VOLUME_5A = $5A +!VOLUME_64 = $64 +!VOLUME_78 = $78 +!VOLUME_82 = $82 +!VOLUME_8C = $8C +!VOLUME_A0 = $A0 +!VOLUME_AA = $AA +!VOLUME_B4 = $B4 +!VOLUME_C8 = $C8 +!VOLUME_D2 = $D2 +!VOLUME_DC = $DC +!VOLUME_E6 = $E6 +!VOLUME_F0 = $F0 +!VOLUME_FA = $FA +!VOLUME_FF = $FF ;== File select == org $1A9D28 ; <- D1D28 . -db #VOLUME_8C ; $8C +db #!VOLUME_8C ; $8C org $1A9D41 ; <- D1D41 . -db #VOLUME_8C ; $8C +db #!VOLUME_8C ; $8C org $1A9D5C ; <- D1D5C . -db #VOLUME_8C ; $8C +db #!VOLUME_8C ; $8C org $1A9D77 ; <- D1D77 . -db #VOLUME_8C ; $8C +db #!VOLUME_8C ; $8C org $1A9D92 ; <- D1D92 . -db #VOLUME_C8 ; $C8 +db #!VOLUME_C8 ; $C8 org $1A9DBD ; <- D1DBD . -db #VOLUME_C8 ; $C8 +db #!VOLUME_C8 ; $C8 org $1A9DEB ; <- D1DEB . -db #VOLUME_C8 ; $C8 +db #!VOLUME_C8 ; $C8 ;org $1A9EEE ; <- D1EEE . (silent track) -;db #VOLUME_8C ; $8C +;db #!VOLUME_8C ; $8C ;== Title Theme (Triforce jingle) == org $1A9F5D ; <- D1F5D . -db #VOLUME_C8 ; $C8 +db #!VOLUME_C8 ; $C8 org $1A9F9F ; <- D1F9F . -db #VOLUME_C8 ; $C8 +db #!VOLUME_C8 ; $C8 org $1A9FBD ; <- D1FBD . -db #VOLUME_C8 ; $C8 +db #!VOLUME_C8 ; $C8 org $1A9FDC ; <- D1FDC . -db #VOLUME_C8 ; $C8 +db #!VOLUME_C8 ; $C8 org $1A9FEA ; <- D1FEA . -db #VOLUME_C8 ; $C8 +db #!VOLUME_C8 ; $C8 ;== Light World == org $1AA047 ; <- D2047 . -db #VOLUME_FA ; $FA +db #!VOLUME_FA ; $FA org $1AA085 ; <- D2085 . -db #VOLUME_FF ; $FF +db #!VOLUME_FF ; $FF org $1AA0CA ; <- D20CA . -db #VOLUME_C8 ; $C8 +db #!VOLUME_C8 ; $C8 org $1AA10A ; <- D210A . -db #VOLUME_E6 ; $E6 +db #!VOLUME_E6 ; $E6 org $1AA13F ; <- D213F . -db #VOLUME_DC ; $DC +db #!VOLUME_DC ; $DC org $1AA174 ; <- D2174 . -db #VOLUME_DC ; $DC +db #!VOLUME_DC ; $DC org $1AA1BB ; <- D21BB . -db #VOLUME_C8 ; $C8 +db #!VOLUME_C8 ; $C8 org $1AA1C5 ; <- D21C5 . -db #VOLUME_FF ; $FF +db #!VOLUME_FF ; $FF org $1AA1CD ; <- D21CD . -db #VOLUME_B4 ; $B4 +db #!VOLUME_B4 ; $B4 org $1AA279 ; <- D2279 . -db #VOLUME_B4 ; $B4 +db #!VOLUME_B4 ; $B4 org $1AA29E ; <- D229E . -db #VOLUME_DC ; $DC +db #!VOLUME_DC ; $DC org $1AA2C9 ; <- D22C9 . -db #VOLUME_C8 ; $C8 +db #!VOLUME_C8 ; $C8 org $1AA2DC ; <- D22DC . -db #VOLUME_E6 ; $E6 +db #!VOLUME_E6 ; $E6 org $1AA349 ; <- D2349 . -db #VOLUME_78 ; $78 +db #!VOLUME_78 ; $78 org $1AA426 ; <- D2426 . -db #VOLUME_DC ; $DC +db #!VOLUME_DC ; $DC org $1AA447 ; <- D2447 . -db #VOLUME_E6 ; $E6 +db #!VOLUME_E6 ; $E6 org $1AA49C ; <- D249C . -db #VOLUME_A0 ; $A0 +db #!VOLUME_A0 ; $A0 org $1AA4C2 ; <- D24C2 . -db #VOLUME_FA ; $FA +db #!VOLUME_FA ; $FA org $1AA4CD ; <- D24CD . -db #VOLUME_A0 ; $A0 +db #!VOLUME_A0 ; $A0 org $1AA4EC ; <- D24EC . -db #VOLUME_FA ; $FA +db #!VOLUME_FA ; $FA org $1AA5A4 ; <- D25A4 . -db #VOLUME_FA ; $FA +db #!VOLUME_FA ; $FA org $1AA754 ; <- D2754 . -db #VOLUME_C8 ; $C8 +db #!VOLUME_C8 ; $C8 ;== Escape == org $1AA84C ; <- D284C . -db #VOLUME_C8 ; $C8 +db #!VOLUME_C8 ; $C8 org $1AA866 ; <- D2866 . -db #VOLUME_C8 ; $C8 +db #!VOLUME_C8 ; $C8 org $1AA887 ; <- D2887 . -db #VOLUME_C8 ; $C8 +db #!VOLUME_C8 ; $C8 org $1AA8A0 ; <- D28A0 . -db #VOLUME_C8 ; $C8 +db #!VOLUME_C8 ; $C8 org $1AA8BA ; <- D28BA . -db #VOLUME_C8 ; $C8 +db #!VOLUME_C8 ; $C8 org $1AA8DB ; <- D28DB . -db #VOLUME_C8 ; $C8 +db #!VOLUME_C8 ; $C8 org $1AA8F4 ; <- D28F4 . -db #VOLUME_C8 ; $C8 +db #!VOLUME_C8 ; $C8 org $1AA93E ; <- D293E . -db #VOLUME_C8 ; $C8 +db #!VOLUME_C8 ; $C8 org $1AAB88 ; <- D2B88 . -db #VOLUME_D2 ; $D2 +db #!VOLUME_D2 ; $D2 ;== Bunny == org $1AABF3 ; <- D2BF3 . -db #VOLUME_C8 ; $C8 +db #!VOLUME_C8 ; $C8 org $1AAC09 ; <- D2C09 . -db #VOLUME_A0 ; $A0 +db #!VOLUME_A0 ; $A0 org $1AAC1F ; <- D2C1F . -db #VOLUME_C8 ; $C8 +db #!VOLUME_C8 ; $C8 org $1AAC53 ; <- D2C53 . -db #VOLUME_A0 ; $A0 +db #!VOLUME_A0 ; $A0 org $1AAC69 ; <- D2C69 . -db #VOLUME_C8 ; $C8 +db #!VOLUME_C8 ; $C8 ;org $1AACA1 ; <- D2CA1 . (silent track) -;db #VOLUME_C8 ; $C8 +;db #!VOLUME_C8 ; $C8 org $1AACAF ; <- D2CAF . -db #VOLUME_A0 ; $A0 +db #!VOLUME_A0 ; $A0 org $1AACC5 ; <- D2CC5 . -db #VOLUME_C8 ; $C8 +db #!VOLUME_C8 ; $C8 org $1AACEB ; <- D2CEB . -db #VOLUME_A0 ; $A0 +db #!VOLUME_A0 ; $A0 org $1AAD05 ; <- D2D05 . -db #VOLUME_C8 ; $C8 +db #!VOLUME_C8 ; $C8 org $1AAD73 ; <- D2D73 . -db #VOLUME_C8 ; $C8 +db #!VOLUME_C8 ; $C8 org $1AAD91 ; <- D2D91 . -db #VOLUME_A0 ; $A0 +db #!VOLUME_A0 ; $A0 org $1AADAF ; <- D2DAF . -db #VOLUME_C8 ; $C8 +db #!VOLUME_C8 ; $C8 ;== Lost Woods == org $1AAE3D ; <- D2E3D . -db #VOLUME_C8 ; $C8 +db #!VOLUME_C8 ; $C8 org $1AAE66 ; <- D2E66 . -db #VOLUME_B4 ; $B4 +db #!VOLUME_B4 ; $B4 org $1AAE70 ; <- D2E70 . -db #VOLUME_B4 ; $B4 +db #!VOLUME_B4 ; $B4 org $1AAEAB ; <- D2EAB . -db #VOLUME_B4 ; $B4 +db #!VOLUME_B4 ; $B4 org $1AAEE6 ; <- D2EE6 . -db #VOLUME_A0 ; $A0 +db #!VOLUME_A0 ; $A0 org $1AAF00 ; <- D2F00 . -db #VOLUME_82 ; $82 +db #!VOLUME_82 ; $82 org $1AAF36 ; <- D2F36 . -db #VOLUME_C8 ; $C8 +db #!VOLUME_C8 ; $C8 org $1AAF46 ; <- D2F46 . -db #VOLUME_C8 ; $C8 +db #!VOLUME_C8 ; $C8 org $1AAF6F ; <- D2F6F . -db #VOLUME_C8 ; $C8 +db #!VOLUME_C8 ; $C8 ;org $1AAFCF ; <- D2FCF . (unused track) -;db #VOLUME_C8 ; $C8 +;db #!VOLUME_C8 ; $C8 ;org $1AAFDF ; <- D2FDF . (unused track) -;db #VOLUME_C8 ; $C8 +;db #!VOLUME_C8 ; $C8 ;org $1AB02B ; <- D302B . (unused track) -;db #VOLUME_C8 ; $C8 +;db #!VOLUME_C8 ; $C8 org $1AB086 ; <- D3086 . -db #VOLUME_C8 ; $C8 +db #!VOLUME_C8 ; $C8 org $1AB099 ; <- D3099 . -db #VOLUME_C8 ; $C8 +db #!VOLUME_C8 ; $C8 org $1AB0A5 ; <- D30A5 . -db #VOLUME_C8 ; $C8 +db #!VOLUME_C8 ; $C8 org $1AB0CD ; <- D30CD . -db #VOLUME_C8 ; $C8 +db #!VOLUME_C8 ; $C8 org $1AB0F6 ; <- D30F6 . -db #VOLUME_C8 ; $C8 +db #!VOLUME_C8 ; $C8 org $1AB11D ; <- D311D . -db #VOLUME_8C ; $8C +db #!VOLUME_8C ; $8C org $1AB154 ; <- D3154 . -db #VOLUME_C8 ; $C8 +db #!VOLUME_C8 ; $C8 org $1AB184 ; <- D3184 . -db #VOLUME_C8 ; $C8 +db #!VOLUME_C8 ; $C8 org $1AB1D1 ; <- D31D1 . -db #VOLUME_8C ; $8C +db #!VOLUME_8C ; $8C ;== Episode III - A Link to the Past randomizer == org $1AB33A ; <- D333A . -db #VOLUME_C8 ; $C8 +db #!VOLUME_C8 ; $C8 org $1AB3D9 ; <- D33D9 . -db #VOLUME_C8 ; $C8 +db #!VOLUME_C8 ; $C8 org $1AB49F ; <- D349F . -db #VOLUME_C8 ; $C8 +db #!VOLUME_C8 ; $C8 org $1AB54A ; <- D354A . -db #VOLUME_C8 ; $C8 +db #!VOLUME_C8 ; $C8 org $1AB5E5 ; <- D35E5 . -db #VOLUME_C8 ; $C8 +db #!VOLUME_C8 ; $C8 org $1AB624 ; <- D3624 . -db #VOLUME_C8 ; $C8 +db #!VOLUME_C8 ; $C8 org $1AB63C ; <- D363C . -db #VOLUME_C8 ; $C8 +db #!VOLUME_C8 ; $C8 org $1AB64A ; <- D364A . -db #VOLUME_D2 ; $D2 +db #!VOLUME_D2 ; $D2 org $1AB672 ; <- D3672 . -db #VOLUME_C8 ; $C8 +db #!VOLUME_C8 ; $C8 org $1AB691 ; <- D3691 . -db #VOLUME_C8 ; $C8 +db #!VOLUME_C8 ; $C8 org $1AB69F ; <- D369F . -db #VOLUME_D2 ; $D2 +db #!VOLUME_D2 ; $D2 org $1AB6B4 ; <- D36B4 . -db #VOLUME_C8 ; $C8 +db #!VOLUME_C8 ; $C8 org $1AB6C6 ; <- D36C6 . -db #VOLUME_C8 ; $C8 +db #!VOLUME_C8 ; $C8 org $1AB724 ; <- D3724 . -db #VOLUME_C8 ; $C8 +db #!VOLUME_C8 ; $C8 ;org $1AB73B ; <- D373B . (muted track) -;db #VOLUME_00 ; $00 +;db #!VOLUME_00 ; $00 org $1AB747 ; <- D3747 . -db #VOLUME_D2 ; $D2 +db #!VOLUME_D2 ; $D2 ;org $1AB75B ; <- D375B . (muted track) -;db #VOLUME_00 ; $00 +;db #!VOLUME_00 ; $00 org $1AB767 ; <- D3767 . -db #VOLUME_C8 ; $C8 +db #!VOLUME_C8 ; $C8 ;== Kakariko == org $1AB8CB ; <- D38CB . -db #VOLUME_C8 ; $C8 +db #!VOLUME_C8 ; $C8 org $1AB8ED ; <- D38ED . -db #VOLUME_A0 ; $A0 +db #!VOLUME_A0 ; $A0 org $1ABB1D ; <- D3B1D . -db #VOLUME_C8 ; $C8 +db #!VOLUME_C8 ; $C8 org $1ABB2F ; <- D3B2F . -db #VOLUME_C8 ; $C8 +db #!VOLUME_C8 ; $C8 org $1ABB55 ; <- D3B55 . -db #VOLUME_C8 ; $C8 +db #!VOLUME_C8 ; $C8 org $1ABB70 ; <- D3B70 . -db #VOLUME_C8 ; $C8 +db #!VOLUME_C8 ; $C8 org $1ABB81 ; <- D3B81 . -db #VOLUME_C8 ; $C8 +db #!VOLUME_C8 ; $C8 org $1ABB97 ; <- D3B97 . -db #VOLUME_B4 ; $B4 +db #!VOLUME_B4 ; $B4 org $1ABBAC ; <- D3BAC . -db #VOLUME_B4 ; $B4 +db #!VOLUME_B4 ; $B4 org $1ABBBF ; <- D3BBF . -db #VOLUME_C8 ; $C8 +db #!VOLUME_C8 ; $C8 org $1ABBE8 ; <- D3BE8 . -db #VOLUME_B4 ; $B4 +db #!VOLUME_B4 ; $B4 org $1ABC0D ; <- D3C0D . -db #VOLUME_B4 ; $B4 +db #!VOLUME_B4 ; $B4 org $1ABC39 ; <- D3C39 . -db #VOLUME_B4 ; $B4 +db #!VOLUME_B4 ; $B4 org $1ABC68 ; <- D3C68 . -db #VOLUME_B4 ; $B4 +db #!VOLUME_B4 ; $B4 org $1ABC91 ; <- D3C91 . -db #VOLUME_A0 ; $A0 +db #!VOLUME_A0 ; $A0 org $1ABC9F ; <- D3C9F . -db #VOLUME_B4 ; $B4 +db #!VOLUME_B4 ; $B4 org $1ABCBC ; <- D3CBC . -db #VOLUME_B4 ; $B4 +db #!VOLUME_B4 ; $B4 org $1ABCD3 ; <- D3CD3 . -db #VOLUME_A0 ; $A0 +db #!VOLUME_A0 ; $A0 org $1ABCE8 ; <- D3CE8 . -db #VOLUME_A0 ; $A0 +db #!VOLUME_A0 ; $A0 ;== Mirror Sounds == org $1ABD34 ; <- D3D34 . -db #VOLUME_C8 ; $C8 +db #!VOLUME_C8 ; $C8 org $1ABD55 ; <- D3D55 . -db #VOLUME_C8 ; $C8 +db #!VOLUME_C8 ; $C8 org $1ABD6E ; <- D3D6E . -db #VOLUME_C8 ; $C8 +db #!VOLUME_C8 ; $C8 org $1ABDAA ; <- D3DAA . -db #VOLUME_FA ; $FA +db #!VOLUME_FA ; $FA org $1ABDC6 ; <- D3DC6 . -db #VOLUME_C8 ; $C8 +db #!VOLUME_C8 ; $C8 org $1ABE04 ; <- D3E04 . (this track sounds awesome on its own) -db #VOLUME_C8 ; $C8 +db #!VOLUME_C8 ; $C8 org $1ABE38 ; <- D3E38 . -db #VOLUME_C8 ; $C8 +db #!VOLUME_C8 ; $C8 ;== Dark World == org $1ABF0C ; <- D3F0C . -db #VOLUME_A0 ; $A0 +db #!VOLUME_A0 ; $A0 org $1ABF45 ; <- D3F45 . -db #VOLUME_78 ; $78 +db #!VOLUME_78 ; $78 org $1ABF65 ; <- D3F65 . -db #VOLUME_C8 ; $C8 +db #!VOLUME_C8 ; $C8 org $1ABF82 ; <- D3F82 . -db #VOLUME_A0 ; $A0 +db #!VOLUME_A0 ; $A0 org $1ABFA6 ; <- D3FA6 . -db #VOLUME_C8 ; $C8 +db #!VOLUME_C8 ; $C8 org $1AC01E ; <- D401E . -db #VOLUME_B4 ; $B4 +db #!VOLUME_B4 ; $B4 org $1AC04F ; <- D404F . -db #VOLUME_C8 ; $C8 +db #!VOLUME_C8 ; $C8 org $1AC05F ; <- D405F . -db #VOLUME_A0 ; $A0 +db #!VOLUME_A0 ; $A0 org $1AC087 ; <- D4087 . -db #VOLUME_C8 ; $C8 +db #!VOLUME_C8 ; $C8 org $1AC139 ; <- D4139 . -db #VOLUME_A0 ; $A0 +db #!VOLUME_A0 ; $A0 org $1AC148 ; <- D4148 . -db #VOLUME_8C ; $8C +db #!VOLUME_8C ; $8C org $1AC17A ; <- D417A . -db #VOLUME_C8 ; $C8 +db #!VOLUME_C8 ; $C8 org $1AC198 ; <- D4198 . -db #VOLUME_A0 ; $A0 +db #!VOLUME_A0 ; $A0 org $1AC1A0 ; <- D41A0 . -db #VOLUME_C8 ; $C8 +db #!VOLUME_C8 ; $C8 org $1AC1D5 ; <- D41D5 . -db #VOLUME_A0 ; $A0 +db #!VOLUME_A0 ; $A0 org $1AC1F6 ; <- D41F6 . -db #VOLUME_A0 ; $A0 +db #!VOLUME_A0 ; $A0 org $1AC22B ; <- D422B . -db #VOLUME_A0 ; $A0 +db #!VOLUME_A0 ; $A0 org $1AC25C ; <- D425C . -db #VOLUME_C8 ; $C8 +db #!VOLUME_C8 ; $C8 org $1AC270 ; <- D4270 . -db #VOLUME_A0 ; $A0 +db #!VOLUME_A0 ; $A0 org $1AC290 ; <- D4290 . -db #VOLUME_B4 ; $B4 +db #!VOLUME_B4 ; $B4 org $1AC2B1 ; <- D42B1 . -db #VOLUME_A0 ; $A0 +db #!VOLUME_A0 ; $A0 org $1AC2EB ; <- D42EB . -db #VOLUME_78 ; $78 +db #!VOLUME_78 ; $78 org $1AC306 ; <- D4306 (Volume fade) . -db #VOLUME_5A ; $5A +db #!VOLUME_5A ; $5A org $1AC319 ; <- D4319 . -db #VOLUME_C8 ; $C8 +db #!VOLUME_C8 ; $C8 org $1AC334 ; <- D4334 . -db #VOLUME_A0 ; $A0 +db #!VOLUME_A0 ; $A0 org $1AC33C ; <- D433C . -db #VOLUME_C8 ; $C8 +db #!VOLUME_C8 ; $C8 org $1AC371 ; <- D4371 . -db #VOLUME_A0 ; $A0 +db #!VOLUME_A0 ; $A0 org $1AC3A6 ; <- D43A6 . -db #VOLUME_A0 ; $A0 +db #!VOLUME_A0 ; $A0 org $1AC3DB ; <- D43DB . -db #VOLUME_A0 ; $A0 +db #!VOLUME_A0 ; $A0 org $1AC3EF ; <- D43EF . -db #VOLUME_C8 ; $C8 +db #!VOLUME_C8 ; $C8 org $1AC40C ; <- D440C . -db #VOLUME_C8 ; $C8 +db #!VOLUME_C8 ; $C8 org $1AC41E ; <- D441E . -db #VOLUME_A0 ; $A0 +db #!VOLUME_A0 ; $A0 org $1AC43E ; <- D443E . -db #VOLUME_B4 ; $B4 +db #!VOLUME_B4 ; $B4 org $1AC452 ; <- D4452 . -db #VOLUME_C8 ; $C8 +db #!VOLUME_C8 ; $C8 org $1AC494 ; <- D4494 . -db #VOLUME_C8 ; $C8 +db #!VOLUME_C8 ; $C8 org $1AC4B5 ; <- D44B5 . -db #VOLUME_C8 ; $C8 +db #!VOLUME_C8 ; $C8 org $1AC512 ; <- D4512 . -db #VOLUME_C8 ; $C8 +db #!VOLUME_C8 ; $C8 org $1AC56F ; <- D456F . -db #VOLUME_B4 ; $B4 +db #!VOLUME_B4 ; $B4 org $1AC597 ; <- D4597 . -db #VOLUME_A0 ; $A0 +db #!VOLUME_A0 ; $A0 org $1AC5D1 ; <- D45D1 . -db #VOLUME_C8 ; $C8 +db #!VOLUME_C8 ; $C8 org $1AC5EF ; <- D45EF . -db #VOLUME_C8 ; $C8 +db #!VOLUME_C8 ; $C8 org $1AC682 ; <- D4682 . -db #VOLUME_C8 ; $C8 +db #!VOLUME_C8 ; $C8 org $1AC6C3 ; <- D46C3 . -db #VOLUME_C8 ; $C8 +db #!VOLUME_C8 ; $C8 ;== Getting Master Sword == org $1AC731 ; <- D4731 . -db #VOLUME_DC ; $DC +db #!VOLUME_DC ; $DC org $1AC753 ; <- D4753 . -db #VOLUME_DC ; $DC +db #!VOLUME_DC ; $DC org $1AC774 ; <- D4774 . -db #VOLUME_DC ; $DC +db #!VOLUME_DC ; $DC org $1AC795 ; <- D4795 . -db #VOLUME_DC ; $DC +db #!VOLUME_DC ; $DC org $1AC7B6 ; <- D47B6 . -db #VOLUME_DC ; $DC +db #!VOLUME_DC ; $DC org $1AC7D3 ; <- D47D3 . -db #VOLUME_B4 ; $B4 +db #!VOLUME_B4 ; $B4 ;== Hostile Kakariko Guards == org $1AC83C ; <- D483C . -db #VOLUME_C8 ; $C8 +db #!VOLUME_C8 ; $C8 org $1AC848 ; <- D4848 . -db #VOLUME_C8 ; $C8 +db #!VOLUME_C8 ; $C8 org $1AC855 ; <- D4855 . -db #VOLUME_C8 ; $C8 +db #!VOLUME_C8 ; $C8 org $1AC862 ; <- D4862 . -db #VOLUME_C8 ; $C8 +db #!VOLUME_C8 ; $C8 org $1AC86F ; <- D486F . -db #VOLUME_C8 ; $C8 +db #!VOLUME_C8 ; $C8 org $1AC87C ; <- D487C . -db #VOLUME_C8 ; $C8 +db #!VOLUME_C8 ; $C8 org $1AC8B9 ; <- D48B9 . -db #VOLUME_78 ; $78 +db #!VOLUME_78 ; $78 org $1AC8FF ; <- D48FF . -db #VOLUME_78 ; $78 +db #!VOLUME_78 ; $78 ;== Title theme (after triforce jingle) == org $1ACA1C ; <- D4A1C . -db #VOLUME_C8 ; $C8 +db #!VOLUME_C8 ; $C8 org $1ACA3B ; <- D4A3B . -db #VOLUME_C8 ; $C8 +db #!VOLUME_C8 ; $C8 org $1ACA60 ; <- D4A60 . -db #VOLUME_C8 ; $C8 +db #!VOLUME_C8 ; $C8 org $1ACAA5 ; <- D4AA5 . -db #VOLUME_DC ; $DC +db #!VOLUME_DC ; $DC org $1ACAE4 ; <- D4AE4 . -db #VOLUME_DC ; $DC +db #!VOLUME_DC ; $DC org $1ACB27 ; <- D4B27 . -db #VOLUME_C8 ; $C8 +db #!VOLUME_C8 ; $C8 org $1ACB3C ; <- D4B3C . -db #VOLUME_A0 ; $A0 +db #!VOLUME_A0 ; $A0 org $1ACB96 ; <- D4B96 . -db #VOLUME_DC ; $DC +db #!VOLUME_DC ; $DC org $1ACBAB ; <- D4BAB . -db #VOLUME_A0 ; $A0 +db #!VOLUME_A0 ; $A0 org $1ACC03 ; <- D4C03 . -db #VOLUME_A0 ; $A0 +db #!VOLUME_A0 ; $A0 org $1ACC53 ; <- D4C53 . -db #VOLUME_A0 ; $A0 +db #!VOLUME_A0 ; $A0 org $1ACC7A ; <- D4C7A . -db #VOLUME_C8 ; $C8 +db #!VOLUME_C8 ; $C8 org $1ACC7F ; <- D4C7F . -db #VOLUME_A0 ; $A0 +db #!VOLUME_A0 ; $A0 org $1ACCA5 ; <- D4CA5 . -db #VOLUME_DC ; $DC +db #!VOLUME_DC ; $DC ;== Skull Woods == org $1ACD12 ; <- D4D12 . -db #VOLUME_C8 ; $C8 +db #!VOLUME_C8 ; $C8 org $1ACD43 ; <- D4D43 . -db #VOLUME_B4 ; $B4 +db #!VOLUME_B4 ; $B4 org $1ACD81 ; <- D4D81 . -db #VOLUME_C8 ; $C8 +db #!VOLUME_C8 ; $C8 org $1ACD9C ; <- D4D9C . -db #VOLUME_A0 ; $A0 +db #!VOLUME_A0 ; $A0 org $1ACDCC ; <- D4DCC . -db #VOLUME_B4 ; $B4 +db #!VOLUME_B4 ; $B4 org $1ACE90 ; <- D4E90 . -db #VOLUME_C8 ; $C8 +db #!VOLUME_C8 ; $C8 org $1ACEBA ; <- D4EBA . -db #VOLUME_B4 ; $B4 +db #!VOLUME_B4 ; $B4 org $1ACED6 ; <- D4ED6 . -db #VOLUME_C8 ; $C8 +db #!VOLUME_C8 ; $C8 org $1ACEE2 ; <- D4EE2 . -db #VOLUME_C8 ; $C8 +db #!VOLUME_C8 ; $C8 org $1ACF0B ; <- D4F0B . -db #VOLUME_B4 ; $B4 +db #!VOLUME_B4 ; $B4 org $1ACFE5 ; <- D4FE5 . -db #VOLUME_B4 ; $B4 +db #!VOLUME_B4 ; $B4 org $1AD005 ; <- D5005 . -db #VOLUME_C8 ; $C8 +db #!VOLUME_C8 ; $C8 org $1AD012 ; <- D5012 . -db #VOLUME_B4 ; $B4 +db #!VOLUME_B4 ; $B4 org $1AD02E ; <- D502E . -db #VOLUME_C8 ; $C8 +db #!VOLUME_C8 ; $C8 org $1AD03C ; <- D503C . -db #VOLUME_C8 ; $C8 +db #!VOLUME_C8 ; $C8 org $1AD081 ; <- D5081 . -db #VOLUME_C8 ; $C8 +db #!VOLUME_C8 ; $C8 ;== Minigame == org $1AD1A8 ; <- D51A8 . -db #VOLUME_FA ; $FA +db #!VOLUME_FA ; $FA org $1AD1B1 ; <- D51B1 . -db #VOLUME_C8 ; $C8 +db #!VOLUME_C8 ; $C8 org $1AD1C7 ; <- D51C7 . -db #VOLUME_C8 ; $C8 +db #!VOLUME_C8 ; $C8 org $1AD1CF ; <- D51CF . -db #VOLUME_C8 ; $C8 +db #!VOLUME_C8 ; $C8 org $1AD1E6 ; <- D51E6 . -db #VOLUME_FA ; $FA +db #!VOLUME_FA ; $FA org $1AD1EF ; <- D51EF . -db #VOLUME_C8 ; $C8 +db #!VOLUME_C8 ; $C8 org $1AD20C ; <- D520C . -db #VOLUME_C8 ; $C8 +db #!VOLUME_C8 ; $C8 org $1AD214 ; <- D5214 . -db #VOLUME_C8 ; $C8 +db #!VOLUME_C8 ; $C8 org $1AD231 ; <- D5231 . -db #VOLUME_C8 ; $C8 +db #!VOLUME_C8 ; $C8 org $1AD24E ; <- D524E . -db #VOLUME_FA ; $FA +db #!VOLUME_FA ; $FA org $1AD257 ; <- D5257 . -db #VOLUME_C8 ; $C8 +db #!VOLUME_C8 ; $C8 org $1AD26D ; <- D526D . -db #VOLUME_C8 ; $C8 +db #!VOLUME_C8 ; $C8 org $1AD275 ; <- D5275 . -db #VOLUME_C8 ; $C8 +db #!VOLUME_C8 ; $C8 org $1AD29E ; <- D529E . -db #VOLUME_FA ; $FA +db #!VOLUME_FA ; $FA org $1AD2AF ; <- D52AF . -db #VOLUME_C8 ; $C8 +db #!VOLUME_C8 ; $C8 org $1AD2BD ; <- D52BD . -db #VOLUME_C8 ; $C8 +db #!VOLUME_C8 ; $C8 org $1AD2CD ; <- D52CD . -db #VOLUME_C8 ; $C8 +db #!VOLUME_C8 ; $C8 org $1AD2DB ; <- D52DB . -db #VOLUME_C8 ; $C8 +db #!VOLUME_C8 ; $C8 ;== Triforce Chamber == org $1AD424 ; <- D5424 . -db #VOLUME_A0 ; $A0 +db #!VOLUME_A0 ; $A0 org $1AD43F ; <- D543F . -db #VOLUME_78 ; $78 +db #!VOLUME_78 ; $78 org $1AD477 ; <- D5477 . -db #VOLUME_DC ; $DC +db #!VOLUME_DC ; $DC org $1AD49C ; <- D549C . -db #VOLUME_C8 ; $C8 +db #!VOLUME_C8 ; $C8 org $1AD4BC ; <- D54BC . -db #VOLUME_B4 ; $B4 +db #!VOLUME_B4 ; $B4 org $1AD4D5 ; <- D54D5 . -db #VOLUME_B4 ; $B4 +db #!VOLUME_B4 ; $B4 org $1AD4F0 ; <- D54F0 . -db #VOLUME_B4 ; $B4 +db #!VOLUME_B4 ; $B4 org $1AD509 ; <- D5509 . -db #VOLUME_B4 ; $B4 +db #!VOLUME_B4 ; $B4 org $1AD543 ; <- D5543 . -db #VOLUME_8C ; $8C +db #!VOLUME_8C ; $8C ;== Credits fuck it i'm not testing this, they look right though. === org $1AD7D8 ; <- D57D8 . -db #VOLUME_B4 ; $B4 +db #!VOLUME_B4 ; $B4 org $1AD801 ; <- D5801 . -db #VOLUME_C8 ; $C8 +db #!VOLUME_C8 ; $C8 org $1AD817 ; <- D5817 . -db #VOLUME_78 ; $78 +db #!VOLUME_78 ; $78 org $1AD8A4 ; <- D58A4 -db #VOLUME_C8 ; $C8 +db #!VOLUME_C8 ; $C8 org $1AD954 ; <- D5954 -db #VOLUME_3C ; $3C +db #!VOLUME_3C ; $3C org $1AD957 ; <- D5957 (Volume fade) -db #VOLUME_78 ; $78 +db #!VOLUME_78 ; $78 org $1AD9B9 ; <- D59B9 -db #VOLUME_B4 ; $B4 +db #!VOLUME_B4 ; $B4 org $1ADA2F ; <- D5A2F (maybe a silent track?) -db #VOLUME_B4 ; $B4 +db #!VOLUME_B4 ; $B4 org $1ADA3D ; <- D5A3D -db #VOLUME_DC ; $DC +db #!VOLUME_DC ; $DC org $1ADA4D ; <- D5A4D -db #VOLUME_E6 ; $E6 +db #!VOLUME_E6 ; $E6 org $1ADA68 ; <- D5A68 -db #VOLUME_C8 ; $C8 +db #!VOLUME_C8 ; $C8 org $1ADA7F ; <- D5A7F -db #VOLUME_C8 ; $C8 +db #!VOLUME_C8 ; $C8 org $1ADACB ; <- D5ACB -db #VOLUME_78 ; $78 +db #!VOLUME_78 ; $78 org $1ADAE8 ; <- D5AE8 -db #VOLUME_78 ; $78 +db #!VOLUME_78 ; $78 org $1ADAEB ; <- D5AEB (Volume fade) -db #VOLUME_B4 ; $B4 +db #!VOLUME_B4 ; $B4 org $1ADB47 ; <- D5B47 -db #VOLUME_50 ; $50 +db #!VOLUME_50 ; $50 org $1ADB4A ; <- D5B4A (Volume fade) -db #VOLUME_78 ; $78 +db #!VOLUME_78 ; $78 org $1ADB5E ; <- D5B5E -db #VOLUME_50 ; $50 +db #!VOLUME_50 ; $50 org $1ADB6F ; <- D5B6F (Volume fade) -db #VOLUME_8C ; $8C +db #!VOLUME_8C ; $8C org $1ADC12 ; <- D5C12 -db #VOLUME_C8 ; $C8 +db #!VOLUME_C8 ; $C8 org $1ADD71 ; <- D5D71 -db #VOLUME_C8 ; $C8 +db #!VOLUME_C8 ; $C8 org $1ADDDC ; <- D5DDC -db #VOLUME_E6 ; $E6 +db #!VOLUME_E6 ; $E6 org $1ADE10 ; <- D5E10 -db #VOLUME_C8 ; $C8 +db #!VOLUME_C8 ; $C8 org $1ADE5E ; <- D5E5E -db #VOLUME_B4 ; $B4 +db #!VOLUME_B4 ; $B4 org $1ADE9A ; <- D5E9A -db #VOLUME_C8 ; $C8 +db #!VOLUME_C8 ; $C8 org $1ADF28 ; <- D5F28 -db #VOLUME_FF ; $FF +db #!VOLUME_FF ; $FF org $1ADF8B ; <- D5F8B -db #VOLUME_C8 ; $C8 +db #!VOLUME_C8 ; $C8 org $1ADFA4 ; <- D5FA4 -db #VOLUME_C8 ; $C8 +db #!VOLUME_C8 ; $C8 org $1ADFE9 ; <- D5FE9 -db #VOLUME_B4 ; $B4 +db #!VOLUME_B4 ; $B4 org $1AE045 ; <- D6045 . -db #VOLUME_FA ; $FA +db #!VOLUME_FA ; $FA ;== Pre-credits == org $1AE51A ; <- D651A . -db #VOLUME_C8 ; $C8 +db #!VOLUME_C8 ; $C8 org $1AE53B ; <- D653B (Volume Fade) . -db #VOLUME_3C ; $3C +db #!VOLUME_3C ; $3C org $1AE542 ; <- D6542 . -db #VOLUME_C8 ; $C8 +db #!VOLUME_C8 ; $C8 org $1AE566 ; <- D6566 . -db #VOLUME_DC ; $DC +db #!VOLUME_DC ; $DC org $1AE58F ; <- D658F . -db #VOLUME_B4 ; $B4 +db #!VOLUME_B4 ; $B4 org $1AE5B3 ; <- D65B3 . -db #VOLUME_8C ; $8C +db #!VOLUME_8C ; $8C org $1AE5D2 ; <- D65D2 . -db #VOLUME_A0 ; $A0 +db #!VOLUME_A0 ; $A0 org $1AE5ED ; <- D65ED . -db #VOLUME_C8 ; $C8 +db #!VOLUME_C8 ; $C8 org $1AE61D ; <- D661D . -db #VOLUME_C8 ; $C8 +db #!VOLUME_C8 ; $C8 org $1AE64F ; <- D664F . -db #VOLUME_A0 ; $A0 +db #!VOLUME_A0 ; $A0 org $1AE698 ; <- D6698 . -db #VOLUME_A0 ; $A0 +db #!VOLUME_A0 ; $A0 org $1AE6D7 ; <- D66D7 . -db #VOLUME_C8 ; $C8 +db #!VOLUME_C8 ; $C8 org $1AE6FF ; <- D66FF . -db #VOLUME_A0 ; $A0 +db #!VOLUME_A0 ; $A0 org $1AE72C ; <- D672C . -db #VOLUME_DC ; $DC +db #!VOLUME_DC ; $DC org $1AE74A ; <- D674A . -db #VOLUME_B4 ; $B4 +db #!VOLUME_B4 ; $B4 org $1AE760 ; <- D6760 . -db #VOLUME_8C ; $8C +db #!VOLUME_8C ; $8C org $1AE776 ; <- D6776 . -db #VOLUME_C8 ; $C8 +db #!VOLUME_C8 ; $C8 org $1AE7C0 ; <- D67C0 . -db #VOLUME_DC ; $DC +db #!VOLUME_DC ; $DC org $1AE827 ; <- D6827 . -db #VOLUME_B4 ; $B4 +db #!VOLUME_B4 ; $B4 org $1AE878 ; <- D6878 . -db #VOLUME_64 ; $64 +db #!VOLUME_64 ; $64 org $1AE883 ; <- D6883 . -db #VOLUME_64 ; $64 +db #!VOLUME_64 ; $64 org $1AE8BD ; <- D68BD . -db #VOLUME_C8 ; $C8 +db #!VOLUME_C8 ; $C8 ;== Holding the Triforce (part 1, more below) == org $1AE8E5 ; <- D68E5 . -db #VOLUME_C8 ; $C8 +db #!VOLUME_C8 ; $C8 ;== More pre-credits stuff == org $1AE956 ; <- D6956 . -db #VOLUME_C8 ; $C8 +db #!VOLUME_C8 ; $C8 org $1AE973 ; <- D6973 . -db #VOLUME_C8 ; $C8 +db #!VOLUME_C8 ; $C8 org $1AE985 ; <- D6985 . -db #VOLUME_A0 ; $A0 +db #!VOLUME_A0 ; $A0 org $1AE9A8 ; <- D69A8 . -db #VOLUME_C8 ; $C8 +db #!VOLUME_C8 ; $C8 org $1AE9B8 ; <- D69B8 . -db #VOLUME_DC ; $DC +db #!VOLUME_DC ; $DC org $1AE9D6 ; <- D69D6 . -db #VOLUME_B4 ; $B4 +db #!VOLUME_B4 ; $B4 org $1AE9F5 ; <- D69F5 . -db #VOLUME_B4 ; $B4 +db #!VOLUME_B4 ; $B4 org $1AEA05 ; <- D6A05 . -db #VOLUME_B4 ; $B4 +db #!VOLUME_B4 ; $B4 org $1AEA51 ; <- D6A51 . -db #VOLUME_C8 ; $C8 +db #!VOLUME_C8 ; $C8 org $1AEA86 ; <- D6A86 . -db #VOLUME_C8 ; $C8 +db #!VOLUME_C8 ; $C8 org $1AEAB1 ; <- D6AB1 . -db #VOLUME_DC ; $DC +db #!VOLUME_DC ; $DC org $1AEAE9 ; <- D6AE9 . -db #VOLUME_B4 ; $B4 +db #!VOLUME_B4 ; $B4 org $1AEB6B ; <- D6B6B . -db #VOLUME_8C ; $8C +db #!VOLUME_8C ; $8C org $1AEB96 ; <- D6B96 . -db #VOLUME_C8 ; $C8 +db #!VOLUME_C8 ; $C8 org $1AEC05 ; <- D6C05 . -db #VOLUME_DC ; $DC +db #!VOLUME_DC ; $DC org $1AEC3E ; <- D6C3E . -db #VOLUME_C8 ; $C8 +db #!VOLUME_C8 ; $C8 org $1AEC5C ; <- D6C5C . -db #VOLUME_A0 ; $A0 +db #!VOLUME_A0 ; $A0 org $1AEC6F ; <- D6C6F . -db #VOLUME_A0 ; $A0 +db #!VOLUME_A0 ; $A0 org $1AEC8E ; <- D6C8E . -db #VOLUME_A0 ; $A0 +db #!VOLUME_A0 ; $A0 org $1AECB4 ; <- D6CB4 . -db #VOLUME_A0 ; $A0 +db #!VOLUME_A0 ; $A0 org $1AED4A ; <- D6D4A . -db #VOLUME_C8 ; $C8 +db #!VOLUME_C8 ; $C8 org $1AED7D ; <- D6D7D . -db #VOLUME_A0 ; $A0 +db #!VOLUME_A0 ; $A0 org $1AEDB3 ; <- D6DB3 . -db #VOLUME_DC ; $DC +db #!VOLUME_DC ; $DC org $1AEDCF ; <- D6DCF . -db #VOLUME_B4 ; $B4 +db #!VOLUME_B4 ; $B4 org $1AEDF6 ; <- D6DF6 . -db #VOLUME_8C ; $8C +db #!VOLUME_8C ; $8C org $1AEE0D ; <- D6E0D . -db #VOLUME_8C ; $8C +db #!VOLUME_8C ; $8C org $1AEE20 ; <- D6E20 . -db #VOLUME_B4 ; $B4 +db #!VOLUME_B4 ; $B4 org $1AEE48 ; <- D6E48 . -db #VOLUME_64 ; $64 +db #!VOLUME_64 ; $64 org $1AEE76 ; <- D6E76 . -db #VOLUME_64 ; $64 +db #!VOLUME_64 ; $64 org $1AEE9C ; <- D6E9C . -db #VOLUME_C8 ; $C8 +db #!VOLUME_C8 ; $C8 org $1AEECB ; <- D6ECB . -db #VOLUME_B4 ; $B4 +db #!VOLUME_B4 ; $B4 org $1AEEFB ; <- D6EFB . -db #VOLUME_64 ; $64 +db #!VOLUME_64 ; $64 org $1AEF2D ; <- D6F2D . -db #VOLUME_64 ; $64 +db #!VOLUME_64 ; $64 org $1AEF80 ; <- D6F80 (i think this is unused, but i don't feel like confirming this one) -db #VOLUME_C8 ; $C8 +db #!VOLUME_C8 ; $C8 org $1AF17E ; <- D717E . -db #VOLUME_C8 ; $C8 +db #!VOLUME_C8 ; $C8 ;== Holding the Triforce (part 2) == org $1AF190 ; <- D7190 . -db #VOLUME_C8 ; $C8 +db #!VOLUME_C8 ; $C8 org $1AF1AB ; <- D71AB . -db #VOLUME_DC ; $DC +db #!VOLUME_DC ; $DC org $1AF1B9 ; <- D71B9 . -db #VOLUME_C8 ; $C8 +db #!VOLUME_C8 ; $C8 org $1AF1D4 ; <- D71D4 . -db #VOLUME_B4 ; $B4 +db #!VOLUME_B4 ; $B4 org $1AF1E6 ; <- D71E6 . -db #VOLUME_B4 ; $B4 +db #!VOLUME_B4 ; $B4 org $1AF203 ; <- D7203 . -db #VOLUME_B4 ; $B4 +db #!VOLUME_B4 ; $B4 org $1AF21E ; <- D721E . -db #VOLUME_B4 ; $B4 +db #!VOLUME_B4 ; $B4 ;== More Credits == org $1AF3A1 ; <- D73A1 . -db #VOLUME_8C ; $8C +db #!VOLUME_8C ; $8C ;== Hyrule Castle == org $1B811D ; <- D811D . -db #VOLUME_C8 ; $C8 +db #!VOLUME_C8 ; $C8 ;org $1B8139 ; <- D8139 . (silent track) -;db #VOLUME_C8 ; $C8 +;db #!VOLUME_C8 ; $C8 ;org $1B814C ; <- D814C . (silent track) -;db #VOLUME_8C ; $8C +;db #!VOLUME_8C ; $8C org $1B816B ; <- D816B . -db #VOLUME_C8 ; $C8 +db #!VOLUME_C8 ; $C8 org $1B818A ; <- D818A . -db #VOLUME_C8 ; $C8 +db #!VOLUME_C8 ; $C8 org $1B819E ; <- D819E . -db #VOLUME_C8 ; $C8 +db #!VOLUME_C8 ; $C8 org $1B81BE ; <- D81BE . -db #VOLUME_C8 ; $C8 +db #!VOLUME_C8 ; $C8 org $1B81DE ; <- D81DE . -db #VOLUME_FA ; $FA +db #!VOLUME_FA ; $FA org $1B821E ; <- D821E . -db #VOLUME_FA ; $FA +db #!VOLUME_FA ; $FA org $1B825D ; <- D825D . -db #VOLUME_8C ; $8C +db #!VOLUME_8C ; $8C org $1B827D ; <- D827D . -db #VOLUME_A0 ; $A0 +db #!VOLUME_A0 ; $A0 org $1B829C ; <- D829C . -db #VOLUME_C8 ; $C8 +db #!VOLUME_C8 ; $C8 org $1B82BE ; <- D82BE . -db #VOLUME_8C ; $8C +db #!VOLUME_8C ; $8C org $1B82E1 ; <- D82E1 . -db #VOLUME_C8 ; $C8 +db #!VOLUME_C8 ; $C8 org $1B8306 ; <- D8306 . -db #VOLUME_C8 ; $C8 +db #!VOLUME_C8 ; $C8 org $1B830E ; <- D830E . -db #VOLUME_C8 ; $C8 +db #!VOLUME_C8 ; $C8 org $1B8340 ; <- D8340 . -db #VOLUME_8C ; $8C +db #!VOLUME_8C ; $8C org $1B835E ; <- D835E . -db #VOLUME_C8 ; $C8 +db #!VOLUME_C8 ; $C8 org $1B8394 ; <- D8394 . -db #VOLUME_8C ; $8C +db #!VOLUME_8C ; $8C org $1B83AB ; <- D83AB . -db #VOLUME_C8 ; $C8 +db #!VOLUME_C8 ; $C8 org $1B83CA ; <- D83CA . -db #VOLUME_C8 ; $C8 +db #!VOLUME_C8 ; $C8 org $1B83F0 ; <- D83F0 . -db #VOLUME_C8 ; $C8 +db #!VOLUME_C8 ; $C8 org $1B83F8 ; <- D83F8 . -db #VOLUME_C8 ; $C8 +db #!VOLUME_C8 ; $C8 org $1B842C ; <- D842C . -db #VOLUME_8C ; $8C +db #!VOLUME_8C ; $8C org $1B844B ; <- D844B . -db #VOLUME_C8 ; $C8 +db #!VOLUME_C8 ; $C8 org $1B8479 ; <- D8479 . -db #VOLUME_C8 ; $C8 +db #!VOLUME_C8 ; $C8 org $1B849E ; <- D849E . -db #VOLUME_C8 ; $C8 +db #!VOLUME_C8 ; $C8 org $1B84CB ; <- D84CB . -db #VOLUME_C8 ; $C8 +db #!VOLUME_C8 ; $C8 org $1B84EB ; <- D84EB . -db #VOLUME_C8 ; $C8 +db #!VOLUME_C8 ; $C8 org $1B84F3 ; <- D84F3 . -db #VOLUME_C8 ; $C8 +db #!VOLUME_C8 ; $C8 org $1B854A ; <- D854A . -db #VOLUME_C8 ; $C8 +db #!VOLUME_C8 ; $C8 org $1B8573 ; <- D8573 . -db #VOLUME_C8 ; $C8 +db #!VOLUME_C8 ; $C8 org $1B859D ; <- D859D . -db #VOLUME_C8 ; $C8 +db #!VOLUME_C8 ; $C8 org $1B85B4 ; <- D85B4 . -db #VOLUME_C8 ; $C8 +db #!VOLUME_C8 ; $C8 org $1B85CE ; <- D85CE . -db #VOLUME_C8 ; $C8 +db #!VOLUME_C8 ; $C8 org $1B862A ; <- D862A . -db #VOLUME_C8 ; $C8 +db #!VOLUME_C8 ; $C8 org $1B8681 ; <- D8681 . -db #VOLUME_C8 ; $C8 +db #!VOLUME_C8 ; $C8 org $1B8724 ; <- D8724 . -db #VOLUME_B4 ; $B4 +db #!VOLUME_B4 ; $B4 org $1B8732 ; <- D8732 . -db #VOLUME_B4 ; $B4 +db #!VOLUME_B4 ; $B4 org $1B8796 ; <- D8796 . -db #VOLUME_8C ; $8C +db #!VOLUME_8C ; $8C org $1B87E3 ; <- D87E3 . -db #VOLUME_C8 ; $C8 +db #!VOLUME_C8 ; $C8 org $1B87FF ; <- D87FF . -db #VOLUME_C8 ; $C8 +db #!VOLUME_C8 ; $C8 org $1B887B ; <- D887B . -db #VOLUME_C8 ; $C8 +db #!VOLUME_C8 ; $C8 org $1B88C6 ; <- D88C6 . -db #VOLUME_C8 ; $C8 +db #!VOLUME_C8 ; $C8 org $1B88E3 ; <- D88E3 . -db #VOLUME_C8 ; $C8 +db #!VOLUME_C8 ; $C8 ;org $1B8903 ; <- D8903 . (silent track) -;db #VOLUME_8C ; $8C +;db #!VOLUME_8C ; $8C org $1B892A ; <- D892A . -db #VOLUME_8C ; $8C +db #!VOLUME_8C ; $8C org $1B8944 ; <- D8944 . -db #VOLUME_C8 ; $C8 +db #!VOLUME_C8 ; $C8 org $1B897B ; <- D897B . -db #VOLUME_C8 ; $C8 +db #!VOLUME_C8 ; $C8 ;== Pendant Dungeon == org $1B8C97 ; <- D8C97 . -db #VOLUME_C8 ; $C8 +db #!VOLUME_C8 ; $C8 org $1B8CA4 ; <- D8CA4 . -db #VOLUME_C8 ; $C8 +db #!VOLUME_C8 ; $C8 org $1B8CB3 ; <- D8CB3 . -db #VOLUME_C8 ; $C8 +db #!VOLUME_C8 ; $C8 org $1B8CC2 ; <- D8CC2 . -db #VOLUME_C8 ; $C8 +db #!VOLUME_C8 ; $C8 org $1B8CD1 ; <- D8CD1 . -db #VOLUME_C8 ; $C8 +db #!VOLUME_C8 ; $C8 org $1B8D01 ; <- D8D01 . -db #VOLUME_C8 ; $C8 +db #!VOLUME_C8 ; $C8 org $1B8E2D ; <- D8E2D . -db #VOLUME_DC ; $DC +db #!VOLUME_DC ; $DC org $1B8F0D ; <- D8F0D . -db #VOLUME_DC ; $DC +db #!VOLUME_DC ; $DC ;org $1B90F8 ; <- D90F8 (muted track) -;db #VOLUME_00 ; $00 +;db #!VOLUME_00 ; $00 ;== Caves == org $1B917B ; <- D917B . -db #VOLUME_C8 ; $C8 +db #!VOLUME_C8 ; $C8 org $1B918C ; <- D918C . -db #VOLUME_C8 ; $C8 +db #!VOLUME_C8 ; $C8 org $1B919A ; <- D919A . -db #VOLUME_C8 ; $C8 +db #!VOLUME_C8 ; $C8 org $1B91B5 ; <- D91B5 . -db #VOLUME_C8 ; $C8 +db #!VOLUME_C8 ; $C8 org $1B91D0 ; <- D91D0 . -db #VOLUME_C8 ; $C8 +db #!VOLUME_C8 ; $C8 org $1B91DD ; <- D91DD . (splashy sound) -db #VOLUME_C8 ; $C8 +db #!VOLUME_C8 ; $C8 org $1B91E8 ; <- D91E8 . -db #VOLUME_8C ; $8C +db #!VOLUME_8C ; $8C org $1B9220 ; <- D9220 . (splashy sound) -db #VOLUME_C8 ; $C8 +db #!VOLUME_C8 ; $C8 org $1B922B ; <- D922B . -db #VOLUME_8C ; $8C +db #!VOLUME_8C ; $8C org $1B9273 ; <- D9273 . -db #VOLUME_C8 ; $C8 +db #!VOLUME_C8 ; $C8 org $1B9284 ; <- D9284 . -db #VOLUME_C8 ; $C8 +db #!VOLUME_C8 ; $C8 org $1B9292 ; <- D9292 . -db #VOLUME_C8 ; $C8 +db #!VOLUME_C8 ; $C8 org $1B92AD ; <- D92AD . -db #VOLUME_C8 ; $C8 +db #!VOLUME_C8 ; $C8 org $1B92C8 ; <- D92C8 . -db #VOLUME_C8 ; $C8 +db #!VOLUME_C8 ; $C8 org $1B92D5 ; <- D92D5 . (splashy sound) -db #VOLUME_C8 ; $C8 +db #!VOLUME_C8 ; $C8 org $1B92E0 ; <- D92E0 . -db #VOLUME_8C ; $8C +db #!VOLUME_8C ; $8C org $1B9311 ; <- D9311 . -db #VOLUME_C8 ; $C8 +db #!VOLUME_C8 ; $C8 org $1B9322 ; <- D9322 . -db #VOLUME_C8 ; $C8 +db #!VOLUME_C8 ; $C8 org $1B9330 ; <- D9330 . -db #VOLUME_C8 ; $C8 +db #!VOLUME_C8 ; $C8 org $1B934B ; <- D934B . -db #VOLUME_C8 ; $C8 +db #!VOLUME_C8 ; $C8 org $1B9366 ; <- D9366 . -db #VOLUME_C8 ; $C8 +db #!VOLUME_C8 ; $C8 org $1B9373 ; <- D9373 . (splashy sound) -db #VOLUME_C8 ; $C8 +db #!VOLUME_C8 ; $C8 org $1B937E ; <- D937E . -db #VOLUME_8C ; $8C +db #!VOLUME_8C ; $8C org $1B93B6 ; <- D93B6 . (splashy sound) -db #VOLUME_C8 ; $C8 +db #!VOLUME_C8 ; $C8 org $1B93C1 ; <- D93C1 . -db #VOLUME_8C ; $8C +db #!VOLUME_8C ; $8C ;== Crystal/Pendant get == org $1B945E ; <- D945E . -db #VOLUME_F0 ; $F0 +db #!VOLUME_F0 ; $F0 org $1B94AA ; <- D94AA . -db #VOLUME_FA ; $FA +db #!VOLUME_FA ; $FA org $1B94E0 ; <- D94E0 . -db #VOLUME_DC ; $DC +db #!VOLUME_DC ; $DC org $1B9544 ; <- D9544 . -db #VOLUME_DC ; $DC +db #!VOLUME_DC ; $DC org $1B95A8 ; <- D95A8 . -db #VOLUME_DC ; $DC +db #!VOLUME_DC ; $DC org $1B960C ; <- D960C . -db #VOLUME_A0 ; $A0 +db #!VOLUME_A0 ; $A0 org $1B9652 ; <- D9652 . -db #VOLUME_B4 ; $B4 +db #!VOLUME_B4 ; $B4 org $1B967D ; <- D967D . -db #VOLUME_F0 ; $F0 +db #!VOLUME_F0 ; $F0 org $1B9698 ; <- D9698 . -db #VOLUME_B4 ; $B4 +db #!VOLUME_B4 ; $B4 org $1B96C2 ; <- D96C2 . -db #VOLUME_F0 ; $F0 +db #!VOLUME_F0 ; $F0 ;== Sanctuary == org $1B97A6 ; <- D97A6 . -db #VOLUME_C8 ; $C8 +db #!VOLUME_C8 ; $C8 org $1B97C2 ; <- D97C2 . -db #VOLUME_C8 ; $C8 +db #!VOLUME_C8 ; $C8 org $1B97DC ; <- D97DC . -db #VOLUME_C8 ; $C8 +db #!VOLUME_C8 ; $C8 org $1B97FB ; <- D97FB . -db #VOLUME_C8 ; $C8 +db #!VOLUME_C8 ; $C8 org $1B9811 ; <- D9811 . -db #VOLUME_C8 ; $C8 +db #!VOLUME_C8 ; $C8 org $1B9828 ; <- D9828 . -db #VOLUME_A0 ; $A0 +db #!VOLUME_A0 ; $A0 ;== Boss == ;org $1B98FF ; <- D98FF . (silent track) -;db #VOLUME_C8 ; $C8 +;db #!VOLUME_C8 ; $C8 org $1B996F ; <- D996F . -db #VOLUME_C8 ; $C8 +db #!VOLUME_C8 ; $C8 org $1B9982 ; <- D9982 . -db #VOLUME_DC ; $DC +db #!VOLUME_DC ; $DC org $1B99A8 ; <- D99A8 . -db #VOLUME_C8 ; $C8 +db #!VOLUME_C8 ; $C8 org $1B99D5 ; <- D99D5 . -db #VOLUME_C8 ; $C8 +db #!VOLUME_C8 ; $C8 org $1B9A02 ; <- D9A02 . -db #VOLUME_AA ; $AA +db #!VOLUME_AA ; $AA org $1B9A30 ; <- D9A30 . -db #VOLUME_C8 ; $C8 +db #!VOLUME_C8 ; $C8 org $1B9A4E ; <- D9A4E . -db #VOLUME_C8 ; $C8 +db #!VOLUME_C8 ; $C8 org $1B9A6B ; <- D9A6B . -db #VOLUME_C8 ; $C8 +db #!VOLUME_C8 ; $C8 org $1B9A88 ; <- D9A88 . -db #VOLUME_C8 ; $C8 +db #!VOLUME_C8 ; $C8 org $1B9A9E ; <- D9A9E . -db #VOLUME_FA ; $FA +db #!VOLUME_FA ; $FA ;org $1B9AE4 ; <- D9AE4 . (unused track) these three tracks go together -;db #VOLUME_FA ; $FA +;db #!VOLUME_FA ; $FA ;org $1B9AF7 ; <- D9AF7 . (unused track) -;db #VOLUME_C8 ; $C8 +;db #!VOLUME_C8 ; $C8 ;org $1B9B1D ; <- D9B1D . (unused track) -;db #VOLUME_C8 ; $C8 +;db #!VOLUME_C8 ; $C8 org $1B9B43 ; <- D9B43 . -db #VOLUME_C8 ; $C8 +db #!VOLUME_C8 ; $C8 org $1B9B56 ; <- D9B56 . -db #VOLUME_DC ; $DC +db #!VOLUME_DC ; $DC org $1B9B7C ; <- D9B7C . -db #VOLUME_C8 ; $C8 +db #!VOLUME_C8 ; $C8 org $1B9BA9 ; <- D9BA9 . -db #VOLUME_C8 ; $C8 +db #!VOLUME_C8 ; $C8 org $1B9BD6 ; <- D9BD6 . -db #VOLUME_AA ; $AA +db #!VOLUME_AA ; $AA ;== Crystal Dungeon == org $1B9C84 ; <- D9C84 . -db #VOLUME_C8 ; $C8 +db #!VOLUME_C8 ; $C8 org $1B9C8D ; <- D9C8D . -db #VOLUME_C8 ; $C8 +db #!VOLUME_C8 ; $C8 org $1B9C95 ; <- D9C95 . -db #VOLUME_F0 ; $F0 +db #!VOLUME_F0 ; $F0 org $1B9CAC ; <- D9CAC . -db #VOLUME_C8 ; $C8 +db #!VOLUME_C8 ; $C8 org $1B9CBC ; <- D9CBC . -db #VOLUME_B4 ; $B4 +db #!VOLUME_B4 ; $B4 org $1B9CE8 ; <- D9CE8 . -db #VOLUME_C8 ; $C8 +db #!VOLUME_C8 ; $C8 org $1B9CF3 ; <- D9CF3 . -db #VOLUME_C8 ; $C8 +db #!VOLUME_C8 ; $C8 org $1B9CFD ; <- D9CFD . -db #VOLUME_C8 ; $C8 +db #!VOLUME_C8 ; $C8 org $1B9D46 ; <- D9D46 . -db #VOLUME_C8 ; $C8 +db #!VOLUME_C8 ; $C8 org $1B9DC0 ; <- D9DC0 . -db #VOLUME_B4 ; $B4 +db #!VOLUME_B4 ; $B4 org $1B9E49 ; <- D9E49 . -db #VOLUME_B4 ; $B4 +db #!VOLUME_B4 ; $B4 org $1B9EE6 ; <- D9EE6 . -db #VOLUME_F0 ; $F0 +db #!VOLUME_F0 ; $F0 ;== Fortuneteller == org $1BA211 ; <- DA211 . -db #VOLUME_64 ; $64 +db #!VOLUME_64 ; $64 org $1BA233 ; <- DA233 . -db #VOLUME_A0 ; $A0 +db #!VOLUME_A0 ; $A0 org $1BA251 ; <- DA251 . -db #VOLUME_E6 ; $E6 +db #!VOLUME_E6 ; $E6 org $1BA26C ; <- DA26C . -db #VOLUME_E6 ; $E6 +db #!VOLUME_E6 ; $E6 org $1BA289 ; <- DA289 . -db #VOLUME_FA ; $FA +db #!VOLUME_FA ; $FA ;== Zelda's Lullaby == org $1BA35B ; <- DA35B . -db #VOLUME_64 ; $64 +db #!VOLUME_64 ; $64 org $1BA35E ; <- DA35E (Volume fade) . -db #VOLUME_C8 ; $C8 +db #!VOLUME_C8 ; $C8 org $1BA37B ; <- DA37B . -db #VOLUME_64 ; $64 +db #!VOLUME_64 ; $64 org $1BA37E ; <- DA37E (Volume fade) . -db #VOLUME_C8 ; $C8 +db #!VOLUME_C8 ; $C8 org $1BA38E ; <- DA38E . -db #VOLUME_64 ; $64 +db #!VOLUME_64 ; $64 org $1BA391 ; <- DA391 (Volume fade) . -db #VOLUME_C8 ; $C8 +db #!VOLUME_C8 ; $C8 org $1BA39F ; <- DA39F . -db #VOLUME_64 ; $64 +db #!VOLUME_64 ; $64 org $1BA3A2 ; <- DA3A2 (Volume fade) . -db #VOLUME_A0 ; $A0 +db #!VOLUME_A0 ; $A0 org $1BA3D5 ; <- DA3D5 . -db #VOLUME_82 ; $82 +db #!VOLUME_82 ; $82 org $1BA478 ; <- DA478 . -db #VOLUME_C8 ; $C8 +db #!VOLUME_C8 ; $C8 org $1BA49E ; <- DA49E . -db #VOLUME_A0 ; $A0 +db #!VOLUME_A0 ; $A0 org $1BA4C3 ; <- DA4C3 . -db #VOLUME_C8 ; $C8 +db #!VOLUME_C8 ; $C8 org $1BA4D7 ; <- DA4D7 . -db #VOLUME_C8 ; $C8 +db #!VOLUME_C8 ; $C8 org $1BA4F6 ; <- DA4F6 . -db #VOLUME_C8 ; $C8 +db #!VOLUME_C8 ; $C8 org $1BA515 ; <- DA515 . -db #VOLUME_C8 ; $C8 +db #!VOLUME_C8 ; $C8 ;== Maidens == org $1BA5C3 ; <- DA5C3 . -db #VOLUME_64 ; $64 +db #!VOLUME_64 ; $64 org $1BA5C6 ; <- DA5C6 (Volume fade) . -db #VOLUME_F0 ; $F0 +db #!VOLUME_F0 ; $F0 org $1BA5DE ; <- DA5DE . -db #VOLUME_78 ; $78 +db #!VOLUME_78 ; $78 org $1BA608 ; <- DA608 . -db #VOLUME_78 ; $78 +db #!VOLUME_78 ; $78 org $1BA635 ; <- DA635 . -db #VOLUME_78 ; $78 +db #!VOLUME_78 ; $78 org $1BA662 ; <- DA662 . -db #VOLUME_78 ; $78 +db #!VOLUME_78 ; $78 org $1BA691 ; <- DA691 . -db #VOLUME_64 ; $64 +db #!VOLUME_64 ; $64 org $1BA694 ; <- DA694 (Volume fade) . -db #VOLUME_DC ; $DC +db #!VOLUME_DC ; $DC org $1BA6A8 ; <- DA6A8 . -db #VOLUME_64 ; $64 +db #!VOLUME_64 ; $64 org $1BA6AB ; <- DA6AB (Volume fade) . -db #VOLUME_DC ; $DC +db #!VOLUME_DC ; $DC org $1BA6DF ; <- DA6DF . -db #VOLUME_64 ; $64 +db #!VOLUME_64 ; $64 org $1BA6E2 ; <- DA6E2 (Volume fade) . -db #VOLUME_C8 ; $C8 +db #!VOLUME_C8 ; $C8 org $1BA710 ; <- DA710 . -db #VOLUME_14 ; $14 +db #!VOLUME_14 ; $14 org $1BA71F ; <- DA71F (Volume fade) . -db #VOLUME_78 ; $78 +db #!VOLUME_78 ; $78 org $1BA72B ; <- DA72B . -db #VOLUME_A0 ; $A0 +db #!VOLUME_A0 ; $A0 org $1BA736 ; <- DA736 (Volume fade) . -db #VOLUME_3C ; $3C +db #!VOLUME_3C ; $3C org $1BA745 ; <- DA745 . -db #VOLUME_A0 ; $A0 +db #!VOLUME_A0 ; $A0 org $1BA752 ; <- DA752 (Volume fade) . -db #VOLUME_3C ; $3C +db #!VOLUME_3C ; $3C org $1BA765 ; <- DA765 . -db #VOLUME_A0 ; $A0 +db #!VOLUME_A0 ; $A0 org $1BA772 ; <- DA772 (Volume fade) . -db #VOLUME_3C ; $3C +db #!VOLUME_3C ; $3C org $1BA785 ; <- DA785 . -db #VOLUME_A0 ; $A0 +db #!VOLUME_A0 ; $A0 org $1BA792 ; <- DA792 (Volume fade) . -db #VOLUME_3C ; $3C +db #!VOLUME_3C ; $3C org $1BA7A4 ; <- DA7A4 . -db #VOLUME_14 ; $14 +db #!VOLUME_14 ; $14 org $1BA7AF ; <- DA7AF (Volume fade) . -db #VOLUME_78 ; $78 +db #!VOLUME_78 ; $78 org $1BA7BB ; <- DA7BB . -db #VOLUME_14 ; $14 +db #!VOLUME_14 ; $14 org $1BA7C6 ; <- DA7C6 (Volume fade) . -db #VOLUME_78 ; $78 +db #!VOLUME_78 ; $78 org $1BA7D2 ; <- DA7D2 . -db #VOLUME_14 ; $14 +db #!VOLUME_14 ; $14 org $1BA7DD ; <- DA7DD (Volume fade) . -db #VOLUME_78 ; $78 +db #!VOLUME_78 ; $78 ;== Fairy Fountain == org $1BA958 ; <- DA958 . -db #VOLUME_8C ; $8C +db #!VOLUME_8C ; $8C org $1BA971 ; <- DA971 . -db #VOLUME_8C ; $8C +db #!VOLUME_8C ; $8C org $1BA98C ; <- DA98C . -db #VOLUME_8C ; $8C +db #!VOLUME_8C ; $8C org $1BA9A7 ; <- DA9A7 . -db #VOLUME_8C ; $8C +db #!VOLUME_8C ; $8C org $1BA9C2 ; <- DA9C2 . -db #VOLUME_C8 ; $C8 +db #!VOLUME_C8 ; $C8 org $1BA9ED ; <- DA9ED . -db #VOLUME_C8 ; $C8 +db #!VOLUME_C8 ; $C8 org $1BAA1B ; <- DAA1B . -db #VOLUME_C8 ; $C8 +db #!VOLUME_C8 ; $C8 org $1BAA57 ; <- DAA57 . -db #VOLUME_C8 ; $C8 +db #!VOLUME_C8 ; $C8 org $1BAA68 ; <- DAA68 . -db #VOLUME_B4 ; $B4 +db #!VOLUME_B4 ; $B4 org $1BAA77 ; <- DAA77 . -db #VOLUME_B4 ; $B4 +db #!VOLUME_B4 ; $B4 org $1BAA88 ; <- DAA88 . -db #VOLUME_B4 ; $B4 +db #!VOLUME_B4 ; $B4 org $1BAA99 ; <- DAA99 . -db #VOLUME_B4 ; $B4 +db #!VOLUME_B4 ; $B4 ;== Pre-Ganon Fight == org $1BABAF ; <- DABAF . -db #VOLUME_C8 ; $C8 +db #!VOLUME_C8 ; $C8 org $1BABC9 ; <- DABC9 . -db #VOLUME_C8 ; $C8 +db #!VOLUME_C8 ; $C8 org $1BABE2 ; <- DABE2 . -db #VOLUME_C8 ; $C8 +db #!VOLUME_C8 ; $C8 org $1BABF6 ; <- DABF6 . -db #VOLUME_A0 ; $A0 +db #!VOLUME_A0 ; $A0 org $1BAC0D ; <- DAC0D . -db #VOLUME_A0 ; $A0 +db #!VOLUME_A0 ; $A0 org $1BAC28 ; <- DAC28 . -db #VOLUME_C8 ; $C8 +db #!VOLUME_C8 ; $C8 org $1BAC46 ; <- DAC46 . -db #VOLUME_C8 ; $C8 +db #!VOLUME_C8 ; $C8 org $1BAC63 ; <- DAC63 . -db #VOLUME_C8 ; $C8 +db #!VOLUME_C8 ; $C8 ;== Agah 2 defeated == ;org $1BACB8 ; <- DACB8 . (silent track) -;db #VOLUME_C8 ; $C8 +;db #!VOLUME_C8 ; $C8 org $1BACEC ; <- DACEC . -db #VOLUME_C8 ; $C8 +db #!VOLUME_C8 ; $C8 org $1BAD08 ; <- DAD08 . -db #VOLUME_C8 ; $C8 +db #!VOLUME_C8 ; $C8 org $1BAD25 ; <- DAD25 . -db #VOLUME_C8 ; $C8 +db #!VOLUME_C8 ; $C8 org $1BAD42 ; <- DAD42 . -db #VOLUME_C8 ; $C8 +db #!VOLUME_C8 ; $C8 org $1BAD5F ; <- DAD5F . -db #VOLUME_C8 ; $C8 +db #!VOLUME_C8 ; $C8 ;== Ganon == org $1BAE17 ; <- DAE17 . -db #VOLUME_C8 ; $C8 +db #!VOLUME_C8 ; $C8 org $1BAE34 ; <- DAE34 . -db #VOLUME_C8 ; $C8 +db #!VOLUME_C8 ; $C8 org $1BAE51 ; <- DAE51 . -db #VOLUME_C8 ; $C8 +db #!VOLUME_C8 ; $C8 org $1BAE88 ; <- DAE88 . -db #VOLUME_DC ; $DC +db #!VOLUME_DC ; $DC org $1BAEBE ; <- DAEBE . -db #VOLUME_A0 ; $A0 +db #!VOLUME_A0 ; $A0 org $1BAEC8 ; <- DAEC8 . -db #VOLUME_DC ; $DC +db #!VOLUME_DC ; $DC org $1BAEE6 ; <- DAEE6 . -db #VOLUME_DC ; $DC +db #!VOLUME_DC ; $DC org $1BAF04 ; <- DAF04 . -db #VOLUME_B4 ; $B4 +db #!VOLUME_B4 ; $B4 org $1BAF2E ; <- DAF2E . -db #VOLUME_C8 ; $C8 +db #!VOLUME_C8 ; $C8 org $1BAF55 ; <- DAF55 . -db #VOLUME_C8 ; $C8 +db #!VOLUME_C8 ; $C8 org $1BAF6B ; <- DAF6B . -db #VOLUME_C8 ; $C8 +db #!VOLUME_C8 ; $C8 org $1BAF81 ; <- DAF81 . -db #VOLUME_C8 ; $C8 +db #!VOLUME_C8 ; $C8 org $1BAFAC ; <- DAFAC . -db #VOLUME_A0 ; $A0 +db #!VOLUME_A0 ; $A0 ;== Falling into the Ganon fight == org $1BB14F ; <- DB14F . -db #VOLUME_C8 ; $C8 +db #!VOLUME_C8 ; $C8 org $1BB16B ; <- DB16B . -db #VOLUME_C8 ; $C8 +db #!VOLUME_C8 ; $C8 org $1BB180 ; <- DB180 . -db #VOLUME_C8 ; $C8 +db #!VOLUME_C8 ; $C8 org $1BB195 ; <- DB195 . -db #VOLUME_C8 ; $C8 +db #!VOLUME_C8 ; $C8 org $1BB1AA ; <- DB1AA . -db #VOLUME_C8 ; $C8 +db #!VOLUME_C8 ; $C8 org $1BB1BF ; <- DB1BF . -db #VOLUME_DC ; $DC +db #!VOLUME_DC ; $DC diff --git a/newhud.asm b/newhud.asm index dfc3ca4..6fd9b9c 100644 --- a/newhud.asm +++ b/newhud.asm @@ -126,14 +126,14 @@ NewDrawHud: !C_ICON = $295F SEP #$20 - LDA.b $1B : BEQ .noprize + LDA.b IndoorsFlag : BEQ .noprize - LDX.w $040C + LDX.w DungeonID CPX #$1A : !BGE .noprize CPX #$04 : !BLT .noprize CPX #$08 : BEQ .noprize - LDA.b $10 : CMP #$12 : BEQ .noprize + LDA.b GameMode : CMP #$12 : BEQ .noprize LDA.l MapMode REP #$20 @@ -174,7 +174,7 @@ DrawMagicMeter_mp_tilemap = $0DFE0F LDA.l InfiniteMagic : AND.w #$00FF : BNE + : JMP .green : + SEP #$20 : LDA.b #$80 : STA.l CurrentMagic : REP #$30 ; set magic to max LDX.w #$0080 ; load full magic meter graphics - LDA.b $1A : AND.w #$000C : LSR #2 + LDA.b FrameCounter : AND.w #$000C : LSR #2 BEQ .red CMP.w #0001 : BEQ .yellow CMP.w #0002 : BNE + : JMP .green : + diff --git a/newitems.asm b/newitems.asm index 06c0306..2545f9e 100755 --- a/newitems.asm +++ b/newitems.asm @@ -359,14 +359,14 @@ AddReceivedItemExpandedGetItem: LDA.l CurrentSmallKeys : INC : STA.l CurrentSmallKeys JMP .done .normal - TXA : ASL : CMP.w $040C : BNE ++ + TXA : ASL : CMP.w DungeonID : BNE ++ LDA.l CurrentSmallKeys : INC : STA.l CurrentSmallKeys ++ JMP .done + .done PLX - LDA.w $02E9 : CMP.b #$01 ; thing we wrote over + LDA.w ItemReceiptMethod : CMP.b #$01 ; thing we wrote over RTL ; #$70 - Maps ; #$80 - Compasses @@ -1050,18 +1050,18 @@ CountBottles: RTS ;-------------------------------------------------------------------------------- ActivateGoal: - STZ.b $11 - STZ.b $B0 + STZ.b GameSubMode + STZ.b SubSubModule JML.l StatsFinalPrep ;-------------------------------------------------------------------------------- ChestPrep: - LDA.b #$01 : STA.w $02E9 + LDA.b #$01 : STA.w ItemReceiptMethod JSL.l IncrementChestCounter LDA.l ServerRequestMode : BEQ + JSL.l ChestItemServiceRequest RTL + - LDY.b $0C ; get item value + LDY.b Scrap0C ; get item value SEC RTL ;-------------------------------------------------------------------------------- @@ -1069,7 +1069,7 @@ RTL ; counts on MaybeFlagCompassTotalPickup: LDA.l CompassMode : AND.b #$0F : BEQ .done - LDA.w $040C : CMP.b #$FF : BEQ .done + LDA.w DungeonID : CMP.b #$FF : BEQ .done LSR : STA.b Scrap04 : LDA.b #$0F : !SUB Scrap04 ; Compute flag "index" CPY.b #$25 : BEQ .setFlag ; Set flag if it's a compass for this dungeon STA.b Scrap04 @@ -1090,7 +1090,7 @@ RTL ; Set the compass count display flag if we're entering a dungeon and alerady have ; that compass MaybeFlagCompassTotalEntrance: - LDX.w $040C : CPX.b #$FF : BEQ .done ; Skip if we're not entering dungeon + LDX.w DungeonID : CPX.b #$FF : BEQ .done ; Skip if we're not entering dungeon LDA.l CompassMode : AND.w #$000F : BEQ .done ; Skip if we're not showing compass counts CMP.w #$0002 : BEQ .countShown LDA.l CompassField : AND.l DungeonItemMasks, X : BEQ .done ; skip if we don't have compass diff --git a/npcitems.asm b/npcitems.asm index 6cc435b..df48a9d 100644 --- a/npcitems.asm +++ b/npcitems.asm @@ -61,7 +61,7 @@ ItemCheck_TreeKid3: BRA .done LDA.b #$05 .normal - LDA.w $0D80, X + LDA.w SpriteUnknown, X .done RTL @@ -133,13 +133,13 @@ RTL ItemSet_Mushroom: PHA LDA.l NpcFlags+1 : ORA.b #$10 : STA.l NpcFlags+1 - LDY.w $0E80, X ; Retrieve stored item type + LDY.w SpriteItemType, X ; Retrieve stored item type BNE + ; if for any reason the item value is 0 reload it, just in case %GetPossiblyEncryptedItem(MushroomItem, SpriteItemValues) : TAY + PLA - STZ.w $02E9 ; thing we wrote over - the mushroom is an npc for item purposes apparently + STZ.w ItemReceiptMethod ; thing we wrote over - the mushroom is an npc for item purposes apparently RTL ItemSet_Powder: @@ -151,7 +151,7 @@ RTL ; Randomize 300 Rupee NPC ;-------------------------------------------------------------------------------- Set300RupeeNPCItem: - INC.w $0D80, X ; thing we wrote over + INC.w SpriteUnknown, X ; thing we wrote over PHA : PHP REP #$20 ; set 16-bit accumulator diff --git a/password.asm b/password.asm index 10123b1..a1b52be 100644 --- a/password.asm +++ b/password.asm @@ -1,8 +1,5 @@ -PASSWORD_CODE_POSITION = $C8 -PASSWORD_SELECTION_POSITION = $C9 - Module_Password: - LDA.b $11 + LDA.b GameSubMode JSL.l UseImplicitRegIndexedLongJumpTable @@ -21,15 +18,15 @@ Password_BeginInit: JSL LoadCustomHudPalette ; replace the 2bpp palettes, and trigger upload LDA.b #$07 : STA.b $14 ; have NMI load up the initial tilemap from Password_Tilemap - INC.b $11 + INC.b GameSubMode RTL Password_EndInit: JSR LoadPasswordStripeTemplate ;reset the variables used by this screen - STZ.b PASSWORD_CODE_POSITION - STZ.b PASSWORD_SELECTION_POSITION + STZ.b PasswordCodePosition + STZ.b PasswordSelectPosition JSL ValidatePassword : BNE + ; zero out password if not valid @@ -41,7 +38,7 @@ Password_EndInit: + LDA.b #$0F : STA.b $13 - INC $11 + INC.b GameSubMode RTL Password_Main: @@ -58,38 +55,38 @@ Password_Main: JSR PasswordMoveCursorLeft + LDA.b $F4 : AND.b #$01 : BEQ + ; right - LDA.b PASSWORD_SELECTION_POSITION : INC A : CMP.b #$24 : !BLT ++ + LDA.b PasswordSelectPosition : INC A : CMP.b #$24 : !BLT ++ !SUB.b #$24 ++ - STA.b PASSWORD_SELECTION_POSITION - LDA.b #$20 : STA.w $012F + STA.b PasswordSelectPosition + LDA.b #$20 : STA.w SFX3 + LDA.b $F4 : AND.b #$02 : BEQ + ; left - LDA.b PASSWORD_SELECTION_POSITION : DEC A : BPL ++ + LDA.b PasswordSelectPosition : DEC A : BPL ++ !ADD.b #$24 ++ - STA.b PASSWORD_SELECTION_POSITION - LDA.b #$20 : STA.w $012F + STA.b PasswordSelectPosition + LDA.b #$20 : STA.w SFX3 + LDA.b $F4 : AND.b #$04 : BEQ + ; down - LDA.b PASSWORD_SELECTION_POSITION : !ADD.b #$09 : CMP.b #$24 : !BLT ++ + LDA.b PasswordSelectPosition : !ADD.b #$09 : CMP.b #$24 : !BLT ++ !SUB.b #$24 ++ - STA.b PASSWORD_SELECTION_POSITION - LDA.b #$20 : STA.w $012F + STA.b PasswordSelectPosition + LDA.b #$20 : STA.w SFX3 + LDA.b $F4 : AND.b #$08 : BEQ + ; up - LDA.b PASSWORD_SELECTION_POSITION : !SUB.b #$09 : BPL ++ + LDA.b PasswordSelectPosition : !SUB.b #$09 : BPL ++ !ADD.b #$24 ++ - STA.b PASSWORD_SELECTION_POSITION - LDA.b #$20 : STA.w $012F + STA.b PasswordSelectPosition + LDA.b #$20 : STA.w SFX3 + LDA.b $F4 : ORA.b $F6 : AND.b #$C0 : BEQ + ; face button - LDX.b PASSWORD_SELECTION_POSITION + LDX.b PasswordSelectPosition LDA.l .selectionValues, X : BPL ++ CMP.b #$F0 : BNE +++ - INC $11 + INC.b GameSubMode BRA .endOfButtonChecks +++ : CMP.b #$F1 : BNE +++ JSR PasswordMoveCursorLeft @@ -98,24 +95,24 @@ Password_Main: JSR PasswordMoveCursorRight BRA + +++ : CMP.b #$F3 : BNE +++ - INC $11 : INC $11 ; skip to return submodule - LDA.b #$2C : STA.w $012E ;file screen selection sound + INC.b GameSubMode : INC.b GameSubMode ; skip to return submodule + LDA.b #$2C : STA.w SFX2 ;file screen selection sound BRA .endOfButtonChecks +++ BRA + ++ - LDX.b PASSWORD_CODE_POSITION + LDX.b PasswordCodePosition STA.l PasswordSRAM,X - TXA : INC A : AND.b #$0F : STA.b PASSWORD_CODE_POSITION + TXA : INC A : AND.b #$0F : STA.b PasswordCodePosition BNE ++ - STZ.w $012E - INC $11 + STZ.w SFX2 + INC.b GameSubMode BRA .endOfButtonChecks ++ - LDA.b #$2B : STA.w $012E + LDA.b #$2B : STA.w SFX2 + LDA.b $F4 : AND.b #$10 : BEQ + ; start - INC $11 + INC.b GameSubMode + .endOfButtonChecks @@ -133,21 +130,21 @@ db $19, $1A, $1B, $1C, $1D, $1E, $1F, $20, $F3 Password_Check: JSL.l ValidatePassword : BNE .correct - LDA.b #$3C : STA.w $012E ; error - DEC $11 + LDA.b #$3C : STA.w SFX2 ; error + DEC.b GameSubMode RTL .correct - LDA.b #$1B : STA.w $012F ; solved puzzle sound - INC $11 + LDA.b #$1B : STA.w SFX3 ; solved puzzle sound + INC.b GameSubMode RTL Password_Return: - LDA.b #$01 : STA.w $10 ; select screen - LDA.b #$01 : STA.w $11 ; Skip the first submodule - STZ $B0 - STZ $0B9D ; Reset file screen cursor pre-selection - STZ $C8 - STZ $C9 + LDA.b #$01 : STA.b GameMode ; select screen + LDA.b #$01 : STA.b GameSubMode ; Skip the first submodule + STZ.b SubSubModule + STZ.w SaveFileIndex + STZ.b PasswordCodePosition + STZ.b PasswordCodePosition+1 RTL ;-------------------------------------------------------------------------------- @@ -275,14 +272,14 @@ PasswordEraseOldCursors: REP #$20 ; set 16-bit accumulator ;Code Cursor - LDA.b PASSWORD_CODE_POSITION : AND.w #$00FF : ASL : TAX + LDA.b PasswordCodePosition : AND.w #$00FF : ASL : TAX LDA.l .code_offsets, X !ADD.w #$20*Scrap04+Scrap04+$6000 XBA ; because big endian is needed STA.l $1002+Password_StripeImageTemplate_CodeCursorErase-Password_StripeImageTemplate ;selection cursor - LDA.b PASSWORD_SELECTION_POSITION : AND.w #$00FF : ASL : TAX + LDA.b PasswordSelectPosition : AND.w #$00FF : ASL : TAX LDA.l .selection_offsets, X !ADD.w #$20*Scrap0D+Scrap03+$6000 XBA ; because big endian is needed @@ -308,14 +305,14 @@ RTS PasswordSetNewCursors: REP #$20 ; set 16-bit accumulator ;Code Cursor - LDA.b PASSWORD_CODE_POSITION : AND.w #$00FF : ASL : TAX + LDA.b PasswordCodePosition : AND.w #$00FF : ASL : TAX LDA.l PasswordEraseOldCursors_code_offsets, X !ADD.w #$20*Scrap04+Scrap04+$6000 XBA ; because big endian is needed STA.l $1002+Password_StripeImageTemplate_CodeCursorDraw-Password_StripeImageTemplate ;Selection cursor - LDA.b PASSWORD_SELECTION_POSITION : AND.w #$00FF : ASL : TAX + LDA.b PasswordSelectPosition : AND.w #$00FF : ASL : TAX LDA.l PasswordEraseOldCursors_selection_offsets, X !ADD.w #$20*Scrap0D+Scrap03+$6000 XBA ; because big endian is needed @@ -353,13 +350,13 @@ RTS PasswordMoveCursorRight: ; return new code position - LDA.b #$2B : STA.w $012E - LDA.b PASSWORD_CODE_POSITION : INC A : AND.b #$0F : STA.b PASSWORD_CODE_POSITION + LDA.b #$2B : STA.w SFX2 + LDA.b PasswordCodePosition : INC A : AND.b #$0F : STA.b PasswordCodePosition RTS PasswordMoveCursorLeft: ; return new code position - LDA.b #$2B : STA.w $012E - LDA.b PASSWORD_CODE_POSITION : DEC A : AND.b #$0F : STA.b PASSWORD_CODE_POSITION + LDA.b #$2B : STA.w SFX2 + LDA.b PasswordCodePosition : DEC A : AND.b #$0F : STA.b PasswordCodePosition RTS macro dw_big_endian(value) diff --git a/pendantcrystalhud.asm b/pendantcrystalhud.asm index f7cfbed..0f86c2d 100644 --- a/pendantcrystalhud.asm +++ b/pendantcrystalhud.asm @@ -145,13 +145,13 @@ BringMenuDownEnhanced: EOR.w #$FFFF : !ADD.w #$0001 ; negate menu speed - !ADD $EA : CMP.w #$FF18 : !BGE .noOvershoot + !ADD BG3VOFSQL : CMP.w #$FF18 : !BGE .noOvershoot LDA.w #$FF18 ; if we went past the limit, go to the limit .noOvershoot - STA.b $EA : CMP.w #$FF18 + STA.b BG3VOFSQL : CMP.w #$FF18 SEP #$20 ; set 8-bit accumulator BNE .notDoneScrolling - INC $0200 + INC.w SubModuleInterface .notDoneScrolling RTL ;================================================================================ @@ -163,30 +163,30 @@ RaiseHudMenu: LDA.l MenuSpeed : AND.w #$00FF ++ - !ADD $EA : BMI .noOvershoot + !ADD BG3VOFSQL : BMI .noOvershoot LDA.w #$0000 ; if we went past the limit, go to the limit .noOvershoot - STA.b $EA + STA.b BG3VOFSQL RTL ;================================================================================ CheckCloseItemMenu: LDA.l MenuCollapse : BNE + - LDA.b $F4 : AND.b #$10 : RTL + LDA.b Joy1A_New : AND.b #$10 : RTL + - LDA.b $F0 : AND.b #$10 : EOR.b #$10 + LDA.b Joy1A_All : AND.b #$10 : EOR.b #$10 RTL ;================================================================================ ShowDungeonItems: - LDA.w $040C : AND.w #$00FF : CMP.w #$00FF : BNE + : RTL : + ; return normal result if outdoors or in a cave + LDA.w DungeonID : AND.w #$00FF : CMP.w #$00FF : BNE + : RTL : + ; return normal result if outdoors or in a cave LDA.l HudFlag : AND.w #$0020 ; check hud flag BEQ + : LDA.w #$0000 : RTL : + ; if set, send the zero onwards - LDA.w $040C : AND.w #$00FF : CMP.w #$00FF ; original logic + LDA.w DungeonID : AND.w #$00FF : CMP.w #$00FF ; original logic RTL ;-------------------------------------------------------------------------------- UpdateKeys: PHX : PHP SEP #$30 ; set 8-bit accumulator & index registers - LDA.w $040C : CMP.b $1F : !BLT .skip + LDA.w DungeonID : CMP.b $1F : !BLT .skip LSR : TAX ; get dungeon index and store to X diff --git a/quickswap.asm b/quickswap.asm index 3563a72..d9c1fa5 100644 --- a/quickswap.asm +++ b/quickswap.asm @@ -4,28 +4,28 @@ QuickSwap: ; We perform all other checks only if we are pushing L or R in order to have minimal ; perf impact, since this runs every frame - LDA.b $F6 : AND.b #$30 : BEQ .done + LDA.b Joy1B_New : AND.b #$30 : BEQ .done XBA ; stash away the value for after the checks. LDA.l QuickSwapFlag : BEQ .done - LDA.w $0202 : BEQ .done ; Skip everything if we don't have any items + LDA.w ItemCursor : BEQ .done ; Skip everything if we don't have any items LDY.b #$14 PHX XBA ; restore the stashed value CMP.b #$30 : BNE + ; If prossing both L and R this frame, then go directly to the special swap code - LDX.w $0202 : BRA .special_swap + LDX.w ItemCursor : BRA .special_swap + BIT.b #$10 : BEQ + ; Only pressed R JSR.w RCode - LDA.b $F2 : BIT.b #$20 : BNE .special_swap ; Still holding L from a previous frame + LDA.b Joy1B_All : BIT.b #$20 : BNE .special_swap ; Still holding L from a previous frame BRA .store + ; Only pressed L JSR.w LCode - LDA.b $F2 : BIT #$10 : BNE .special_swap ; Still holding R from a previous frame + LDA.b Joy1B_All : BIT #$10 : BNE .special_swap ; Still holding R from a previous frame BRA .store .special_swap @@ -36,21 +36,21 @@ QuickSwap: CPX.b #$0D : BEQ + ; flute CPX.b #$10 : BEQ + ; bottle BRA .store - + STX.w $0202 : JSL ProcessMenuButtons_y_pressed + + STX.w ItemCursor : JSL ProcessMenuButtons_y_pressed .store - LDA.b #$20 : STA.w $012F - STX.w $0202 + LDA.b #$20 : STA.w SFX3 + STX.w ItemCursor JSL HUD_RefreshIconLong PLX .done - LDA.b $F6 : AND.b #$40 ;what we wrote over + LDA.b Joy1B_New : AND.b #$40 ;what we wrote over RTL RCode: - LDX.w $0202 - LDA.b $F2 : BIT.b #$20 : BNE ++ ; Still holding L from a previous frame + LDX.w ItemCursor + LDA.b Joy1B_All : BIT.b #$20 : BNE ++ ; Still holding L from a previous frame LDA.l InventoryTracking+1 : AND.b #$FE : STA.l InventoryTracking+1 BRA + ++ @@ -66,8 +66,8 @@ RCode: RTS LCode: - LDX.w $0202 - LDA.b $F2 : BIT #$10 : BNE ++ ; Still holding R from a previous frame + LDX.w ItemCursor + LDA.b Joy1B_All : BIT #$10 : BNE ++ ; Still holding R from a previous frame LDA.l InventoryTracking+1 : AND.b #$FE : STA.l InventoryTracking+1 BRA + ++ diff --git a/ram.asm b/ram.asm index 98d131a..23a65b7 100644 --- a/ram.asm +++ b/ram.asm @@ -2,99 +2,226 @@ ; RAM Labels & Assertions ;-------------------------------------------------------------------------------- ; This module is primarily concerned with labeling WRAM addresses used by the -; randomizer and documenting their usage. +; randomizer and documenting their usage. We use a combination of base $[address] +; and WRAMLabel = $[address] here, favoring the former when we have larger blocks +; of contiguous ram labeled. In some cases the label name can be descriptive enough +; without documentation, you may want to consult more in-depth reference materials, +; or I just don't understand what they are. ; -; See the JP 1.0 disassembly for reference -; (https://github.com/spannerisms/jpdasm/ - 31/10/2022) +; See the JP 1.0 disassembly for reference, specifically symbols_wram.asm +; (https://github.com/spannerisms/jpdasm/ - 19/11/2022) ;-------------------------------------------------------------------------------- pushpc org 0 +;================================================================================ +; Bank 7E +;-------------------------------------------------------------------------------- ;================================================================================ ; Direct Page ;-------------------------------------------------------------------------------- base $7E0000 Scrap: -Scrap00: skip 1 ; Used as short-term scratch space. If you need some short-term -Scrap01: skip 1 ; RAM, you can often use these. Double check that the next use -Scrap02: skip 1 ; of the addresses you want to use is a write. -Scrap03: skip 1 ; -Scrap04: skip 1 ; -Scrap05: skip 1 ; -Scrap06: skip 1 ; -Scrap07: skip 1 ; -Scrap08: skip 1 ; -Scrap09: skip 1 ; -Scrap0A: skip 1 ; -Scrap0B: skip 1 ; -Scrap0C: skip 1 ; -Scrap0D: skip 1 ; -Scrap0E: skip 1 ; -Scrap0F: skip 1 ; +Scrap00: skip 1 ; Used as short-term scratch space. If you need some short-term +Scrap01: skip 1 ; RAM, you can often use these. Double check that the next use +Scrap02: skip 1 ; of the addresses you want to use is a write. +Scrap03: skip 1 ; +Scrap04: skip 1 ; +Scrap05: skip 1 ; +Scrap06: skip 1 ; +Scrap07: skip 1 ; +Scrap08: skip 1 ; +Scrap09: skip 1 ; +Scrap0A: skip 1 ; +Scrap0B: skip 1 ; +Scrap0C: skip 1 ; +Scrap0D: skip 1 ; +Scrap0E: skip 1 ; +Scrap0F: skip 1 ; + ; +GameMode = $7E0010 ; Game mode & submode. Refer to disassembly. +GameSubMode = $7E0011 ; + ; +FrameCounter = $7E001A ; Increments every frame that the game isn't lagging +IndoorsFlag = $7E001B ; $00 = Outdoors | $01 = Indoors + ; +LinkPosY = $7E0020 ; Link's absolute x/y coordinates. Both are word length. +LinkPosX = $7E0022 ; +LinkPosZ = $7E0024 ; $FFFF when on ground + ; +LinkRecoilY = $7E0027 ; +LinkRecoilX = $7E0028 ; +LinkRecoilZ = $7E0029 ; + ; +LinkDirection = $7E002F ; $00 = Up | $02 = Down | $04 = Left | $06 = Right + ; +OAMOffsetY = $7E0044 ; +OAMOffsetX = $7E0045 ; + ; +LinkJumping = $7E004D ; $00 = None | $01 = Bonk/damage/water | $02 = Ledge + ; +BunnyFlagDP = $7E0056 ; $00 = Link | $01 = Bunny + ; +LinkSlipping = $7E005B ; $00 = None | $01 = Near pit + ; $02 = Falling | $03 = Falling "more" +FallTimer = $7E005C ; Timer for falling animation +LinkState = $7E005D ; Main Link state handler +LinkSpeed = $7E005E ; Main Link speed handler + ; +OverworldIndex = $7E008A ; Overworld screen index. Word length. Dark world is OR $40 of + ; light world screen in same position. Zeroed on UW entry. +OverlayID = $7E008C ; Overworld overlay ID. One Byte. + ; +RoomIndex = $7E00A0 ; Underworld room index. Word length. High byte: $00 = EG1 | $01 = EG2 + ; Not zeroed on exit to overworld. +PreviousRoom = $7E00A2 ; Stores previous value of RoomIndex + ; +SubSubModule = $7E00B0 ; Often used as a submodule, such as for transitions + ; +ObjPtr = $7E00B7 ; Pointer for drawing room objects. Three bytes. +ObjPtrOffset = $7E00BA ; Used as an offset for ObjPointer. Word Length. +PlayerSpriteBank = $7E00BC ; +ScrapBufferBD = $7E00BD ; Another scrap buffer. $23 bytes. +FileSelectPosition = $7E00C8 ; +PasswordCodePosition = $7E00C8 ; +PasswordSelectPosition = $7E00C9 ; + ; +BG1H = $7E00E0 ; Background scroll registers +BG2H = $7E00E2 ; For BG1 and BG2, these registers are used for calculations later for different writes to PPU. +BG3HOFSQL = $7E00E4 ; For BG3, the values are written directly to the PPU during NMI +BG1V = $7E00E6 ; Since BG1 and BG2 are not written directly to PPU they are given different names from BG3. +BG2V = $7E00E8 ; +BG3VOFSQL = $7E00EA ; + ; +LinkLayer = $7E00EE ; Layer that Link is on. $00 = BG2 (upper) | $02 = BG1 (lower) + ; +Joy1A_All = $7E00F0 ; Joypad input +Joy2A_All = $7E00F1 ; All = Current & previous frame +Joy1B_All = $7E00F2 ; New = Current frame +Joy2B_All = $7E00F3 ; Old = Previous frame +Joy1A_New = $7E00F4 ; +Joy2A_New = $7E00F5 ; +Joy1B_New = $7E00F6 ; +Joy2B_New = $7E00F7 ; +Joy1A_Old = $7E00F8 ; +Joy2A_Old = $7E00F9 ; +Joy1B_Old = $7E00FA ; +Joy2B_Old = $7E00FB ; - -LinkPosY = $7E0020 ; 2 bytes -LinkPosX = $7E0022 ; 2 bytes - -RoomIndex = $7E00A0 ; 2 bytes, UW room index - -;================================================================================ -; Bank 7E -;-------------------------------------------------------------------------------- ;================================================================================ ; Mirrored WRAM ;-------------------------------------------------------------------------------- ; Pages 0x00–0x1F of Bank7E are mirrored to every program bank ALTTP uses. ;-------------------------------------------------------------------------------- -CurrentMSUTrack = $7E010B -CurrentVolume = $7E0127 -TargetVolume = $7E0129 -CurrentControlRequest = $7E0133 ; Last thing written to MusicControlRequest -MusicControl = $7E012B -MusicControlRequest = $7E012C +CurrentMSUTrack = $7E010B ; +GameModeCache = $7E010C ; +GameSubModeCache = $7E010D ; + ; +MedallionFlag = $7E0112 ; Medallion cutscene flag. $01 = Cutscene active. + ; +BG1ShakeV = $7E011A ; Applied to BG Scroll. Word Length. +BG1ShakeH = $7E011C ; + ; +CurrentVolume = $7E0127 ; +TargetVolume = $7E0129 ; +CurrentControlRequest = $7E0133 ; Last thing written to MusicControlRequest +MusicControl = $7E012B ; +MusicControlRequest = $7E012C ; +SFX1 = $7E012D ; +SFX2 = $7E012E ; +SFX3 = $7E012F ; + ; +SubModuleInterface = $7E0200 ; Word length. High byte expected to be $00. +ItemCursor = $7E0202 ; Current location of the item menu cursor. + ; +BottleMenuCounter = $7E0205 ; Step counter for opening bottle menu +MenuFrameCounter = $7E0206 ; Incremented every menu frame. Never read. +MenuBlink = $7E0207 ; Incremented every frame and masked with $10 to blink cursor + ; +ItemReceiptID = $7E02D8 ; + ; +BunnyFlag = $7E02E0 ; $00 = Link | $01 = Bunny + ; +CutsceneFlag = $7E02E4 ; Flags various cutscenes. All non-zero behave the same. + ; +ItemReceiptMethod = $7E02E9 ; + ; +TileActBE = $7E02EF ; Bitfield used by breakables and entrances. b b b b d d d d + ; b = Breakables | d = Entrances +CurrentYItem = $7E0303 ; + ; + ; +TileActDig = $7E035B ; Bitfield used by diggable ground. Word length. High byte unused. + ; +ForceSwordUp = $7E03EF ; $01 = Force sword up pose. + ; +ItemsTaken = $7E0403 ; Items taken in a room: b k u t s e h c + ; b = boss kill/item | k = key/heart piece (prevents crystals) + ; u = 2nd key/heart piece | t = chest 4/rupees/swamp drain/bomb floor/mire wall + ; s = chest 3/pod or dp wall | e, h, c = chest 2, 1, 0 +DungeonID = $7E040C ; High byte mostly unused but sometimes read. Word length. + ; +OWEntranceCutscene = $7E04C6 ; + ; +HeartBeepTimer = $7E04CA ; + ; +NMIAux = $7E0632 ; Stores long address of NMI jump. Currently only used by shops. + ; +SkipOAM = $7E0710 ; Set to skip OAM updates. High byte written $FF with exploding walls + ; +BowDryFire = $7E0B9A ; If set, arrows are deleted immediately + ; +SaveFileIndex = $7E0B9D ; + ; +SpritePosYLow = $7E0D00 ; Sprite slot data. Each label has $10 bytes. +SpritePosXLow = $7E0D10 ; +SpritePosYHigh = $7E0D20 ; +SpritePosXHigh = $7E0D30 ; +SpriteVelocityY = $7E0D40 ; +SpriteVelocityX = $7E0D50 ; + ; +SpriteUnknown = $7E0D80 ; Don't know what this is + ; +SpriteAuxTable = $7E0DA0 ; $20 bytes. +SpriteGFXControl = $7E0DC0 ; +SpriteAITable = $7E0DD0 ; AI state of sprites. $10 bytes. + ; +SpriteTimer = $7E0DF0 ; + ; +SpriteTypeTable = $7E0E20 ; Which sprite occupies this slot. $10 bytes. + ; +SpriteItemType = $7E0E80 ; Sprite Item Type. $10 bytes. + ; +SpriteDirectionTable = $7E0EB0 ; Sprite direction. $10 bytes. + ; +FreezeSprites = $7E0FC1 ; "Seems to freeze sprites" + ; +SpriteCoordCacheX = $7E0FD8 ; +SpriteCoordCacheY = $7E0FDA ; + ; +NoMenu = $7E0FFC ; When set prevents menu, mirror, medallions + ; +TextID = $7E1CF0 ; Message ID and page. Word length. + ; +ToastBuffer = $7E1E0E ; Multiworld buffer. Word length. + ; +MSUResumeTime = $7E1E6B ; Mirrored MSU block +MSUResumeControl = $7E1E6F ; +MSUFallbackTable = $7E1E70 ; +MSUDelayedCommand = $7E1E79 ; +MSUPackCount = $7E1E7A ; +MSUPackCurrent = $7E1E7B ; +MSUPackRequest = $7E1E7C ; +MSULoadedTrack = $7E1E7D ; +MSUResumeTrack = $7E1E7F ; -ItemReceiptID = $7E02D8 - -NMIAux = $7E0632 - -SpritePosYLow = $7E0D00 ; all $10 bytes -SpritePosXLow = $7E0D10 -SpritePosYHigh = $7E0D20 -SpritePosXHigh = $7E0D30 - -SpriteAuxTable = $7E0DA0 ; 0x1F bytes -SpriteAITable = $7E0DD0 - -SpriteTypeTable = $7E0E20 - -SpriteDirectionTable = $7E0EB0 - -ToastBuffer = $7E1E0E ; 2 bytes DoToast - -MSUResumeTime = $7E1E6B ; 4 bytes -MSUResumeControl = $7E1E6F -MSUFallbackTable = $7E1E70 ; 8 bytes -MSUDelayedCommand = $7E1E79 -MSUPackCount = $7E1E7A -MSUPackCurrent = $7E1E7B -MSUPackRequest = $7E1E7C -MSULoadedTrack = $7E1E7D ; 2 bytes -MSUResumeTrack = $7E1E7F - -;1E90 -ClockHours = $7E1E90 ; Clock Hours -ClockMinutes = $7E1E94 ; Clock Minutes -ClockSeconds = $7E1E98 ; Clock Seconds -ClockBuffer = $7E1E9C ; Clock Temporary -;1EA0 -ScratchBufferNV = $7E1EA0 ; Callee preserved -;1EB0 -ScratchBufferV = $7E1EB0 ; Caller preserved -;1EC0 -;1ED0 -;1EE0 -;1EF0 +ClockHours = $7E1E90 ; Clock Hours +ClockMinutes = $7E1E94 ; Clock Minutes +ClockSeconds = $7E1E98 ; Clock Seconds +ClockBuffer = $7E1E9C ; Clock Temporary +ScratchBufferNV = $7E1EA0 ; Non-volatile scratch buffer. Must preserve values through return. +ScratchBufferV = $7E1EB0 ; Volatile scratch buffer. Can clobber at will. ;================================================================================ ; UNMIRRORED WRAM @@ -102,24 +229,24 @@ ScratchBufferV = $7E1EB0 ; Caller preserved ; or absolute addressing with the appropriate data bank set ;-------------------------------------------------------------------------------- -TileUploadBuffer = $7EA180 ; 0x300 bytes -SpriteOAM = $7EC025 ; +TileUploadBuffer = $7EA180 ; 0x300 bytes +SpriteOAM = $7EC025 ; + ; $7EC700 - Tile map buffer for HUD +HUDKeyIcon = $7EC726 ; +HUDGoalIndicator = $7EC72A ; +HUDPrizeIcon = $7EC742 ; +HUDRupees = $7EC750 ; +HUDBombCount = $7EC75A ; +HUDArrowCount = $7EC760 ; +HUDKeyDigits = $7EC764 ; -; $7EC700 - Tile map buffer for HUD - -HUDKeyIcon = $7EC726 -HUDGoalIndicator = $7EC72A -HUDPrizeIcon = $7EC742 -HUDRupees = $7EC750 -HUDBombCount = $7EC75A -HUDArrowCount = $7EC760 -HUDKeyDigits = $7EC764 - -BigRAM = $7EC900 ; Big buffer of free ram (0x1F00) +BigRAM = $7EC900 ; Big buffer of free ram (0x1F00) ;================================================================================ ; Bank 7F ;-------------------------------------------------------------------------------- +DecompressionBuffer = $7F0000 ; Decompression Buffer. $2000 bytes. + base $7F5000 RedrawFlag: skip 1 ; skip 2 ; @@ -226,6 +353,9 @@ skip $40 ; Unused skip $260 ; Unused DialogBuffer: skip $100 ; Dialog Buffer +MiniGameTime = $7FFE00 ; Time spent in mini game. 32-bits. +MiniGameTimeFinal = $7FFE04 ; Final mini game time. 32 bits. + ;================================================================================ ; RAM Assertions ;-------------------------------------------------------------------------------- @@ -249,29 +379,98 @@ endmacro %assertRAM(Scrap0D, $7E000D) %assertRAM(Scrap0E, $7E000E) %assertRAM(Scrap0F, $7E000F) - - +%assertRAM(GameMode, $7E0010) +%assertRAM(GameSubMode, $7E0011) +%assertRAM(FrameCounter, $7E001A) +%assertRAM(IndoorsFlag, $7E001B) %assertRAM(LinkPosY, $7E0020) %assertRAM(LinkPosX, $7E0022) +%assertRAM(LinkPosZ, $7E0024) +%assertRAM(LinkRecoilY, $7E0027) +%assertRAM(LinkRecoilX, $7E0028) +%assertRAM(LinkRecoilZ, $7E0029) +%assertRAM(LinkDirection, $7E002F) +%assertRAM(OAMOffsetY, $7E0044) +%assertRAM(OAMOffsetX, $7E0045) +%assertRAM(LinkJumping, $7E004D) +%assertRAM(BunnyFlagDP, $7E0056) +%assertRAM(LinkSlipping, $7E005B) +%assertRAM(FallTimer, $7E005C) +%assertRAM(LinkState, $7E005D) +%assertRAM(LinkSpeed, $7E005E) +%assertRAM(OverworldIndex, $7E008A) +%assertRAM(OverlayID, $7E008C) %assertRAM(RoomIndex, $7E00A0) +%assertRAM(PreviousRoom, $7E00A2) +%assertRAM(SubSubModule, $7E00B0) +%assertRAM(ObjPtr, $7E00B7) +%assertRAM(ObjPtrOffset, $7E00BA) +%assertRAM(ScrapBufferBD, $7E00BD) +%assertRAM(PlayerSpriteBank, $7E00BC) +%assertRAM(FileSelectPosition, $7E00C8) +%assertRAM(PasswordCodePosition, $7E00C8) +%assertRAM(PasswordSelectPosition, $7E00C9) +%assertRAM(BG1H, $7E00E0) +%assertRAM(BG2H, $7E00E2) +%assertRAM(BG3HOFSQL, $7E00E4) +%assertRAM(BG1V, $7E00E6) +%assertRAM(BG2V, $7E00E8) +%assertRAM(BG3VOFSQL, $7E00EA) +%assertRAM(LinkLayer, $7E00EE) %assertRAM(CurrentMSUTrack, $7E010B) +%assertRAM(GameModeCache, $7E010C) +%assertRAM(GameSubModeCache, $7E010D) +%assertRAM(MedallionFlag, $7E0112) +%assertRAM(BG1ShakeV, $7E011A) +%assertRAM(BG1ShakeH, $7E011C) %assertRAM(CurrentVolume, $7E0127) %assertRAM(TargetVolume, $7E0129) %assertRAM(CurrentControlRequest, $7E0133) %assertRAM(MusicControl, $7E012B) %assertRAM(MusicControlRequest, $7E012C) +%assertRAM(SFX1, $7E012D) +%assertRAM(SFX2, $7E012E) +%assertRAM(SFX3, $7E012F) +%assertRAM(SubModuleInterface, $7E0200) +%assertRAM(ItemCursor, $7E0202) +%assertRAM(BottleMenuCounter, $7E0205) +%assertRAM(MenuBlink, $7E0207) %assertRAM(ItemReceiptID, $7E02D8) +%assertRAM(BunnyFlag, $7E02E0) +%assertRAM(CutsceneFlag, $7E02E4) +%assertRAM(ItemReceiptMethod, $7E02E9) +%assertRAM(TileActBE, $7E02EF) +%assertRAM(CurrentYItem, $7E0303) +%assertRAM(TileActDig, $7E035B) +%assertRAM(ForceSwordUp, $7E03EF) +%assertRAM(ItemsTaken, $7E0403) +%assertRAM(DungeonID, $7E040C) +%assertRAM(OWEntranceCutscene, $7E04C6) +%assertRAM(HeartBeepTimer, $7E04CA) %assertRAM(NMIAux, $7E0632) +%assertRAM(SkipOAM, $7E0710) +%assertRAM(BowDryFire, $7E0B9A) +%assertRAM(SaveFileIndex, $7E0B9D) %assertRAM(SpritePosYLow, $7E0D00) %assertRAM(SpritePosXLow, $7E0D10) %assertRAM(SpritePosYHigh, $7E0D20) %assertRAM(SpritePosXHigh, $7E0D30) +%assertRAM(SpriteVelocityY, $7E0D40) +%assertRAM(SpriteVelocityX, $7E0D50) +%assertRAM(SpriteUnknown, $7E0D80) %assertRAM(SpriteAuxTable, $7E0DA0) +%assertRAM(SpriteGFXControl, $7E0DC0) %assertRAM(SpriteAITable, $7E0DD0) +%assertRAM(SpriteTimer, $7E0DF0) %assertRAM(SpriteTypeTable, $7E0E20) +%assertRAM(SpriteItemType, $7E0E80) %assertRAM(SpriteDirectionTable, $7E0EB0) +%assertRAM(FreezeSprites, $7E0FC1) +%assertRAM(SpriteCoordCacheX, $7E0FD8) +%assertRAM(SpriteCoordCacheY, $7E0FDA) +%assertRAM(NoMenu, $7E0FFC) +%assertRAM(TextID, $7E1CF0) %assertRAM(ToastBuffer, $7E1E0E) - %assertRAM(MSUResumeTime, $7E1E6B) %assertRAM(MSUResumeControl, $7E1E6F) %assertRAM(MSUFallbackTable, $7E1E70) @@ -281,8 +480,6 @@ endmacro %assertRAM(MSUPackRequest, $7E1E7C) %assertRAM(MSULoadedTrack, $7E1E7D) %assertRAM(MSUResumeTrack, $7E1E7F) - - %assertRAM(ClockHours, $7E1E90) %assertRAM(ClockMinutes, $7E1E94) %assertRAM(ClockSeconds, $7E1E98) @@ -299,6 +496,8 @@ endmacro %assertRAM(HUDArrowCount, $7EC760) %assertRAM(HUDKeyDigits, $7EC764) %assertRAM(BigRAM, $7EC900) + +%assertRAM(DecompressionBuffer, $7F0000) %assertRAM(RedrawFlag, $7F5000) %assertRAM(HexToDecDigit1, $7F5003) %assertRAM(HexToDecDigit2, $7F5004) @@ -306,9 +505,6 @@ endmacro %assertRAM(HexToDecDigit4, $7F5006) %assertRAM(HexToDecDigit5, $7F5007) %assertRAM(SpriteSkipEOR, $7F5008) - - - %assertRAM(AltTextFlag, $7F5035) %assertRAM(BossKills, $7F5037) %assertRAM(LagTime, $7F5038) @@ -369,68 +565,7 @@ endmacro %assertRAM(TxStatus, $7F53FF) %assertRAM(CompassTotalsWRAM, $7F5410) %assertRAM(DialogBuffer, $7F5700) - +%assertRAM(MiniGameTime, $7FFE00) +%assertRAM(MiniGameTimeFinal, $7FFE04) pullpc -;================================================================================ -; Bank 7F -;-------------------------------------------------------------------------------- - -;OLDSTUFF -; $7F5042 - Tile Upload Offset Override (Low) -; $7F5043 - Tile Upload Offset Override (High) -; $7F5044 - $7F5046 - NMI Auxiliary Function -; $7F5047 - $7F504F - Unused -; $7F5050 - $7F506F - Shop Block -; $7F5070 - Reserved for OneMind -; $7F5071 - Reserved for OneMind -; $7F5072 - OneMind player ID -; $7F5073 - $7F5074 - OneMind timer -; $7F5075 - $7F507D - Unused -; $7F507E - Clock Status -; $7F507F - Always Zero -; $7F5080 - $7F508F - unused -; $7F5090 - RNG Item Lock-In -; $7F5091 - Item Animation Busy Flag -; $7F5092 - Potion Animation Busy Flags (Health) -; $7F5093 - Potion Animation Busy Flags (Magic) -; $7F5094 - Dialog Offset Pointer (Low) -; $7F5095 - Dialog Offset Pointer (High) -; $7F5096 - Dialog Offset Pointer Return (Low) -; $7F5097 - Dialog Offset Pointer Return (High) -; $7F5098 - Unused -; $7F5099 - Last Entered Overworld Door ID -; $7F509A - (Reserved) -; $7F509B - Unused -; $7F509C - Duck Map Flag -; $7F509E - Valid Key Loaded -; $7F509F - Text Box Defer Flag -; $7F50A0 - $7F50AF - Unused - -; $7F50B0 - $7F50BF - Downstream Reserved (Enemizer) - -; $7F50C1 - Shield Modifier (Not Implemented) -; $7F50C2 - Armor Modifier -; $7F50C3 - Magic Modifier -; $7F50C4 - Light Cone Modifier -; $7F50C5 - Cucco Storm -; $7F50C6 - Old Man Dash Modifier -; $7F50C7 - Ice Physics Modifier -; $7F50C8 - Infinite Arrows Modifier -; $7F50C9 - Infinite Bombs Modifier -; $7F50CA - Infinite Magic Modifier -; $7F50CB - Invert D-Pad (Fill in values) -; $7F50CC - OHKO Flag -; $7F50CD - Sprite Swapper -; $7F50CE - Boots Modifier (0=Off, 1=Always, 2=Never) - -; $7F50D0 - $7F50FF - Block Cypher Parameters -; $7F5100 - $7F51FF - Block Cypher Buffer -; $7F5200 - $7F52FF - RNG Pointer Block -; $7F5300 - $7F53FF - Multiworld Block -; $7F5400 - $7F540F - Unused -; $7F5410 - $7F545F - Dungeon Tracking Block -; $7F5460 - $7F56FF - Unused - -; $7F5700 - $7F57FF - Dialog Buffer - diff --git a/registers.asm b/registers.asm index 0da5204..9c877d0 100644 --- a/registers.asm +++ b/registers.asm @@ -2,7 +2,7 @@ ; SNES Registers ;=================================================================================================== ; Note: This is almost entirely a copy from the JP 1.0 disassembly. -; See: https://github.com/spannerisms/jpdasm/ - 02/11/2022 +; See: https://github.com/spannerisms/jpdasm/ - 19/11/2022 ;-------------------------------------------------------------------------------- diff --git a/retro.asm b/retro.asm index c68fab2..d3ac078 100644 --- a/retro.asm +++ b/retro.asm @@ -36,7 +36,7 @@ DecrementArrows: .rupees REP #$20 LDA.b RoomIndex : CMP.w #$0111 : SEP #$20 : BNE .not_archery_game - LDA.b $1B : BEQ .not_archery_game ; in overworld + LDA.b IndoorsFlag : BEQ .not_archery_game ; in overworld LDA.w $0B9A : BEQ .shoot_arrow ; arrow game active LDA.b #$00 : BRA .done diff --git a/rngfixes.asm b/rngfixes.asm index 6ad59f6..f8c33db 100644 --- a/rngfixes.asm +++ b/rngfixes.asm @@ -2,11 +2,11 @@ ; RNG Fixes ;-------------------------------------------------------------------------------- RigDigRNG: - LDA.l $7FFE01 : CMP.l DiggingGameRNG : !BGE .forceHeart + LDA.l MiniGameTime+1 : CMP.l DiggingGameRNG : !BGE .forceHeart .normalItem JML GetRandomInt .forceHeart - LDA.l $7FFE00 : BNE .normalItem + LDA.l MiniGameTime : BNE .normalItem LDA.b #$04 RTL ;-------------------------------------------------------------------------------- @@ -20,8 +20,8 @@ RigChestRNG: JSL.l DecrementItemCounter RTL .forceHeart - LDA.b #$33 : STA.b $C8 ; assure the correct state if player talked to shopkeeper - LDA.w $0403 : AND.b #$40 : BNE .notHeart + LDA.b #$33 : STA.b ScrapBufferBD+$0B ; assure the correct state if player talked to shopkeeper + LDA.w ItemsTaken : AND.b #$40 : BNE .notHeart LDA.b #$07 ; give prize item RTL .notHeart diff --git a/save.asm b/save.asm index 2b01731..5f7204d 100644 --- a/save.asm +++ b/save.asm @@ -14,10 +14,10 @@ WriteSaveChecksumAndBackup: STA.l InverseChecksumSRAM PHB - LDA.w #$14FF ; \ - LDX.w #CartridgeSRAM&$FFFF ; | Copies $1500 bytes from beginning of cart SRAM to - LDY.w #SaveBackupSRAM&$FFFF ; | $704000 - MVN SRAMBank, SRAMBank ; / + LDA.w #$14FF ; \ + LDX.w #CartridgeSRAM&$FFFF ; | Copies $1500 bytes from beginning of cart SRAM to + LDY.w #SaveBackupSRAM&$FFFF ; | $704000 + MVN !SRAMBank, !SRAMBank ; / PLB RTL @@ -51,10 +51,10 @@ ValidateSRAM: TDC : STA.l FileValiditySRAM ; Delete save by way of zeroing validity marker BRA .goodchecksum : + PHB - LDA.w #$14FF ; \ - LDX.w #SaveBackupSRAM&$FFFF ; | Copies $1500 bytes from backup on cart SRAM to - LDY.w #CartridgeSRAM&$FFFF ; | main save location at $700000 - MVN SRAMBank, SRAMBank ; / + LDA.w #$14FF ; \ + LDX.w #SaveBackupSRAM&$FFFF ; | Copies $1500 bytes from backup on cart SRAM to + LDY.w #CartridgeSRAM&$FFFF ; | main save location at $700000 + MVN !SRAMBank, !SRAMBank ; / PLB .goodchecksum diff --git a/servicerequest.asm b/servicerequest.asm index 991a5af..9bf6bf0 100644 --- a/servicerequest.asm +++ b/servicerequest.asm @@ -58,13 +58,13 @@ endmacro ;-------------------------------------------------------------------------------- macro ServiceRequestChest(type) LDA.l TxStatus : BEQ + : CLC : RTL : + ; return fail if we don't have the lock - LDA.b $1B : STA.l TxBuffer+8 ; indoor/outdoor + LDA.b IndoorsFlag : STA.l TxBuffer+8 ; indoor/outdoor BEQ + LDA.b RoomIndex : STA.l TxBuffer+9 ; roomid low LDA.b RoomIndex+1 : STA.l TxBuffer+10 ; roomid high BRA ++ + - LDA.w $040A : STA.l TxBuffer+9 ; area id + LDA.b OverworldIndex : STA.l TxBuffer+9 ; area id LDA.b #$00 : STA.l TxBuffer+10 ; protocol defines this as a ushort ++ LDA.b $76 : !SUB #$58 : STA.l TxBuffer+11 ; object index (type 2 only) @@ -76,13 +76,13 @@ endmacro ;-------------------------------------------------------------------------------- macro ServiceRequest(type,index) LDA.l TxStatus : BEQ + : CLC : RTL : + ; return fail if we don't have the lock - LDA.b $1B : STA.l TxBuffer+8 ; indoor/outdoor + LDA.b IndoorsFlag : STA.l TxBuffer+8 ; indoor/outdoor BEQ + LDA.b RoomIndex : STA.l TxBuffer+9 ; roomid low LDA.b RoomIndex+1 : STA.l TxBuffer+10 ; roomid high BRA ++ + - LDA.w $040A : STA.l TxBuffer+9 ; area id + LDA.b OverworldIndex : STA.l TxBuffer+9 ; area id LDA.b #$00 : STA.l TxBuffer+10 ; protocol defines this as a ushort ++ LDA.b # : STA.l TxBuffer+11 ; object index (type 2 only) @@ -111,7 +111,7 @@ PollService: BRA .done + : CMP.b #!SCM_PROMPT : BNE + ; item prompt LDA.l RxBuffer+8 : TAX - LDA.l RxBuffer+9 : STA.w $012E, X ; set sound effect + LDA.l RxBuffer+9 : STA.w SFX2, X ; set sound effect REP #$30 ; set 16-bit accumulator and index registers LDA.l RxBuffer+10 : TAX LDA.l RxBuffer+12 diff --git a/shopkeeper.asm b/shopkeeper.asm index bb365db..6731ab6 100644 --- a/shopkeeper.asm +++ b/shopkeeper.asm @@ -331,7 +331,7 @@ Shopkepeer_CallOriginal: LDA.b #ShopkeeperJumpTable>>16 : PHA LDA.b #ShopkeeperJumpTable>>8 : PHA LDA.b #ShopkeeperJumpTable : PHA - LDA.w $0E80, X + LDA.w SpriteItemType, X JML.l UseImplicitRegIndexedLocalJumpTable ;-------------------------------------------------------------------------------- Sprite_ShopKeeper: @@ -370,7 +370,7 @@ RTL ;-------------------------------------------------------------------------------- macro DrawMerchant(head,body,speed) PHX : LDX.b #$00 - LDA.b $1A : AND.b : BEQ + + LDA.b FrameCounter : AND.b : BEQ + - LDA.w .oam_shopkeeper_f1, X : STA.l BigRAM, X : INX CPX.b #$10 : !BLT - @@ -420,7 +420,7 @@ Shopkeeper_DrawMerchant_Type1: LDA.b #$01 : STA.b Scrap06 ; request 1 OAM slot LDA.b #$04 : JSL.l OAM_AllocateFromRegionA ; request 4 bytes STZ.b Scrap07 - LDA.b $1A : AND #$08 : BEQ + + LDA.b FrameCounter : AND #$08 : BEQ + LDA.b #.oam_shopkeeper_f1 : STA.b Scrap08 LDA.b #.oam_shopkeeper_f1>>8 : STA.b Scrap09 BRA ++ @@ -464,8 +464,8 @@ Shopkeeper_SetupHitboxes: JSR.w Setup_ShopItemInteractionHitbox JSL.l Utility_CheckIfHitBoxesOverlapLong : BCC .no_interaction - LDA.b $F6 : AND.b #$80 : BEQ .no_interaction ; check for A-press - LDA.b $10 : CMP.b #$0C : !BGE .no_interaction ; don't interact in other modes besides game action + LDA.b Joy1B_New : AND.b #$80 : BEQ .no_interaction ; check for A-press + LDA.b GameMode : CMP.b #$0C : !BGE .no_interaction ; don't interact in other modes besides game action JSR.w Shopkeeper_BuyItem .no_interaction INY #4 @@ -496,13 +496,13 @@ Shopkeeper_BuyItem: LDA.b #$7A LDY.b #$01 JSL.l Sprite_ShowMessageUnconditional - LDA.b #$3C : STA.w $012E ; error sound + LDA.b #$3C : STA.w SFX2 ; error sound JMP .done .full_bottles LDA.b #$6B LDY.b #$01 JSL.l Sprite_ShowMessageUnconditional - LDA.b #$3C : STA.w $012E ; error sound + LDA.b #$3C : STA.w SFX2 ; error sound JMP .done .buy LDA.l ShopType : AND.b #$80 : BNE ++ ; don't charge if this is a take-any @@ -544,7 +544,7 @@ Setup_ShopItemCollisionHitbox: SEP #$20 ; set 8-bit accumulator ; load shopkeeper X (16 bit) - LDA.w $0D30, X : XBA : LDA.w $0D10, X + LDA.w SpritePosXHigh, X : XBA : LDA.w SpritePosXLow, X REP #$20 ; set 16-bit accumulator PHA : PHY @@ -561,7 +561,7 @@ Setup_ShopItemCollisionHitbox: STA.b Scrap04 : XBA : STA.b Scrap0A ;load shopkeeper Y (16 bit) - LDA.w $0D20, X : XBA : LDA.w $0D00, X + LDA.w SpritePosYHigh, X : XBA : LDA.w SpritePosYLow, X REP #$20 ; set 16-bit accumulator PHY : INY #2 @@ -624,7 +624,7 @@ RTS Sprite_HaltSpecialPlayerMovementCopied: PHX JSL Sprite_NullifyHookshotDrag - STZ $5E ; Set Link's speed to zero... + STZ.b LinkSpeed ; Set Link's speed to zero... JSL Player_HaltDashAttackLong PLX RTS diff --git a/spriteswap.asm b/spriteswap.asm index b37fe03..c5e34f8 100644 --- a/spriteswap.asm +++ b/spriteswap.asm @@ -1,5 +1,5 @@ org $008A01 ; 0xA01 - Bank00.asm (LDA.b #$10 : STA $4304 : STA $4314 : STA $4324) -LDA.b $BC +LDA.b PlayerSpriteBank org $1BEDF9 JSL SpriteSwap_Palette_ArmorAndGloves ;4bytes @@ -16,9 +16,9 @@ org $BF8000 SwapSpriteIfNecessary: PHP SEP #$20 ; set 8-bit accumulator - LDA.l SpriteSwapper : BEQ + : !ADD #!BANK_BASE : CMP.b $BC : BEQ + - STA.b $BC - STZ.w $0710 ; Set Normal Sprite NMI + LDA.l SpriteSwapper : BEQ + : !ADD #!BANK_BASE : CMP.b PlayerSpriteBank : BEQ + + STA.b PlayerSpriteBank + STZ.w SkipOAM ; Set Normal Sprite NMI JSL.l SpriteSwap_Palette_ArmorAndGloves_part_two + PLP @@ -28,7 +28,7 @@ SpriteSwap_Palette_ArmorAndGloves: { ;DEDF9 LDA.l SpriteSwapper : BNE .continue - LDA.b #$10 : STA.b $BC ; Load Original Sprite Location + LDA.b #$10 : STA.b PlayerSpriteBank ; Load Original Sprite Location REP #$21 LDA.l ArmorEquipment JSL $1BEDFF ; Read Original Palette Code @@ -60,7 +60,7 @@ SpriteSwap_Palette_ArmorAndGloves: TXY : TAX - LDA.b $BC : AND.w #$00FF : STA.b Scrap02 + LDA.b PlayerSpriteBank : AND.w #$00FF : STA.b Scrap02 .loop diff --git a/sram.asm b/sram.asm index 74fed05..971d805 100644 --- a/sram.asm +++ b/sram.asm @@ -425,8 +425,8 @@ base off ; If these move (most likely by placing initsramtable.asm somewhere else) these ; bank definitions need to be changed as well. ;================================================================================ -SRAMBank = $70 -SRAMTableBank = $30|$80 +!SRAMBank = $70 +!SRAMTableBank = $30|$80 ;================================================================================ ; Assertions diff --git a/stats.asm b/stats.asm index 36b97dc..b4405cf 100644 --- a/stats.asm +++ b/stats.asm @@ -16,7 +16,7 @@ RTL StatSaveCounter: PHA LDA.l StatsLocked : BNE + - LDA.b $10 : CMP.b #$17 : BNE + ; not a proper s&q, link probably died + LDA.b GameMode : CMP.b #$17 : BNE + ; not a proper s&q, link probably died LDA.l SaveQuitCounter : INC CMP.b #100 : BEQ + ; decimal 100 STA.l SaveQuitCounter @@ -55,7 +55,7 @@ DungeonExitTransition: JSL Player_HaltDashAttackLong LDA.b #$00 : STA.w $0301 ; stop item dashing + - LDA.b #$0F : STA.b $10 ; stop running through the transition + LDA.b #$0F : STA.b GameMode ; stop running through the transition StatTransitionCounter: PHA : PHP LDA.l StatsLocked : BNE + @@ -93,7 +93,7 @@ IncrementSmallKeysNoPrimary: JSL AddInventory_incrementKeyLong + JSL.l UpdateKeys - LDA.b $1B : BEQ + ; skip room check if outdoors + LDA.b IndoorsFlag : BEQ + ; skip room check if outdoors PHP : REP #$20 ; set 16-bit accumulator LDA.w $048E : CMP.w #$0087 : BNE ++ ; hera basement PLP : PHY : LDY.b #$24 : JSL.l FullInventoryExternal @@ -116,13 +116,13 @@ RTL ;-------------------------------------------------------------------------------- CountChestKey: ; called by neighbor functions PHA : PHX - CPY.b #$24 : BEQ + ; small key for this dungeon - use $040C + CPY.b #$24 : BEQ + ; small key for this dungeon - use DungeonID CPY.b #$A0 : !BLT .end ; Ignore most items CPY.b #$AE : !BGE .end ; Ignore reserved key and generic key TYA : AND.B #$0F : BNE ++ ; If this is an HC key, instead count it as a sewers key INC - ++ TAX : BRA .count ; use Key id instead of $040C (Keysanity) - + LDA.w $040C : LSR + ++ TAX : BRA .count ; use Key id instead of DungeonID (Keysanity) + + LDA.w DungeonID : LSR BNE + INC ; combines HC and Sewer counts + TAX @@ -182,7 +182,7 @@ IncrementChestTurnCounter: RTL ;-------------------------------------------------------------------------------- IncrementChestCounter: - LDA.b #$01 : STA.w $02E9 ; thing we wrote over + LDA.b #$01 : STA.w ItemReceiptMethod ; thing we wrote over PHA LDA.l StatsLocked : BNE + LDA.l ChestsOpened : INC : STA.l ChestsOpened @@ -289,7 +289,7 @@ IncrementUWMirror: PHA LDA.b #$00 : STA.l $7F5035 ; bandaid patch bug with mirroring away from text LDA.l StatsLocked : BNE + - LDA.w $040C : CMP.b #$FF : BEQ + ; skip if we're in a cave or house + LDA.w DungeonID : CMP.b #$FF : BEQ + ; skip if we're in a cave or house LDA.l UnderworldMirrors : INC : STA.l UnderworldMirrors JSL.l StatTransitionCounter + @@ -350,9 +350,9 @@ StatsFinalPrep: .done PLP : PLX : PLA - LDA.b #$19 : STA.b $10 ; thing we wrote over, load triforce room - STZ.b $11 - STZ.b $B0 + LDA.b #$19 : STA.b GameMode ; thing we wrote over, load triforce room + STZ.b GameSubMode + STZ.b SubSubModule RTL ;-------------------------------------------------------------------------------- ; Notes: diff --git a/swordswap.asm b/swordswap.asm index 1dfc790..bdc315c 100644 --- a/swordswap.asm +++ b/swordswap.asm @@ -4,7 +4,7 @@ ;$03348E: smith sword check (to see if uprade-able) ;================================================================================ LoadSwordForDamage: - LDA.w $0E20, X : CMP.b #$88 : BNE .notMoth + LDA.w SpriteTypeTable, X : CMP.b #$88 : BNE .notMoth JSR.w LoadModifiedSwordLevel ; load normal sword value CMP.b #$04 : !BLT + : DEC : + ; if it's gold sword, change it to tempered RTL @@ -66,17 +66,17 @@ RTL ; $7E0348 - Ice Value LoadModifiedIceFloorValue_a11: LDA.b RoomIndex : CMP.b #$91 : BEQ + : CMP.b #$92 : BEQ + : CMP.b #$93 : BEQ + ; mire basement currently broken - not sure why - LDA.b $5D : CMP.b #$01 : BEQ + : CMP.b #$17 : BEQ + : CMP.b #$1C : BEQ + - LDA.b $5E : CMP.b #$02 : BEQ + - LDA.b $5B : BNE + + LDA.b LinkState : CMP.b #$01 : BEQ + : CMP.b #$17 : BEQ + : CMP.b #$1C : BEQ + + LDA.b LinkSpeed : CMP.b #$02 : BEQ + + LDA.b LinkSlipping : BNE + LDA.w $0348 : ORA.l IceModifier : AND.b #$11 : RTL + : LDA.w $0348 : AND.b #$11 RTL LoadModifiedIceFloorValue_a01: LDA.b RoomIndex : CMP.b #$91 : BEQ + : CMP.b #$92 : BEQ + : CMP.b #$93 : BEQ + ; mire basement currently broken - not sure why - LDA.b $5D : CMP.b #$01 : BEQ + : CMP.b #$17 : BEQ + : CMP.b #$1C : BEQ + - LDA.b $5E : CMP.b #$02 : BEQ + - LDA.b $5B : BNE + + LDA.b LinkState : CMP.b #$01 : BEQ + : CMP.b #$17 : BEQ + : CMP.b #$1C : BEQ + + LDA.b LinkSpeed : CMP.b #$02 : BEQ + + LDA.b LinkSlipping : BNE + LDA.w $0348 : ORA.l IceModifier : AND.b #$01 : RTL + : LDA.w $0348 : AND.b #$01 RTL @@ -98,10 +98,10 @@ RTL ;================================================================================ CheckGanonHammerDamage: LDA.l HammerableGanon : BEQ + - LDA.w $0E20, X : CMP.b #$D8 ; original behavior except ganon + LDA.w SpriteTypeTable, X : CMP.b #$D8 ; original behavior except ganon RTL + - LDA.w $0E20, X : CMP.b #$D6 ; original behavior + LDA.w SpriteTypeTable, X : CMP.b #$D6 ; original behavior RTL ;================================================================================ GetSmithSword: @@ -122,7 +122,7 @@ GetSmithSword: .buy LDA.l SmithItem : TAY - STZ.w $02E9 ; Item from NPC + STZ.w ItemReceiptMethod ; Item from NPC PHX : JSL Link_ReceiveItem : PLX REP #$20 : LDA.l CurrentRupees : !SUB.w #$000A : STA.l CurrentRupees : SEP #$20 ; Take 10 rupees @@ -133,7 +133,7 @@ GetSmithSword: ;================================================================================ CheckMedallionSword: LDA.l AllowSwordlessMedallionUse : BEQ .check_sword - CMP #$01 : BEQ .check_pad + CMP.b #$01 : BEQ .check_pad LDA.b #$02 ; Pretend we have master sword RTL .check_sword @@ -141,31 +141,31 @@ CheckMedallionSword: RTL .check_pad PHB : PHX : PHY - LDA.b $1B : BEQ .outdoors + LDA.b IndoorsFlag : BEQ .outdoors .indoors REP #$20 ; set 16-bit accumulator LDA.b RoomIndex ; load room ID CMP.w #$000E : BNE + ; freezor1 - LDA.b $22 : AND.w #$01FF ; check x-coord + LDA.b LinkPosX : AND.w #$01FF ; check x-coord CMP.w #368-8 : !BLT .normal CMP.w #368+32-8 : !BGE .normal - LDA.b $20 : AND.w #$01FF ; check y-coord + LDA.b LinkPosY : AND.w #$01FF ; check y-coord CMP.w #400-22 : !BLT .normal CMP.w #400+32-22 : !BGE .normal JMP .permit + : CMP.w #$007E : BNE + ; freezor2 - LDA.b $22 : AND.w #$01FF ; check x-coord + LDA.b LinkPosX : AND.w #$01FF ; check x-coord CMP.w #112-8 : !BLT .normal CMP.w #112+32-8 : !BGE .normal - LDA.b $20 : AND.w #$01FF ; check y-coord + LDA.b LinkPosY : AND.w #$01FF ; check y-coord CMP.w #400-22 : !BLT .normal CMP.w #400+32-22 : !BGE .normal JMP .permit + : CMP.w #$00DE : BNE + ; kholdstare - LDA.b $22 : AND.w #$01FF ; check x-coord + LDA.b LinkPosX : AND.w #$01FF ; check x-coord CMP.w #368-8 : !BLT .normal CMP.w #368+32-8 : !BGE .normal - LDA.b $20 : AND.w #$01FF ; check y-coord + LDA.b LinkPosY : AND.w #$01FF ; check y-coord CMP.w #144-22 : !BLT .normal CMP.w #144+32-22 : !BGE .normal BRA .permit @@ -173,14 +173,14 @@ CheckMedallionSword: SEP #$20 ; set 8-bit accumulator BRA .done .outdoors - LDA.b $8A : CMP.b #$70 : BNE + - LDA.l MireRequiredMedallion : TAX : LDA.l .medallion_type, X : CMP.w $0303 : BNE .done + LDA.b OverworldIndex : CMP.b #$70 : BNE + + LDA.l MireRequiredMedallion : TAX : LDA.l .medallion_type, X : CMP.w CurrentYItem : BNE .done LDA.l OverworldEventDataWRAM+$70 : AND.b #$20 : BNE .done LDA.b #$08 : PHA : PLB ; set data bank to $08 LDY.b #$02 : JSL.l Ancilla_CheckIfEntranceTriggered : BCS .permit ; misery mire BRA .done + : CMP.b #$47 : BNE + - LDA.l TRockRequiredMedallion : TAX : LDA.l .medallion_type, X : CMP.w $0303 : BNE .done + LDA.l TRockRequiredMedallion : TAX : LDA.l .medallion_type, X : CMP.w CurrentYItem : BNE .done LDA.l OverworldEventDataWRAM+$47 : AND.b #$20 : BNE .done LDA.b #$08 : PHA : PLB ; set data bank to $08 LDY.b #$03 : JSL.l Ancilla_CheckIfEntranceTriggered : BCS .permit ; turtle rock diff --git a/tablets.asm b/tablets.asm index cd45bb0..2a088ee 100644 --- a/tablets.asm +++ b/tablets.asm @@ -20,7 +20,7 @@ RTL SetTabletItem: JSL.l GetSpriteID PHA - LDA.b $8A : CMP.b #$03 : BEQ .ether ; if we're on the map where ether is, we're the ether tablet + LDA.b OverworldIndex : CMP.b #$03 : BEQ .ether ; if we're on the map where ether is, we're the ether tablet .bombos JSL.l ItemSet_BombosTablet : BRA .done .ether @@ -33,36 +33,36 @@ SpawnTabletItem: JSL.l LoadOutdoorValue PHA JSL.l PrepDynamicTile - + JSL.l SetTabletItem - + LDA.b #$EB - STA.l $7FFE00 + STA.l MiniGameTime JSL Sprite_SpawnDynamically - PLA : STA.w $0E80, Y ; Store item type - LDA.b $22 : STA.w $0D10, Y - LDA.b $23 : STA.w $0D30, Y + PLA : STA.w SpriteItemType, Y ; Store item type + LDA.b LinkPosX : STA.w SpritePosXLow, Y + LDA.b LinkPosX+1 : STA.w SpritePosXHigh, Y - LDA.b $20 : STA.w $0D00, Y - LDA.b $21 : STA.w $0D20, Y + LDA.b LinkPosY : STA.w SpritePosYLow, Y + LDA.b LinkPosY+1 : STA.w SpritePosYHigh, Y LDA.b #$00 : STA.w $0F20, Y - + LDA.b #$7F : STA.w $0F70, Y ; spawn WAY up high RTL ;-------------------------------------------------------------------------------- MaybeUnlockTabletAnimation: PHA : PHP JSL.l IsMedallion : BCC + - STZ $0112 ; disable falling-medallion mode - STZ $03EF ; release link from item-up pose - LDA.b #$00 : STA.b $5D ; set link to ground state + STZ.w MedallionFlag ; disable falling-medallion mode + STZ.w ForceSwordUp ; release link from item-up pose + LDA.b #$00 : STA.b LinkState ; set link to ground state REP #$20 ; set 16-bit accumulator - LDA.b $8A : CMP.w #$0030 : BNE ++ ; Desert + LDA.b OverworldIndex : CMP.w #$0030 : BNE ++ ; Desert SEP #$20 ; set 8-bit accumulator - LDA.b #$02 : STA.b $2F ; face link forward + LDA.b #$02 : STA.b LinkDirection ; face link forward LDA.b #$3C : STA.b $46 ; lock link for 60f ++ SEP #$20 ; set 8-bit accumulator @@ -72,15 +72,15 @@ RTL ;-------------------------------------------------------------------------------- IsMedallion: REP #$20 ; set 16-bit accumulator - LDA.b $8A + LDA.b OverworldIndex CMP.w #$03 : BNE + ; Death Mountain - LDA.b $22 : CMP.w #1890 : !BGE ++ + LDA.b LinkPosX : CMP.w #1890 : !BGE ++ SEC JMP .done ++ BRA .false + CMP.w #$30 : BNE + ; Desert - LDA.b $22 : CMP.w #512 : !BLT ++ + LDA.b LinkPosX : CMP.w #512 : !BLT ++ SEC JMP .done ++ diff --git a/textrenderer.asm b/textrenderer.asm index 3b8d07b..c053dd2 100644 --- a/textrenderer.asm +++ b/textrenderer.asm @@ -5,8 +5,8 @@ RenderCharSetColorExtended_init: RenderCharSetColorExtended_close: stz.b Scrap0C - lda.w $010c - sta.b $10 + lda.w GameModeCache + sta.b GameMode rtl RenderCharSetColorExtended: diff --git a/timer.asm b/timer.asm index cbc2bf4..d2bc2ba 100644 --- a/timer.asm +++ b/timer.asm @@ -157,7 +157,7 @@ DrawChallengeTimer: LDA.w ClockSeconds+2 : STA.l $7EC7A2 LDA.w ClockSeconds : STA.l $7EC7A4 ++ - LDA.b $1A : AND.w #$001F : BNE + : JSR CalculateTimer : + + LDA.b FrameCounter : AND.w #$001F : BNE + : JSR CalculateTimer : + RTL ;-------------------------------------------------------------------------------- diff --git a/utilities.asm b/utilities.asm index 36f2201..eac5297 100644 --- a/utilities.asm +++ b/utilities.asm @@ -504,23 +504,23 @@ Sprite_IsOnscreen: JSR _Sprite_IsOnscreen_DoWork BCS + REP #$20 - LDA.b $E2 : PHA : !SUB.w #$0F : STA.b $E2 - LDA.b $E8 : PHA : !SUB.w #$0F : STA.b $E8 + LDA.b BG2H : PHA : !SUB.w #$0F : STA.b BG2H + LDA.b BG2V : PHA : !SUB.w #$0F : STA.b BG2V SEP #$20 JSR _Sprite_IsOnscreen_DoWork REP #$20 - PLA : STA.b $E8 - PLA : STA.b $E2 + PLA : STA.b BG2V + PLA : STA.b BG2H SEP #$20 + RTL _Sprite_IsOnscreen_DoWork: - LDA.w $0D10, X : CMP.b $E2 - LDA.w $0D30, X : SBC.b $E3 : BNE .offscreen + LDA.w SpritePosXLow, X : CMP.b BG2H + LDA.w SpritePosXHigh, X : SBC.b $E3 : BNE .offscreen - LDA.w $0D00, X : CMP.b $E8 - LDA.w $0D20, X : SBC.b $E9 : BNE .offscreen + LDA.w SpritePosYLow, X : CMP.b BG2V + LDA.w SpritePosYHigh, X : SBC.b $E9 : BNE .offscreen SEC RTS .offscreen @@ -542,13 +542,13 @@ Sprite_GetScreenRelativeCoords: STA.b Scrap08 - LDA.w $0D00, X : STA.b Scrap00 - !SUB $E8 : STA.b Scrap06 - LDA.w $0D20, X : STA.b Scrap01 + LDA.w SpritePosYLow, X : STA.b Scrap00 + !SUB.b BG2V : STA.b Scrap06 + LDA.w SpritePosYHigh, X : STA.b Scrap01 - LDA.w $0D10, X : STA.b Scrap02 - !SUB $E2 : STA.b Scrap07 - LDA.w $0D30, X : STA.b Scrap03 + LDA.w SpritePosXLow, X : STA.b Scrap02 + !SUB.b BG2H : STA.b Scrap07 + LDA.w SpritePosXHigh, X : STA.b Scrap03 RTL ;--------------------------------------------------------------------------------