Not hindered by knowledge of any VGA (timing) specifics, but: shouldn't a few line buffer be enough? For example the smallest multiple of "ZX81 outputs 1 screen line" and "VGA monitor sees 2 screen lines @ its input" ?gertk wrote:Yes I already tried to understand some of the hires routines, basically they end up having some sort of framebuffer.
The ways you can force the ULA to display anything are quite limited so that should not be such a problem.
The VGA (sub)system is a library which I created together with Ivo van Poorten on the mbed platform. He had made a text only 80x25 output to VGA using the I2S port of the mbed. I modified it heavily to get the timing right and make it into a full 640x480 framebuffer. Alas I needed more ram so the output is reduced to 640x240 which for the ZX81 emulation does not matter, only for the other screens I had to revert to 8x8 pixel font instead of the nice 8x16 pixel font.
Pixel clock is a constant 6.5 MHz. Hsync's are on all the time with a 15.7 kHz frequency unless masked by software-generated vsync's. There's a variety of Hi-Res routines out there, but regardless of which, any Hi-Res routine only has so much wiggle room to mess with the sync signal, if it wants to keep TV synchronization. Software that steps outside that boundary will produce different results on different monitor types anyway (I'm thinking of Rezzurection style demo's).
Just saying that the number of variables are limited when it comes to ZX81 video output, and exactly doubling the line frequency should put you in supported range for most VGA monitors, I think.
Future-wise I'd prefer HDMI option, but VGA is also excellent. Because there's so many of those 14, 15" monitors out there that are a) perfect for ZX81 use, b) cheap & plentiful, and c) usually in good shape (used in offices, 3-5 yrs old for example).