At the ABUG event, Kees was demonstrating his Manic Miner Intro program that uses Palette Switching to get 8 colours on the screen. This worked perfectly in Atomulator 1.22, but didn't work on a real Atom. Which meant the Frame Sync (FS) signal is not being accurately emulated in Atomulator.
I've just looked at how Atomulator generates FS (called vbl in Atomulator and active high), and discovered the following in video.c:
Code: Select all
if (line == 200)
vbl = 1;
if (line == 261)
vbl = 0;
The value of line depends on the Colour Board setting, and is either 0..261 or 0..311. Lines 0..191 are the active region on the display.
I think there are two separate issues here:
1. On a real Atom, FS is asserted low for 32 lines, starting at the end of the active region of the display. So, the above code should switch vbl at lines 192 and 224.
2. When you enable the Colour Board option, Atomulator emulates an original Acorn ColourBoard which runs at 50Hz. Modern Colour solutions, like Phill's or the like the GODIL, run at 60Hz as it's just simpler and more compatible. I think it's worth having separate config options in Atomulator for PAL (50Hz)/NTSC (60Hz) and Mono/Colour.
I've just implemented the above, plus fixed some small debugger issues (mentioned earlier in this thread) and pushed a version 1.24 into github:https://github.com/hoglet67/Atomulator/ ... ulator.exe
I've tested this with the code we wrote at ABUG, and this gives identical results on Atomulator, an original Atom, and an Atom with the latest GODIL code (about to be pushed...)
Kees, your MMINTRO.ATM now fails in Atomulator in the same way it fails on a real Atom. You should be able to debug this more easily now.
For further testing, I'll try to write a program to accurately time FS using the 6522. I'm interested in whether there is much variability on real Atoms.