Merge pull request #103 from spannerisms/master

General branch fixes
This commit is contained in:
KatDevsGames
2021-04-03 13:59:59 -05:00
committed by GitHub
19 changed files with 175 additions and 238 deletions

View File

@@ -15,9 +15,7 @@ DrawLibraryItemGFX:
RTL RTL
;-------------------------------------------------------------------------------- ;--------------------------------------------------------------------------------
SetLibraryItem: SetLibraryItem:
PHA
LDY $0E80, X ; Retrieve stored item type LDY $0E80, X ; Retrieve stored item type
PLA
JSL.l ItemSet_Library ; contains thing we wrote over JSL.l ItemSet_Library ; contains thing we wrote over
RTL RTL
;-------------------------------------------------------------------------------- ;--------------------------------------------------------------------------------

View File

@@ -32,7 +32,7 @@ RTL
;-------------------------------------------------------------------------------- ;--------------------------------------------------------------------------------
;0 = Become (Perma)bunny ;0 = Become (Perma)bunny
DecideIfBunny: DecideIfBunny:
LDA $7EF357 : BEQ + : RTL : + LDA $7EF357 : BNE .done
LDA $7EF3CA : AND.b #$40 LDA $7EF3CA : AND.b #$40
PHA : LDA.l InvertedMode : BNE .inverted PHA : LDA.l InvertedMode : BNE .inverted
.normal .normal
@@ -47,8 +47,8 @@ RTL
DecideIfBunnyByScreenIndex: DecideIfBunnyByScreenIndex:
; If indoors we don't have a screen index. Return non-bunny to make mirror-based ; If indoors we don't have a screen index. Return non-bunny to make mirror-based
; superbunny work ; superbunny work
LDA $1B : BEQ + : RTL : + LDA $1B : BNE .done
LDA $7EF357 : BEQ + : RTL : + LDA $7EF357 : BNE .done
LDA $8A : AND.b #$40 : PHA LDA $8A : AND.b #$40 : PHA
LDA.l InvertedMode : BNE .inverted LDA.l InvertedMode : BNE .inverted
.normal .normal
@@ -114,12 +114,13 @@ RTS
FixFrogSmith: FixFrogSmith:
LDA.l $7EF3CA : BNE .darkWorld LDA.l $7EF3CA : BNE .darkWorld
LDA.l $7EF3CC : CMP.b #$07 : BNE .done 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 BRA .loadgfx
.darkWorld .darkWorld
LDA.l $7EF3CC : CMP.b #$08 : BNE .done 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 .loadgfx
STA.l $7EF3CC
JSL Tagalong_LoadGfx JSL Tagalong_LoadGfx
.done .done
RTS RTS
@@ -137,12 +138,11 @@ RTL
; Fix crystal not spawning when using somaria vs boss ; Fix crystal not spawning when using somaria vs boss
TryToSpawnCrystalUntilSuccess: TryToSpawnCrystalUntilSuccess:
STX $02D8 ; what we overwrote STX $02D8 ; what we overwrote
JSL AddAncillaLong : BCC .spawned ; a clear carry flag indicates success JSL AddAncillaLong : BCS .failed ; a clear carry flag indicates success
.failed
RTL
.spawned .spawned
STZ $AE ; the "trying to spawn crystal" flag STZ $AE ; the "trying to spawn crystal" flag
STZ $AF ; the "trying to spawn pendant" flag STZ $AF ; the "trying to spawn pendant" flag
.failed
RTL RTL
;-------------------------------------------------------------------------------- ;--------------------------------------------------------------------------------
@@ -173,22 +173,22 @@ CMP.w #$030E : BEQ .new ; opening dungeon map
CMP.w #$070E : BEQ .new ; opening overworld map CMP.w #$070E : BEQ .new ; opening overworld map
.original .original
- -
lda [$00] LDA [$00]
sta $7ec300, x STA $7EC300, X
sta $7ec500, x STA $7EC500, X
inc $00 : inc $00 INC $00 : INC $00
inx #2 INX #2
dey DEY
bpl - BPL -
RTL RTL
.new .new
- -
lda [$00] LDA [$00]
sta $7ec500, x STA $7EC500, X
inc $00 : inc $00 INC $00 : INC $00
inx #2 INX #2
dey DEY
bpl - BPL -
RTL RTL
;-------------------------------------------------------------------------------- ;--------------------------------------------------------------------------------

View File

@@ -4,8 +4,7 @@
!HEART_REDRAW = "$7F5000" !HEART_REDRAW = "$7F5000"
LoadCatfishItemGFX: LoadCatfishItemGFX:
LDA.l $1DE185 ; location randomizer writes catfish item to LDA.l $1DE185 ; location randomizer writes catfish item to
JSL.l PrepDynamicTile JML PrepDynamicTile
RTL
;-------------------------------------------------------------------------------- ;--------------------------------------------------------------------------------
DrawThrownItem: DrawThrownItem:
LDA $8A : CMP.b #$81 : BNE .catfish LDA $8A : CMP.b #$81 : BNE .catfish
@@ -19,8 +18,7 @@ DrawThrownItem:
LDA.l $1DE185 ; location randomizer writes catfish item to LDA.l $1DE185 ; location randomizer writes catfish item to
.draw .draw
JSL.l DrawDynamicTile JML DrawDynamicTile
RTL
;-------------------------------------------------------------------------------- ;--------------------------------------------------------------------------------
MarkThrownItem: MarkThrownItem:
JSL Link_ReceiveItem ; thing we wrote over JSL Link_ReceiveItem ; thing we wrote over
@@ -28,12 +26,9 @@ MarkThrownItem:
LDA $8A : CMP.b #$81 : BNE .catfish LDA $8A : CMP.b #$81 : BNE .catfish
.zora .zora
JSL.l ItemSet_ZoraKing JML ItemSet_ZoraKing
BRA .done
.catfish .catfish
JSL.l ItemSet_Catfish JML ItemSet_Catfish
.done
RTL
;-------------------------------------------------------------------------------- ;--------------------------------------------------------------------------------

View File

