Were there systems that wasted #framebuffer space in order to avoid needing hardware to implement the front and back porches for #VGA?
Were there systems that wasted #framebuffer space in order to avoid needing hardware to implement the front and back porches for #VGA?
I realized 256x240 would be an extremely convenient resolution, since on an 8 bit system you can convert X and Y to a framebuffer address without doing any math. Did a search for "256x240" and discovered this is the resolution the NES uses.
Turns out 10-bit counters are readily available, so to produce a 640x480x60Hz VGA signal, one can use the middle 8 bits on one for the low bits of the address, suppress the output when the high bit is on and reset when the top 5 bits are 11001. Not sure what the best way is to send the horizontal sync pulse; it needs to be 96 pixels wide, from pixel 656-791, which is 101001 through 101110 in the top 6 bits. I've read that monitors only care about the rising edge, so maybe I can send the horizontal sync pulse whenever the top 3 bits are 101?
Oh, actually, sending the horizontal sync pulse early is good, because otherwise the image will be on the left edge of the screen!
Vertical uses a very similar setup: middle 8 bits are the high bits of the address (each line is repeated twice), output suppressed when the high bit is set. Sync pulse is sent when the top 9 bits are 11110101. Apparently some systems don't like there to be any video signal in the horizontal blanking interval, but I don't know how much they care about the vertical blanking info. So it's possible that writing anything past row 240 will cause problems. The blitter can at least avoid doing that.
It's kind of hilarious that VGA has 525 lines just like NTSC. It's to make it easy for systems to produce a TV out signal as well. I guess the PAL equivalent would be 720x576x50Hz?
Unfortunately, dual-ported SRAMs of sufficient size are *expensive*: around $100 for a 64K one. And single-ported leads to complexity: either you have to block access by the CPU while reading for output, or you need double-buffering with two chips which requires swapping the chips between 2 24 bit buses, plus read and write lines etc.
Starting to really understand why having the CPU handle output to the screen is so attractive.
@freakazoid Most non-CRT VGA monitors, though, can handle higher resolutions like 1024x768 (IIUC; at least, my VGA monitor looks really good with MiSTer). I certainly remember throwing 1152x864 at my VGA CRT in 1991 though with my S3 video card and X on Linux.