Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Slowest solution ever, yet it works
- // ***********************************
- .pc=$032c
- .byte <init,>init
- .var extcounter = $20
- .var longloop = 184
- .var shrtloop = 125
- init:
- ldy #extcounter // 2 Y: outer loop, A:inner loop
- frameloop1:
- sec // 2 C=1 => Long wait (11061 cycles)
- ldx #longloop // 2
- frameloop2:
- bit NOP // 3 C=0 => Short wait (7511 cycles)
- bit NOP // 3
- sei // 2
- fx:
- stx $0420 // 4
- xtloop:
- txs // 2
- ldx #10 // 2
- !:
- dex // 2
- bne !- // 2
- tsx // 2
- dex // 2
- bne xtloop // 3
- bcc frameloop1 // 2/3
- ldx #shrtloop // 2 Here we're counting frames that's why
- adc #$fe // 2 we can skip A initialization (ie even/odd don't care)
- bcs !+ // 3/2
- lda #$d0 // 2
- dey // 2
- bne frameloop2+1 // 3
- sta fx+2 // 4 Nice solution Ruk!
- bcc fx // 3
- !:
- clc // 2
- bcc frameloop2 // 3
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement