From cd7260c5f425fd2d225a703f28d70a77205965eb Mon Sep 17 00:00:00 2001 From: spannerisms <32842036+spannerisms@users.noreply.github.com> Date: Wed, 24 Mar 2021 07:31:38 -0400 Subject: [PATCH 01/20] refactor bookofmudora unnecessary stack operations --- bookofmudora.asm | 2 -- 1 file changed, 2 deletions(-) diff --git a/bookofmudora.asm b/bookofmudora.asm index 3030d34..e26c7fa 100644 --- a/bookofmudora.asm +++ b/bookofmudora.asm @@ -15,9 +15,7 @@ DrawLibraryItemGFX: RTL ;-------------------------------------------------------------------------------- SetLibraryItem: - PHA LDY $0E80, X ; Retrieve stored item type - PLA JSL.l ItemSet_Library ; contains thing we wrote over RTL ;-------------------------------------------------------------------------------- From f6f28d89a94ac9937148e274a8a44033d1a7a5f9 Mon Sep 17 00:00:00 2001 From: spannerisms <32842036+spannerisms@users.noreply.github.com> Date: Wed, 24 Mar 2021 07:37:32 -0400 Subject: [PATCH 02/20] refactor bugfixes reverse some labels for compactness and readability --- bugfixes.asm | 44 ++++++++++++++++++++++---------------------- 1 file changed, 22 insertions(+), 22 deletions(-) diff --git a/bugfixes.asm b/bugfixes.asm index 4b55a67..5e7a6be 100644 --- a/bugfixes.asm +++ b/bugfixes.asm @@ -32,7 +32,7 @@ RTL ;-------------------------------------------------------------------------------- ;0 = Become (Perma)bunny DecideIfBunny: - LDA $7EF357 : BEQ + : RTL : + + LDA $7EF357 : BNE .done LDA $7EF3CA : AND.b #$40 PHA : LDA.l InvertedMode : BNE .inverted .normal @@ -47,8 +47,8 @@ RTL DecideIfBunnyByScreenIndex: ; If indoors we don't have a screen index. Return non-bunny to make mirror-based ; superbunny work - LDA $1B : BEQ + : RTL : + - LDA $7EF357 : BEQ + : RTL : + + LDA $1B : BNE .done + LDA $7EF357 : BNE .done LDA $8A : AND.b #$40 : PHA LDA.l InvertedMode : BNE .inverted .normal @@ -114,12 +114,13 @@ RTS FixFrogSmith: LDA.l $7EF3CA : BNE .darkWorld LDA.l $7EF3CC : CMP.b #$07 : BNE .done - LDA.b #$08 : STA.l $7EF3CC ; make frog into smith in light world + LDA.b #$08 : ; make frog into smith in light world BRA .loadgfx .darkWorld LDA.l $7EF3CC : CMP.b #$08 : BNE .done - LDA.b #$07 : STA.l $7EF3CC ; make smith into frog in dark world + LDA.b #$07 ; make smith into frog in dark world .loadgfx + STA.l $7EF3CC JSL Tagalong_LoadGfx .done RTS @@ -137,12 +138,11 @@ RTL ; Fix crystal not spawning when using somaria vs boss TryToSpawnCrystalUntilSuccess: STX $02D8 ; what we overwrote - JSL AddAncillaLong : BCC .spawned ; a clear carry flag indicates success - .failed - RTL - .spawned + JSL AddAncillaLong : BCS .failed ; a clear carry flag indicates success +.spawned STZ $AE ; the "trying to spawn crystal" flag STZ $AF ; the "trying to spawn pendant" flag +.failed RTL ;-------------------------------------------------------------------------------- @@ -173,22 +173,22 @@ CMP.w #$030E : BEQ .new ; opening dungeon map CMP.w #$070E : BEQ .new ; opening overworld map .original - - lda [$00] - sta $7ec300, x - sta $7ec500, x - inc $00 : inc $00 - inx #2 - dey - bpl - + LDA [$00] + STA $7EC300, X + STA $7EC500, X + INC $00 : INC $00 + INX #2 + DEY + BPL - RTL .new - - lda [$00] - sta $7ec500, x - inc $00 : inc $00 - inx #2 - dey - bpl - + LDA [$00] + STA $7EC500, X + INC $00 : INC $00 + INX #2 + DEY + BPL - RTL ;-------------------------------------------------------------------------------- From ffd1db722bb68206f8c045196332b7f04f751daa Mon Sep 17 00:00:00 2001 From: spannerisms <32842036+spannerisms@users.noreply.github.com> Date: Wed, 24 Mar 2021 07:39:20 -0400 Subject: [PATCH 03/20] refactor catfish use JML instead of JSL : RTL --- catfish.asm | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/catfish.asm b/catfish.asm index 908a31f..4754600 100644 --- a/catfish.asm +++ b/catfish.asm @@ -4,8 +4,7 @@ !HEART_REDRAW = "$7F5000" LoadCatfishItemGFX: LDA.l $1DE185 ; location randomizer writes catfish item to - JSL.l PrepDynamicTile -RTL + JML PrepDynamicTile ;-------------------------------------------------------------------------------- DrawThrownItem: LDA $8A : CMP.b #$81 : BNE .catfish @@ -19,8 +18,7 @@ DrawThrownItem: LDA.l $1DE185 ; location randomizer writes catfish item to .draw - JSL.l DrawDynamicTile -RTL + JML DrawDynamicTile ;-------------------------------------------------------------------------------- MarkThrownItem: JSL Link_ReceiveItem ; thing we wrote over @@ -28,12 +26,9 @@ MarkThrownItem: LDA $8A : CMP.b #$81 : BNE .catfish .zora - JSL.l ItemSet_ZoraKing - BRA .done - + JML ItemSet_ZoraKing + .catfish - JSL.l ItemSet_Catfish - - .done -RTL + JML ItemSet_Catfish + ;-------------------------------------------------------------------------------- \ No newline at end of file From 97e3a995e027d8908286301855c8fb28600a95cc Mon Sep 17 00:00:00 2001 From: spannerisms <32842036+spannerisms@users.noreply.github.com> Date: Wed, 24 Mar 2021 07:42:34 -0400 Subject: [PATCH 04/20] refactor clock JSL : RTL to JML SEC not necessary if we branch on BEQ, since BEQ implies a set carry made carry_bit a sublabel --- clock.asm | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/clock.asm b/clock.asm index c0eebd1..4e853d1 100644 --- a/clock.asm +++ b/clock.asm @@ -66,8 +66,7 @@ endmacro Clock_Test: JSL.l Clock_Init - JSL.l Clock_IsSupported -RTL + JML.l Clock_IsSupported ;-------------------------------------------------------------------------------- ; Clock_Init @@ -112,11 +111,10 @@ Clock_IsSupported: PHA : PHX LDX #$00; - - LDA $002800 : AND.b #$0F : CMP #$0F : BEQ + ; check for clock chip ready signal - CPX.b #$0E : !BLT ++ : CLC : BRA .done : ++ ; if we've read 14 bytes with no success, unset carry and exit - INX - BRA - : + - SEC ; found a clock chip + LDA $002800 : AND.b #$0F : CMP #$0F : BEQ .done ; check for clock chip ready signal + CPX.b #$0E : BCC ++ : CLC : BRA .done ; if we've read 14 bytes with no success, unset carry and exit + ++ INX + BRA - .done PLX : PLA RTL @@ -197,9 +195,9 @@ Multiply_A16Y8: CLC ADC $4216 LDY $4217 - BCC carry_bit + BCC .carry_bit INY - carry_bit: +.carry_bit: XBA REP #$20 ; set 16-bit accumulator RTL From a28726d20ec8ae094ca50dab55ec2911d0f08775 Mon Sep 17 00:00:00 2001 From: spannerisms <32842036+spannerisms@users.noreply.github.com> Date: Wed, 24 Mar 2021 07:46:53 -0400 Subject: [PATCH 05/20] refactor compasses reverse some branching for compactness move SEP #$20 to macro --- compasses.asm | 18 +++--------------- 1 file changed, 3 insertions(+), 15 deletions(-) diff --git a/compasses.asm b/compasses.asm index 89ee265..af65625 100644 --- a/compasses.asm +++ b/compasses.asm @@ -8,16 +8,17 @@ macro DrawConstantNumber(digit1,digit2) LDA.w #$2490+ : STA $7EC79A LDA.w #$2490+ : STA $7EC79C + SEP #$20 endmacro ;-------------------------------------------------------------------------------- DrawDungeonCompassCounts: LDX $1B : BNE + : RTL : + ; Skip if outdoors - LDX $040C : CPX.b #$FF : BNE + : RTL : + ; Skip if not in a dungeon + LDX $040C : CPX.b #$FF : BEQ .done ; Skip if not in a dungeon CMP.w #$0002 : BEQ ++ ; if CompassMode==2, we don't check for the compass LDA $7EF364 : AND.l .item_masks, X ; Load compass values to A, mask with dungeon item masks - BNE + : RTL : + ; skip if we don't have compass + BEQ .done ; skip if we don't have compass ++ JMP (CompassCountDungeonHandlers, X) : .return_spot @@ -48,79 +49,66 @@ CompassCountDungeonHandlers: ; pointers to functions that handle dungeon-specifi CompassCount_Escape: %DrawConstantNumber(0,8) - SEP #$20 LDA $7EF434 : LSR #4 JMP DrawDungeonCompassCounts_return_spot CompassCount_Eastern: %DrawConstantNumber(0,6) - SEP #$20 LDA $7EF436 : AND.b #$07 JMP DrawDungeonCompassCounts_return_spot CompassCount_Desert: %DrawConstantNumber(0,6) - SEP #$20 LDA $7EF435 : LSR #5 JMP DrawDungeonCompassCounts_return_spot CompassCount_Agah: %DrawConstantNumber(0,2) - SEP #$20 LDA $7EF435 : AND.b #$02 JMP DrawDungeonCompassCounts_return_spot CompassCount_Swamp: %DrawConstantNumber(1,0) - SEP #$20 LDA $7EF439 : AND.b #$0F JMP DrawDungeonCompassCounts_return_spot CompassCount_PoD: %DrawConstantNumber(1,4) - SEP #$20 LDA $7EF434 : AND.b #$0F JMP DrawDungeonCompassCounts_return_spot CompassCount_Mire: %DrawConstantNumber(0,8) - SEP #$20 LDA $7EF438 : AND.b #$0F JMP DrawDungeonCompassCounts_return_spot CompassCount_Skull: %DrawConstantNumber(0,8) - SEP #$20 LDA $7EF437 : LSR #4 JMP DrawDungeonCompassCounts_return_spot CompassCount_Ice: %DrawConstantNumber(0,8) - SEP #$20 LDA $7EF438 : LSR #4 JMP DrawDungeonCompassCounts_return_spot CompassCount_Hera: %DrawConstantNumber(0,6) - SEP #$20 LDA $7EF435 : AND.b #$1C : LSR #2 JMP DrawDungeonCompassCounts_return_spot CompassCount_Thieves: %DrawConstantNumber(0,8) - SEP #$20 LDA $7EF437 : AND.b #$0F JMP DrawDungeonCompassCounts_return_spot CompassCount_Trock: %DrawConstantNumber(1,2) - SEP #$20 LDA $7EF439 : LSR #4 JMP DrawDungeonCompassCounts_return_spot CompassCount_Gt: %DrawConstantNumber(2,7) - SEP #$20 LDA $7EF436 : LSR #3 JMP DrawDungeonCompassCounts_return_spot From 8b9ea182d877768b9ecbfb4b638dbbdcc572ed69 Mon Sep 17 00:00:00 2001 From: spannerisms <32842036+spannerisms@users.noreply.github.com> Date: Wed, 24 Mar 2021 07:55:51 -0400 Subject: [PATCH 06/20] refactor darkworldspawn reversed some labels moved nomirror because 0 is already loaded INC from 7 to 8 ORA instead of multiple branchings SBC without SEC when carry is guaranteed --- darkworldspawn.asm | 50 ++++++++++++++++++++-------------------------- 1 file changed, 22 insertions(+), 28 deletions(-) diff --git a/darkworldspawn.asm b/darkworldspawn.asm index e38e652..43a55ae 100644 --- a/darkworldspawn.asm +++ b/darkworldspawn.asm @@ -4,8 +4,7 @@ DarkWorldSaveFix: LDA.b #$70 : PHA : PLB ; thing we wrote over - data bank change JSL.l MasterSwordFollowerClear - JSL.l StatSaveCounter -RTL + JML.l StatSaveCounter ;-------------------------------------------------------------------------------- DoWorldFix: LDA InvertedMode : BEQ + @@ -14,12 +13,12 @@ DoWorldFix: LDA.l Bugfix_MirrorlessSQToLW : BEQ .skip_mirror_check LDA $7EF353 : BEQ .noMirror ; check if we have the mirror .skip_mirror_check ; alt entrance point - LDA $7EF3C5 : CMP.b #$03 : !BLT .aga1Alive ; check if agahnim 1 is alive - BRA .done - .noMirror + LDA $7EF3C5 : CMP.b #$03 : BCS .done ; check if agahnim 1 is alive .aga1Alive - LDA #$00 : STA $7EF3CA ; set flag to light world - LDA $7EF3CC : CMP #$07 : BNE + : LDA.b #$08 : STA $7EF3CC : + ; convert frog to dwarf + LDA #$00 + .noMirror + STA $7EF3CA ; set flag to light world + LDA $7EF3CC : CMP #$07 : BNE .done : INC : STA $7EF3CC ; convert frog to dwarf .done RTL ;-------------------------------------------------------------------------------- @@ -29,8 +28,7 @@ SetDeathWorldChecked: + LDA $1B : BEQ .outdoors LDA $040C : CMP #$FF : BNE .dungeon - LDA $A0 : BNE ++ - LDA $A1 : BNE ++ + LDA $A0 : ORA $A1 : BNE ++ LDA GanonPyramidRespawn : BNE .pyramid ; if flag is set, force respawn at pyramid on death to ganon ++ .outdoors @@ -42,7 +40,7 @@ JMP DoWorldFix_skip_mirror_check .pyramid LDA #$40 : STA $7EF3CA ; set flag to dark world - LDA $7EF3CC : CMP #$08 : BNE + : LDA.b #$07 : STA $7EF3CC : + ; convert dwarf to frog + LDA $7EF3CC : CMP #$08 : BNE .done : DEC : STA $7EF3CC : + ; convert dwarf to frog .done RTL ;================================================================================ @@ -50,15 +48,13 @@ DoWorldFix_Inverted: LDA.l Bugfix_MirrorlessSQToLW : BEQ .skip_mirror_check LDA $7EF353 : BEQ .noMirror ; check if we have the mirror .skip_mirror_check ; alt entrance point - LDA $7EF3C5 : CMP.b #$03 : !BLT .aga1Alive ; check if agahnim 1 is alive - BRA .done + LDA $7EF3C5 : CMP.b #$03 : BCS .done ; check if agahnim 1 is alive .noMirror .aga1Alive LDA #$40 : STA $7EF3CA ; set flag to dark world LDA $7EF3CC - CMP #$07 : BEQ .clear ; clear frog - CMP #$08 : BEQ .clear ; clear dwarf - consider flute implications - BRA .done + CMP #$07 : BNE .done ; clear frog + CMP #$08 : BNE .done ; clear dwarf - consider flute implications .clear LDA.b #$00 : STA $7EF3CC ; clear follower .done @@ -67,8 +63,7 @@ RTL SetDeathWorldChecked_Inverted: LDA $1B : BEQ .outdoors LDA $040C : CMP #$FF : BNE .dungeon - LDA $A0 : BNE ++ - LDA $A1 : BNE ++ + LDA $A0 : ORA $A1 : BNE ++ LDA GanonPyramidRespawn : BNE .castle ; if flag is set, force respawn at pyramid on death to ganon ++ .outdoors @@ -95,16 +90,15 @@ RTL ;-------------------------------------------------------------------------------- MasterSwordFollowerClear: LDA $7EF3CC - CMP #$0E : BEQ .clear ; clear master sword follower -RTL - .clear + CMP #$0E : BNE .exit ; clear master sword follower LDA.b #$00 : STA $7EF3CC ; clear follower -RTL +.exit + RTL ;-------------------------------------------------------------------------------- FixAgahnimFollowers: LDA.b #$00 : STA $7EF3CC ; clear follower - JSL PrepDungeonExit ; thing we wrote over -RTL + JML PrepDungeonExit ; thing we wrote over + ;-------------------------------------------------------------------------------- macro SetMinimum(base,filler,compare) LDA.l : !SUB.l : !BLT ?done @@ -112,7 +106,7 @@ macro SetMinimum(base,filler,compare) ?done: endmacro RefreshRainAmmo: - LDA $7EF3C5 : CMP.b #$01 : BEQ + : RTL : + ; check if we're in rain state + LDA $7EF3C5 : CMP.b #$01 : BNE .done ; check if we're in rain state .rain LDA $7EF3C8 + CMP.b #$03 : BNE + ; Uncle @@ -137,14 +131,14 @@ RTL !INFINITE_BOMBS = "$7F50C9" !INFINITE_MAGIC = "$7F50CA" SetEscapeAssist: - LDA $7EF3C5 : CMP.b #$01 : BNE .notrain ; check if we're in rain state + LDA $7EF3C5 : CMP.b #$01 : BNE .no_train ; check if we're in rain state .rain LDA.l EscapeAssist BIT.b #$04 : BEQ + : STA !INFINITE_MAGIC : + BIT.b #$02 : BEQ + : STA !INFINITE_BOMBS : + BIT.b #$01 : BEQ + : STA !INFINITE_ARROWS : + BRA ++ - .notrain + .no_train ; choo choo LDA.l EscapeAssist : BIT.b #$04 : BEQ + : LDA.b #$00 : STA !INFINITE_MAGIC : + LDA.l EscapeAssist : BIT.b #$02 : BEQ + : LDA.b #$00 : STA !INFINITE_BOMBS : + LDA.l EscapeAssist : BIT.b #$01 : BEQ + : LDA.b #$00 : STA !INFINITE_ARROWS : + @@ -153,8 +147,8 @@ RTL ;-------------------------------------------------------------------------------- SetSilverBowMode: LDA SilverArrowsUseRestriction : BEQ + ; fix bow type for restricted arrow mode - LDA $7EF340 : CMP.b #$3 : !BLT + - !SUB.b #$02 : STA $7EF340 + LDA $7EF340 : CMP.b #$3 : BCC + + SBC.b #$02 : STA $7EF340 + RTL ;================================================================================ From a5580621ef903dd96162a20141d2a51f8eec1179 Mon Sep 17 00:00:00 2001 From: spannerisms <32842036+spannerisms@users.noreply.github.com> Date: Wed, 24 Mar 2021 08:10:35 -0400 Subject: [PATCH 07/20] refactor dialog PEI is a great opcode and should be used more! change AND mask : CMP mask : BNE to just AND mask : BEQ merge SEP and REPs across branches change LDA : AND to BIT --- dialog.asm | 140 ++++++++++++++++++++++++----------------------------- 1 file changed, 63 insertions(+), 77 deletions(-) diff --git a/dialog.asm b/dialog.asm index 720f7b1..5e1a835 100644 --- a/dialog.asm +++ b/dialog.asm @@ -82,14 +82,13 @@ macro LoadDialogAddress(address) PHB : PHK : PLB SEP #$20 ; set 8-bit accumulator REP #$10 ; set 16-bit index registers - LDA $00 : PHA - LDA $01 : PHA + PEI ($00) LDA $02 : PHA STZ $1CF0 : STZ $1CF1 ; reset decompression buffer LDA.b #$01 : STA $7F5035 ; set flag %CopyDialog(
) PLA : STA $02 - PLA : STA $01 + REP #$20 PLA : STA $00 PLB PLP @@ -132,53 +131,52 @@ FreeDungeonItemNotice: PHB : PHK : PLB SEP #$20 ; set 8-bit accumulator REP #$10 ; set 16-bit index registers - LDA $00 : PHA - LDA $01 : PHA + PEI ($00) LDA $02 : PHA ;-------------------------------- LDA.l FreeItemText : BNE + : JMP .skip : + LDA #$00 : STA $7F5010 ; initialize scratch - LDA.l FreeItemText : AND.b #$01 : CMP.b #$01 : BNE + ; show message for general small key + LDA.l FreeItemText : AND.b #$01 : BEQ + ; show message for general small key LDA !ITEM_TEMPORARY : CMP.b #$24 : BNE + ; general small key %CopyDialog(Notice_SmallKeyOf) LDA !OFFSET_RETURN : DEC #2 : STA !OFFSET_POINTER %CopyDialog(Notice_Self) JMP .done - + : LDA.l FreeItemText : AND.b #$02 : CMP.b #$02 : BNE + ; show message for general compass + + : LDA.l FreeItemText : AND.b #$02 : BEQ + ; show message for general compass LDA !ITEM_TEMPORARY : CMP.b #$25 : BNE + ; general compass %CopyDialog(Notice_CompassOf) LDA !OFFSET_RETURN : DEC #2 : STA !OFFSET_POINTER %CopyDialog(Notice_Self) JMP .done - + : LDA.l FreeItemText : AND.b #$04 : CMP.b #$04 : BNE + ; show message for general map + + : LDA.l FreeItemText : AND.b #$04 : BEQ + ; show message for general map LDA !ITEM_TEMPORARY : CMP.b #$33 : BNE + ; general map %CopyDialog(Notice_MapOf) LDA !OFFSET_RETURN : DEC #2 : STA !OFFSET_POINTER %CopyDialog(Notice_Self) JMP .done - + : LDA.l FreeItemText : AND.b #$08 : CMP.b #$08 : BNE + ; show message for general big key + + : LDA.l FreeItemText : AND.b #$08 : BEQ + ; show message for general big key LDA !ITEM_TEMPORARY : CMP.b #$32 : BNE + ; general big key %CopyDialog(Notice_BigKeyOf) LDA !OFFSET_RETURN : DEC #2 : STA !OFFSET_POINTER %CopyDialog(Notice_Self) JMP .done + - LDA.l FreeItemText : AND.b #$04 : CMP.b #$04 : BNE + ; show message for dungeon map + LDA.l FreeItemText : AND.b #$04 : BEQ + ; show message for dungeon map LDA !ITEM_TEMPORARY : AND.b #$F0 ; looking at high bits only CMP.b #$70 : BNE + ; map of... %CopyDialog(Notice_MapOf) JMP .dungeon - + : LDA.l FreeItemText : AND.b #$02 : CMP.b #$02 : BNE + ; show message for dungeon compass + + : LDA.l FreeItemText : AND.b #$02 : BEQ + ; show message for dungeon compass LDA !ITEM_TEMPORARY : AND.b #$F0 : CMP.b #$80 : BNE + ; compass of... %CopyDialog(Notice_CompassOf) JMP .dungeon - + : LDA.l FreeItemText : AND.b #$08 : CMP.b #$08 : BNE + ; show message for dungeon big key + + : LDA.l FreeItemText : AND.b #$08 : BEQ + ; show message for dungeon big key LDA !ITEM_TEMPORARY : AND.b #$F0 : CMP.b #$90 : BNE + ; big key of... %CopyDialog(Notice_BigKeyOf) BRA .dungeon - + : LDA.l FreeItemText : AND.b #$01 : CMP.b #$01 : BNE + ; show message for dungeon small key + + : LDA.l FreeItemText : AND.b #$01 : BEQ + ; show message for dungeon small key LDA !ITEM_TEMPORARY : AND.b #$F0 : CMP.b #$A0 : BNE + ; small key of... LDA !ITEM_TEMPORARY : CMP.b #$AF : BNE ++ : JMP .skip : ++ %CopyDialog(Notice_SmallKeyOf) @@ -235,27 +233,19 @@ FreeDungeonItemNotice: STZ $1CF0 : STZ $1CF1 ; reset decompression buffer LDA.b #$01 : STA $7F5035 ; set alternate dialog flag - LDA.b #$01 : STA $7F509F + STA $7F509F ;-------------------------------- - PLA : STA $02 - PLA : STA $01 - PLA : STA $00 - PLB - PLP - PLY : PLX : PLA - ;JSL.l Main_ShowTextMessage_Alt -RTL - .skip - ;-------------------------------- PLA : STA $02 - PLA : STA $01 + REP #$20 PLA : STA $00 PLB PLP PLY : PLX : PLA + ;JSL.l Main_ShowTextMessage_Alt ; .skip can be here so long as this line remains commented out RTL + ;-------------------------------------------------------------------------------- DialogResetSelectionIndex: JSL.l Attract_DecompressStoryGfx ; what we wrote over @@ -264,11 +254,9 @@ RTL ;-------------------------------------------------------------------------------- DialogItemReceive: BCS .noMessage ; if doubling the item value overflowed it must be a rando item - CPY #$98 : !BLT + ;if the item is $4C or greater it must be a rando item - .noMessage - LDA.w #$FFFF - BRA .done - + + LDA.w #$FFFF + CPY #$98 : BCS .done ;if the item is $4C or greater it must be a rando item + LDA.w Ancilla_ReceiveItem_item_messages, Y .done CMP.w #$FFFF @@ -289,12 +277,13 @@ RTL RTL ;-------------------------------------------------------------------------------- DialogGanon1: - JSL.l CheckGanonVulnerability : BCS + - REP #$20 : LDA.w #$018C : STA $1CF0 : SEP #$20 - BRA ++ - + - REP #$20 : LDA.w #$016D : STA $1CF0 : SEP #$20 - ++ + JSL.l CheckGanonVulnerability + REP #$20 + LDA.w #$018C + BCC + + LDA.w #$016D ++ STA $1CF0 + SEP #$20 JSL.l Sprite_ShowMessageMinimal_Alt RTL ;-------------------------------------------------------------------------------- @@ -307,28 +296,30 @@ RTL ; s = silver arrow bow ; p = 2nd progressive bow DialogGanon2: - JSL.l CheckGanonVulnerability : BCS + - REP #$20 : LDA.w #$018D : STA $1CF0 : SEP #$20 - BRA ++ + JSL.l CheckGanonVulnerability + + REP #$20 + BCS + + LDA.w #$018D : BRA ++ + - LDA.l $7EF38E : AND #$80 : BNE + ; branch if bow - REP #$20 : LDA.w #$0192 : STA $1CF0 : SEP #$20 ; no bow - BRA ++ + LDA.l $7EF38E + + BIT.w #$0080 : BNE + ; branch if bow + LDA.w #$0192 : BRA ++ + - LDA.l $7EF38E : AND #$40 : BEQ + ; branch if no silvers - REP #$20 : LDA.w #$0195 : STA $1CF0 : SEP #$20 ;has silvers - BRA ++ + BIT.w #$0040 : BEQ + ; branch if no silvers + LDA.w #$0195 : BRA ++ + - LDA.l $7EF38E : AND #$20 : BNE + ; branch if p bow - REP #$20 : LDA.w #$0194 : STA $1CF0 : SEP #$20 ; bow, no-silvers, no-p-bow - BRA ++ + BIT.w #$0020 : BNE + ; branch if p bow + LDA.w #$0194 : BRA ++ + - LDA.l $7EF38E : AND #$80 : BEQ + ; branch if no bow - REP #$20 : LDA.w #$0193 : STA $1CF0 : SEP #$20 ; bow, no-silvers, p-bow - BRA ++ + BIT.w #$0080 : BEQ + ; branch if no bow + LDA.w #$0193 : BRA ++ + - REP #$20 : LDA.w #$016E : STA $1CF0 : SEP #$20 ; both bow and no bow. impossible. + LDA.w #$016E ++ + STA $1CF0 + SEP #$20 JSL.l Sprite_ShowMessageMinimal_Alt RTL ;-------------------------------------------------------------------------------- @@ -336,21 +327,20 @@ DialogEtherTablet: PHA LDA $0202 : CMP.b #$0F : BEQ + ; Show normal text if book is not equipped - - PLA : JSL Sprite_ShowMessageUnconditional ; Wacky Hylian Text -RTL + PLA : JML Sprite_ShowMessageUnconditional ; Wacky Hylian Text + BIT $F4 : BVC - ; Show normal text if Y is not pressed LDA.l AllowHammerTablets : BEQ ++ LDA $7EF34B : BEQ .yesText : BRA .noText ++ - LDA $7EF359 : CMP.b #$FF : BEQ .yesText : CMP.b #$02 : !BGE .noText + LDA $7EF359 : CMP.b #$FF : BEQ .yesText : CMP.b #$02 : BCS .noText ;++ .yesText PLA - LDA.b #$0c + LDA.b #$0C LDY.b #$01 - JSL Sprite_ShowMessageUnconditional ; Text From MSPedestalText (tables.asm) -RTL + JML Sprite_ShowMessageUnconditional ; Text From MSPedestalText (tables.asm) + .noText PLA RTL @@ -359,8 +349,7 @@ DialogBombosTablet: PHA LDA $0202 : CMP.b #$0F : BEQ + ; Show normal text if book is not equipped - - PLA : JSL Sprite_ShowMessageUnconditional ; Wacky Hylian Text -RTL + PLA : JML Sprite_ShowMessageUnconditional ; Wacky Hylian Text + BIT $F4 : BVC - ; Show normal text if Y is not pressed LDA.l AllowHammerTablets : BEQ ++ @@ -372,8 +361,8 @@ RTL PLA LDA.b #$0D LDY.b #$01 - JSL Sprite_ShowMessageUnconditional ; Text From MSPedestalText (tables.asm) -RTL + JML Sprite_ShowMessageUnconditional ; Text From MSPedestalText (tables.asm) + .noText PLA RTL @@ -382,19 +371,17 @@ DialogSahasrahla: LDA.l $7EF374 : AND #$04 : BEQ + ;Check if player has green pendant LDA.b #$2F LDY.b #$00 - JSL.l Sprite_ShowMessageUnconditional + JML Sprite_ShowMessageUnconditional + RTL ;-------------------------------------------------------------------------------- DialogBombShopGuy: - LDA.l $7EF37A : AND #$05 : CMP #$05 : BEQ + ;Check if player has crystals 5 & 6 - LDA.b #$15 - LDY.b #$01 - JSL.l Sprite_ShowMessageUnconditional - RTL + LDY.b #$15 + LDA.l $7EF37A : AND #$05 : CMP #$05 : BNE + ;Check if player has crystals 5 & 6 + INY ; from 15 to 16 + - LDA.b #$16 - LDY.b #$01 + TYA + LDY.b #$01 JSL.l Sprite_ShowMessageUnconditional RTL ;-------------------------------------------------------------------------------- @@ -405,23 +392,22 @@ Sprite_ShowMessageMinimal_Alt: STZ $11 PHX : PHY - LDA.b $00 : PHA - LDA.b $01 : PHA + PEA ($00) LDA.b $02 : PHA LDA.b #$1C : STA.b $02 REP #$30 LDA.w $1CF0 : ASL : TAX - LDA.l $7f71c0, X + LDA.l $7F71C0, X STA.b $00 SEP #$30 LDY.b #$00 - LDA [$00], Y : CMP.b #$fe : BNE + - INY : LDA [$00], Y : CMP.b #$6e : BNE + + LDA [$00], Y : CMP.b #$FE : BNE + + INY : LDA [$00], Y : CMP.b #$6E : BNE + INY : LDA [$00], Y : : BNE + - INY : LDA [$00], Y : CMP.b #$fe : BNE + - INY : LDA [$00], Y : CMP.b #$6b : BNE + + INY : LDA [$00], Y : CMP.b #$FE : BNE + + INY : LDA [$00], Y : CMP.b #$6B : BNE + INY : LDA [$00], Y : CMP.b #$04 : BNE + STZ $1CE8 JMP .end From 9ce7b9f9d24f323f0ad8b854e41648b9f6294f16 Mon Sep 17 00:00:00 2001 From: spannerisms <32842036+spannerisms@users.noreply.github.com> Date: Wed, 24 Mar 2021 08:11:32 -0400 Subject: [PATCH 08/20] Update dungeondrops.asm JML --- dungeondrops.asm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dungeondrops.asm b/dungeondrops.asm index ac40e11..c33e1cc 100644 --- a/dungeondrops.asm +++ b/dungeondrops.asm @@ -3,7 +3,7 @@ ;-------------------------------------------------------------------------------- DropSafeDungeon: LDA $040C : CMP #$08 : BEQ + - LDA $01C6FC, X : JSL Sprite_SpawnFallingItem + LDA $01C6FC, X : JML Sprite_SpawnFallingItem + RTL ;-------------------------------------------------------------------------------- \ No newline at end of file From d883b9a637a1e163ee7a75c0c53c2620a422279d Mon Sep 17 00:00:00 2001 From: spannerisms <32842036+spannerisms@users.noreply.github.com> Date: Wed, 24 Mar 2021 08:13:00 -0400 Subject: [PATCH 09/20] Update enemy_adjustments.asm reverse branching --- enemy_adjustments.asm | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/enemy_adjustments.asm b/enemy_adjustments.asm index a0206f2..f6205ce 100644 --- a/enemy_adjustments.asm +++ b/enemy_adjustments.asm @@ -4,18 +4,10 @@ ;-------------------------------------------------------------------------------- NewBatInit: ;check if map id == 240 or 241 - LDA $A0 : CMP #$F0 : BNE + ;oldman cave1 - BRA .light_world - + - CMP #$F1 : BNE + ;oldman cave2 - BRA .light_world - + - CMP #$B0 : BNE + ;agahnim statue keese - BRA .light_world - + - CMP #$D0 : BNE + ;agahnim darkmaze - BRA .light_world - + + LDA $A0 : CMP #$F0 : BEQ .light_world ;oldman cave1 + CMP #$F1 : BEQ .light_world ;oldman cave2 + CMP #$B0 : BEQ .light_world ;agahnim statue keese + CMP #$D0 : BEQ .light_world ;agahnim darkmaze CPY #$00 : BEQ .light_world LDA.b #$85 : STA $0CD2, X From 5273112d9d80a26ab4993a3d275f4eb6fdee783f Mon Sep 17 00:00:00 2001 From: spannerisms <32842036+spannerisms@users.noreply.github.com> Date: Wed, 24 Mar 2021 08:13:41 -0400 Subject: [PATCH 10/20] Update enemy_adjustments.asm this first since it can easily short circuit --- enemy_adjustments.asm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/enemy_adjustments.asm b/enemy_adjustments.asm index f6205ce..ec0411f 100644 --- a/enemy_adjustments.asm +++ b/enemy_adjustments.asm @@ -3,13 +3,14 @@ ; make sure bats always load LW stats ;-------------------------------------------------------------------------------- NewBatInit: + CPY #$00 : BEQ .light_world ;check if map id == 240 or 241 LDA $A0 : CMP #$F0 : BEQ .light_world ;oldman cave1 CMP #$F1 : BEQ .light_world ;oldman cave2 CMP #$B0 : BEQ .light_world ;agahnim statue keese CMP #$D0 : BEQ .light_world ;agahnim darkmaze - CPY #$00 : BEQ .light_world + LDA.b #$85 : STA $0CD2, X LDA.b #$04 : STA $0E50, X RTL From f4a336db9e5308f8dae43f40f22b8cbe3e29bf5f Mon Sep 17 00:00:00 2001 From: spannerisms <32842036+spannerisms@users.noreply.github.com> Date: Wed, 24 Mar 2021 08:17:52 -0400 Subject: [PATCH 11/20] Update entrances.asm labels BIT instead of AND --- entrances.asm | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/entrances.asm b/entrances.asm index 2b2f171..a76ae17 100644 --- a/entrances.asm +++ b/entrances.asm @@ -4,9 +4,7 @@ ;-------------------------------------------------------------------------------- LockAgahnimDoors: LDA.l AgahnimDoorStyle : AND.w #$00FF - BNE + - ;#$0 = Never Locked - LDA.w #$0000 : RTL + BEQ .exit ; don't need to load 0, because we'd have it if we reached here + : CMP.w #$0001 : BNE + LDA $7EF3C5 : AND.w #$000F : CMP.w #$0002 : !BGE .unlock ; if we rescued zelda, skip JSR.w LockAgahnimDoorsCore : RTL @@ -37,7 +35,7 @@ LockAgahnimDoors: .unlock LDA.w #$0000 ; fallback to never locked - +.exit RTL ;-------------------------------------------------------------------------------- LockAgahnimDoorsCore: @@ -204,14 +202,14 @@ RTL AnimatedEntranceFix: ;when an entrance animation tries to start PHA LDA.l InvertedMode : BEQ + ;If we are in inverted mode - LDA $8A : AND.b #$40 : BNE + ;and in the light world - PLA + PLA + BIT $8A : BVS ++ ; and in the light world STZ $04C6 ; skip it. LDA #$00 RTL + PLA - STA $02E4 ;what we wrote over +++ STA $02E4 ;what we wrote over STA $0FC1 ;what we wrote over STA $0710 ;what we wrote over RTL From 33dbe3003c27f5652489d48ed759a9368dfcace1 Mon Sep 17 00:00:00 2001 From: spannerisms <32842036+spannerisms@users.noreply.github.com> Date: Wed, 24 Mar 2021 08:20:08 -0400 Subject: [PATCH 12/20] Update events.asm just JMLs here --- events.asm | 24 +++++++++++------------- 1 file changed, 11 insertions(+), 13 deletions(-) diff --git a/events.asm b/events.asm index 15912b7..1ba18b0 100644 --- a/events.asm +++ b/events.asm @@ -11,8 +11,7 @@ OnPrepFileSelect: RTL + JSL.l LoadAlphabetTilemap - JSL.l LoadFullItemTiles -RTL + JML.l LoadFullItemTiles ;-------------------------------------------------------------------------------- OnDrawHud: JSL.l DrawChallengeTimer ; this has to come before NewDrawHud because the timer overwrites the compass counter @@ -77,15 +76,14 @@ RTL ;-------------------------------------------------------------------------------- OnAga2Defeated: JSL.l Dungeon_SaveRoomData_justKeys ; thing we wrote over, make sure this is first - JSL.l IncrementAgahnim2Sword -RTL + JML.l IncrementAgahnim2Sword ;-------------------------------------------------------------------------------- !RNG_ITEM_LOCK_IN = "$7F5090" OnFileLoad: REP #$10 ; set 16 bit index registers JSL.l EnableForceBlank ; what we wrote over - LDA.b #$07 : STA $210c ; Restore screen 3 to normal tile area + LDA.b #$07 : STA $210C ; Restore screen 3 to normal tile area LDA !FRESH_FILE_MARKER : BNE + JSL.l OnNewFile @@ -161,8 +159,8 @@ RTL ;-------------------------------------------------------------------------------- OnLinkDamaged: JSL.l FlipperKill - JSL.l OHKOTimer -RTL + JML.l OHKOTimer + ;-------------------------------------------------------------------------------- OnEnterWater: JSL.l RegisterWaterEntryScreen @@ -177,8 +175,8 @@ OnLinkDamagedFromPit: RTL ;-------------------------------------------------------------------------------- OnLinkDamagedFromPitOutdoors: - JSL.l OHKOTimer ; make sure this is last -RTL + JML.l OHKOTimer ; make sure this is last + ;-------------------------------------------------------------------------------- !RNG_ITEM_LOCK_IN = "$7F5090" OnOWTransition: @@ -201,16 +199,16 @@ OnLoadDuckMap: RTL + LDA.b #$00 : STA !DARK_DUCK_TEMP - JSL OverworldMap_DarkWorldTilemap -RTL + JML OverworldMap_DarkWorldTilemap + ;-------------------------------------------------------------------------------- PreItemGet: LDA.b #$01 : STA !ITEM_BUSY ; mark item as busy RTL ;-------------------------------------------------------------------------------- PostItemGet: - JSL.l MaybeWriteSRAMTrace -RTL + JML.l MaybeWriteSRAMTrace + ;-------------------------------------------------------------------------------- PostItemAnimation: LDA.b #$00 : STA !ITEM_BUSY ; mark item as finished From 372b0ba59904068910f5575182eb3badee25e3c4 Mon Sep 17 00:00:00 2001 From: spannerisms <32842036+spannerisms@users.noreply.github.com> Date: Wed, 24 Mar 2021 08:21:44 -0400 Subject: [PATCH 13/20] Update fairyfixes.asm JML dont push yet if the branch just pulls --- fairyfixes.asm | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/fairyfixes.asm b/fairyfixes.asm index c62ea3a..5364376 100644 --- a/fairyfixes.asm +++ b/fairyfixes.asm @@ -27,8 +27,7 @@ RTL FairyPond_Init: LDA.l Restrict_Ponds : BNE + LDA.b #$48 - JSL.l Sprite_ShowMessageFromPlayerContact - RTL + JML.l Sprite_ShowMessageFromPlayerContact + PHY : JSL.l Sprite_CheckDamageToPlayerSameLayerLong : BCC + LDA $7EF35C : CMP.b #$02 : BNE ++ : LDA.b #$1C : PHA : BRA .emptyBottle : ++ @@ -56,8 +55,8 @@ RTL ;-------------------------------------------------------------------------------- HappinessPond_Check: LDA $A0 : CMP.b #$15 ;what we wrote over - PHP BNE .done + PHP LDA.b #$72 JSL Sprite_SpawnDynamically @@ -83,6 +82,6 @@ HappinessPond_Check: STZ $0DD0, X ; self terminate - .done PLP + .done RTL From 6472553213f0ad6d233f10633b986295b855e9cd Mon Sep 17 00:00:00 2001 From: spannerisms <32842036+spannerisms@users.noreply.github.com> Date: Wed, 24 Mar 2021 08:24:44 -0400 Subject: [PATCH 14/20] Update fileselect.asm reverse --- fileselect.asm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fileselect.asm b/fileselect.asm index 3d9f551..6605b22 100644 --- a/fileselect.asm +++ b/fileselect.asm @@ -113,7 +113,7 @@ JMP DrawItem DrawPlayerFile: - LDA $1A : AND.w #$0001 : BEQ + : BRA .normal : + + LDA $1A : AND.w #$0001 : BNE .normal JSR DrawPlayerFileShared INC $0710 ; Suppress animated tile updates for this frame From 8321a5ef599e1cfc973c90f7c66856fe5652432c Mon Sep 17 00:00:00 2001 From: spannerisms <32842036+spannerisms@users.noreply.github.com> Date: Thu, 25 Mar 2021 04:53:35 -0400 Subject: [PATCH 15/20] zora jml --- fileselect.asm | 6 +++--- zoraking.asm | 3 +-- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/fileselect.asm b/fileselect.asm index 6605b22..a494226 100644 --- a/fileselect.asm +++ b/fileselect.asm @@ -633,15 +633,15 @@ AltBufferTable: STA $1104 ;file 2 top row STA $1144 ;file 2 bottom row STA $1184 ;gap row top - STA $11c4 ;gap row bottom + STA $11C4 ;gap row bottom STA $1204 ;file 3 top row STA $1244 ;file 3 bottom row STA $1284 ;extra gap row top - STA $12c4 ;extra gap row bottom + STA $12C4 ;extra gap row bottom STA $1304 ;extra gap row top STA $1344 ;extra gap row bottom STA $1384 ;extra gap row top - STA $13c4 ;extra gap row bottom + STA $13C4 ;extra gap row bottom ; Set last packet marker LDA.w #$00FF : STA $1402 diff --git a/zoraking.asm b/zoraking.asm index 91d8437..9ac1a1c 100644 --- a/zoraking.asm +++ b/zoraking.asm @@ -3,8 +3,7 @@ ;-------------------------------------------------------------------------------- LoadZoraKingItemGFX: LDA.l $1DE1C3 ; location randomizer writes zora item to - JSL.l PrepDynamicTile -RTL + JML.l PrepDynamicTile ;-------------------------------------------------------------------------------- JumpToSplashItemTarget: LDA $0D90, X From 3c891b526fbc2ae16751004b12403e235b20bf4b Mon Sep 17 00:00:00 2001 From: spannerisms <32842036+spannerisms@users.noreply.github.com> Date: Thu, 25 Mar 2021 05:07:46 -0400 Subject: [PATCH 16/20] Update zelda.asm BEQ necessarily means set carry --- zelda.asm | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/zelda.asm b/zelda.asm index f03a4ba..d80ae0a 100644 --- a/zelda.asm +++ b/zelda.asm @@ -5,10 +5,8 @@ SpawnZelda: LDA.l $7EF3CC : CMP #$08 : BEQ + ; don't spawn if dwarf is present CMP #$07 : BEQ + ; don't spawn if frog is present CMP #$0C : BEQ + ; don't spawn if purple chest is present - CLC : RTL - + - SEC -RTL + CLC + + RTL ;-------------------------------------------------------------------------------- EndRainState: LDA $7EF3C5 : CMP.b #$02 : !BGE + ; skip if past escape already From 1dca518150396959971ab4b2a1a917c53f4e1c15 Mon Sep 17 00:00:00 2001 From: spannerisms <32842036+spannerisms@users.noreply.github.com> Date: Thu, 25 Mar 2021 05:10:39 -0400 Subject: [PATCH 17/20] Update halfmagicbat.asm JML --- halfmagicbat.asm | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/halfmagicbat.asm b/halfmagicbat.asm index deb4cb6..56ba087 100644 --- a/halfmagicbat.asm +++ b/halfmagicbat.asm @@ -7,8 +7,7 @@ GetMagicBatItem: CMP.b #$FF : BEQ .normalLogic TAY STZ $02E9 ; 0 = Receiving item from an NPC or message - JSL.l Link_ReceiveItem -RTL + JML.l Link_ReceiveItem .normalLogic LDA HalfMagic STA $7EF37B From f95351183c9cf39559cb4f9f716bff1a3944e089 Mon Sep 17 00:00:00 2001 From: spannerisms <32842036+spannerisms@users.noreply.github.com> Date: Thu, 25 Mar 2021 05:17:03 -0400 Subject: [PATCH 18/20] SEC BEQ IMPLIES SET CARRY --- heartpieces.asm | 33 +++++++++++---------------------- icepalacegraphics.asm | 2 +- 2 files changed, 12 insertions(+), 23 deletions(-) diff --git a/heartpieces.asm b/heartpieces.asm index 5c20ebd..6a4c3fe 100644 --- a/heartpieces.asm +++ b/heartpieces.asm @@ -379,30 +379,19 @@ CheckIfBossRoom: ;-------------------------------------------------------------------------------- REP #$20 ; set 16-bit accumulator LDA $A0 ; these are all decimal because i got them that way - CMP.w #200 : BNE + - SEC : JMP .done - + CMP.w #51 : BNE + - SEC : JMP .done - + CMP.w #7 : BNE + - SEC : JMP .done - + CMP.w #90 : BNE + - SEC : JMP .done - + CMP.w #6 : BNE + - SEC : JMP .done - + CMP.w #41 : BNE + - SEC : JMP .done - + CMP.w #172 : BNE + - SEC : JMP .done - + CMP.w #222 : BNE + - SEC : JMP .done - + CMP.w #144 : BNE + - SEC : JMP .done - + CMP.w #164 : BNE + - SEC : JMP .done - + + CMP.w #200 : BEQ .done + CMP.w #51 : BEQ .done + CMP.w #7 : BEQ .done + CMP.w #90 : BEQ .done + CMP.w #6 : BEQ .done + CMP.w #41 : BEQ .done + CMP.w #172 : BEQ .done + CMP.w #222 : BEQ .done + CMP.w #144 : BEQ .done + CMP.w #164 : BEQ .done CLC .done - SEP #$20 ; set 8-bit accumulator ++ SEP #$20 ; set 8-bit accumulator RTL ;-------------------------------------------------------------------------------- ;#200 - Eastern Palace - Armos Knights diff --git a/icepalacegraphics.asm b/icepalacegraphics.asm index 8d2677f..22d5903 100644 --- a/icepalacegraphics.asm +++ b/icepalacegraphics.asm @@ -9,7 +9,7 @@ ShouldOverrideFileLoad: .no CLC : RTS .yes - SEC : RTS + RTS BgGraphicsLoading: ; Instructions overwritten From 36a21a7190168e82612499a8eaea22d541563515 Mon Sep 17 00:00:00 2001 From: spannerisms <32842036+spannerisms@users.noreply.github.com> Date: Fri, 26 Mar 2021 04:51:58 -0400 Subject: [PATCH 19/20] unkillaable enemies --- hooks.asm | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/hooks.asm b/hooks.asm index f084147..6891ac9 100755 --- a/hooks.asm +++ b/hooks.asm @@ -2548,3 +2548,8 @@ CheckIfReading: CPX #$04 RTS ;================================================================================ +org $0DB4CA : db $40, $40 ; fire bar statis +org $0DB4A9 : db $50, $50, $6E, $6E ; roller statis +org $0DB4B2 : db $40, $40, $40, $40 ; cannon statis +org $0DB4C3 : db $C0 ; anti fairy statis +org $0DB516 : db $40 ; chain chomp statis \ No newline at end of file From 97031959617b09e4eab8ed642f3c99f40abc4205 Mon Sep 17 00:00:00 2001 From: spannerisms <32842036+spannerisms@users.noreply.github.com> Date: Sat, 3 Apr 2021 00:30:14 -0400 Subject: [PATCH 20/20] is this better? --- compasses.asm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compasses.asm b/compasses.asm index af65625..5c1acb5 100644 --- a/compasses.asm +++ b/compasses.asm @@ -64,7 +64,7 @@ CompassCount_Desert: CompassCount_Agah: %DrawConstantNumber(0,2) - LDA $7EF435 : AND.b #$02 + LDA $7EF435 : AND.b #$03 JMP DrawDungeonCompassCounts_return_spot CompassCount_Swamp: