psr

by perryman1138

Game: SMW

Description:

;psr - makes sprites rotate
!amount = #02
!yamount = #03

main:

;get second hand timer

;       LDA $0F33  ;second hand
;       AND #04
;       BEQ .zero

;get button press

LDA $15  ;pressed a
BIT #$80
BEQ .end
LDA #2
STA $19

        LDX $9F
        LDA $A0
        STA $9F
        LDA $A1
        STA $A0
        LDA $A2
        STA $A1
        LDA $A3
        STA $A2
        LDA $A4
        STA $A3
        LDA $A5
        STA $A4
        LDA $A6
        STA $A5
        LDA $A7
        STA $A6
        LDA $A8
        STA $A7
        STA $A8

	STX $A9
.end
RTL
        AND #80
	SBC #80
        BNE .zero

;xhigh:
        ;LDA $E0
        ;SBC !amount
        ;STA $E0

;LDA #9
;STA $0F33

        LDX $9F
        LDA $A0
        STA $9F
        LDA $A1
        STA $A0
	STX $A1
		
        ;LDA $A2
        ;STA $A1
        ;LDA $A3
        ;STA $A2
        ;LDA $A4
        ;STA $A3
        ;LDA $A5
        ;STA $A4
        ;LDA $A6
        ;STA $A5
        ;LDA $A7
        ;STA $A6
        ;LDA $A8
        ;STA $A7
        ;LDA $A9
        ;STA $A8
        ;STX $A9

.zero

.return
        RTL
back to listings