Start Farore custom sprite, rearrange banks
This commit is contained in:
@@ -23,35 +23,40 @@ BRA $1C ; make it always branch, so map isn't loaded anymore
|
||||
; =============================================================================
|
||||
; long subroutine that is executed every frame
|
||||
org $068365
|
||||
JSL $3CA600 ; overwrite it (originally JSL $099F91)
|
||||
JSL LinkItem_SecretsBook ; overwrite it (originally JSL $099F91)
|
||||
|
||||
; =============================================================================
|
||||
; go to expanded space to write our routine
|
||||
; (keep EveryFrame.asm in mind for the right adresses)
|
||||
org $3CA600
|
||||
LDA $1B ; load data that tells us whether we are in a building or not
|
||||
AND #$01 ; are we in a building?
|
||||
BEQ END ; if not, don't use the x-button-secret
|
||||
; org $3CA600
|
||||
org $228000
|
||||
LinkItem_SecretsBook:
|
||||
{
|
||||
LDA $1B ; load data that tells us whether we are in a building or not
|
||||
AND #$01 ; are we in a building?
|
||||
BEQ .end ; if not, don't use the x-button-secret
|
||||
|
||||
; ----------
|
||||
LDA $7EF34D ; load book of mudora slot
|
||||
CMP #$01 ; do we have the moon pearl?
|
||||
BNE $0F ; if not, go to enable BG2
|
||||
LDA $F2 ; load unfiltered joypad 1 register (AXLR|????)
|
||||
AND #$50 ; delete all bits except those for X and R
|
||||
SEC ; set carry for the following subtraction
|
||||
SBC #$50 ; X+R button pressed? (if yes, zero flag is set)
|
||||
BNE $06 ; if not, go to enable BG2
|
||||
LDA $1C ; load layer flags
|
||||
AND #$FD ; disable BG2 (0xFD = 11111101)
|
||||
BRA $04 ; go to store layer flags
|
||||
LDA $1C ; load layer flags
|
||||
ORA #$02 ; enable BG2 (0x02 = 00000010)
|
||||
STA $1C ; store layer flags
|
||||
; ----------
|
||||
; ----------
|
||||
LDA $7EF34D ; load book of mudora slot
|
||||
CMP #$01 ; do we have the moon pearl?
|
||||
BNE $0F ; if not, go to enable BG2
|
||||
LDA $F2 ; load unfiltered joypad 1 register (AXLR|????)
|
||||
AND #$50 ; delete all bits except those for X and R
|
||||
SEC ; set carry for the following subtraction
|
||||
SBC #$50 ; X+R button pressed? (if yes, zero flag is set)
|
||||
BNE $06 ; if not, go to enable BG2
|
||||
LDA $1C ; load layer flags
|
||||
AND #$FD ; disable BG2 (0xFD = 11111101)
|
||||
BRA $04 ; go to store layer flags
|
||||
LDA $1C ; load layer flags
|
||||
ORA #$02 ; enable BG2 (0x02 = 00000010)
|
||||
STA $1C ; store layer flags
|
||||
; ----------
|
||||
|
||||
.end
|
||||
JSL $099F91 ; at least execute original code
|
||||
RTL
|
||||
}
|
||||
|
||||
END:
|
||||
JSL $099F91 ; at least execute original code
|
||||
RTL
|
||||
|
||||
; =============================================================================
|
||||
Reference in New Issue
Block a user