Shadow Account closed
Registered: Apr 2002 Posts: 355 |
How can this code work???
I'm using a bit of FPP-code I wrote a while ago. It seems to work like a charm, but now when I look at it, I can't figure out why it is, because if I count correctly, my code per line is 20 cycles, while a badline should be 23, correct?
This means that my code should be badly out of sync after some lines, but somehow it seems to work!
lda #$32
!wait:
cmp $d012
bne !wait-
ldy #$03
!delay:
dey
bne !delay-
.for(var i=0;i<200;i++)
{
lda #$18+[[i+$32]&7]
sta $d011
ldy fpptable+i
lda fpporig,y
sta $d018
nop
}
(both fpptable and fpptable are page-aligned, non-ZP memory locations. I have no sprites enabled) |