@voxel I wonder if someone's made an #NES subroutine that runs outside VBlank, reads arbitrary bytes and generates a program in RAM that writes those bytes to $2007 as fast as possible. For example, the subroutine would convert bytes $00 $10 $20 $00 $80 $20 into this program:
lda #$00
sta $2007
ldx #$10
stx $2007
ldy #$20
sty $2007
sta $2007 ; LDA not necessary
ldx #$80
stx $2007
sty $2007 ; LDY not necessary