NTSC video out with the Papilio One

video_out_with_the_papilio_one

[Ben Leperchey] is working on building a Sega Master System clone using the Papilio One FPGA board, and although his ultimate goal has yet to be reached, he’s bringing some great stuff to the table in the meantime.

One component that is necessary for any sort of game system clone is NTSC/PAL video output, naturally. Since no one had constructed a TV output “Wing” (The Papilio One’s version of a shield or breakout board), [Ben] went and did it on his own. Using only 14 resistors and a low-pass audio filter, he was able to get the video output he was looking for with relatively little trouble. His VHDL code running on the Papilio does all the hard work of creating the video signal, while the wing he designed mostly handles the connectivity.

This is one of the first few projects/components we’ve seen come out of the Papilio camp, and it looks like things are off to a good start. We can’t wait to see the Master System implementation once it has been wrapped up!

Continue reading to see a quick video demonstration of the Papilio One and [Ben’s] TV output wing.

Comments

  1. beeboue says:

    I like the kinder, gentler HaD. This is almost like stumbleupon!

  2. Denis Bisson says:

    Go to the following link to help a kickstarter project where you can reserve for yourself the Papilio FPGA Shield for Arduino, bigger and potentially more powerful than Papilio One.

  3. o says:

    So it’s an R2R DAC. Is the accuracy of the resistors important here?

  4. Kaj says:

    R2R DACs always leave me feeling nostalgic, for the days when I built one so my laptop would have sound output, via the LPT Port :)

  5. dext3r says:
  6. third says:

    Colour NTSC and PAL, that’s pretty impressive, especially from a pure digital source. Usually external colour carriers are used. No wonder it requires a 64MHz clock.

  7. Tachikoma says:

    Nice! Do you have demos for animated stuff? Would be interesting to see how it looks.

  8. harald says:

    Great butterfly, so awesome. Cool.

  9. charliex says:

    @o the resistors do have to be accurate, and also you should have an opamp if there is going to be any load/resistance on the output stage, otherwise that affects the R2R. the opamp can also be used to help with the tail off that a R2R usually has, by increasing the output voltage.

  10. tyco says:

    that is amazingly tough, and very impressive. For color NTSC, you need to be able to create a 3.45MHz sine, of variable amplitude, and, the tricky part with pure A-to-D, variable phase.

    For example: you would need at least a 7MHz clock to create a sine output at 3.45MHz, and then you would not be able to adjust the phase at all, at least not without the amplitude getting wildly off. Each time you double that clock, you can get twice as many phases available, with less amplitude error for in-between phases. This circuit can still only create 8 different phases at exactly the intended amplitude, but in-between phases are probably not all that far off anymore.

  11. ben says:

    hi all,

    glad you enjoy it.

    @o @charliex : no, the precision is not that important, as it affects the relative brightness/saturation of colors but not hue, so the image doesn’t look too bad. you have to choose the correct value though (115 ohms for 3.3V digital output) to match the TV input impedance — otherwise you would indeed need an amplifier. BTW, a regular opamp cannot be used, as it would filter out the color carrier.

    @tyco: the phase shift was the solution I went for at first, but you pointed out its major drawback perfectly. I use an equivalent phase/quadrature modulation: it is much easier and it ‘only’ require a 4x clock with little extra some math. The high clock rate (64MHz) clock is needed to get a precise approximation of the NTSC (or PAL) color carrier. I could theoretically produce any number of colors, although the various noises create too much artefacts to see them well : the demo uses a 64 color palette (2 bit RGB)

  12. tyco says:

    @ben: maybe you could consider getting rid of the RGB palette altogether, and just having the palette be direct YUV, maybe 3-bit instead of 2-bit. This would let you ditch the small rom you’re making to create a lookup table in the FPGA. AFAIK, this is pretty much how the NES works.

  13. ben says:

    @tyco i use a ‘palette’ to convert rgb to yuv, because the sega master system speaks in rgb. you could of course get rid of this lookup table if you chose to use yuv natively. even the nes doesn’t, though: it uses ysh (the polar coordinates), if i remember well.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

Join 94,548 other followers