Hi qkumba,
> Oh, and as I understand things, your wait has the $C070 in the wrong place. $C070 resets the bit so it should be accessed after $C019 goes high, not before, otherwise there won't be another IRQ triggered because the existing one will still appear to be pending.
Hm, it rather seems different to me. With your...
1: bit $C019
bpl 1
bit $C070
rts
...the idea is: "When I come too late for the begin of the VBL, then don't wait at all because I have to catch up." but with my...
bit $C070
1: bit $C019
bpl 1
rts
...the idea is: "When I come too late for the begin of the VBL, then wait for the next one to make sure to have a full VBL cycle ahead of me on return."
If I had to choose one idea over the other without knowing the actual use case I'd opt for mine because the usual //e code...
1: bit $C019
bpl 1
2: bit $C019
bmi 2
rts
...behaves like my //c code so the behavior is more consistent across the different machines.
Or did I get something completely wrong?
Regards,
Oliver