Code: Select all
; 10 SYS4109
*=$1001
BYTE $0B, $10, $0A, $00, $9E, $34, $31, $30, $39, $00, $00, $00
*=$100d
start lda #$7f
sta $912e
sta $912d
sta $911e
sync ldx #0
@0 cpx $9004
bne @0
ldx #1
@1 cpx $9004
bne @1
ldy #9
nop
bit $24
@2 ldx $9004
txa
bit $24
bit $24
ldx #21
@3 dex
bne @3
cmp $9004
bcs @4
dey
@4 bne @2
timers lda #$40
sta $911b
sta $912b
lda #$43
ldx #$42
sta $9116
sta $9126
ldy #6
@0 dey
bne @0
bit $24
stx $9125
ldy #10
@1 dey
bne @1
stx $9115
sei
lda #<irq
sta $314
lda #>irq
sta $315
lda #$c0
sta $912e
cli
rts
irq lda $9114
cmp #8
bcc @0
pha
pla
and #7
@0 cmp #4
bcc @1
bit $24
and #3
@1 cmp #2
bcs @2
@2 bcs @3
@3 lsr
bcs @4
@4 ldx #5
@5 dex
bne @5
effect ldy #16
lda $900f
tax
eor #$f7
@0 sta $900f
stx $900f
sta $900f
stx $900f
sta $900f
stx $900f
sta $900f
stx $900f
sta $900f
stx $900f
sta $900f
stx $900f
pha
pla
bit $24
nop
dey
bne @0
jmp $eabf