@@ -66,8 +66,7 @@ endmacro
Clock_Test: Clock_Test:
JSL.l Clock_Init JSL.l Clock_Init
JSL.l Clock_IsSupported JML.l Clock_IsSupported
RTL
;-------------------------------------------------------------------------------- ;--------------------------------------------------------------------------------
; Clock_Init ; Clock_Init
@@ -112,11 +111,10 @@ Clock_IsSupported:
PHA : PHX PHA : PHX
LDX #$00; LDX #$00;
- -
LDA $002800 : AND.b #$0F : CMP #$0F : BEQ + ; check for clock chip ready signal LDA $002800 : AND.b #$0F : CMP #$0F : BEQ .done ; 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 CPX.b #$0E : BCC ++ : CLC : BRA .done ; if we've read 14 bytes with no success, unset carry and exit
INX ++ INX
BRA - : + BRA -
SEC ; found a clock chip
.done .done
PLX : PLA PLX : PLA
RTL RTL
@@ -197,9 +195,9 @@ Multiply_A16Y8:
CLC CLC
ADC $4216 ADC $4216
LDY $4217 LDY $4217
BCC carry_bit BCC .carry_bit
INY INY
carry_bit: .carry_bit:
XBA XBA
REP #$20 ; set 16-bit accumulator REP #$20 ; set 16-bit accumulator
RTL RTL

View File

@@ -8,16 +8,17 @@
macro DrawConstantNumber(digit1,digit2) macro DrawConstantNumber(digit1,digit2)
LDA.w #$2490+<digit1> : STA $7EC79A LDA.w #$2490+<digit1> : STA $7EC79A
LDA.w #$2490+<digit2> : STA $7EC79C LDA.w #$2490+<digit2> : STA $7EC79C
SEP #$20
endmacro endmacro
;-------------------------------------------------------------------------------- ;--------------------------------------------------------------------------------
DrawDungeonCompassCounts: DrawDungeonCompassCounts:
LDX $1B : BNE + : RTL : + ; Skip if outdoors 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 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 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 JMP (CompassCountDungeonHandlers, X) : .return_spot
@@ -48,79 +49,66 @@ CompassCountDungeonHandlers: ; pointers to functions that handle dungeon-specifi
CompassCount_Escape: CompassCount_Escape:
%DrawConstantNumber(0,8) %DrawConstantNumber(0,8)
SEP #$20
LDA $7EF434 : LSR #4 LDA $7EF434 : LSR #4
JMP DrawDungeonCompassCounts_return_spot JMP DrawDungeonCompassCounts_return_spot
CompassCount_Eastern: CompassCount_Eastern:
%DrawConstantNumber(0,6) %DrawConstantNumber(0,6)
SEP #$20
LDA $7EF436 : AND.b #$07 LDA $7EF436 : AND.b #$07
JMP DrawDungeonCompassCounts_return_spot JMP DrawDungeonCompassCounts_return_spot
CompassCount_Desert: CompassCount_Desert:
%DrawConstantNumber(0,6) %DrawConstantNumber(0,6)
SEP #$20
LDA $7EF435 : LSR #5 LDA $7EF435 : LSR #5
JMP DrawDungeonCompassCounts_return_spot JMP DrawDungeonCompassCounts_return_spot
CompassCount_Agah: CompassCount_Agah:
%DrawConstantNumber(0,2) %DrawConstantNumber(0,2)
SEP #$20
LDA $7EF435 : AND.b #$03 LDA $7EF435 : AND.b #$03
JMP DrawDungeonCompassCounts_return_spot JMP DrawDungeonCompassCounts_return_spot
CompassCount_Swamp: CompassCount_Swamp:
%DrawConstantNumber(1,0) %DrawConstantNumber(1,0)
SEP #$20
LDA $7EF439 : AND.b #$0F LDA $7EF439 : AND.b #$0F
JMP DrawDungeonCompassCounts_return_spot JMP DrawDungeonCompassCounts_return_spot
CompassCount_PoD: CompassCount_PoD:
%DrawConstantNumber(1,4) %DrawConstantNumber(1,4)
SEP #$20
LDA $7EF434 : AND.b #$0F LDA $7EF434 : AND.b #$0F
JMP DrawDungeonCompassCounts_return_spot JMP DrawDungeonCompassCounts_return_spot
CompassCount_Mire: CompassCount_Mire:
%DrawConstantNumber(0,8) %DrawConstantNumber(0,8)
SEP #$20
LDA $7EF438 : AND.b #$0F LDA $7EF438 : AND.b #$0F
JMP DrawDungeonCompassCounts_return_spot JMP DrawDungeonCompassCounts_return_spot
CompassCount_Skull: CompassCount_Skull:
%DrawConstantNumber(0,8) %DrawConstantNumber(0,8)
SEP #$20
LDA $7EF437 : LSR #4 LDA $7EF437 : LSR #4
JMP DrawDungeonCompassCounts_return_spot JMP DrawDungeonCompassCounts_return_spot
CompassCount_Ice: CompassCount_Ice:
%DrawConstantNumber(0,8) %DrawConstantNumber(0,8)
SEP #$20
LDA $7EF438 : LSR #4 LDA $7EF438 : LSR #4
JMP DrawDungeonCompassCounts_return_spot JMP DrawDungeonCompassCounts_return_spot
CompassCount_Hera: CompassCount_Hera:
%DrawConstantNumber(0,6) %DrawConstantNumber(0,6)
SEP #$20
LDA $7EF435 : AND.b #$1C : LSR #2 LDA $7EF435 : AND.b #$1C : LSR #2
JMP DrawDungeonCompassCounts_return_spot JMP DrawDungeonCompassCounts_return_spot
CompassCount_Thieves: CompassCount_Thieves:
%DrawConstantNumber(0,8) %DrawConstantNumber(0,8)
SEP #$20
LDA $7EF437 : AND.b #$0F LDA $7EF437 : AND.b #$0F
JMP DrawDungeonCompassCounts_return_spot JMP DrawDungeonCompassCounts_return_spot
CompassCount_Trock: CompassCount_Trock:
%DrawConstantNumber(1,2) %DrawConstantNumber(1,2)
SEP #$20
LDA $7EF439 : LSR #4 LDA $7EF439 : LSR #4
JMP DrawDungeonCompassCounts_return_spot JMP DrawDungeonCompassCounts_return_spot
CompassCount_Gt: CompassCount_Gt:
%DrawConstantNumber(2,7) %DrawConstantNumber(2,7)
SEP #$20
LDA $7EF436 : LSR #3 LDA $7EF436 : LSR #3
JMP DrawDungeonCompassCounts_return_spot JMP DrawDungeonCompassCounts_return_spot

