The only thing that would suppress all waiting is somehow being able to write to $2006.2 between dot 260 and 328, am I correct ?
This means a window of 22.66 CPU cycles, but since we have 6 extra cycles of jitter (carefully avoiding 7-cycle instructions), there's only 16.66 CPU cycles remaining for actually writing to $2006.
IRQ latency on CPU itself is 7 cycles , which leaves 9.66 cycles for the programm.... A "sta $2006" is 4 cycles; this leaves 5 cycles for something before, just enough for a ZP/stack store and an LDA #immediate which should be self-mod code with already the correct $2006/2 value.
So that might be worth a try ! But something tells me I'm probably forgeting some detail again which makes my idea moot like all the previous.
IRQ would be something like:
Code: Select all
IRQ : sta zp_save_a ; could as well be PHA also 3 cycles, but restoring would slower lda #$00 ; changed on the fly by means of selfmod code sta $2006 ; The crutial $2006/2 write that should happen just behind dot 328 in worst case stx selfmod_save_x+1 (....) ; logic here lda scolltableh, X sta $2006 ; write to $2006/1 lda scrolltablel,X sta IRQ+4 ; write to $2006/2 on next IRQ lda zp_save_a selfmod_save_x: ldx #$00 ; changed on the fly by means of selfmod code rti