Up to now, the method works fine on an expanded QL with a Trump Card. It displays (reasonably) well on a "real" CRT, albeit with noticeable flickering (but that's just intrinsic to this method of display). LCD screens (and my SCART-to-HDMI converter) seem to "somewhat" work with that method, although some colors seem to be off. The best picture impression is on an old TV that has a SCART input and (even in "normal" modes) a very mushy picture.
My problem is: I don't seem to be able to make that method work reliably on a GC/SGC QL and I'm running out of possible fixes. I can't get a stable, synced picture, instead the picture is steady (and "allright") for about half a second, then the monitor (both LCD and TV) loses sync, starts rolling for some ms, then syncs again. This is obviously very annoying.
After thinking about the problem for a while, I came up with several possible reasons:
- The SGC is simply too fast and switches screen memory pages while the picture is still displaying (instead of doing it in the backporch). With my limited knowledge of display technology, I find that extremely improbable. Experimental delay loops inserted in the ISR change the behavior (and the amount of re-syncing), but still don't achieve a stable picture.
- The SGC does not run in sync with the QL's video. On an unexpanded QL, the CPU is halted when the video circuitry is displaying the picture. The SGC that has shadow video memory doesn't need to do that - I have thus inserted a screen memory write to the ISR (I guess the SGC CPU needs to wait in this case until the display memory is completely read by the video circuitry, and thus I could achieve sync) - This improved the situation greatly, but still does not result in a completely stable picture.
- The polling interrupt on the SGC is simply not running with reliable timing - Not very probable, but possible. No way to fix this if this should be the case
- My main loop that displays the picture waits for IPC keypresses in a loop - Could it be the IPC comms on the SGC is simply too slow (rather than too fast) or disables interrupts for too long that the picture cannot sync any more?
Tobias.