Skip to content

Commit ebc0791

Browse files
committed
let's dev 6/28/17
fixed fake flipper kill (again except on the screen you entered) fixed stats bonk key fixed stats progressive sword probably fixed several byrna bugs added OnEnterWater event hook
1 parent 4d89eac commit ebc0791

8 files changed

+44
-18
lines changed

LTTP_RND_GeneralBugfixes.asm

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ org $3FFFFF ; <- 1FFFFF
2626
db #$00 ; expand file to 2mb
2727

2828
org $1FFFF8 ; timestamp rom
29-
dl #$20170626
29+
dl #$20170628
3030

3131
;================================================================================
3232

bookofmudora.asm

+1
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ GiveBonkItem:
5454
JSR LoadBonkItem
5555
CMP #$24 : BNE .notKey
5656
.key
57+
JSL.l AddInventory_incrementKeyLong
5758
LDA $7EF36F : INC A : STA $7EF36F
5859
LDA.b #$2F : JSL.l Sound_SetSfx3PanLong
5960
RTL

events.asm

+9-1
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ OnFileLoad:
3636
JSL.l MasterSwordFollowerClear
3737
JSL.l InitOpenMode
3838
LDA #$FF : STA !RNG_ITEM_LOCK_IN ; reset rng item lock-in
39+
LDA #$00 : STA $7F5001 ; mark fake flipper softlock as impossible
3940
RTL
4041
;--------------------------------------------------------------------------------
4142
!RNG_ITEM_LOCK_IN = "$7F5090"
@@ -53,10 +54,17 @@ OnNewFile:
5354
RTL
5455
;--------------------------------------------------------------------------------
5556
OnLinkDamaged:
56-
;JSL.l FlipperKill
57+
JSL.l FlipperKill
5758
JSL.l OHKOTimer
5859
RTL
5960
;--------------------------------------------------------------------------------
61+
OnEnterWater:
62+
JSL.l RegisterWaterEntryScreen
63+
64+
JSL.l MysteryWaterFunction
65+
LDX.b #$04
66+
RTL
67+
;--------------------------------------------------------------------------------
6068
OnLinkDamagedFromPit:
6169
JSL.l OHKOTimer
6270
LDA.b #$14 : STA $11 ; thing we wrote over

flipperkill.asm

+15-1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ FlipperKill:
66
LDA $5D : CMP #$04 : BNE .done ; skip if we're not swimming
77
LDA $7EF356 : BNE .done ; skip if we have the flippers
88
LDA $7F5001 : BEQ .done ; skip if we're not marked in danger for softlock
9+
LDA $8A : CMP $7F5098 : BEQ .done ; skip if we're on the same screen we entered the water on
910
JSL.l KillFairies ; take away fairies
1011
LDA.b #$00 : STA $7EF36D ; kill link
1112
LDA.b #$00 : STA $7F5001 ; mark fake flipper softlock as impossible
@@ -41,4 +42,17 @@ FlipperFlag:
4142
LDA #$00 : STA $7F5001 ; mark fake flipper softlock as impossible
4243
.done
4344
RTL
44-
;--------------------------------------------------------------------------------
45+
;--------------------------------------------------------------------------------
46+
RegisterWaterEntryScreen:
47+
PHA
48+
LDA $8A : STA $7F5098 ; store ow index
49+
PLA
50+
RTL
51+
;--------------------------------------------------------------------------------
52+
MysteryWaterFunction: ; *$3AE54 ALTERNATE ENTRY POINT
53+
LDA.b #$20 : STA $02E2
54+
STZ $037B
55+
STZ $55
56+
STZ $0360
57+
RTL
58+
;--------------------------------------------------------------------------------

hooks.asm

+14
Original file line numberDiff line numberDiff line change
@@ -514,6 +514,10 @@ JSL.l DialogUncle
514514
;org $1FB8E4 ; <- 0FB8E4
515515
;db $00
516516
;--------------------------------------------------------------------------------
517+
;0xFE465 -> 0x1E
518+
org $1FE465
519+
db #$1E
520+
;--------------------------------------------------------------------------------
517521

