peachhover
by circlefriendo
Game: smw
Description: SMB2 Princess Peach style hover
;****Princess Hover**** ; 7f9e04 Charges ; 7f9e05 Timer ; Refresh charge if grounded lda $72 beq refreshcharge lda $75 bne refreshcharge settimer: ; check falling lda $7d bpl test rtl test: ; if charge and A and falling lda $7f9e04 beq zerotimer lda $15 and #$80 ; A or B beq dectimer ; remove charge lda #$00 sta $7f9e04 ; set timer lda #$40 sta $7f9e05 zerotimer: ; if not charge and not A and falling lda $15 and #$80 ; A or B bne dectimer ; zero timer lda #$00 sta $7f9e05 dectimer: lda $7f9e05 beq end dec sta $7f9e05 lda #$00 sta $7d end: rtl refreshcharge: lda #$01 sta $7f9e04 rtlback to listings