nmoog, on Mon May 29, 2006 10:24 AM, said:
I don't know where in each frame (before the frame starts, after the vertical syncs, during the screen drawing etc) I should be doing:
* Joystick checking
* Horizontal Positioning
* vertical positioning
Joystick: best before positioning, since you want to react to the players input immediately.
Positioning: before the display kernel, after stuff like joystick, collision checking etc.
Actually, there is no strict pattern you have to follow. Just do it in some logical order. Later on, you might discover that reordering your code may make things easier.
Quote
In the horizontal positioning subroutine that Andrew listed it starts with "sta WSYNC" - does that mean I don't do the wsync at the end of the main loop as well?
The RESPx commands have to be timed exactly, so you need a WSYNC before. But that doesn't mean you have to do it inside the kernel. You can do everything whereever you want (except HMOVEs during vertical sync).