My first idea was to reserve a backbuffer in 65C02 memory which acts as screen memory and let the 6502 copy that memory in a neverending loop to the VIC. Something like this (untested, direkt brain to keyboard assembly )
Code: Select all
ForEver:
lda #<Buffer
sta $FA
lda #>Buffer
sta $FB
lda #<VICScreen
sta $FC
lda #>VICScreen
sta $FD
ldx #4
OuterLoop:
ldy #0
InnerLoop:
lda ($FA),y
sta ($FC),y
dey
bne InnerLoop
inc $FB
inc $FD
dex
bne OuterLoop
jmp ForEver
Thinking about my snippet, it would need another copy loop for the color ram, so maybe (or not so maybe but surely) this isn't the fastest solution.
Btw. your new memory layout sounds great with a maximum of shared memory and separate zeropages and stacks. I'm really looking forward to experiment with this board!
Edit: Just saw Eslapions post, especially
That reminds me that for transferring key or joystick input the 6502 must stash these infos in corresponding "mailbox slots" in the $2000 - $7FFF area so the 65C02 could poll for inputIt seems to me the 65C02 also doesn't have access to the 656X and 6522 registers so the MOS 6502 has to manage that for the 65C02.