518522
;================================================================================
519523
; Bomb & Arrow Capacity Updates
@@ -1665,15 +1669,25 @@ NOP #6
16651669
;================================================================================
16661670
; Fake Flippers Softlock Fix + General Damage Hooks
16671671
;--------------------------------------------------------------------------------
1672+
org $078091 ; <- 38091 - Bank07.asm:138 (LDA $037B : BNE .linkNotDamaged)
1673+
LDA $0373 : STA $00 : STZ $0373 ; store and zero damage
1674+
LDA $037B : BNE LinkDamaged_linkNotDamaged ; skip if immune
1675+
;--------------------------------------------------------------------------------
16681676
org $0780C6 ; <- 380C6 - Bank07.asm:174 (LDA $7EF36D)
16691677
JSL.l OnLinkDamaged
16701678
;--------------------------------------------------------------------------------
1679+
org $0780FB ; <- 380FB - Bank07.asm:207 (.linkNotDamaged)
1680+
LinkDamaged_linkNotDamaged:
1681+
;--------------------------------------------------------------------------------
16711682
org $0794FB ; <- 394FB - Bank07.asm:3336 (LDA.b #$14 : STA $11)
16721683
JSL.l OnLinkDamagedFromPit
16731684
;--------------------------------------------------------------------------------
16741685
org $078F27 ; <- 38F27
16751686
JSL.l FlipperReset
16761687
;--------------------------------------------------------------------------------
1688+
org $078F51 ; <- 38F51 - Bank07.asm:2444 (JSR $AE54 ; $3AE54 IN ROM)
1689+
JSL.l OnEnterWater : NOP
1690+
;--------------------------------------------------------------------------------
16771691

16781692
;================================================================================
16791693
; Floodgate Softlock Fix

inventory.asm

+2-13
Original file line numberDiff line numberDiff line change
@@ -231,10 +231,7 @@ AddInventory:
231231
CPY.b #$50 : BEQ .isSword
232232
BRA +
233233
.isSword
234-
LDA $7EF42A : AND #$40 : BNE ++ ; skip additional processing if we have the fairy sword flag yet
235-
BRL .dungeonCounts
236-
++
237-
BRL .itemCounts
234+
BRL .dungeonCounts
238235
+
239236
CPY.b #$3B : BNE + : BRL .dungeonCounts : + ; Silver Arrow Bow - Skip Shop/Fairy Check for Silver Arrow Bow
240237

@@ -522,15 +519,7 @@ RTL
522519
PLA
523520
+
524521

525-
LDA $00 : PHA
526-
LDA.l FairySword : STA $00
527-
CPY $00 : BNE + ; increment if not the fairy sword
528-
LDA $7EF42A : BIT #$40 : BNE ++ ; skip if we have the fairy sword flag yet
529-
ORA.b #$40 : STA $7EF42A ; set fairy sword flag
530-
+
531-
LDA $7EF422 : !ADD #$20 : STA $7EF422 ; increment sword counter
532-
++
533-
PLA : STA $00
522+
LDA $7EF422 : !ADD #$20 : STA $7EF422 ; increment sword counter
534523
RTS
535524

536525
.incrementShield

stats.asm

+1-2
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,8 @@
3838
; b - heart containers
3939
; p - pendant upgrades
4040
;--------------------------------------------------------------------------------
41-
; $7EF42A bfsccccc
41+
; $7EF42A b-sccccc
4242
; b - bomb acquired
43-
; f - fairy sword acquired
4443
; s - silver arrow bow acquired
4544
; c - chests before gtower big key
4645
;--------------------------------------------------------------------------------

tables.asm

+1
Original file line numberDiff line numberDiff line change
@@ -1104,6 +1104,7 @@ dw #9999 ; Rupee Limit
11041104
; $7F5095 - Dialog Offset Pointer (High)
11051105
; $7F5096 - Dialog Offset Pointer Return (Low)
11061106
; $7F5097 - Dialog Offset Pointer Return (High)
1107+
; $7F5098 - Water Entry Index
11071108
; $7F50D0 - $7F50FF - Block Cypher Parameters
11081109
; $7F5100 - $7F51FF - Block Cypher Buffer
11091110
; $7F5200 - $7F52FF - RNG Pointer Block

0 commit comments

Comments
 (0)