It's good that George and Ivan have joined the discussion, I'm not sure I could cope with all the questions...
About the ULA "cache" question :
- the ULA does maintain a state : current video mode (TEXT/HIRES), frequency (50Hz/60Hz), current address in memory, normal/alt characters, single/double height, paper, ink...
But as Ivan said, you shouldn't be able to switch screens between the two memory cycles of the ULA in TEXT mode, because your switching action occurs during the third memory cycle (the cpu one)... (however, an oscilloscope would be needed to confirm that the VIA's PB6 output is immediately reflected)
Regarding how accurate the synchronization is :
- on a simple demo (that switches between two images at 60 Hz), the two images are correctly displayed one on top of the other, ie. like a single image but with a noticeable flickering on a CRT monitor due to that each image is displayed only at 30 Hz. This allows to reduce the colour proximity constraints of course, and have more colours due to remanency...
- I don't know if this is due to my CRT monitor, I've noticed that 'sometimes' (every 20 seconds or so), one of the image might be shifted one pixel horizontally... It might be due to my monitor which does not like 60 Hz too much, so I should check at 50 Hz too, and on other monitors...
- I don't think that it would be possible to have the same kind of doubled resolution that existed on the Atari ST, by having the two frames vertically shifted a little bit... on the other hand, if you can synchronize with the *horizontal* retrace, then you can mix two screen texts for a doubled semi-graphics resolution...
Regarding Atmos mode vs Telestrat mode : there isn't really a Telestrat hardware mode... There are two eproms, a manual rear switch and PB5 that work together or not :
- two positions of the rear switch select one of the two 16K parts of a 27C256 eprom. For these two switch positions, PB5 has no effect, so it's a good idea to have Atmos/Oric-1 roms in these two 16K parts and run Atmos software with near 100% compatibility (the only compatibility issues might come from the different processor (unofficial Nmos 6502 opcodes not supported for example) or if some software inadvertently toggles the PB6 output (which you would hear on an Atmos because of the relay)) : the bundled Atmos and Pravetz roms have been patched so that they don't toggle PB6.
- two positions of the rear switch select one of the two 32K parts of a 27C512 eprom. For these two switch positions, PB5 further select a 16K part in this 27C512 eprom, so all the so-called "PB5-roms" are usable. The Telemon software has been patched so that it uses PB5 in order to switch rom banks, and patched so that it doesn't toggle PB6.
- it's not a good idea to move the rear switch while the AtmoStrat is running, even if you make sure that the cpu is currently executing code in ram... Voltage pikes might occur and freeze the computer...
Detecting the AtmoStrat:
- you can detect the type of cpu, but this doesn't mean you run on an AtmoStrat (there are some people having 65816 on Atmos or Telestrat)...
- you can detect the machine has 256 KB ram, but this doesn't make it for sure it's an AtmoStrat either...
- you can visually detect the machine has two switchable video pages, but this isn't fully automatic...
So, that's not so easy... (if it was so distinguishable from an Atmos, it wouldn't be so compatible)
@Godzil: RAM refreshing
- whatever the currently selected video page, the ULA increments memory addresses in a regular pattern : the fact that the lower 8-bit part of the address iterates over all 256 combinations is enough to refresh the whole 256 KB (because the DRAM bits are organized in a rectangular 256 x 1024 grid)