xucaen said:
You control the TV yes. That's one of the coolest featrures of the VCS. It doesn't matter how you begin your loop, because after the first VSYNC sequence - you're synced. The order does matter though:
NextScreen
VSYNC
VBLANK
Kernel
Overscan
JMP NextScreen
is as fine as
NextScreen
VBLANK
Kernel
Overscan
VSYNC
JMP NextScreen
The layout I'd personally recommend though is starting the Kernel code right after the first ORG F000:
ORG $F000 DoKernel Kernel ; Kernel Code here JMP Overscan CartridgeEntry CLEAN_START Init Code ; Initialisation code here NextScreen VSYNC VBLANK ; VBLANK calculations here JMP DoKernel Overscan ; Overscan calculations here JMP NextScreen Subroutines; Subroutines and data fill the rest Data ; ORG FFFC .word CartridgeEntry
That way, with your kernel code being on top of the ROM space, it does not get shifted around, thus it's safe from all timing issues like crossing pages.
xucaen said:
Precisely. The VBLANK register for example will switch the electron beam on and off immediately, wherever you want.
Greetings,
Manuel