View File

@@ -4,8 +4,7 @@
DarkWorldSaveFix: DarkWorldSaveFix:
LDA.b #$70 : PHA : PLB ; thing we wrote over - data bank change LDA.b #$70 : PHA : PLB ; thing we wrote over - data bank change
JSL.l MasterSwordFollowerClear JSL.l MasterSwordFollowerClear
JSL.l StatSaveCounter JML.l StatSaveCounter
RTL
;-------------------------------------------------------------------------------- ;--------------------------------------------------------------------------------
DoWorldFix: DoWorldFix:
LDA InvertedMode : BEQ + LDA InvertedMode : BEQ +
@@ -14,12 +13,12 @@ DoWorldFix:
LDA.l Bugfix_MirrorlessSQToLW : BEQ .skip_mirror_check LDA.l Bugfix_MirrorlessSQToLW : BEQ .skip_mirror_check
LDA $7EF353 : BEQ .noMirror ; check if we have the mirror LDA $7EF353 : BEQ .noMirror ; check if we have the mirror
.skip_mirror_check ; alt entrance point .skip_mirror_check ; alt entrance point
LDA $7EF3C5 : CMP.b #$03 : !BLT .aga1Alive ; check if agahnim 1 is alive LDA $7EF3C5 : CMP.b #$03 : BCS .done ; check if agahnim 1 is alive
BRA .done
.noMirror
.aga1Alive .aga1Alive
LDA #$00 : STA $7EF3CA ; set flag to light world LDA #$00
LDA $7EF3CC : CMP #$07 : BNE + : LDA.b #$08 : STA $7EF3CC : + ; convert frog to dwarf .noMirror
STA $7EF3CA ; set flag to light world
LDA $7EF3CC : CMP #$07 : BNE .done : INC : STA $7EF3CC ; convert frog to dwarf
.done .done
RTL RTL
;-------------------------------------------------------------------------------- ;--------------------------------------------------------------------------------
@@ -29,8 +28,7 @@ SetDeathWorldChecked:
+ +
LDA $1B : BEQ .outdoors LDA $1B : BEQ .outdoors
LDA $040C : CMP #$FF : BNE .dungeon LDA $040C : CMP #$FF : BNE .dungeon
LDA $A0 : BNE ++ LDA $A0 : ORA $A1 : BNE ++
LDA $A1 : BNE ++
LDA GanonPyramidRespawn : BNE .pyramid ; if flag is set, force respawn at pyramid on death to ganon LDA GanonPyramidRespawn : BNE .pyramid ; if flag is set, force respawn at pyramid on death to ganon
++ ++
.outdoors .outdoors
@@ -42,7 +40,7 @@ JMP DoWorldFix_skip_mirror_check
.pyramid .pyramid
LDA #$40 : STA $7EF3CA ; set flag to dark world 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 .done
RTL RTL
;================================================================================ ;================================================================================
@@ -50,15 +48,13 @@ DoWorldFix_Inverted:
LDA.l Bugfix_MirrorlessSQToLW : BEQ .skip_mirror_check LDA.l Bugfix_MirrorlessSQToLW : BEQ .skip_mirror_check
LDA $7EF353 : BEQ .noMirror ; check if we have the mirror LDA $7EF353 : BEQ .noMirror ; check if we have the mirror
.skip_mirror_check ; alt entrance point .skip_mirror_check ; alt entrance point
LDA $7EF3C5 : CMP.b #$03 : !BLT .aga1Alive ; check if agahnim 1 is alive LDA $7EF3C5 : CMP.b #$03 : BCS .done ; check if agahnim 1 is alive
BRA .done
.noMirror .noMirror
.aga1Alive .aga1Alive
LDA #$40 : STA $7EF3CA ; set flag to dark world LDA #$40 : STA $7EF3CA ; set flag to dark world
LDA $7EF3CC LDA $7EF3CC
CMP #$07 : BEQ .clear ; clear frog CMP #$07 : BNE .done ; clear frog
CMP #$08 : BEQ .clear ; clear dwarf - consider flute implications CMP #$08 : BNE .done ; clear dwarf - consider flute implications
BRA .done
.clear .clear
LDA.b #$00 : STA $7EF3CC ; clear follower LDA.b #$00 : STA $7EF3CC ; clear follower
.done .done
@@ -67,8 +63,7 @@ RTL
SetDeathWorldChecked_Inverted: SetDeathWorldChecked_Inverted:
LDA $1B : BEQ .outdoors LDA $1B : BEQ .outdoors
LDA $040C : CMP #$FF : BNE .dungeon LDA $040C : CMP #$FF : BNE .dungeon
LDA $A0 : BNE ++ LDA $A0 : ORA $A1 : BNE ++
LDA $A1 : BNE ++
LDA GanonPyramidRespawn : BNE .castle ; if flag is set, force respawn at pyramid on death to ganon LDA GanonPyramidRespawn : BNE .castle ; if flag is set, force respawn at pyramid on death to ganon
++ ++
.outdoors .outdoors
@@ -95,16 +90,15 @@ RTL
;-------------------------------------------------------------------------------- ;--------------------------------------------------------------------------------
MasterSwordFollowerClear: MasterSwordFollowerClear:
LDA $7EF3CC LDA $7EF3CC
CMP #$0E : BEQ .clear ; clear master sword follower CMP #$0E : BNE .exit ; clear master sword follower
RTL
.clear
LDA.b #$00 : STA $7EF3CC ; clear follower LDA.b #$00 : STA $7EF3CC ; clear follower
.exit
RTL RTL
;-------------------------------------------------------------------------------- ;--------------------------------------------------------------------------------
FixAgahnimFollowers: FixAgahnimFollowers:
LDA.b #$00 : STA $7EF3CC ; clear follower LDA.b #$00 : STA $7EF3CC ; clear follower
JSL PrepDungeonExit ; thing we wrote over JML PrepDungeonExit ; thing we wrote over
RTL
;-------------------------------------------------------------------------------- ;--------------------------------------------------------------------------------
macro SetMinimum(base,filler,compare) macro SetMinimum(base,filler,compare)
LDA.l <compare> : !SUB.l <base> : !BLT ?done LDA.l <compare> : !SUB.l <base> : !BLT ?done
@@ -112,7 +106,7 @@ macro SetMinimum(base,filler,compare)
?done: ?done:
endmacro endmacro
RefreshRainAmmo: 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 .rain
LDA $7EF3C8 LDA $7EF3C8
+ CMP.b #$03 : BNE + ; Uncle + CMP.b #$03 : BNE + ; Uncle
@@ -137,14 +131,14 @@ RTL
!INFINITE_BOMBS = "$7F50C9" !INFINITE_BOMBS = "$7F50C9"
!INFINITE_MAGIC = "$7F50CA" !INFINITE_MAGIC = "$7F50CA"
SetEscapeAssist: 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 .rain
LDA.l EscapeAssist LDA.l EscapeAssist
BIT.b #$04 : BEQ + : STA !INFINITE_MAGIC : + BIT.b #$04 : BEQ + : STA !INFINITE_MAGIC : +
BIT.b #$02 : BEQ + : STA !INFINITE_BOMBS : + BIT.b #$02 : BEQ + : STA !INFINITE_BOMBS : +
BIT.b #$01 : BEQ + : STA !INFINITE_ARROWS : + BIT.b #$01 : BEQ + : STA !INFINITE_ARROWS : +
BRA ++ BRA ++
.notrain .no_train ; choo choo
LDA.l EscapeAssist : BIT.b #$04 : BEQ + : LDA.b #$00 : STA !INFINITE_MAGIC : + 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 #$02 : BEQ + : LDA.b #$00 : STA !INFINITE_BOMBS : +
LDA.l EscapeAssist : BIT.b #$01 : BEQ + : LDA.b #$00 : STA !INFINITE_ARROWS : + LDA.l EscapeAssist : BIT.b #$01 : BEQ + : LDA.b #$00 : STA !INFINITE_ARROWS : +
@@ -153,8 +147,8 @@ RTL
;-------------------------------------------------------------------------------- ;--------------------------------------------------------------------------------
SetSilverBowMode: SetSilverBowMode:
LDA SilverArrowsUseRestriction : BEQ + ; fix bow type for restricted arrow mode LDA SilverArrowsUseRestriction : BEQ + ; fix bow type for restricted arrow mode
LDA $7EF340 : CMP.b #$3 : !BLT + LDA $7EF340 : CMP.b #$3 : BCC +
!SUB.b #$02 : STA $7EF340 SBC.b #$02 : STA $7EF340
+ +
RTL RTL
;================================================================================ ;================================================================================

