wolf mask shovel code, zora mask labels
This commit is contained in:
@@ -1,3 +1,7 @@
|
|||||||
|
; no glove color
|
||||||
|
org $0DEE24
|
||||||
|
db $80
|
||||||
|
|
||||||
org $09912C
|
org $09912C
|
||||||
AddTransformationCloud:
|
AddTransformationCloud:
|
||||||
|
|
||||||
@@ -7,7 +11,6 @@ Link_CheckNewY_ButtonPress:
|
|||||||
org $078028
|
org $078028
|
||||||
Player_DoSfx2:
|
Player_DoSfx2:
|
||||||
|
|
||||||
|
|
||||||
org $278000
|
org $278000
|
||||||
StartupMasks:
|
StartupMasks:
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,6 +1,51 @@
|
|||||||
; =============================================================================
|
; =============================================================================
|
||||||
; Wolf Mask
|
; Wolf Mask
|
||||||
|
|
||||||
|
; =============================================================================
|
||||||
|
|
||||||
|
org $098F5B
|
||||||
|
AddShovelDirt:
|
||||||
|
|
||||||
|
org $098C73
|
||||||
|
AddRecoveredFlute:
|
||||||
|
|
||||||
|
org $098024
|
||||||
|
AddHitStars:
|
||||||
|
|
||||||
|
org $1DFD5C
|
||||||
|
DiggingGameGuy_AttemptPrizeSpawn:
|
||||||
|
|
||||||
|
|
||||||
|
; =============================================================================
|
||||||
|
|
||||||
|
org $07D077
|
||||||
|
Link_ShovelTileDetect:
|
||||||
|
|
||||||
|
org $07F8D1
|
||||||
|
Link_ShovelTileDetect_Long:
|
||||||
|
{
|
||||||
|
PHB : PHK : PLB
|
||||||
|
JSR Link_ShovelTileDetect
|
||||||
|
PLB
|
||||||
|
RTL
|
||||||
|
}
|
||||||
|
|
||||||
|
org $07802F
|
||||||
|
Player_DoSfx3:
|
||||||
|
|
||||||
|
org $07A772
|
||||||
|
Player_DoSfx3_Long:
|
||||||
|
{
|
||||||
|
PHB : PHK : PLB
|
||||||
|
JSR Player_DoSfx3
|
||||||
|
PLB
|
||||||
|
RTL
|
||||||
|
}
|
||||||
|
|
||||||
|
print "Next address for jump in bank07: ", pc
|
||||||
|
|
||||||
|
; =============================================================================
|
||||||
|
|
||||||
org $07A3DB
|
org $07A3DB
|
||||||
LinkItem_Flute:
|
LinkItem_Flute:
|
||||||
|
|
||||||
@@ -21,6 +66,7 @@ LinkItem_ShovelAndFlute:
|
|||||||
org $07A32C
|
org $07A32C
|
||||||
LinkItem_WolfMask:
|
LinkItem_WolfMask:
|
||||||
{
|
{
|
||||||
|
JSL LinkItem_UsingWolfMask
|
||||||
JSR Link_CheckNewY_ButtonPress : BCC .return
|
JSR Link_CheckNewY_ButtonPress : BCC .return
|
||||||
LDA $3A : AND.b #$BF : STA $3A ; clear the Y button state
|
LDA $3A : AND.b #$BF : STA $3A ; clear the Y button state
|
||||||
|
|
||||||
@@ -76,3 +122,155 @@ WolfPalette:
|
|||||||
dw #$7616, #$0000
|
dw #$7616, #$0000
|
||||||
|
|
||||||
; =============================================================================
|
; =============================================================================
|
||||||
|
|
||||||
|
LinkItem_Return:
|
||||||
|
{
|
||||||
|
RTL
|
||||||
|
}
|
||||||
|
|
||||||
|
print pc
|
||||||
|
LinkItem_UsingWolfMask:
|
||||||
|
{
|
||||||
|
; Shovel item code
|
||||||
|
|
||||||
|
BIT $3A : BVS .in_use
|
||||||
|
LDA $6C : BNE LinkItem_Return ; .BRANCH_$3A312 ; (RTS, BASICALLY)
|
||||||
|
|
||||||
|
LDA $F2 ; load unfiltered joypad 1 register (AXLR|????)
|
||||||
|
CMP #$10 ; R button pressed?
|
||||||
|
BEQ $03 ; if yes, branch behind the jump that leads to the end and load items instead
|
||||||
|
JMP LinkItem_Return
|
||||||
|
; JSR Link_CheckNewY_ButtonPress : BCC LinkItem_Return ;.BRANCH_$3A312
|
||||||
|
|
||||||
|
LDA $A320 : STA $3D
|
||||||
|
|
||||||
|
STZ $030D
|
||||||
|
STZ $0300
|
||||||
|
|
||||||
|
LDA.b #$01 : STA $037A
|
||||||
|
LDA.b #$01 : TSB $50
|
||||||
|
STZ $2E
|
||||||
|
|
||||||
|
.in_use
|
||||||
|
|
||||||
|
JSR HaltLinkWhenUsingItems ; $AE65 ; $3AE65 IN ROM
|
||||||
|
|
||||||
|
LDA $67 : AND.b #$F0 : STA $67
|
||||||
|
|
||||||
|
DEC $3D : BMI .continue
|
||||||
|
|
||||||
|
RTL
|
||||||
|
|
||||||
|
.continue
|
||||||
|
|
||||||
|
LDX $030D : INX : STX $030D
|
||||||
|
|
||||||
|
LDA $A320, X : STA $3D
|
||||||
|
|
||||||
|
LDA $A326, X : STA $0300 : CMP.b #$01 : BNE .BRANCH_GAMMA
|
||||||
|
|
||||||
|
LDY.b #$02
|
||||||
|
|
||||||
|
PHX
|
||||||
|
|
||||||
|
; JSR $D077 ; $3D077 IN ROM
|
||||||
|
JSL Link_ShovelTileDetect_Long
|
||||||
|
|
||||||
|
PLX
|
||||||
|
|
||||||
|
LDA $04B2 : BEQ .not_flute_spot
|
||||||
|
|
||||||
|
LDA.b #$1B : JSL Player_DoSfx3_Long
|
||||||
|
|
||||||
|
PHX
|
||||||
|
|
||||||
|
; Add recovered flute (from digging). Interesting...
|
||||||
|
LDY.b #$00
|
||||||
|
LDA.b #$36
|
||||||
|
|
||||||
|
JSL AddRecoveredFlute
|
||||||
|
|
||||||
|
PLX
|
||||||
|
|
||||||
|
.not_flute_spot
|
||||||
|
|
||||||
|
LDA $0357 : ORA $035B : AND.b #$01 : BNE .dont_clink
|
||||||
|
|
||||||
|
PHX
|
||||||
|
|
||||||
|
LDY.b #$00
|
||||||
|
LDA.b #$16
|
||||||
|
|
||||||
|
JSL AddHitStars
|
||||||
|
|
||||||
|
PLX
|
||||||
|
|
||||||
|
LDA.b #$05 : JSL Player_DoSfx2
|
||||||
|
|
||||||
|
BRA .finish_up
|
||||||
|
|
||||||
|
.dont_clink
|
||||||
|
|
||||||
|
PHX
|
||||||
|
|
||||||
|
; Add shovel dirt? what? I thought these were aftermath tiles
|
||||||
|
LDY.b #$00
|
||||||
|
LDA.b #$17
|
||||||
|
|
||||||
|
JSL AddShovelDirt
|
||||||
|
|
||||||
|
LDA $03FC : BEQ .digging_game_inactive
|
||||||
|
|
||||||
|
JSL DiggingGameGuy_AttemptPrizeSpawn
|
||||||
|
|
||||||
|
.digging_game_inactive
|
||||||
|
|
||||||
|
PLX
|
||||||
|
|
||||||
|
LDA.b #$12 : JSL Player_DoSfx2
|
||||||
|
|
||||||
|
.finish_up
|
||||||
|
|
||||||
|
CPX.b #$03 : BNE .return
|
||||||
|
|
||||||
|
STZ $030D
|
||||||
|
STZ $0300
|
||||||
|
|
||||||
|
LDA $3A : AND.b #$80 : STA $3A
|
||||||
|
|
||||||
|
STZ $037A
|
||||||
|
|
||||||
|
LDA $50 : AND.b #$FE : STA $50
|
||||||
|
|
||||||
|
.return
|
||||||
|
|
||||||
|
RTL
|
||||||
|
}
|
||||||
|
|
||||||
|
; ==============================================================================
|
||||||
|
|
||||||
|
; *$3AE65-$3AE87 LOCAL
|
||||||
|
HaltLinkWhenUsingItems:
|
||||||
|
{
|
||||||
|
LDA $AD : CMP.b #$02 : BNE .BRANCH_ALPHA
|
||||||
|
|
||||||
|
LDA $0322 : AND.b #$03 : CMP.b #$03 : BNE .BRANCH_ALPHA
|
||||||
|
|
||||||
|
STZ $30
|
||||||
|
STZ $31
|
||||||
|
STZ $67
|
||||||
|
STZ $2A
|
||||||
|
STZ $2B
|
||||||
|
STZ $6B
|
||||||
|
|
||||||
|
.BRANCH_ALPHA:
|
||||||
|
|
||||||
|
; Cane of Somaria transit lines?
|
||||||
|
LDA $02F5 : BEQ .BRANCH_BETA
|
||||||
|
|
||||||
|
STZ $67
|
||||||
|
|
||||||
|
.BRANCH_BETA:
|
||||||
|
|
||||||
|
RTS
|
||||||
|
}
|
||||||
@@ -63,7 +63,7 @@ zora_palette:
|
|||||||
|
|
||||||
; =============================================================================
|
; =============================================================================
|
||||||
|
|
||||||
LinkItem_UsingZoraMask:
|
; LinkItem_UsingZoraMask:
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -75,19 +75,23 @@ LinkItem_UsingZoraMask:
|
|||||||
; =============================================================================
|
; =============================================================================
|
||||||
; 22E0E0
|
; 22E0E0
|
||||||
|
|
||||||
|
FairyFlippers_E0E0:
|
||||||
{
|
{
|
||||||
LDA $1B
|
LDA $1B ; 1 if the player is in indoors and 0 otherwise.
|
||||||
BNE $22E0F7
|
BNE .alpha ; we are outdoors
|
||||||
LDA $7F500E
|
|
||||||
|
LDA $7F500E ; are we currently underwater?
|
||||||
CMP #$01
|
CMP #$01
|
||||||
BNE $22E0F7
|
BNE .alpha ; we are not underwater
|
||||||
|
|
||||||
LDA #$01
|
LDA #$01
|
||||||
STA $55
|
STA $55 ; activate cape flag (invisible, invincible)
|
||||||
STZ $5D
|
STZ $5D ; reset player to ground state
|
||||||
LDA #$08
|
LDA #$08
|
||||||
STA $5E
|
STA $5E ; set the player speed
|
||||||
RTL
|
RTL
|
||||||
;-------
|
;-------
|
||||||
|
.alpha
|
||||||
LDA #$01
|
LDA #$01
|
||||||
STA $4D
|
STA $4D
|
||||||
RTL
|
RTL
|
||||||
@@ -96,6 +100,7 @@ LinkItem_UsingZoraMask:
|
|||||||
; =============================================================================
|
; =============================================================================
|
||||||
; 22E100
|
; 22E100
|
||||||
|
|
||||||
|
FairyFlippers_E100:
|
||||||
{
|
{
|
||||||
LDA $2F ; The direction the player is currently facing
|
LDA $2F ; The direction the player is currently facing
|
||||||
STA $0323 ; Mirror of $2F
|
STA $0323 ; Mirror of $2F
|
||||||
@@ -106,7 +111,7 @@ LinkItem_UsingZoraMask:
|
|||||||
NOP
|
NOP
|
||||||
LDA $0345 ; Set to 1 when we are in deep water, 0 otherwise
|
LDA $0345 ; Set to 1 when we are in deep water, 0 otherwise
|
||||||
CMP #$01 ; Are we in deep water?
|
CMP #$01 ; Are we in deep water?
|
||||||
BEQ $22E120
|
BEQ FairyFlippers_E120
|
||||||
LDA $7F500E
|
LDA $7F500E
|
||||||
CMP #$01
|
CMP #$01
|
||||||
BEQ $22E11C
|
BEQ $22E11C
|
||||||
@@ -116,6 +121,7 @@ LinkItem_UsingZoraMask:
|
|||||||
; =============================================================================
|
; =============================================================================
|
||||||
; 22E120
|
; 22E120
|
||||||
|
|
||||||
|
FairyFlippers_E120:
|
||||||
{
|
{
|
||||||
LDA $F0 ; Joypad 1 Register
|
LDA $F0 ; Joypad 1 Register
|
||||||
CMP #$40
|
CMP #$40
|
||||||
@@ -146,6 +152,7 @@ LinkItem_UsingZoraMask:
|
|||||||
; =============================================================================
|
; =============================================================================
|
||||||
; 22E17D
|
; 22E17D
|
||||||
|
|
||||||
|
FairyFlippers_E17D:
|
||||||
{
|
{
|
||||||
LDA $7F500E
|
LDA $7F500E
|
||||||
CMP #$00
|
CMP #$00
|
||||||
@@ -186,6 +193,7 @@ LinkItem_UsingZoraMask:
|
|||||||
; Returns to 3C30B below
|
; Returns to 3C30B below
|
||||||
; Noted changes added
|
; Noted changes added
|
||||||
|
|
||||||
|
FairyFlippers_SetFlipperAbilities:
|
||||||
{
|
{
|
||||||
LDA $1B ; Flag set to 1 when indoors, 0 otherwise
|
LDA $1B ; Flag set to 1 when indoors, 0 otherwise
|
||||||
BNE $22E1F7
|
BNE $22E1F7
|
||||||
@@ -209,6 +217,7 @@ LinkItem_UsingZoraMask:
|
|||||||
; =============================================================================
|
; =============================================================================
|
||||||
; *$3C2C3-$3C30B LOCAL
|
; *$3C2C3-$3C30B LOCAL
|
||||||
|
|
||||||
|
Vanilla_UntitledRoutine:
|
||||||
{
|
{
|
||||||
LDA $1B : BNE .alpha ; Set to 1 if indoors, 0 otherwise
|
LDA $1B : BNE .alpha ; Set to 1 if indoors, 0 otherwise
|
||||||
LDX #$02
|
LDX #$02
|
||||||
@@ -251,6 +260,7 @@ LinkItem_UsingZoraMask:
|
|||||||
; =============================================================================
|
; =============================================================================
|
||||||
; 22E260
|
; 22E260
|
||||||
|
|
||||||
|
FairyFlippers_E260:
|
||||||
{
|
{
|
||||||
LDA $7EF33C ; fairy flippers save ram
|
LDA $7EF33C ; fairy flippers save ram
|
||||||
AND #$00FF
|
AND #$00FF
|
||||||
@@ -282,7 +292,7 @@ LinkItem_UsingZoraMask:
|
|||||||
; Observed behavior of preserving the direction link was facing when diving
|
; Observed behavior of preserving the direction link was facing when diving
|
||||||
; E.g. face left, dive, turn right underwater, and resurface facing left
|
; E.g. face left, dive, turn right underwater, and resurface facing left
|
||||||
|
|
||||||
FairyFlipper_Prepare:
|
FairyFlippers_Prepare:
|
||||||
{
|
{
|
||||||
JSR FairyFlippers_Main ; $E530
|
JSR FairyFlippers_Main ; $E530
|
||||||
JSL FairyFlippers_HandleMagic ; $22E670
|
JSL FairyFlippers_HandleMagic ; $22E670
|
||||||
@@ -303,7 +313,8 @@ FairyFlipper_Prepare:
|
|||||||
|
|
||||||
LDA #$40
|
LDA #$40
|
||||||
STA $F0
|
STA $F0
|
||||||
JMP $079657 ; Apart of LinkState_Swimming
|
; TODO: RESTORE ME
|
||||||
|
; JMP $079657 ; Apart of LinkState_Swimming
|
||||||
|
|
||||||
.gamma
|
.gamma
|
||||||
LDA $F0 ; Joypad 1 Register (preserves previous press)
|
LDA $F0 ; Joypad 1 Register (preserves previous press)
|
||||||
@@ -322,12 +333,14 @@ FairyFlippers_RestoreControlHandler:
|
|||||||
LDA $5D ; Player Handler or "State"
|
LDA $5D ; Player Handler or "State"
|
||||||
ASL
|
ASL
|
||||||
TAX
|
TAX
|
||||||
JMP $078106 ; Link_ControlHandler Jump Table Statement
|
; TODO: RESTORE ME
|
||||||
|
; JMP $078106 ; Link_ControlHandler Jump Table Statement
|
||||||
}
|
}
|
||||||
|
|
||||||
; =============================================================================
|
; =============================================================================
|
||||||
; 22E300
|
; 22E300
|
||||||
|
|
||||||
|
FairyFlippers_E300:
|
||||||
{
|
{
|
||||||
LDA #$00
|
LDA #$00
|
||||||
STA $5D ; Player Handler or "State"
|
STA $5D ; Player Handler or "State"
|
||||||
@@ -342,6 +355,7 @@ FairyFlippers_RestoreControlHandler:
|
|||||||
; =============================================================================
|
; =============================================================================
|
||||||
; 22E340
|
; 22E340
|
||||||
|
|
||||||
|
FairyFlippers_E340:
|
||||||
{
|
{
|
||||||
LDA $1B ; 1 if indoors, 0 otherwise
|
LDA $1B ; 1 if indoors, 0 otherwise
|
||||||
BEQ $22E34E
|
BEQ $22E34E
|
||||||
@@ -359,7 +373,7 @@ FairyFlippers_RestoreControlHandler:
|
|||||||
; =============================================================================
|
; =============================================================================
|
||||||
; 22E460
|
; 22E460
|
||||||
|
|
||||||
FairyFlippers_Untitled:
|
FairyFlippers_E460:
|
||||||
{
|
{
|
||||||
LDA $02E4 ; If flag nonzero, Link cannot move
|
LDA $02E4 ; If flag nonzero, Link cannot move
|
||||||
AND #$00FF
|
AND #$00FF
|
||||||
@@ -385,6 +399,7 @@ FairyFlippers_Untitled:
|
|||||||
; =============================================================================
|
; =============================================================================
|
||||||
; 22E500
|
; 22E500
|
||||||
|
|
||||||
|
FairyFlippers_E500:
|
||||||
{
|
{
|
||||||
CMP #$5A
|
CMP #$5A
|
||||||
BEQ $22E507
|
BEQ $22E507
|
||||||
@@ -428,6 +443,7 @@ FairyFlippers_Main:
|
|||||||
; =============================================================================
|
; =============================================================================
|
||||||
; 22E5F0
|
; 22E5F0
|
||||||
|
|
||||||
|
FairyFlippers_E5F0:
|
||||||
{
|
{
|
||||||
LDA $7EF33C
|
LDA $7EF33C
|
||||||
BNE $22E5F7
|
BNE $22E5F7
|
||||||
@@ -446,6 +462,7 @@ FairyFlippers_Main:
|
|||||||
|
|
||||||
; Referenced at: 0D:E507
|
; Referenced at: 0D:E507
|
||||||
|
|
||||||
|
FairyFlippers_E600:
|
||||||
{
|
{
|
||||||
LDA $7EF34A
|
LDA $7EF34A
|
||||||
AND #$00FF
|
AND #$00FF
|
||||||
@@ -487,7 +504,8 @@ FairyFlippers_HandleMagic:
|
|||||||
BNE $22E688 ; branch if != 0
|
BNE $22E688 ; branch if != 0
|
||||||
LDA #$3C
|
LDA #$3C
|
||||||
STA $012E
|
STA $012E
|
||||||
JMP $22E141
|
; TODO: RESTORE ME
|
||||||
|
; JMP $22E141
|
||||||
LDA $7F500D ; load timer
|
LDA $7F500D ; load timer
|
||||||
BNE $22E69E ; branch if != 0
|
BNE $22E69E ; branch if != 0
|
||||||
LDA #$18
|
LDA #$18
|
||||||
@@ -505,6 +523,7 @@ FairyFlippers_HandleMagic:
|
|||||||
; =============================================================================
|
; =============================================================================
|
||||||
; 22E700
|
; 22E700
|
||||||
|
|
||||||
|
FairyFlippers_E700:
|
||||||
{
|
{
|
||||||
STA $F6
|
STA $F6
|
||||||
STY $FA
|
STY $FA
|
||||||
@@ -527,6 +546,7 @@ FairyFlippers_HandleMagic:
|
|||||||
; =============================================================================
|
; =============================================================================
|
||||||
; 22E760
|
; 22E760
|
||||||
|
|
||||||
|
FairyFlippers_E760:
|
||||||
{
|
{
|
||||||
LDA #$0E10
|
LDA #$0E10
|
||||||
STA $7EE000
|
STA $7EE000
|
||||||
@@ -539,6 +559,7 @@ FairyFlippers_HandleMagic:
|
|||||||
; 22E780
|
; 22E780
|
||||||
; Jesucristo...
|
; Jesucristo...
|
||||||
|
|
||||||
|
FairyFlippers_E780:
|
||||||
{
|
{
|
||||||
REP #$30
|
REP #$30
|
||||||
LDY #$0000
|
LDY #$0000
|
||||||
@@ -624,6 +645,7 @@ FairyFlippers_HandleMagic:
|
|||||||
; =============================================================================
|
; =============================================================================
|
||||||
; 22E830
|
; 22E830
|
||||||
|
|
||||||
|
FairyFlippers_E830:
|
||||||
{
|
{
|
||||||
ADC #$0020
|
ADC #$0020
|
||||||
STA $1CD0
|
STA $1CD0
|
||||||
|
|||||||
Reference in New Issue
Block a user