let's dev 2/15/18
added money arrow mode to classic fixed generic key mode hud after falling into holes
This commit is contained in:
@@ -26,7 +26,7 @@ org $3FFFFF ; <- 1FFFFF
|
||||
db #$00 ; expand file to 2mb
|
||||
|
||||
org $1FFFF8 ; <- FFFF8 timestamp rom
|
||||
db #$20, #$18, #$02, #$11 ; year/month/day
|
||||
db #$20, #$18, #$02, #$15 ; year/month/day
|
||||
|
||||
;================================================================================
|
||||
|
||||
@@ -491,6 +491,9 @@ DrawEquipment: ; this returns short
|
||||
org $0DFA78
|
||||
HUD_RebuildLong:
|
||||
|
||||
org $0DFA88
|
||||
HUD_RebuildIndoor_Palace:
|
||||
|
||||
org $0EEE10
|
||||
Messaging_Text:
|
||||
|
||||
|
||||
29
hooks.asm
29
hooks.asm
@@ -984,10 +984,10 @@ org $0DFCC4 ; <- 6FCC4
|
||||
STA $7EC75C ; nudge bomb 1s digit right
|
||||
|
||||
org $0DFCDC ; <- 6FCDC
|
||||
STA $7EC760 ; nudge arrow 10s digit right
|
||||
JSL.l DrawArrowTens
|
||||
|
||||
org $0DFCE8 ; <- 6FCE8
|
||||
STA $7EC762 ; nudge arrow 1s digit right
|
||||
JSL.l DrawArrowOnes
|
||||
|
||||
;org $0DFD0A ; <- 6FD0A - headsup_display.asm : 900
|
||||
;STA $7EC766 ; nudge key digit right
|
||||
@@ -1004,7 +1004,7 @@ org $0DFB29 ; <- headsup_display.asm : 688 (LDA.b #$86 : STA $7EC71E)
|
||||
;LDA.b #$24 : STA $7EC721
|
||||
;LDA.b #$87 : STA $7EC722
|
||||
;LDA.b #$24 : STA $7EC723
|
||||
JSL.l DrawHUDSilverArrows : BRA +
|
||||
JSL.l DrawHUDArrows : BRA +
|
||||
NOP #18
|
||||
+
|
||||
;--------------------------------------------------------------------------------
|
||||
@@ -1150,9 +1150,12 @@ JSL.l SaveKeys
|
||||
org $0282EC ; <- 102EC - Bank02.asm:650 - (STA $7EF36F)
|
||||
JSL.l ClearOWKeys
|
||||
;--------------------------------------------------------------------------------
|
||||
org $0DFA80 ; <- 6FA80 ; headsup_display.asm:596 - (LDA.b #$00 : STA $7EC017)
|
||||
org $0DFA80 ; <- 6FA80 : headsup_display.asm:596 - (LDA.b #$00 : STA $7EC017)
|
||||
JSL.l HUDRebuildIndoor : NOP #4
|
||||
;--------------------------------------------------------------------------------
|
||||
org $029A35 ; <- 11A35 : Bank02.asm:4789 - (JSL HUD.RebuildIndoor.palace)
|
||||
JSL.l HUDRebuildIndoorHole
|
||||
;--------------------------------------------------------------------------------
|
||||
org $0DFD02 ; <- 6FD02 ; headsup_display.asm:900 - (LDA $05 : AND.w #$00FF : ORA.w #$2400 : STA $7EC764)
|
||||
JSL.l DrawKeyIcon : NOP #8
|
||||
;--------------------------------------------------------------------------------
|
||||
@@ -1512,10 +1515,10 @@ STZ $1CE8 : NOP
|
||||
org $1EE523 ; <- F6523 sprite_kiki.asm : 373 kiki will open door
|
||||
NOP #4
|
||||
|
||||
org $1EE414 ; <- F6414 sprite_kiki.asm : 193 don't have 10 rupees
|
||||
NOP #4
|
||||
org $1EE50C ; <- F650C sprite_kiki.asm : 356 don't have 100 rupees
|
||||
NOP #4
|
||||
;org $1EE414 ; <- F6414 sprite_kiki.asm : 193 don't have 10 rupees
|
||||
;NOP #4
|
||||
;org $1EE50C ; <- F650C sprite_kiki.asm : 356 don't have 100 rupees
|
||||
;NOP #4
|
||||
;----------------------------------------------------
|
||||
;-- Witch
|
||||
org $05E4FB ; <- 2E4FB sprite_witch.asm : 165 (JSL Sprite_ShowSolicitedMessageIfPlayerFacing)
|
||||
@@ -2053,11 +2056,9 @@ org $00DF6E ; <- A few instructions later, right after JSR Do3To4High16Bit
|
||||
;================================================================================
|
||||
; Hook bow use - to use rupees instead of actual arrows
|
||||
;--------------------------------------------------------------------------------
|
||||
org $07A055
|
||||
NOP #$12 ; Remove archery minigame code
|
||||
org $07A055 ; <- Bank07.asm:5205 (LDA $0B99 : BEQ BRANCH_DELTA)
|
||||
JSL.l ArrowGame : NOP #14
|
||||
|
||||
org $07A06C ; <- Bank07.asm:5215 (LDA $7EF377) (Skip #$02) (DEC A : LDA $7EF377)
|
||||
JSL CheckEnoughRupeeArrows
|
||||
skip #$02 ;Skip the BEQ
|
||||
NOP #$0B ;Remove hud update code for bow/arrow kinda useless / Remove decrease arrow code
|
||||
org $07A06C ; <- Bank07.asm:5215 (LDA $7EF377 : BEQ BRANCH_EPSILON)
|
||||
JSL.l DecrementArrows : SKIP #2 : NOP #5
|
||||
;================================================================================
|
||||
|
||||
3
hud.asm
3
hud.asm
@@ -3,7 +3,8 @@ HUD_TileMap:
|
||||
dw $207F, $207F, $2850, $A856
|
||||
dw $2852, $285B, $285B, $285C
|
||||
;dw $207F, $3CA8, $207F, $207F, $207F
|
||||
dw $207F, $3C02, $3C03, $207F, $207F
|
||||
dw $207F, $3C02, $3C03, $207F, $207F ; normal mode
|
||||
;dw $3C02, $3C03, $207F, $207F, $207F ; rupee arrows
|
||||
dw $2C88, $2C89, $207F, $20A7
|
||||
dw $20A9, $207F, $2871 ;, $207F
|
||||
dw $207F, $207F, $288B, $288F
|
||||
|
||||
30
newitems.asm
30
newitems.asm
@@ -316,6 +316,13 @@ AddReceivedItemExpandedGetItem:
|
||||
+ CMP.b #$A0 : !BLT + : CMP.b #$B0 : !BGE + ; Free Small Key
|
||||
AND #$0F : TAX
|
||||
LDA $7EF37C, X : INC : STA $7EF37C, X ; Increment Key Count
|
||||
|
||||
CPX.b #$00 : BNE +
|
||||
STA $7EF37D ; copy HC to sewers
|
||||
+ : CPX.b #$01 : BNE +
|
||||
STA $7EF37C ; copy sewers to HC
|
||||
+
|
||||
|
||||
LDA.l GenericKeys : BEQ +
|
||||
.generic
|
||||
LDA $7EF36F : INC : STA $7EF36F
|
||||
@@ -833,15 +840,34 @@ RTL
|
||||
;--------------------------------------------------------------------------------
|
||||
;Return $7EF340 but also draw silver arrows if you have the upgrade even if you don't have the bow
|
||||
CheckHUDSilverArrows:
|
||||
LDA.l ArrowMode : BEQ .normal
|
||||
.rupee_arrows
|
||||
JSL.l DrawHUDArrows
|
||||
LDA $7EF340
|
||||
RTL
|
||||
.normal
|
||||
LDA $7EF340 : BNE +
|
||||
LDA !INVENTORY_SWAP_2 : AND.b #$40 : BEQ ++
|
||||
JSL.l DrawHUDSilverArrows
|
||||
JSL.l DrawHUDArrows
|
||||
++
|
||||
LDA $7EF340
|
||||
+
|
||||
RTL
|
||||
;--------------------------------------------------------------------------------
|
||||
DrawHUDSilverArrows:
|
||||
DrawHUDArrows:
|
||||
LDA.l ArrowMode : BEQ .normal
|
||||
.rupee_arrows
|
||||
LDA.b #$7F : STA $7EC720 ; draw no arrows
|
||||
LDA.b #$24 : STA $7EC721
|
||||
LDA.b #$7F : STA $7EC722
|
||||
LDA.b #$24 : STA $7EC723
|
||||
|
||||
LDA.b #$86 : STA $7EC714 ; draw silver arrow marker
|
||||
LDA.b #$24 : STA $7EC715
|
||||
LDA.b #$87 : STA $7EC716
|
||||
LDA.b #$24 : STA $7EC717
|
||||
RTL
|
||||
.normal
|
||||
LDA.b #$86 : STA $7EC720 ; draw silver arrow marker
|
||||
LDA.b #$24 : STA $7EC721
|
||||
LDA.b #$87 : STA $7EC722
|
||||
|
||||
@@ -18,6 +18,19 @@ FlipLWDWFlag:
|
||||
PLP
|
||||
RTL
|
||||
;================================================================================
|
||||
HUDRebuildIndoorHole:
|
||||
PHA
|
||||
LDA.l GenericKeys : BEQ .normal
|
||||
.generic
|
||||
PLA
|
||||
LDA $7EF38B ; generic key count
|
||||
JSL.l HUD_RebuildIndoor_Palace
|
||||
RTL
|
||||
.normal
|
||||
PLA
|
||||
JSL.l HUD_RebuildIndoor_Palace
|
||||
RTL
|
||||
;================================================================================
|
||||
HUDRebuildIndoor:
|
||||
LDA.l GenericKeys : BEQ .normal
|
||||
.generic
|
||||
@@ -228,6 +241,20 @@ RTL
|
||||
;$388 = Turtle Rock
|
||||
;$389 = Ganon's Tower
|
||||
;--------------------------------------------------------------------------------
|
||||
DrawArrowTens:
|
||||
PHA : LDA.l ArrowMode : AND.w #$00FF : BNE +
|
||||
PLA : STA $7EC760 : RTL
|
||||
+
|
||||
PLA
|
||||
RTL
|
||||
;--------------------------------------------------------------------------------
|
||||
DrawArrowOnes:
|
||||
PHA : LDA.l ArrowMode : AND.w #$00FF : BNE +
|
||||
PLA : STA $7EC762 : RTL
|
||||
+
|
||||
PLA
|
||||
RTL
|
||||
;--------------------------------------------------------------------------------
|
||||
DrawBootsInMenuLocation:
|
||||
LDA.l HUDDungeonItems : BNE +
|
||||
LDA.w #$1608 : STA $00
|
||||
|
||||
69
retro.asm
69
retro.asm
@@ -1,31 +1,40 @@
|
||||
CheckEnoughRupeeArrows:
|
||||
{
|
||||
LDA $0B99 : BNE .minigame_arrow
|
||||
LDA $7EF340 : CMP #$03 : BCS .skip_arrow_check ;03 is the silver bow without arrows
|
||||
LDA $7EF377 : BEQ .no_arrows
|
||||
.skip_arrow_check
|
||||
PHX
|
||||
REP #$30 ;Set 16bit mode
|
||||
LDA $7EF340 : AND #$00FF : TAX
|
||||
LDA $7EF360 : CMP.l .rupees_cost, X : BCC .not_enough_rupees ;Load Rupees count
|
||||
SBC.l .rupees_cost, X : STA $7EF360 ;decrease rupee by 5
|
||||
DecrementArrows:
|
||||
LDA.l ArrowMode : BNE .rupees
|
||||
.normal
|
||||
LDA $7EF377 : BEQ .done
|
||||
DEC A : STA $7EF377
|
||||
.rupees
|
||||
LDA $7EF340 : AND.b #$01 : BEQ +
|
||||
LDA.b #$00 : RTL
|
||||
+
|
||||
PHX
|
||||
REP #$20 ; set 16-bit accumulator
|
||||
LDA $7EF360 : BEQ +
|
||||
PHA : LDA $7EF340 : DEC : AND #$0002 : TAX : PLA
|
||||
!SUB.l ArrowModeWoodArrowCost, X ; CMP.w #$0000
|
||||
BMI .not_enough_money
|
||||
STA $7EF360 : BRA +
|
||||
.not_enough_money
|
||||
LDA.w #$0000
|
||||
+
|
||||
SEP #$20 ; set 8-bit accumulator
|
||||
PLX
|
||||
.done
|
||||
CMP.b #$00
|
||||
RTL
|
||||
|
||||
SEP #$30
|
||||
PLX
|
||||
BRA .ignore_minigame
|
||||
.minigame_arrow
|
||||
DEC $0B99
|
||||
.ignore_minigame
|
||||
LDA #$01 ;return 01 if we have enough rupee so it doesnt despawn the arrow
|
||||
RTL
|
||||
|
||||
.not_enough_rupees
|
||||
SEP #$30
|
||||
PLX
|
||||
.no_arrows
|
||||
LDA #$00 ;Return 00 if we don't have enough rupee so it despawn the arrow
|
||||
RTL
|
||||
|
||||
.rupees_cost ;Normal, Normal, Silver, Silver
|
||||
dw #$0005, #$0005, #$000A, #$000A
|
||||
}
|
||||
ArrowGame:
|
||||
LDA $0B99 : BEQ +
|
||||
DEC $0B99 ; reduce minigame arrow count
|
||||
LDA.l ArrowMode : BNE .rupees
|
||||
.normal
|
||||
LDA $7EF377 : INC #2 : STA $7EF377 ; increment arrow count (by 2 for some reason)
|
||||
.rupees
|
||||
PHX
|
||||
REP #$20 ; set 16-bit accumulator
|
||||
PHA : LDA $7EF340 : DEC : AND #$0002 : TAX : PLA
|
||||
LDA $7EF360 : !ADD.l ArrowModeWoodArrowCost, X : STA $7EF360
|
||||
SEP #$20 ; set 8-bit accumulator
|
||||
PLX
|
||||
+
|
||||
RTL
|
||||
|
||||
13
tables.asm
13
tables.asm
@@ -131,7 +131,7 @@ org $30803B ; PC 0x18003B
|
||||
MapMode:
|
||||
db #$00 ; #$00 = Always On (default) - #$01 = Require Map Item
|
||||
CompassMode:
|
||||
db #$02 ; #$00 = Off (default) - #$01 = Display Dungeon Count w/Compass - #$02 = Display Dungeon Count Always
|
||||
db #$00 ; #$00 = Off (default) - #$01 = Display Dungeon Count w/Compass - #$02 = Display Dungeon Count Always
|
||||
;--------------------------------------------------------------------------------
|
||||
org $30803D ; PC 0x18003D
|
||||
PersistentFloodgate:
|
||||
@@ -739,6 +739,14 @@ org $308174 ; PC 0x180174
|
||||
FixFakeWorld:
|
||||
db #$00 ; #00 = Fix Off (Default) - #$01 = Fix On
|
||||
;================================================================================
|
||||
org $308175 ; PC 0x180175
|
||||
ArrowMode:
|
||||
db #$00 ; #00 = Normal (Default) - #$01 = Rupees
|
||||
ArrowModeWoodArrowCost: ; keep these together
|
||||
dw #$0005 ; #$0005 = 5 (Default)
|
||||
ArrowModeSilverArrowCost: ; keep these together
|
||||
dw #$000A ; #$000A = 10 (Default)
|
||||
;================================================================================
|
||||
org $308190 ; PC 0x180190
|
||||
TimerStyle:
|
||||
db #$00 ; #$00 = Off (Default) - #$01 Countdown - #$02 = Stopwatch
|
||||
@@ -1327,6 +1335,9 @@ dw #9999 ; Rupee Limit
|
||||
; $7F50C5 - Cucco Attack Modifier
|
||||
; $7F50C6 - Old Man Dash Modifier
|
||||
; $7F50C7 - Ice Physics Modifier
|
||||
; $7F50C8 - Infinite Arrows Modifier
|
||||
; $7F50C9 - Infinite Bombs Modifier
|
||||
; $7F50CA - Infinite Magic Modifier
|
||||
|
||||
; $7F50D0 - $7F50FF - Block Cypher Parameters
|
||||
; $7F5100 - $7F51FF - Block Cypher Buffer
|
||||
|
||||
Reference in New Issue
Block a user