View File

@@ -82,14 +82,13 @@ macro LoadDialogAddress(address)
PHB : PHK : PLB PHB : PHK : PLB
SEP #$20 ; set 8-bit accumulator SEP #$20 ; set 8-bit accumulator
REP #$10 ; set 16-bit index registers REP #$10 ; set 16-bit index registers
LDA $00 : PHA PEI ($00)
LDA $01 : PHA
LDA $02 : PHA LDA $02 : PHA
STZ $1CF0 : STZ $1CF1 ; reset decompression buffer STZ $1CF0 : STZ $1CF1 ; reset decompression buffer
LDA.b #$01 : STA $7F5035 ; set flag LDA.b #$01 : STA $7F5035 ; set flag
%CopyDialog(<address>) %CopyDialog(<address>)
PLA : STA $02 PLA : STA $02
PLA : STA $01 REP #$20
PLA : STA $00 PLA : STA $00
PLB PLB
PLP PLP
@@ -132,53 +131,52 @@ FreeDungeonItemNotice:
PHB : PHK : PLB PHB : PHK : PLB
SEP #$20 ; set 8-bit accumulator SEP #$20 ; set 8-bit accumulator
REP #$10 ; set 16-bit index registers REP #$10 ; set 16-bit index registers
LDA $00 : PHA PEI ($00)
LDA $01 : PHA
LDA $02 : PHA LDA $02 : PHA
;-------------------------------- ;--------------------------------
LDA.l FreeItemText : BNE + : JMP .skip : + LDA.l FreeItemText : BNE + : JMP .skip : +
LDA #$00 : STA $7F5010 ; initialize scratch 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 LDA !ITEM_TEMPORARY : CMP.b #$24 : BNE + ; general small key
%CopyDialog(Notice_SmallKeyOf) %CopyDialog(Notice_SmallKeyOf)
LDA !OFFSET_RETURN : DEC #2 : STA !OFFSET_POINTER LDA !OFFSET_RETURN : DEC #2 : STA !OFFSET_POINTER
%CopyDialog(Notice_Self) %CopyDialog(Notice_Self)
JMP .done 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 LDA !ITEM_TEMPORARY : CMP.b #$25 : BNE + ; general compass
%CopyDialog(Notice_CompassOf) %CopyDialog(Notice_CompassOf)
LDA !OFFSET_RETURN : DEC #2 : STA !OFFSET_POINTER LDA !OFFSET_RETURN : DEC #2 : STA !OFFSET_POINTER
%CopyDialog(Notice_Self) %CopyDialog(Notice_Self)
JMP .done 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 LDA !ITEM_TEMPORARY : CMP.b #$33 : BNE + ; general map
%CopyDialog(Notice_MapOf) %CopyDialog(Notice_MapOf)
LDA !OFFSET_RETURN : DEC #2 : STA !OFFSET_POINTER LDA !OFFSET_RETURN : DEC #2 : STA !OFFSET_POINTER
%CopyDialog(Notice_Self) %CopyDialog(Notice_Self)
JMP .done 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 LDA !ITEM_TEMPORARY : CMP.b #$32 : BNE + ; general big key
%CopyDialog(Notice_BigKeyOf) %CopyDialog(Notice_BigKeyOf)
LDA !OFFSET_RETURN : DEC #2 : STA !OFFSET_POINTER LDA !OFFSET_RETURN : DEC #2 : STA !OFFSET_POINTER
%CopyDialog(Notice_Self) %CopyDialog(Notice_Self)
JMP .done 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 LDA !ITEM_TEMPORARY : AND.b #$F0 ; looking at high bits only
CMP.b #$70 : BNE + ; map of... CMP.b #$70 : BNE + ; map of...
%CopyDialog(Notice_MapOf) %CopyDialog(Notice_MapOf)
JMP .dungeon 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... LDA !ITEM_TEMPORARY : AND.b #$F0 : CMP.b #$80 : BNE + ; compass of...
%CopyDialog(Notice_CompassOf) %CopyDialog(Notice_CompassOf)
JMP .dungeon 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... LDA !ITEM_TEMPORARY : AND.b #$F0 : CMP.b #$90 : BNE + ; big key of...
%CopyDialog(Notice_BigKeyOf) %CopyDialog(Notice_BigKeyOf)
BRA .dungeon 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 : AND.b #$F0 : CMP.b #$A0 : BNE + ; small key of...
LDA !ITEM_TEMPORARY : CMP.b #$AF : BNE ++ : JMP .skip : ++ LDA !ITEM_TEMPORARY : CMP.b #$AF : BNE ++ : JMP .skip : ++
%CopyDialog(Notice_SmallKeyOf) %CopyDialog(Notice_SmallKeyOf)
@@ -235,27 +233,19 @@ FreeDungeonItemNotice:
STZ $1CF0 : STZ $1CF1 ; reset decompression buffer STZ $1CF0 : STZ $1CF1 ; reset decompression buffer
LDA.b #$01 : STA $7F5035 ; set alternate dialog flag 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 .skip
;--------------------------------
PLA : STA $02 PLA : STA $02
PLA : STA $01 REP #$20
PLA : STA $00 PLA : STA $00
PLB PLB
PLP PLP
PLY : PLX : PLA PLY : PLX : PLA
;JSL.l Main_ShowTextMessage_Alt ; .skip can be here so long as this line remains commented out
RTL RTL
;-------------------------------------------------------------------------------- ;--------------------------------------------------------------------------------
DialogResetSelectionIndex: DialogResetSelectionIndex:
JSL.l Attract_DecompressStoryGfx ; what we wrote over JSL.l Attract_DecompressStoryGfx ; what we wrote over
@@ -264,11 +254,9 @@ RTL
;-------------------------------------------------------------------------------- ;--------------------------------------------------------------------------------
DialogItemReceive: DialogItemReceive:
BCS .noMessage ; if doubling the item value overflowed it must be a rando item 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 LDA.w #$FFFF
BRA .done CPY #$98 : BCS .done ;if the item is $4C or greater it must be a rando item
+
LDA.w Ancilla_ReceiveItem_item_messages, Y LDA.w Ancilla_ReceiveItem_item_messages, Y
.done .done
CMP.w #$FFFF CMP.w #$FFFF
@@ -289,12 +277,13 @@ RTL
RTL RTL
;-------------------------------------------------------------------------------- ;--------------------------------------------------------------------------------
DialogGanon1: DialogGanon1:
JSL.l CheckGanonVulnerability : BCS + JSL.l CheckGanonVulnerability
REP #$20 : LDA.w #$018C : STA $1CF0 : SEP #$20 REP #$20
BRA ++ LDA.w #$018C
+ BCC +
REP #$20 : LDA.w #$016D : STA $1CF0 : SEP #$20 LDA.w #$016D
++ + STA $1CF0
SEP #$20
JSL.l Sprite_ShowMessageMinimal_Alt JSL.l Sprite_ShowMessageMinimal_Alt
RTL RTL
;-------------------------------------------------------------------------------- ;--------------------------------------------------------------------------------
@@ -307,28 +296,30 @@ RTL
; s = silver arrow bow ; s = silver arrow bow
; p = 2nd progressive bow ; p = 2nd progressive bow
DialogGanon2: DialogGanon2:
JSL.l CheckGanonVulnerability : BCS + JSL.l CheckGanonVulnerability
REP #$20 : LDA.w #$018D : STA $1CF0 : SEP #$20
BRA ++ REP #$20
BCS +
LDA.w #$018D : BRA ++
+ +
LDA.l $7EF38E : AND #$80 : BNE + ; branch if bow LDA.l $7EF38E
REP #$20 : LDA.w #$0192 : STA $1CF0 : SEP #$20 ; no bow
BRA ++ BIT.w #$0080 : BNE + ; branch if bow
LDA.w #$0192 : BRA ++
+ +
LDA.l $7EF38E : AND #$40 : BEQ + ; branch if no silvers BIT.w #$0040 : BEQ + ; branch if no silvers
REP #$20 : LDA.w #$0195 : STA $1CF0 : SEP #$20 ;has silvers LDA.w #$0195 : BRA ++
BRA ++
+ +
LDA.l $7EF38E : AND #$20 : BNE + ; branch if p bow BIT.w #$0020 : BNE + ; branch if p bow
REP #$20 : LDA.w #$0194 : STA $1CF0 : SEP #$20 ; bow, no-silvers, no-p-bow LDA.w #$0194 : BRA ++
BRA ++
+ +
LDA.l $7EF38E : AND #$80 : BEQ + ; branch if no bow BIT.w #$0080 : BEQ + ; branch if no bow
REP #$20 : LDA.w #$0193 : STA $1CF0 : SEP #$20 ; bow, no-silvers, p-bow LDA.w #$0193 : BRA ++
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 JSL.l Sprite_ShowMessageMinimal_Alt
RTL RTL
;-------------------------------------------------------------------------------- ;--------------------------------------------------------------------------------
@@ -336,21 +327,20 @@ DialogEtherTablet:
PHA PHA
LDA $0202 : CMP.b #$0F : BEQ + ; Show normal text if book is not equipped LDA $0202 : CMP.b #$0F : BEQ + ; Show normal text if book is not equipped
- -
PLA : JSL Sprite_ShowMessageUnconditional ; Wacky Hylian Text PLA : JML Sprite_ShowMessageUnconditional ; Wacky Hylian Text
RTL
+ +
BIT $F4 : BVC - ; Show normal text if Y is not pressed BIT $F4 : BVC - ; Show normal text if Y is not pressed
LDA.l AllowHammerTablets : BEQ ++ LDA.l AllowHammerTablets : BEQ ++
LDA $7EF34B : BEQ .yesText : BRA .noText 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 .yesText
PLA PLA
LDA.b #$0c LDA.b #$0C
LDY.b #$01 LDY.b #$01
JSL Sprite_ShowMessageUnconditional ; Text From MSPedestalText (tables.asm) JML Sprite_ShowMessageUnconditional ; Text From MSPedestalText (tables.asm)
RTL
.noText .noText
PLA PLA
RTL RTL
@@ -359,8 +349,7 @@ DialogBombosTablet:
PHA PHA
LDA $0202 : CMP.b #$0F : BEQ + ; Show normal text if book is not equipped LDA $0202 : CMP.b #$0F : BEQ + ; Show normal text if book is not equipped
- -
PLA : JSL Sprite_ShowMessageUnconditional ; Wacky Hylian Text PLA : JML Sprite_ShowMessageUnconditional ; Wacky Hylian Text
RTL
+ +
BIT $F4 : BVC - ; Show normal text if Y is not pressed BIT $F4 : BVC - ; Show normal text if Y is not pressed
LDA.l AllowHammerTablets : BEQ ++ LDA.l AllowHammerTablets : BEQ ++
@@ -372,8 +361,8 @@ RTL
PLA PLA
LDA.b #$0D LDA.b #$0D
LDY.b #$01 LDY.b #$01
JSL Sprite_ShowMessageUnconditional ; Text From MSPedestalText (tables.asm) JML Sprite_ShowMessageUnconditional ; Text From MSPedestalText (tables.asm)
RTL
.noText .noText
PLA PLA
RTL RTL
@@ -382,18 +371,16 @@ DialogSahasrahla:
LDA.l $7EF374 : AND #$04 : BEQ + ;Check if player has green pendant LDA.l $7EF374 : AND #$04 : BEQ + ;Check if player has green pendant
LDA.b #$2F LDA.b #$2F
LDY.b #$00 LDY.b #$00
JSL.l Sprite_ShowMessageUnconditional JML Sprite_ShowMessageUnconditional
+ +
RTL RTL
;-------------------------------------------------------------------------------- ;--------------------------------------------------------------------------------
DialogBombShopGuy: DialogBombShopGuy:
LDA.l $7EF37A : AND #$05 : CMP #$05 : BEQ + ;Check if player has crystals 5 & 6 LDY.b #$15
LDA.b #$15 LDA.l $7EF37A : AND #$05 : CMP #$05 : BNE + ;Check if player has crystals 5 & 6
LDY.b #$01 INY ; from 15 to 16
JSL.l Sprite_ShowMessageUnconditional
RTL
+ +
LDA.b #$16 TYA
LDY.b #$01 LDY.b #$01
JSL.l Sprite_ShowMessageUnconditional JSL.l Sprite_ShowMessageUnconditional
RTL RTL
@@ -405,23 +392,22 @@ Sprite_ShowMessageMinimal_Alt:
STZ $11 STZ $11
PHX : PHY PHX : PHY
LDA.b $00 : PHA PEA ($00)
LDA.b $01 : PHA
LDA.b $02 : PHA LDA.b $02 : PHA
LDA.b #$1C : STA.b $02 LDA.b #$1C : STA.b $02
REP #$30 REP #$30
LDA.w $1CF0 : ASL : TAX LDA.w $1CF0 : ASL : TAX
LDA.l $7f71c0, X LDA.l $7F71C0, X
STA.b $00 STA.b $00
SEP #$30 SEP #$30
LDY.b #$00 LDY.b #$00
LDA [$00], Y : CMP.b #$fe : BNE + LDA [$00], Y : CMP.b #$FE : BNE +
INY : LDA [$00], Y : CMP.b #$6e : BNE + INY : LDA [$00], Y : CMP.b #$6E : BNE +
INY : LDA [$00], Y : : BNE + INY : LDA [$00], Y : : BNE +
INY : LDA [$00], Y : CMP.b #$fe : BNE + INY : LDA [$00], Y : CMP.b #$FE : BNE +
INY : LDA [$00], Y : CMP.b #$6b : BNE + INY : LDA [$00], Y : CMP.b #$6B : BNE +
INY : LDA [$00], Y : CMP.b #$04 : BNE + INY : LDA [$00], Y : CMP.b #$04 : BNE +
STZ $1CE8 STZ $1CE8
JMP .end JMP .end

