rot

by perryman1138

Game: SMW

Description:

!amount = #02
!yamount = #03

main:

;get button press

LDA $15  ;pressed a or b
BIT #$80
BEQ .end
LDA #2
STA $19
JMP .routine
.end
RTL


.routine

LDA $14C8
BIT #$08
BEQ .j1 
LDA $9E
ADC #$01
STA $9E
.j1

LDA $14C9
BIT #$08
BEQ .j2
LDA $9F
ADC #$01
STA $9F
.j2

LDA $14CA
BIT #$08
BEQ .j3 
LDA $A0
ADC #$01
STA $A0
.j3

LDA $14CB
BIT #$08
BEQ .j4
LDA $A1
ADC #$01
STA $A1
.j4

LDA $14CC
BIT #$08
BEQ .j5
LDA $A2
ADC #$01
STA $A2
.j5

LDA $14CD
BIT #$08
BEQ .j6
LDA $A3
ADC #$01
STA $A3
.j6

LDA $14CE
BIT #$08
BEQ .j7
LDA $A4
ADC #$01
STA $A4
.j7

LDA $14CF
BIT #$08
BEQ .j8
LDA $A5
ADC #$01
STA $A5
.j8

LDA $14D0
BIT #$08
BEQ  .j9 
LDA $A6
ADC #$01
STA $A6
.j9

LDA $14D1
BIT #$08
BEQ .j10 
LDA $A7
ADC #$01
STA $A7
.j10

LDA $14D2
BIT #$08
BEQ .j11 
LDA $A8
ADC #$01
STA $A8
.j11

LDA $14D3
BIT #$08
BEQ .j12 
LDA $A9
ADC #$01
STA $A9
.j12


RTL
;        LDX $D8
;        LDA $D9
;        STA $D8
;        LDA $DA
;        STA $D9
;        LDA $DB
;        STA $DA
;        LDA $DC
;        STA $DB
;        LDA $DD
;        STA $DC
;        LDA $DE
;        STA $DD
;        LDA $DF
;        STA $DE
;        LDA $E0
;        STA $DF
        LDX $E0
        LDA $E1
        STA $E0
        LDA $E2
        STA $E1
        LDA $E3
        STA $E2
	STX $E3
	
;		LDX $E4
;        LDA $E5
;        STA $E4
;		LDA $E6
;        STA $E5
;		LDA $E7
;        STA $E6
;		LDA $E8
;        STA $E7
;		LDA $E9
;        STA $E8
;		LDA $EA
;        STA $E9
;		LDA $EB
;        STA $EA
;		LDA $EC
;        STA $EB
		LDX $ED
		LDA $ED
        STA $EC
		LDA $EE
        STA $ED
		LDA $EF
        STA $EE
		
	STX $EF

RTL
back to listings