About the bug, it's solved. That was ULA snow because I register was $FE and in 128K $C000 is switching between 2 pages (one of them is 7 for shadow and is contended). Solved with the help of Ast A Moore who suggest to change the I register to $3B.
About the bugs when launching on 48 BASIC on 128K machines, really there are no bugs. Just use Loader or 128K mode. I'll explain here. The engine has 3 types of machines. The loader detects the mode copy the routines and run.
Machine 0: 48K. Engine exploits floating bus (only 48K timings) for anti flickering. Good case
Machine 1: 128K. Engine exploits shadow video for anti flickering. Best case
Machine 2: Other. We don't have floating bus or shadow video (detected if paging is activated). Worst case
On machine 0 we have 26k cycles to repaint sprites, so we can manage 8 sprites without flickering. When detected the bottom bar disappears, because we paint a pattern to detect when electron beam paints this part of screen. This pattern is hidden with $00 attribute.
On machine 1 we have a whole frame (69k cycles), so we have more than 12 sprites without flickering.
On machine 2 we have only 14k cycles to repaint, that's 4-5 sprites without flickering.
The detection algorithm:
Code: Select all
IF paging available
machine 1
ELSE
IF bus floating
machine 0
ELSE
machine 2
END
END
The problem when you choose 48 BASIC on 128k machine (disable paging) is you have incorrect detection:
-On 128K detects machine 0, so the floating bus algorithm freezes because timings
-On +2A detects machine 2, so no freezes but less sprites without flickering
Machine 2 was thought to other non sinclair clones like Pentagon.