View File

@@ -3,7 +3,7 @@
;-------------------------------------------------------------------------------- ;--------------------------------------------------------------------------------
DropSafeDungeon: DropSafeDungeon:
LDA $040C : CMP #$08 : BEQ + LDA $040C : CMP #$08 : BEQ +
LDA $01C6FC, X : JSL Sprite_SpawnFallingItem LDA $01C6FC, X : JML Sprite_SpawnFallingItem
+ +
RTL RTL
;-------------------------------------------------------------------------------- ;--------------------------------------------------------------------------------

View File

@@ -3,21 +3,14 @@
; make sure bats always load LW stats ; make sure bats always load LW stats
;-------------------------------------------------------------------------------- ;--------------------------------------------------------------------------------
NewBatInit: 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
+
CPY #$00 : BEQ .light_world 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
LDA.b #$85 : STA $0CD2, X LDA.b #$85 : STA $0CD2, X
LDA.b #$04 : STA $0E50, X LDA.b #$04 : STA $0E50, X
RTL RTL

View File

@@ -4,9 +4,7 @@
;-------------------------------------------------------------------------------- ;--------------------------------------------------------------------------------
LockAgahnimDoors: LockAgahnimDoors:
LDA.l AgahnimDoorStyle : AND.w #$00FF LDA.l AgahnimDoorStyle : AND.w #$00FF
BNE + BEQ .exit ; don't need to load 0, because we'd have it if we reached here
;#$0 = Never Locked
LDA.w #$0000 : RTL
+ : CMP.w #$0001 : BNE + + : CMP.w #$0001 : BNE +
LDA $7EF3C5 : AND.w #$000F : CMP.w #$0002 : !BGE .unlock ; if we rescued zelda, skip LDA $7EF3C5 : AND.w #$000F : CMP.w #$0002 : !BGE .unlock ; if we rescued zelda, skip
JSR.w LockAgahnimDoorsCore : RTL JSR.w LockAgahnimDoorsCore : RTL
@@ -37,7 +35,7 @@ LockAgahnimDoors:
.unlock .unlock
LDA.w #$0000 ; fallback to never locked LDA.w #$0000 ; fallback to never locked
.exit
RTL RTL
;-------------------------------------------------------------------------------- ;--------------------------------------------------------------------------------
LockAgahnimDoorsCore: LockAgahnimDoorsCore:
@@ -204,14 +202,14 @@ RTL
AnimatedEntranceFix: ;when an entrance animation tries to start AnimatedEntranceFix: ;when an entrance animation tries to start
PHA PHA
LDA.l InvertedMode : BEQ + ;If we are in inverted mode 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. STZ $04C6 ; skip it.
LDA #$00 LDA #$00
RTL RTL
+ +
PLA PLA
STA $02E4 ;what we wrote over ++ STA $02E4 ;what we wrote over
STA $0FC1 ;what we wrote over STA $0FC1 ;what we wrote over
STA $0710 ;what we wrote over STA $0710 ;what we wrote over
RTL RTL

