CoinPoser

by mrmeyham

Game: SMW

Description: Coins = Pose

; Load coin count into A
LDA $7E0DBF

; Don't do 2A through 2F if Mario doesn't have a cape (0x02)
CMP #$2A
BCS above2a
BRL notcaperange

above2a:
CMP #$30
BCC needscape
BRL notcaperange

needscape:
; Load powerup state into X
LDA $7E0019
CMP #$02
BNE end
BRL store

notcaperange:
; If 0x40 or 0x41, do nothing
CMP #$40
BEQ end
CMP #$41
BEQ end

; If 0x47 or above, do nothing
CMP #$47
BCC store
BRL end

; Pose state = Coin count
store:
LDA $7E0DBF
STA $7E13E0

end:
RTL
back to listings