I've been "validating" the design by trying to port a game this week while I wait for my next board to arrive. I decided to port Tricky's Phoenix clone. This has taken me down the rabbit hole of scrolling and vertical rupture...Thanks to RTW's very helpful article I've now got my head round this and got smooth vertical scrolling working. However it has thrown up a few differences and design issues that have led to me improving a few things.
On this machine PB6 was free on the system VIA so I've hooked that up to the CRTC DISEN signal. This can be set up to decrement Timer 2 at _the end_ of an active video line (not border lines) and palette swapping or vertical rupture timing can be run from this.
However, I'm not sure DISEN is the right signal...maybe horizontal sync would be better? I may feed this through the VIDC on the final board and allow user selection of 1MHz, 2MHz, Hsync, Vsync, DISEN.
Because the palette can be switched between banks easily the smooth top/bottom borders of the scrolling area are achieved by blanking the palette rather than in RTW's original method of adding a phoney CRT cycle at the top, this is a little easier and uses fewer cycles.
It still took me a good while to get my head round it!
I've made a quick video of a scrolling picture (1 pixel each CRT frame) with a 256x216 scrolling area and a 256x16 fixed area each with different palettes.https://youtu.be/uG8ckUhwWL0