View File

@@ -11,8 +11,7 @@ OnPrepFileSelect:
RTL RTL
+ +
JSL.l LoadAlphabetTilemap JSL.l LoadAlphabetTilemap
JSL.l LoadFullItemTiles JML.l LoadFullItemTiles
RTL
;-------------------------------------------------------------------------------- ;--------------------------------------------------------------------------------
OnDrawHud: OnDrawHud:
JSL.l DrawChallengeTimer ; this has to come before NewDrawHud because the timer overwrites the compass counter JSL.l DrawChallengeTimer ; this has to come before NewDrawHud because the timer overwrites the compass counter
@@ -77,8 +76,7 @@ RTL
;-------------------------------------------------------------------------------- ;--------------------------------------------------------------------------------
OnAga2Defeated: OnAga2Defeated:
JSL.l Dungeon_SaveRoomData_justKeys ; thing we wrote over, make sure this is first JSL.l Dungeon_SaveRoomData_justKeys ; thing we wrote over, make sure this is first
JSL.l IncrementAgahnim2Sword JML.l IncrementAgahnim2Sword
RTL
;-------------------------------------------------------------------------------- ;--------------------------------------------------------------------------------
OnFileCreation: OnFileCreation:
TAX ; what we wrote over TAX ; what we wrote over
@@ -91,7 +89,7 @@ OnFileLoad:
REP #$10 ; set 16 bit index registers REP #$10 ; set 16 bit index registers
JSL.l EnableForceBlank ; what we wrote over 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 + LDA !FRESH_FILE_MARKER : BNE +
JSL.l OnNewFile JSL.l OnNewFile
@@ -175,8 +173,8 @@ RTL
;-------------------------------------------------------------------------------- ;--------------------------------------------------------------------------------
OnLinkDamaged: OnLinkDamaged:
JSL.l FlipperKill JSL.l FlipperKill
JSL.l OHKOTimer JML.l OHKOTimer
RTL
;-------------------------------------------------------------------------------- ;--------------------------------------------------------------------------------
OnEnterWater: OnEnterWater:
JSL.l RegisterWaterEntryScreen JSL.l RegisterWaterEntryScreen
@@ -191,8 +189,8 @@ OnLinkDamagedFromPit:
RTL RTL
;-------------------------------------------------------------------------------- ;--------------------------------------------------------------------------------
OnLinkDamagedFromPitOutdoors: OnLinkDamagedFromPitOutdoors:
JSL.l OHKOTimer ; make sure this is last JML.l OHKOTimer ; make sure this is last
RTL
;-------------------------------------------------------------------------------- ;--------------------------------------------------------------------------------
!RNG_ITEM_LOCK_IN = "$7F5090" !RNG_ITEM_LOCK_IN = "$7F5090"
OnOWTransition: OnOWTransition:
@@ -215,16 +213,16 @@ OnLoadDuckMap:
RTL RTL
+ +
LDA.b #$00 : STA !DARK_DUCK_TEMP LDA.b #$00 : STA !DARK_DUCK_TEMP
JSL OverworldMap_DarkWorldTilemap JML OverworldMap_DarkWorldTilemap
RTL
;-------------------------------------------------------------------------------- ;--------------------------------------------------------------------------------
PreItemGet: PreItemGet:
LDA.b #$01 : STA !ITEM_BUSY ; mark item as busy LDA.b #$01 : STA !ITEM_BUSY ; mark item as busy
RTL RTL
;-------------------------------------------------------------------------------- ;--------------------------------------------------------------------------------
PostItemGet: PostItemGet:
JSL.l MaybeWriteSRAMTrace JML.l MaybeWriteSRAMTrace
RTL
;-------------------------------------------------------------------------------- ;--------------------------------------------------------------------------------
PostItemAnimation: PostItemAnimation:
LDA.b #$00 : STA !ITEM_BUSY ; mark item as finished LDA.b #$00 : STA !ITEM_BUSY ; mark item as finished

