Supporting both VGA and NTSC at once

Share unrelated electronics stuff, ideas, rants, etc!
Post Reply
User avatar
Jubatian
Posts: 1355
Joined: Thu Oct 01, 2015 9:44 pm
Location: Hungary
Contact:

Supporting both VGA and NTSC at once

Post by Jubatian » Mon Feb 15, 2016 9:46 am

Just hoping there are guys here who have enough experience with it, guess there are :D

So I am designing a theoretical retro GPU (for a rebuild of RRPGE), but it may be relevant for real hardware game console designs as well, such as the BitBox (which may be capable to do it).

The idea is to support both VGA (640x480) and NTSC the same time. This is perfectly possible for the interlaced output of NTSC since the two have an exact 1:2 ratio by line frequencies, all you need is a line buffer to generate 1 line for NTSC while you do 2 for the VGA (of course the NTSC output does that by incrementing the source line pointer by 2 while the VGA output increments by 1). The pixel clock doesn't matter (the VGA standard doesn't require 1:1 Pixel Aspect Ratio, so you can use an NTSC colorburst crystal), and all the rest like sync signal generations are fairly trivial once this part is solved. So this is pretty much doable, and both outputs would work precisely by the respective standards the same time (so you could plug such a system in both a TV accepting composite and a VGA monitor, and see picture simultaneously).

My problem is that NTSC interlaced output has no scanlines. If you wanted to do the same replicating old style progressive scan 224 or so pixels height, you would be in trouble. On NTSC, this means you do 262 lines in each frame, and not 262.5, which would be required to get 525 lines for the VGA (the refresh rate is also slightly higher than 59.94Hz due to this). Do you know of any way to get around this? Or is progressive scan fixed at 262 lines? (Logic says it is unless you could alternate between 262 and 263 lines. If you did 262.5 lines for an analogue television, that would position the beam so it draws lines between the previous frame's, thus interlaced)

I also found a quite interesting property of the NTSC colorburst frequency, maybe interesting.

If you apply a 176/35 multiplier on it, you get exactly 18MHz. The NTSC 227.5 pixels per line becomes 1144 clocks for 18MHz, so a video hardware using this multiplier to generate a main clock is perfectly viable (or you could get NTSC colorburst clock by a 35/176 multiplication from a 18MHz crystal for the other way). I didn't check but maybe a BitBox could do it. It is interesting since this way you might be able to get both perfectly standard-compliant video signal and USB the same time from the same crystal.

Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests