13 Commits
Author SHA1 Message Date
karafruit 5e892ca283 Fix orange potion overwrite 2026-06-15 16:58:18 -05:00
karafruit bf2b0fc6c8 Remove backup file accidentally created 2026-06-09 10:32:30 -05:00
karafruit 84a5fd3969 Merge branch 'beta' 2026-06-09 10:31:48 -05:00
karafruit 1092f1bc85 Text updates and orange refill box 2026-06-08 22:57:41 -05:00
karafruit fa33a3d24b Fix max frame count 2026-06-08 16:11:28 -05:00
karafruit 7d3a3a54e3 Fix max frame count 2026-06-08 16:10:55 -05:00
karafruit 99d426bc1e Bitflag to block silverless damage on phase 4 ganon 2026-06-08 00:11:01 -05:00
karafruit 82ce1628e6 Make infinite magic bar blue instead of flashy 2026-06-07 21:43:56 -05:00
karafruit 43515851c1 orange potion 2026-06-07 21:35:34 -05:00
karafruit d7ff034884 Unmark MapSwapping as NYI 2026-06-07 13:46:23 -05:00
karafruit 6bf2051bab Generic small keys don't despawn from shops 2026-06-07 13:14:39 -05:00
karafruit fa8f705bf9 Add map time to credits 2026-06-07 13:08:04 -05:00
karafruit 66e095306c Minor fixups 2026-06-07 01:28:16 -05:00
32 changed files with 323 additions and 225 deletions
+1
View File
@@ -206,6 +206,7 @@ warnpc $A38000
org $B98000
incsrc gk/crystalswitchbook.asm
incsrc gk/orange_potion.asm
incsrc gk/mimicdash.asm
incsrc gk/gloom.asm
incsrc gk/special_weapons.asm
BIN
View File
Binary file not shown.
BIN
View File
Binary file not shown.
+1
View File
@@ -29,3 +29,4 @@ Z=33
'=35
-=36
.=37
*=FF
Binary file not shown.
BIN
View File
Binary file not shown.
BIN
View File
Binary file not shown.
+5 -1
View File
@@ -252,10 +252,14 @@ RTL
;--------------------------------------------------------------------------------
DialogItemReceive:
BCS .nomessage ; if doubling the item value overflowed it must be a rando item
CPY.b #$CC : BEQ .orange_potion
CPY.b #$98 : BCC ++ ;if the item is $4C or greater it must be a rando item
.nomessage
LDA.w #$FFFF
BRA .done
.orange_potion
LDA.w #$0198
BRA .done
++ LDA.w Ancilla_ReceiveItem_item_messages, Y
@@ -304,7 +308,7 @@ DialogGanon2:
BCS +
LDA.w #$018D : JMP .done
+
LDA.l GanonVulnerabilityItem : AND.w #$00FF
LDA.l GanonVulnerabilityItem : AND.w #$007F
BEQ .silver_arrows
CMP.w #$0001 : BEQ .silver_arrows
CMP.w #$0004 : BEQ .bombs
+38 -34
View File
@@ -1,14 +1,14 @@
OnPrepFileSelect:
LDA.b GameSubMode : CMP.b #$03 : BNE +
LDA.b #$06 : STA.b NMISTRIPES ; thing we wrote over
RTL
+
PHA : PHX
REP #$10
JSL LoadAlphabetTilemap
JSL LoadFullItemTiles
SEP #$10
PLX : PLA
LDA.b GameSubMode : CMP.b #$03 : BNE +
LDA.b #$06 : STA.b NMISTRIPES ; thing we wrote over
RTL
+
PHA : PHX
REP #$10
JSL LoadAlphabetTilemap
JSL LoadFullItemTiles
SEP #$10
PLX : PLA
RTL
;--------------------------------------------------------------------------------
OnDrawHud:
@@ -22,17 +22,17 @@ JML ReturnFromOnDrawHud
;--------------------------------------------------------------------------------
OnDungeonEntrance:
STA.l PegColor ; thing we wrote over
JSL MaybeFlagDungeonTotalsEntrance
LDA.w #$0001 : STA.l UpdateHUDFlag
SEP #$30
JSL DynamicDropGFXClear
REP #$30
JSL MaybeFlagDungeonTotalsEntrance
LDA.w #$0001 : STA.l UpdateHUDFlag
SEP #$30
JSL DynamicDropGFXClear
REP #$30
RTL
;--------------------------------------------------------------------------------
OnDungeonBossExit:
JSL StatTransitionCounter
JSL ClearMultiworldText
JSL DynamicDropGFXClear
JSL StatTransitionCounter
JSL ClearMultiworldText
JSL DynamicDropGFXClear
RTL
;--------------------------------------------------------------------------------
OnPlayerDead:
@@ -41,40 +41,44 @@ OnPlayerDead:
JSL DynamicDropGFXClear
JSL SetSilverBowMode
JSL RefreshRainAmmo
LDA.b #$00
STA.l InfiniteMagic
PLA
RTL
;--------------------------------------------------------------------------------
OnDungeonExit:
PHA : PHP
SEP #$20 ; set 8-bit accumulator
JSL SQEGFix
JSL DynamicDropGFXClear
PLP : PLA
PHA : PHP
SEP #$20 ; set 8-bit accumulator
JSL SQEGFix
JSL DynamicDropGFXClear
PLP : PLA
STA.w DungeonID : STZ.w Map16ChangeIndex ; thing we wrote over
STA.w DungeonID : STZ.w Map16ChangeIndex ; thing we wrote over
PHA : PHP
LDA.w #$0001 : STA.l UpdateHUDFlag
JSL HUD_RebuildLong
JSL FloodGateResetInner
JSL SetSilverBowMode
PLP : PLA
PHA : PHP
LDA.w #$0001 : STA.l UpdateHUDFlag
JSL HUD_RebuildLong
JSL FloodGateResetInner
JSL SetSilverBowMode
PLP : PLA
RTL
;--------------------------------------------------------------------------------
OnSave:
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 DarkWorldSaveFix
JML MSUResumeReset
JML MSUResumeReset
;--------------------------------------------------------------------------------
OnQuit:
JSL SQEGFix
LDA.b #$00 : STA.l AltTextFlag ; bandaid patch bug with mirroring away from text
LDA.b #$10 : STA.b MAINDESQ ; thing we wrote over
LDA.b #$00
STA.l InfiniteMagic
RTL
;--------------------------------------------------------------------------------
OnDeathNoSave:
JSL MSUResumeReset
LDA.b #$05 : STA.b $10 ; what we wrote over
JSL MSUResumeReset
LDA.b #$05 : STA.b $10 ; what we wrote over
RTL
;--------------------------------------------------------------------------------
OnUncleItemGet:
+6 -1
View File
@@ -82,7 +82,10 @@ DrawBottle:
AND.w #$00FF : BNE +
LDX.w #FileSelectItems_empty_bottle
JMP DrawItemGray
+ : DEC #2 : BNE +
+ : DEC : BNE +
LDX.w #FileSelectItems_orange_potion
JMP DrawItem
+ : DEC : BNE +
LDX.w #FileSelectItems_empty_bottle
JMP DrawItem
+ : DEC : BNE +
@@ -619,6 +622,8 @@ FileSelectItems:
dw #$0282|!FS_COLOR_GREEN, #$0282|!FS_COLOR_GREEN|!FS_HFLIP, #$0292|!FS_COLOR_GREEN, #$0284|!FS_COLOR_GREEN
.blue_potion
dw #$0282|!FS_COLOR_BLUE, #$0282|!FS_COLOR_BLUE|!FS_HFLIP, #$0292|!FS_COLOR_BLUE, #$0285|!FS_COLOR_BLUE
.orange_potion
dw #$0282|!FS_COLOR_BROWN, #$0282|!FS_COLOR_BROWN|!FS_HFLIP, #$0292|!FS_COLOR_BROWN, #$0286|!FS_COLOR_BROWN
.fairy_bottle
dw #$0287|!FS_COLOR_YELLOW|!FS_HFLIP, #$0287|!FS_COLOR_YELLOW, #$0296|!FS_COLOR_BLUE, #$0297|!FS_COLOR_BLUE
.bee_bottle
+48 -41
View File
@@ -2,21 +2,28 @@
; Frame Hook
;--------------------------------------------------------------------------------
FrameHookAction:
JSL Module_MainRouting
JSL CheckMusicLoadRequest
PHP : REP #$30 : PHA
SEP #$20
LDA.l StatsLocked : BNE ++
REP #$20 ; set 16-bit accumulator
LDA.l LoopFrames : INC : STA.l LoopFrames : BNE +
LDA.l LoopFrames+2 : INC : STA.l LoopFrames+2
+
LDA.l GameMode : CMP.w #$010E : BNE ++ ; move this to nmi hook?
LDA.l MenuFrames : INC : STA.l MenuFrames : BNE ++
LDA.l MenuFrames+2 : INC : STA.l MenuFrames+2
++
REP #$30 : PLA : PLP
JSL Module_MainRouting
JSL CheckMusicLoadRequest
PHP : REP #$30 : PHA
SEP #$20
LDA.l StatsLocked : BNE ++
REP #$20 ; set 16-bit accumulator
LDA.l LoopFrames : INC : STA.l LoopFrames : BNE +
LDA.l LoopFrames+2 : INC : STA.l LoopFrames+2
+
; move this to nmi hook?
LDA.l GameMode : CMP.w #$010E : BNE +
; item select menu
LDA.l MenuFrames : INC : STA.l MenuFrames : BNE ++
LDA.l MenuFrames+2 : INC : STA.l MenuFrames+2
+
LDA.l GameMode : CMP.w #$030E : BEQ .map ; underworld map
LDA.l GameMode : CMP.w #$070E : BNE ++ ; overworld map
.map
LDA.l MapFrames : INC : STA.l MapFrames : BNE ++
LDA.l MapFrames+2 : INC : STA.l MapFrames+2
++
REP #$30 : PLA : PLP
RTL
!NMI_MW = "$7F5047"
@@ -47,37 +54,37 @@ JML NMIHookReturn
;--------------------------------------------------------------------------------
PostNMIHookAction:
LDA.w NMIAux : BEQ +
PHK : PEA.w .return-1 ; push stack for RTL return
JMP.w [NMIAux]
.return
STZ.w NMIAux ; zero bank byte of NMI hook pointer
+
JSR TransferItemGFX
LDA.b INIDISPQ : STA.w INIDISP ; thing we wrote over, turn screen back on
LDA.w NMIAux : BEQ +
PHK : PEA.w .return-1 ; push stack for RTL return
JMP.w [NMIAux]
.return
STZ.w NMIAux ; zero bank byte of NMI hook pointer
+
JSR TransferItemGFX
LDA.b INIDISPQ : STA.w INIDISP ; thing we wrote over, turn screen back on
JML PostNMIHookReturn
;--------------------------------------------------------------------------------
TransferItemGFX:
; Only used for shops now but could be used for anything. We should look at how door rando does this
; and try to unify one approach.
REP #$30
LDX.w ItemStackPtr : BEQ .done
TXA : BIT.w #$0040 : BNE .fail ; Crash if we have more than 16 queued (should never happen.)
DEX #2
-
LDA.l ItemGFXStack,X : STA.w ItemGFXPtr
LDA.l ItemTargetStack,X : STA.w ItemGFXTarget
PHX
JSL TransferItemToVRAM
REP #$10
PLX
DEX #2
BPL -
REP #$30
LDX.w ItemStackPtr : BEQ .done
TXA : BIT.w #$0040 : BNE .fail ; Crash if we have more than 16 queued (should never happen.)
DEX #2
-
LDA.l ItemGFXStack,X : STA.w ItemGFXPtr
LDA.l ItemTargetStack,X : STA.w ItemGFXTarget
PHX
JSL TransferItemToVRAM
REP #$10
PLX
DEX #2
BPL -
STZ.w ItemStackPtr
.done
SEP #$30
STZ.w ItemStackPtr
.done
SEP #$30
RTS
.fail
BRK #$00
.fail
BRK #$00
+1 -1
View File
@@ -116,7 +116,7 @@ db !TIER_JUNK ; 62 - RNG pool item (single)
db !TIER_JUNK ; 63 - RNG pool item (multi)
db !TIER_MAJOR ; 64 - Progressive bow
db !TIER_MAJOR ; 65 - Progressive bow
db !TIER_JUNK ; 66 -
db !TIER_HEALTH ; 66 - Potion refill (orange)
db !TIER_JUNK ; 67 -
db !TIER_JUNK ; 68 -
db !TIER_JUNK ; 69 -
+1 -1
View File
@@ -101,7 +101,7 @@ db $00 ; 62 - RNG pool item (single)
db $00 ; 63 - RNG pool item (multi)
db $00 ; 64 - Progressive bow
db $00 ; 65 - Progressive bow
db $00 ; 66 -
db $00 ; 66 - Potion refill (orange)
db $00 ; 67 -
db $00 ; 68 -
db $00 ; 69 -
+31
View File
@@ -0,0 +1,31 @@
CheckOrangePotion:
LDA.l BottleContents, X
CMP.b #$01
BEQ .orange
; return to vanilla behavior
CMP.b #$00
RTL
.orange
LDA.l InfiniteMagic
BNE .nope
LDA.b #$02
STA.l BottleContents, X
STZ.w $0301
LDA.b #$01
STA.l InfiniteMagic
JSL RebuildHUD_update_long
LDA.b #$00
RTL
.nope
JSL Sound_SetSfxPanWithPlayerCoords
ORA.b #$3C
STA.w SFX2
LDA.b #$00
RTL
+2 -2
View File
@@ -155,7 +155,7 @@ dw $295C ; 01 - unknown - dot
dw $2954 ; 02 - junk - pot
dw $2950 ; 03 - small key
dw $2952 ; 04 - triforce piece
dw $2955 ; 05 - safety - plus
dw $2955 ; 05 - health - plus
dw $2953 ; 06 - less important item - small chest
dw $2D56 ; 07 - compass
dw $2957 ; 08 - map
@@ -269,4 +269,4 @@ ItemSources:
; m - have map
; v - have visited dungeon
MapSwapping:
db $01 ; NYI
db $01
+1 -1
View File
@@ -1,6 +1,6 @@
DamageClassCalc:
PHA
LDA.l GanonVulnerabilityItem : BEQ +
LDA.l GanonVulnerabilityItem : AND.b #$7F : BEQ +
LDA.w SpriteTypeTable, X : CMP.b #$D7 : BNE +
PLA
JSL Ganon_CheckAncillaVulnerability
+9 -6
View File
@@ -4,12 +4,14 @@ Ganon_CheckAncillaVulnerability:
PLA
PHX : PHA
LDA.l GanonVulnerabilityItem
BMI .no_weakness
BVS .no_weakness
AND.b #$7F
TAX : PLA
CMP.l Ganon_CheckByAncilla, X : BNE +
PLX : BRA .vulnerable
+ PLX : PHA
LDA.l GanonVulnerabilityItem
AND.b #$7F
BEQ .silver_arrows
CMP.b #$01 : BEQ .silver_arrows
CMP.b #$11 : BEQ .somaria
@@ -34,6 +36,7 @@ Ganon_CheckAncillaVulnerability:
.vulnerable
PHX
LDA.l GanonVulnerabilityItem
AND.b #$7F
TAX
LDA.l Ganon_IFrameDuration, X
PLX
@@ -52,7 +55,7 @@ Ganon_CheckAncillaVulnerability:
RTL
;--------------------------------------------------------------------------------
Ganon_CheckPowderVulnerability:
LDA.l GanonVulnerabilityItem : CMP.b #$05 : BNE .normal
LDA.l GanonVulnerabilityItem : AND.b #$7F : CMP.b #$05 : BNE .normal
LDA.w SpriteTypeTable, X : CMP.b #$D7 : BNE .normal
LDA.w $0EE0, X : BNE .normal ; ganon has i-frames
LDA.l Ganon_IFrameDuration+$05
@@ -69,7 +72,7 @@ Ganon_CheckPowderVulnerability:
Ganon_CheckBeeVulnerability:
; X is bee sprite index
; Y is target sprite index
LDA.l GanonVulnerabilityItem : CMP.b #$10 : BNE .normal
LDA.l GanonVulnerabilityItem : AND.b #$7F : CMP.b #$10 : BNE .normal
LDA.w SpriteTypeTable, Y : CMP.b #$D7 : BNE .normal
LDA.w $0EE0, Y : BNE .normal ; ganon has i-frames
LDA.l Ganon_IFrameDuration+$10
@@ -88,14 +91,14 @@ Ganon_CheckInvincible:
LDA.w $04C5 : CMP.b #$02 : BEQ .not_transparent
LDA.w SpriteTypeTable, X : CMP.b #$D7 : BNE .transparent ; non-stunned ganon
LDA.w UseY1 : AND.b #$0A : BEQ .transparent ; normal behavior if not hammering
LDA.l GanonVulnerabilityItem : CMP.b #$0C : BNE .transparent
LDA.l GanonVulnerabilityItem : AND.b #$7F : CMP.b #$0C : BNE .transparent
.not_transparent
LDA.b #$00 : RTL
.transparent
LDA.b #$01 : RTL
;--------------------------------------------------------------------------------
Ganon_CheckHammerVulnerability:
LDA.l GanonVulnerabilityItem : CMP.b #$0C : BNE .normal
LDA.l GanonVulnerabilityItem : AND.b #$7F : CMP.b #$0C : BNE .normal
LDA.w SpriteTypeTable, X : CMP.b #$D7 : BNE .normal
LDA.w $0EE0, X : BNE .normal ; ganon has i-frames
LDA.l Ganon_IFrameDuration+$0C
@@ -108,7 +111,7 @@ Ganon_CheckHammerVulnerability:
;--------------------------------------------------------------------------------
CheckBeeBoss:
; Y is sprite index
LDA.l GanonVulnerabilityItem : CMP.b #$10 : BNE .normal
LDA.l GanonVulnerabilityItem : AND.b #$7F : CMP.b #$10 : BNE .normal
LDA.w SpriteTypeTable, Y : CMP.b #$D7 : BNE .normal
LDA.b #$00 : RTL
.normal
+3
View File
@@ -1,5 +1,8 @@
GoalItemGanonCheck:
LDA.w SpriteTypeTable, X : CMP.b #$D6 : BNE .success ; skip if not ganon
LDA.l GanonVulnerabilityItem : BPL +
LDA.w SpriteActivity, X : CMP.b #$12 : BEQ .fail
+
LDA.b #$01 : JSL CheckConditionPass
BCS .success
+19
View File
@@ -997,6 +997,15 @@ LDA.w BottleListExpanded, X
org $89895C ; 4895C - ancilla_init.asm:1344 (LDA PotionList, X)
LDA.w PotionListExpanded, X
org $898946
CMP.b #$00 : BNE + : skip 9 : +
org $89895A
LDX.b #$06
org $89896A
ADC.b #$01
;--------------------------------------------------------------------------------
org $86D1EB ; 351EB - sprite_absorbable.asm:364 (STA $7EF375) ; bugbug commented out until i figure out why it doesn't work
JSL HandleBombAbsorbtion
@@ -1029,6 +1038,7 @@ JSL RefillHealth
;--------------------------------------------------------------------------------
org $80F922 ; <- 7922 - Bank00.asm:8543 - (JSL HUD.RefillMagicPower : BCC .beta)
JSL RefillMagic
;--------------------------------------------------------------------------------
;================================================================================
; Early Bottle Fix
@@ -1165,6 +1175,8 @@ ORA.w #$8000 : STA.w $007E, Y
ORA.w #$4000 : STA.w $0084, Y
JSL AddYMarker : NOP #2
;--------------------------------------------------------------------------------
org $8DF779 ; <- 6F779 (not in disassembly) - mushroom bottle hud tile
dw $20D2, $60D2, $20E2, $202D ; (Orig: $2044, $2045, $2046, $2047)
org $8DF789+6 ; <- 6F789+6 (not in disassembly) - red bottle hud tile, lower right
dw $2413 ; (Orig: #$24E3)
org $8DF789+6+8 ; green bottle hud tile, lower right
@@ -2847,3 +2859,10 @@ org $8DFB63 ; bank_0D.asm@18092 (LDA.l $7EF33F, X : AND.w #$00FF)
JSL CheckFluteInHUD
NOP #3
;--------------------------------------------------------------------------------
;================================================================================
; Orange Potion (Chateau Romani)
;--------------------------------------------------------------------------------
org $87A15C ; bank_07.asm@6963 (LDA.l $7EF35C, X)
JSL CheckOrangePotion
;--------------------------------------------------------------------------------
+6 -6
View File
@@ -239,7 +239,7 @@ endmacro
%ReceiptProps($63, -4, 0, $FF, $F36A, $FF, skip, rng_multi) ; 63 - RNG pool item (multi)
%ReceiptProps($64, -4, 0, $FF, $F340, $FF, skip, progressive_bow) ; 64 - Progressive bow
%ReceiptProps($65, -4, 0, $FF, $F340, $FF, skip, progressive_bow_2) ; 65 - Progressive bow
%ReceiptProps($66, -4, 0, $FF, $F36A, $FF, skip, skip) ; 66 -
%ReceiptProps($66, -4, 0, $51, $F36E, $FF, skip, skip) ; 66 - Potion refill (yellow)
%ReceiptProps($67, -4, 0, $FF, $F36A, $FF, skip, skip) ; 67 -
%ReceiptProps($68, -4, 0, $FF, $F36A, $FF, skip, skip) ; 68 -
%ReceiptProps($69, -4, 0, $FF, $F36A, $FF, skip, skip) ; 69 -
@@ -518,7 +518,7 @@ endmacro
%SpriteProps($63, 2, 2, $FF, $FF, $0000) ; 63 - RNG pool item (multi)
%SpriteProps($64, 2, 2, $FF, $FF, $0000) ; 64 - Progressive bow
%SpriteProps($65, 2, 2, $FF, $FF, $0000) ; 65 - Progressive bow
%SpriteProps($66, 2, 2, $00, $00, $0000) ; 66 -
%SpriteProps($66, 2, 2, $02, $02, $0000) ; 66 - Potion refill (yellow)
%SpriteProps($67, 2, 2, $00, $00, $0000) ; 67 -
%SpriteProps($68, 2, 2, $00, $00, $0000) ; 68 -
%SpriteProps($69, 2, 2, $00, $00, $0000) ; 69 -
@@ -794,7 +794,7 @@ endmacro
%InventoryItem($63, $0001, $0000, $0000) ; 63 - RNG pool item (multi)
%InventoryItem($64, $00A5, $0000, $0000) ; 64 - Progressive bow
%InventoryItem($65, $00A5, $0000, $0000) ; 65 - Progressive bow
%InventoryItem($66, $0001, $0000, $0000) ; 66 -
%InventoryItem($66, $0081, $0000, $0000) ; 66 - Potion refill (yellow)
%InventoryItem($67, $0001, $0000, $0000) ; 67 -
%InventoryItem($68, $0001, $0000, $0000) ; 68 -
%InventoryItem($69, $0001, $0000, $0000) ; 69 -
@@ -1054,7 +1054,7 @@ ItemReceiptGraphicsOffsets:
dw $0 ; 63 - RNG pool item (multi)
dw $0 ; 64 - Progressive bow
dw $0 ; 65 - Progressive bow
dw $0 ; 66 -
dw $0CE0 ; 66 - Potion refill (yellow)
dw $0 ; 67 -
dw $0 ; 68 -
dw $0 ; 69 -
@@ -1324,7 +1324,7 @@ StandingItemGraphicsOffsets:
dw $0 ; 63 - RNG pool item (multi)
dw $0 ; 64 - Progressive bow
dw $0 ; 65 - Progressive bow
dw $0 ; 66 -
dw $0CA0 ; 66 - Potion refill (yellow)
dw $0 ; 67 -
dw $0 ; 68 -
dw $0 ; 69 -
@@ -1590,7 +1590,7 @@ VRAMAddressOffset:
dw $0024 ; 63 - RNG pool item (multi)
dw $0024 ; 64 - Progressive bow
dw $0024 ; 65 - Progressive bow
dw $0024 ; 66 -
dw $0024 ; 66 - Potion refill (yellow)
dw $0024 ; 67 -
dw $0024 ; 68 -
dw $0024 ; 69 -
+11 -6
View File
@@ -273,10 +273,15 @@ NewHUD_DrawMagicMeter:
STA.w CurrentMagic
TAY
LDA.b FrameCounter
REP #$30
AND.w #$000C
LSR
LDA.w #$0002
; ; cycle through colors
; LDA.b FrameCounter
; REP #$30
; AND.w #$000C
; LSR
BRA .recolor
.set_index ; this branch is always 0000 when taken
@@ -316,9 +321,9 @@ dw $2894 ; crystal 4
dw $2895 ; crystal 5
dw $2896 ; crystal 6
dw $2897 ; crystal 7
dw $2963 ; green pendant
dw $295E ; blue pendant
dw $296E ; red pendant
dw $2935 ; green pendant
dw $2936 ; blue pendant
dw $2937 ; red pendant
;================================================================================
DrawCompassCounts:
+1 -1
View File
@@ -935,7 +935,7 @@ BottleListExpanded:
db $16, $2B, $2C, $2D, $3D, $3C, $48
PotionListExpanded:
db $2E, $2F, $30, $FF, $0E
db $66, $FF, $2E, $2F, $30, $FF, $0E
;--------------------------------------------------------------------------------
HandleBowTracking:
; In: A - Item Receipt ID
+4 -1
View File
@@ -433,9 +433,12 @@ Shopkeeper_BuyItem:
CMP.b #$2E : BEQ .refill ; Red Potion Refill
CMP.b #$2F : BEQ .refill ; Green Potion Refill
CMP.b #$30 : BEQ .refill ; Blue Potion Refill
BRA +
CMP.b #$66 : BEQ .refill ; Orange Potion Refill
CMP.b #$AF : BEQ .generic_key
BRA +
.refill
JSL Sprite_GetEmptyBottleIndex : BMI .full_bottles
.generic_key
LDA.b #$1 : STA.l ShopkeeperRefill ; If this is on, don't toggle bit to remove from shop
+
+1 -1
View File
@@ -308,7 +308,7 @@ HeartContainerCounter: skip 1 ; Total number of heart containers collected (in
DeathCounter: skip 1 ; Number of deaths (integer)
skip 1 ; Reserved
FluteCounter: skip 1 ; Number of times fluted (integer)
skip 4 ;
MapFrames: skip 4 ; Total map time in frames (32-bit integer)
RNGItem: skip 2 ; RNG Item
SwordlessBossKills: skip 1 ; Number of bosses killed without a sword (integer)
FaerieRevivalCounter: skip 1 ; Number of faerie revivals (integer)
+42 -42
View File
@@ -88,27 +88,27 @@ IncrementSmallKeys:
RTL
;--------------------------------------------------------------------------------
IncrementSmallKeysNoPrimary:
STA.l CurrentSmallKeys ; thing we wrote over, write small key count
PHX
LDA.l StatsLocked : BNE +
LDA.l SmallKeyCounter : INC : STA.l SmallKeyCounter
+
JSL UpdateKeys
LDA.b IndoorsFlag : BEQ + ; skip room check if outdoors
PHP : REP #$20 ; set 16-bit accumulator
LDA.b RoomIndex : CMP.w #$0087 : BNE ++ ; hera basement
LDA.b $A8 : AND.w #$0003 : CMP.w #$0002 : BNE ++ ; must be quadrant 2
LDA.w SprDropsItem, X : AND.w #$00FF : BNE ++ ; must not be a standing item
PLP : PHY
LDY.b #$24
JSL AddInventory
PLY : BRA +
++
PLP
+
LDA.b #$01 : STA.l UpdateHUDFlag
JSL HUD_RebuildLong
PLX
STA.l CurrentSmallKeys ; thing we wrote over, write small key count
PHX
LDA.l StatsLocked : BNE +
LDA.l SmallKeyCounter : INC : STA.l SmallKeyCounter
+
JSL UpdateKeys
LDA.b IndoorsFlag : BEQ + ; skip room check if outdoors
PHP : REP #$20 ; set 16-bit accumulator
LDA.b RoomIndex : CMP.w #$0087 : BNE ++ ; hera basement
LDA.b $A8 : AND.w #$0003 : CMP.w #$0002 : BNE ++ ; must be quadrant 2
LDA.w SprDropsItem, X : AND.w #$00FF : BNE ++ ; must not be a standing item
PLP : PHY
LDY.b #$24
JSL AddInventory
PLY : BRA +
++
PLP
+
LDA.b #$01 : STA.l UpdateHUDFlag
JSL HUD_RebuildLong
PLX
RTL
;--------------------------------------------------------------------------------
DecrementSmallKeys:
@@ -188,9 +188,9 @@ CountAllKey:
;--------------------------------------------------------------------------------
IncrementAgahnim2Sword:
PHA
JSL IncrementBossSword
PLA
PHA
JSL IncrementBossSword
PLA
RTL
;--------------------------------------------------------------------------------
IncrementDeathCounter:
@@ -239,22 +239,22 @@ RTL
DecrementItemCounter:
PHA
LDA.l StatsLocked : BNE +
REP #$20
REP #$20
LDA.l TotalItemCounter : DEC : STA.l TotalItemCounter
SEP #$20
SEP #$20
+
PLA
RTL
;--------------------------------------------------------------------------------
IncrementBigChestCounter:
JSL Dungeon_SaveRoomQuadrantData ; thing we wrote over
PHA
LDA.l StatsLocked : BNE +
LDA.l BigKeysBigChests : INC : AND.b #$0F : TAX
LDA.l BigKeysBigChests : AND.b #$F0 : STA.l BigKeysBigChests
TXA : ORA.l BigKeysBigChests : STA.l BigKeysBigChests
+
PLA
JSL Dungeon_SaveRoomQuadrantData ; thing we wrote over
PHA
LDA.l StatsLocked : BNE +
LDA.l BigKeysBigChests : INC : AND.b #$0F : TAX
LDA.l BigKeysBigChests : AND.b #$F0 : STA.l BigKeysBigChests
TXA : ORA.l BigKeysBigChests : STA.l BigKeysBigChests
+
PLA
RTL
;--------------------------------------------------------------------------------
IncrementDamageTakenCounter_Eight:
@@ -338,8 +338,8 @@ IncrementUWMirror:
RTL
;--------------------------------------------------------------------------------
IncrementSpentRupees:
DEC A : BPL .subtractRupees
LDA.w #$0000 : STA.l CurrentRupees
DEC A : BPL .subtractRupees
LDA.w #$0000 : STA.l CurrentRupees
RTL
.subtractRupees
PHA : PHP
@@ -355,9 +355,9 @@ IndoorTileTransitionCounter:
JMP StatTransitionCounter
;--------------------------------------------------------------------------------
IndoorSubtileTransitionCounter:
;JSL HeartPieceSetRedraw ; set redraw flag for items
STZ.w SomariaSwitchFlag ; stuff we wrote over
STZ.w SpriteRoomTag
;JSL HeartPieceSetRedraw ; set redraw flag for items
STZ.w SomariaSwitchFlag ; stuff we wrote over
STZ.w SpriteRoomTag
JMP StatTransitionCounter
;--------------------------------------------------------------------------------
StatsFinalPrep:
@@ -385,12 +385,12 @@ StatsFinalPrep:
LDA.l RupeesSpent : !ADD.l DisplayRupees : STA.l RupeesCollected
LDA.l RupeesSpent+1 : ADC.l DisplayRupees+1 : STA.l RupeesCollected+1
REP #$20
REP #$20
LDA.l TotalItemCounter : !SUB.l ChestsOpened : STA.l NonChestCounter
.done
PLP : PLX : PLA
LDA.b #$19 : STA.b GameMode ; thing we wrote over, load triforce room
STZ.b GameSubMode
STZ.b SubSubModule
STZ.b GameSubMode
STZ.b SubSubModule
RTL
+18 -16
View File
@@ -504,7 +504,16 @@ CreditsLineBlank:
%blankline()
%blankline()
%smallcredits("SPRITE DEVELOPMENT", "yellow")
%smallcredits("GWAAKIWI * DUNGEON MAPS", "yellow")
%blankline()
%bigcredits("KARAFRUIT")
%blankline()
%blankline()
%smallcredits("SPRITE DEVELOPMENT", "green")
%blankline()
@@ -525,7 +534,7 @@ CreditsLineBlank:
%blankline()
%blankline()
%smallcredits("YOUR SPRITE BY", "green")
%smallcredits("YOUR SPRITE BY", "yellow")
%blankline()
@@ -535,7 +544,7 @@ CreditsLineBlank:
%blankline()
%blankline()
%smallcredits("MSU SUPPORT", "yellow")
%smallcredits("MSU SUPPORT", "green")
%blankline()
@@ -544,7 +553,7 @@ CreditsLineBlank:
%blankline()
%blankline()
%smallcredits("PALETTE SHUFFLER", "green")
%smallcredits("PALETTE SHUFFLER", "yellow")
%blankline()
@@ -553,7 +562,7 @@ CreditsLineBlank:
%blankline()
%blankline()
%smallcredits("WEBSITE LOGO", "yellow")
%smallcredits("WEBSITE LOGO", "green")
%blankline()
@@ -623,12 +632,6 @@ endif
%bigcredits("HTTPS://ALTTPR.COM/DISCORD")
%emptyline()
%emptyline()
%emptyline()
%emptyline()
%emptyline()
%emptyline()
%emptyline()
%emptyline()
@@ -752,14 +755,13 @@ endif
%blankline()
%bigcreditsleft("TOTAL MAP TIME")
%blankline()
%bigcreditsleft("TOTAL LAG TIME")
%blankline()
%blankline()
%blankline()
%blankline()
%blankline()
+7 -3
View File
@@ -263,6 +263,10 @@ dw $3D9E ; ~ ;
dw $3D98 ; , ;
dw $3D99 ; - ; $FB
dw $0000 ; ;
dw $0000 ; ;
dw $0000 ; ;
dw $0000 ; ;
; green ellipsis ;
dw $293F ; ; $FD
; green period
dw $29FE ; ; $FE
; yellow dot
dw $2DFA ; ; $FF
+49 -49
View File
@@ -25,8 +25,8 @@ PreparePointer:
LDY.w #$0000
RTL
; Regular stat: XXXX X00L LLLL LLLL BBBB SSSS CCC- ---- ---- ---- AAAA AAAA AAAA AAAA AAAA AAAA
; Time stat: XXXX X01L LLLL LLLL ---- ---- ---- ---- ---- ---- AAAA AAAA AAAA AAAA AAAA AAAA
; Regular stat: XXXX X00L LLLL LLLL BBBB SSSS CCC- ---- ---- ---- AAAA AAAA AAAA AAAA AAAA AAAA
; Time stat: XXXX X01L LLLL LLLL ---- ---- ---- ---- ---- ---- AAAA AAAA AAAA AAAA AAAA AAAA
; End of data: 1111 1111 1111 1111
; X X offset (measured in 8x8 tiles)
@@ -174,7 +174,7 @@ FindLine:
!FRAMES_PER_SECOND = 60
!FRAMES_PER_MINUTE = 60*60
!FRAMES_PER_HOUR = 60*60*60
!MAX_FRAME_COUNT = 59*60+59*60+59*60+99
!MAX_FRAME_COUNT = (99*60*60*60)+(59*60*60)+(59*60)+59
macro CountUnits(framesPerUnit, unitCounter)
STZ.b <unitCounter>
@@ -196,7 +196,7 @@ endmacro
!ColonOffset = $8A
!PeriodOffset = $4D
BlankCreditsTile = $883D
BlankCreditsTile = $3D88
RenderCreditsStatCounter:
PHB
@@ -498,45 +498,45 @@ RenderLineNumber:
RTS
LoadCreditsTiles:
JSL CopyFontToVRAM ; What we wrote over
JSL CopyFontToVRAM ; What we wrote over
REP #$10
LDA.b #$80 : STA.w VMAIN
LDA.b #$01 : STA.w DMAP0
LDA.b #$18 : STA.w BBAD0
REP #$10
LDA.b #$80 : STA.w VMAIN
LDA.b #$01 : STA.w DMAP0
LDA.b #$18 : STA.w BBAD0
; Item tiles
LDX.w #$8200 : STX.w VMADDL
LDA.b #FileSelectNewGraphics>>16 : STA.w A1B0
LDX.w #FileSelectNewGraphics : STX.w A1T0L
LDX.w #$0C00 : STX.w DAS0L
LDA.b #$01 : STA.w DMAENABLE
; Item tiles
LDX.w #$8200 : STX.w VMADDL
LDA.b #FileSelectNewGraphics>>16 : STA.w A1B0
LDX.w #FileSelectNewGraphics : STX.w A1T0L
LDX.w #$0C00 : STX.w DAS0L
LDA.b #$01 : STA.w DMAENABLE
; Small characters A-Z
LDX.w #$7F00 : STX.w VMADDL
LDA.b #SmallCharacters>>16 : STA.w A1B0
LDX.w #SmallCharacters : STX.w A1T0L
LDX.w #$0200 : STX.w DAS0L
LDA.b #$01 : STA.w DMAENABLE
; Small characters A-Z
LDX.w #$7F00 : STX.w VMADDL
LDA.b #SmallCharacters>>16 : STA.w A1B0
LDX.w #SmallCharacters : STX.w A1T0L
LDX.w #$0200 : STX.w DAS0L
LDA.b #$01 : STA.w DMAENABLE
SEP #$10
SEP #$10
RTL
LoadOverworldCreditsTiles:
JSL CopyFontToVRAM ; What we wrote over
REP #$10
JSL CopyFontToVRAM ; What we wrote over
REP #$10
; Small characters A-Z
LDA.b #$80 : STA.w VMAIN
LDA.b #$01 : STA.w DMAP0
LDA.b #$18 : STA.w BBAD0
LDA.b #SmallCharacters>>16 : STA.w A1B0
LDX.w #SmallCharacters : STX.w A1T0L
LDX.w #$0200 : STX.w DAS0L
LDX.w #$7F00 : STX.w VMADDL
LDA.b #$01 : STA.w DMAENABLE
; Small characters A-Z
LDA.b #$80 : STA.w VMAIN
LDA.b #$01 : STA.w DMAP0
LDA.b #$18 : STA.w BBAD0
LDA.b #SmallCharacters>>16 : STA.w A1B0
LDX.w #SmallCharacters : STX.w A1T0L
LDX.w #$0200 : STX.w DAS0L
LDX.w #$7F00 : STX.w VMADDL
LDA.b #$01 : STA.w DMAENABLE
SEP #$10
SEP #$10
RTL
CheckFontTable:
@@ -577,23 +577,23 @@ RTS
; Dialog Pointer Override
;--------------------------------------------------------------------------------
EndingSequenceTableOverride:
PHY
PHX
TYX
LDA.l EndingSequenceText, X
PLX
STA.w $1008, X
PLY
PHY
PHX
TYX
LDA.l EndingSequenceText, X
PLX
STA.w $1008, X
PLY
RTL
;--------------------------------------------------------------------------------
EndingSequenceTableLookupOverride:
PHX : PHB
PHK : PLB
TYX
LDA.l EndingSequenceText, X : AND.w #$00FF
ASL
TAY
LDA.w FontTable,Y
PLB : PLX
PHX : PHB
PHK : PLB
TYX
LDA.l EndingSequenceText, X : AND.w #$00FF
ASL A
TAY
LDA.w FontTable,Y
PLB : PLX
RTL
;--------------------------------------------------------------------------------
+5 -3
View File
@@ -30,8 +30,10 @@
!FAERIE_REVIVALS_Y = 361
!TOTAL_MENU_TIME_X = 19
!TOTAL_MENU_TIME_Y = 364
!TOTAL_MAP_TIME_X = 19
!TOTAL_MAP_TIME_Y = 367
!TOTAL_LAG_TIME_X = 19
!TOTAL_LAG_TIME_Y = 367
!TOTAL_LAG_TIME_Y = 370
!COLLECTION_RATE_X = 22
!COLLECTION_RATE_Y = 380
!TOTAL_TIME_X = 19
@@ -62,10 +64,10 @@ CreditsStats:
%AddStat(SaveQuitCounter, 0, 0, 08, 2, !SAVE_AND_QUITS_X, !SAVE_AND_QUITS_Y)
%AddStat(DeathCounter, 0, 0, 08, 2, !DEATHS_X, !DEATHS_Y)
%AddStat(FaerieRevivalCounter, 0, 0, 08, 3, !FAERIE_REVIVALS_X, !FAERIE_REVIVALS_Y)
%AddStat(MenuFrames, 1, 8, 32, 4, !TOTAL_MENU_TIME_X, !TOTAL_MENU_TIME_Y)
%AddStat(MenuFrames, 1, 0, 32, 4, !TOTAL_MENU_TIME_X, !TOTAL_MENU_TIME_Y)
%AddStat(MapFrames, 1, 0, 32, 4, !TOTAL_MAP_TIME_X, !TOTAL_MAP_TIME_Y)
%AddStat(LagTime, 1, 0, 32, 4, !TOTAL_LAG_TIME_X, !TOTAL_LAG_TIME_Y)
print "Collection Rate config: ", pc
warnpc $A39864
%AddStat(TotalItemCounter, 0, 0, 16, 3, !COLLECTION_RATE_X, !COLLECTION_RATE_Y)
%AddStat(NMIFrames, 1, 0, 32, 4, !TOTAL_TIME_X, !TOTAL_TIME_Y)
+1 -1
View File
@@ -101,7 +101,7 @@ CheckGanonHammerDamage:
LDA.w SpriteTypeTable, X : CMP.b #$D8 ; original behavior except ganon
RTL
+
LDA.l GanonVulnerabilityItem : CMP.b #$0C : BEQ .hammer_silvers
LDA.l GanonVulnerabilityItem : AND.b #$7F : CMP.b #$0C : BEQ .hammer_silvers
LDA.w SpriteTypeTable, X : CMP.b #$D6 ; original behavior
RTL
+4
View File
@@ -105,6 +105,10 @@ db $00
;--------------------------------------------------------------------------------
org $B0802E
GanonVulnerabilityItem:
; sn-i iiii
; s - immune to sword spins in phase 4
; n - immune to all items
; i - index of item vulnerability
db $00 ; $00 = default behavior (silver arrows)
;--------------------------------------------------------------------------------
org $B0902F
+1 -1
View File
@@ -368,7 +368,7 @@ FontProperties:
dw $8001, $06C0 ; C7 ; !
dw $8001, $02D0 ; C8 ; ,
dw $8001, $02B0 ; C9 ; -
dw $8000, $0000 ; CA ; 🡄"
dw $8000, $0000 ; CA ; 🡄
dw $8000, $0000 ; CB ; 🡆
dw $0000, $0000 ; CC ; Blank char
dw $8001, $02C0 ; CD ; .