View File

@@ -27,8 +27,7 @@ RTL
FairyPond_Init: FairyPond_Init:
LDA.l Restrict_Ponds : BNE + LDA.l Restrict_Ponds : BNE +
LDA.b #$48 LDA.b #$48
JSL.l Sprite_ShowMessageFromPlayerContact JML.l Sprite_ShowMessageFromPlayerContact
RTL
+ +
PHY : JSL.l Sprite_CheckDamageToPlayerSameLayerLong : BCC + PHY : JSL.l Sprite_CheckDamageToPlayerSameLayerLong : BCC +
LDA $7EF35C : CMP.b #$02 : BNE ++ : LDA.b #$1C : PHA : BRA .emptyBottle : ++ LDA $7EF35C : CMP.b #$02 : BNE ++ : LDA.b #$1C : PHA : BRA .emptyBottle : ++
@@ -56,8 +55,8 @@ RTL
;-------------------------------------------------------------------------------- ;--------------------------------------------------------------------------------
HappinessPond_Check: HappinessPond_Check:
LDA $A0 : CMP.b #$15 ;what we wrote over LDA $A0 : CMP.b #$15 ;what we wrote over
PHP
BNE .done BNE .done
PHP
LDA.b #$72 LDA.b #$72
JSL Sprite_SpawnDynamically JSL Sprite_SpawnDynamically
@@ -83,6 +82,6 @@ HappinessPond_Check:
STZ $0DD0, X ; self terminate STZ $0DD0, X ; self terminate
.done
PLP PLP
.done
RTL RTL

