It always takes much more time than expected, but I believe I have something that should bring back video for a system that runs at 12.5 MHz: ROM v3y (ROM image attached to this post).marcelk wrote: ↑14 Apr 2019, 07:21 It shouldn't be too hard to make a custom ROM that sends out more pixels per line. If not from RAM, they could be black, giving only half a screen. Maybe even squeeze some vCPU time in there. I can look into this during the Easter weekend. This would bring back the horizontal pulse frequency into a range the monitor can accept.
ROM v3y is based on standard ROM v3. It adds 200 cycles to every scanline by running vCPU for that duration. This brings back the horizontal sync frequency to 31.25 kHz.
The display becomes just the left half of the screen at 160x120 pixels, with a pixel aspect ratio of 2:1. So it's obviously suitable for experimentation only. The good news is that pixel lines can now spend half of their time running application code. The extra vCPU power is very noticeable in BASIC programs and in Mandelbrot.
A small technical detail: retro scanlines (and invisible vertical blank lines) invoke vCPU twice, instead of just once for a longer combined period. This gives a small overhead, but is needed to prevent overflow of the signed 8-bit vTicks variable. (vTicks tracks the remaining time for vCPU in the current time slice.) Some refactoring was needed to keep the video code inside their pages due to this. It barely fits now.
This is still not the "proper" way to do it, because the horizontal porches and pulse are still at 50% of their nominal duration. But it is a reasonable shot and I give it a fair chance that VGA monitors accept the signal again.
There are many other ways do to this. For example doubling every pixel. Or streaming 256 pixels instead of 160. Or even streaming 320 pixels if you don't mind the repetition when wrapping around the RAM page boundary. But that all requires more reshuffling in code page 2, because that currently doesn't have room for a longer pixel burst. It can be done, but maybe not worth it (yet).
Caveat emptor: I tested it in emulation in gtemu.c and in Phil's Javascript emulator with the clock cranked up. On hardware just with the scope (with the slower standard crystal) where the video sync signal looks stable when pressing buttons and changing modes. That's an indication there are no major errors in timing consistency. So I'm happy to ship a ROM for testing. I can only test it on fast hardware myself after I've made my 74F-based build, and that isn't scheduled yet.
Edit: I figured I could just as well put the emulated 12.5 MHz Javascript version online, so you can experience the speedup without soldering: https://marcelk.net/2019-04-20/. Mandelbrot renders in just under 3.5 minutes, in the default video mode(!), vs. almost 19 minutes on the stock system. A speedup of 550% for just double the clock