I'm pausing for breath at this point, because that last bug-hunt to find the cursor drawing error really sapped my enthusiasm - although I finally found the problem and fixed it, I ended-up being not entirely happy with the way the code to manage the cursor works, or in fact with the way the keyboard handler is turning out. In both cases, the core logic is fine, but I've found a number of places where edge-case situations are forcing me to tweak things that I don't really want to.
So I've designed a new procedure to handle all the user-interaction stuff between screen and keyboard, using a queued-message mechanism to stage events in a predictable way rather than try to make the IRQ handler be able to accomodate possible race conditions and/or situations where things happen in a sequence I didn't foresee. I'm writing code to implement the message queue as a series of small test modules away from the VIC++ core, and once it behaves the way I expect I'll rip a sizeable chunk of logic out of the IRQ routine and drop the queue query call into it instead. Equally, the cursor handler will change to an autonomous routine that sends messages to the queue - as will the keyboard handler.
Stay tuned!
No comments:
Post a Comment