View File

@@ -113,7 +113,7 @@ JMP DrawItem
DrawPlayerFile: DrawPlayerFile:
LDA $1A : AND.w #$0001 : BEQ + : BRA .normal : + LDA $1A : AND.w #$0001 : BNE .normal
JSR DrawPlayerFileShared JSR DrawPlayerFileShared
INC $0710 ; Suppress animated tile updates for this frame INC $0710 ; Suppress animated tile updates for this frame
@@ -633,15 +633,15 @@ AltBufferTable:
STA $1104 ;file 2 top row STA $1104 ;file 2 top row
STA $1144 ;file 2 bottom row STA $1144 ;file 2 bottom row
STA $1184 ;gap row top STA $1184 ;gap row top
STA $11c4 ;gap row bottom STA $11C4 ;gap row bottom
STA $1204 ;file 3 top row STA $1204 ;file 3 top row
STA $1244 ;file 3 bottom row STA $1244 ;file 3 bottom row
STA $1284 ;extra gap row top 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 $1304 ;extra gap row top
STA $1344 ;extra gap row bottom STA $1344 ;extra gap row bottom
STA $1384 ;extra gap row top STA $1384 ;extra gap row top
STA $13c4 ;extra gap row bottom STA $13C4 ;extra gap row bottom
; Set last packet marker ; Set last packet marker
LDA.w #$00FF : STA $1402 LDA.w #$00FF : STA $1402

View File

@@ -7,8 +7,7 @@ GetMagicBatItem:
CMP.b #$FF : BEQ .normalLogic CMP.b #$FF : BEQ .normalLogic
TAY TAY
STZ $02E9 ; 0 = Receiving item from an NPC or message STZ $02E9 ; 0 = Receiving item from an NPC or message
JSL.l Link_ReceiveItem JML.l Link_ReceiveItem
RTL
.normalLogic .normalLogic
LDA HalfMagic LDA HalfMagic
STA $7EF37B STA $7EF37B

View File

@@ -379,30 +379,19 @@ CheckIfBossRoom:
;-------------------------------------------------------------------------------- ;--------------------------------------------------------------------------------
REP #$20 ; set 16-bit accumulator REP #$20 ; set 16-bit accumulator
LDA $A0 ; these are all decimal because i got them that way LDA $A0 ; these are all decimal because i got them that way
CMP.w #200 : BNE + CMP.w #200 : BEQ .done
SEC : JMP .done CMP.w #51 : BEQ .done
+ CMP.w #51 : BNE + CMP.w #7 : BEQ .done
SEC : JMP .done CMP.w #90 : BEQ .done
+ CMP.w #7 : BNE + CMP.w #6 : BEQ .done
SEC : JMP .done CMP.w #41 : BEQ .done
+ CMP.w #90 : BNE + CMP.w #172 : BEQ .done
SEC : JMP .done CMP.w #222 : BEQ .done
+ CMP.w #6 : BNE + CMP.w #144 : BEQ .done
SEC : JMP .done CMP.w #164 : BEQ .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
+
CLC CLC
.done .done
SEP #$20 ; set 8-bit accumulator + SEP #$20 ; set 8-bit accumulator
RTL RTL
;-------------------------------------------------------------------------------- ;--------------------------------------------------------------------------------
;#200 - Eastern Palace - Armos Knights ;#200 - Eastern Palace - Armos Knights

View File

@@ -2550,3 +2550,8 @@ CheckIfReading:
CPX #$04 CPX #$04
RTS 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

View File

@@ -9,7 +9,7 @@ ShouldOverrideFileLoad:
.no .no
CLC : RTS CLC : RTS
.yes .yes
SEC : RTS RTS
BgGraphicsLoading: BgGraphicsLoading:
; Instructions overwritten ; Instructions overwritten

View File

@@ -5,10 +5,8 @@ SpawnZelda:
LDA.l $7EF3CC : CMP #$08 : BEQ + ; don't spawn if dwarf is present LDA.l $7EF3CC : CMP #$08 : BEQ + ; don't spawn if dwarf is present
CMP #$07 : BEQ + ; don't spawn if frog is present CMP #$07 : BEQ + ; don't spawn if frog is present
CMP #$0C : BEQ + ; don't spawn if purple chest is present CMP #$0C : BEQ + ; don't spawn if purple chest is present
CLC : RTL CLC
+ + RTL
SEC
RTL
;-------------------------------------------------------------------------------- ;--------------------------------------------------------------------------------
EndRainState: EndRainState:
LDA $7EF3C5 : CMP.b #$02 : !BGE + ; skip if past escape already LDA $7EF3C5 : CMP.b #$02 : !BGE + ; skip if past escape already

View File

@@ -3,8 +3,7 @@
;-------------------------------------------------------------------------------- ;--------------------------------------------------------------------------------
LoadZoraKingItemGFX: LoadZoraKingItemGFX:
LDA.l $1DE1C3 ; location randomizer writes zora item to LDA.l $1DE1C3 ; location randomizer writes zora item to
JSL.l PrepDynamicTile JML.l PrepDynamicTile
RTL
;-------------------------------------------------------------------------------- ;--------------------------------------------------------------------------------
JumpToSplashItemTarget: JumpToSplashItemTarget:
LDA $0D90, X LDA $0D90, X