Oh, that's really nice stuff, thanks!
However I have a few questions:
The example uses an extract of umc (a video mode calculator) and is more of a general showcase on how to set any video mode the FireBee is capable of.
1. So assuming I keep the FB register writes, can I take values from TOS4 (HHT, VFT etc) and omit the calculations?
2. Why isn't this part of EmuTOS? ScummVM currently just calls VsetMode(BPS8 / BPS8C) (Videl / SuperVidel = chunky 8-bit) and that's how I envision my work for the FireBee as well. :) Also, your fVDI driver code would suddenly become trivial.
The code does fine with 640x480 (8 bit chunky as requested), 320x240 does work as well, but my monitor hardly syncs on it.
3. I find this very surprising, 320x240 is nothing but double pixels/lines, there's no reason why any of the modeline parameters should drastically change, especially those affecting frequency, polarity etc. Maybe you can try to calculate 640x480 modeline and set Videl registers for 320x240?