RGB output from composite PPU

Discuss hardware-related topics, such as development cartridges, CopyNES, PowerPak, EPROMs, or whatever.

Moderator: Moderators

User avatar
kyuusaku
Posts: 1665
Joined: Mon Sep 27, 2004 2:13 pm

Re: RGB output from composite PPU

Post by kyuusaku »

The only important question is "what's being used for an ADC"? Doesn't seem like anything is... So is it really a partial-PPU emulator that snoops bus activity?
lidnariq
Posts: 11432
Joined: Sun Apr 13, 2008 11:12 am

Re: RGB output from composite PPU

Post by lidnariq »

12×, and you basically can't buy one. (digikey sells only an oscillator, no crystals at that frequency, and so you can't use them in a PLL)

The next most robust design is one that samples at roughly 3×12×colorburst, and now you need to run all your components at ~150MHz instead.
kyuusaku wrote:The only important question is "what's being used for an ADC"? Doesn't seem like anything is... So is it really a partial-PPU emulator that snoops bus activity?
While the EP2C35 does not have an ADC, the DE2 does: ftp://ftp.altera.com/up/pub/Webdocs/DE2_UserManual.pdf Specifically the ADV7181B. And I'm sure thefox would have told us if he were emulating a PPU here; that's been done before and is not really novel any more.
User avatar
kyuusaku
Posts: 1665
Joined: Mon Sep 27, 2004 2:13 pm

Re: RGB output from composite PPU

Post by kyuusaku »

While the DE2 has the TV decoder, it doesn't appear he is using it... And if he were, it can't be used as a GP ADC since it appears wired solely for composite/directly spits out YUV-decoded pixels at some 13.5 MHz derivative of course. I believe the pin headers are strictly GPIO too.
tepples
Posts: 22708
Joined: Sun Sep 19, 2004 11:12 pm
Location: NE Indiana, USA (NTSC)
Contact:

Re: RGB output from composite PPU

Post by tepples »

Is there a reason why 6x wouldn't work if samples are taken on both rising and falling edges?
lidnariq
Posts: 11432
Joined: Sun Apr 13, 2008 11:12 am

Re: RGB output from composite PPU

Post by lidnariq »

tepples wrote:Is there a reason why 6x wouldn't work if samples are taken on both rising and falling edges?
No ADC is double-clocked like that? You still need a PLL somewhere. I guess you could start with the actually-purchasable 4x crystal and use a 3x PLL in that case.
User avatar
kyuusaku
Posts: 1665
Joined: Mon Sep 27, 2004 2:13 pm

Re: RGB output from composite PPU

Post by kyuusaku »

3 x 12 x subcarrier is probably quoted for asynchronous sampling, since 3x Fs can easily recover Fs unlike 2x Fs.

6x is OK if you're synchronized, and have two sample & hold circuits or two ADC, or an ADC with a built in PLL (video ADC often double 27 MHz to 54).
User avatar
blargg
Posts: 3715
Joined: Mon Sep 27, 2004 8:33 am
Location: Central Texas, USA
Contact:

Re: RGB output from composite PPU

Post by blargg »

lidnariq wrote:
kyuusaku wrote:The only important question is "what's being used for an ADC"? Doesn't seem like anything is... So is it really a partial-PPU emulator that snoops bus activity?
While the EP2C35 does not have an ADC, the DE2 does: ftp://ftp.altera.com/up/pub/Webdocs/DE2_UserManual.pdf Specifically the ADV7181B. And I'm sure thefox would have told us if he were emulating a PPU here; that's been done before and is not really novel any more.
Since there are only a few levels, perhaps you could have a comparator for each.
lidnariq
Posts: 11432
Joined: Sun Apr 13, 2008 11:12 am

Re: RGB output from composite PPU

Post by lidnariq »

Somehow I missed this post...
kyuusaku wrote:And if he were, it can't be used as a GP ADC since it appears wired solely for composite/directly spits out YUV-decoded pixels at some 13.5 MHz derivative of course.
I first was afraid of that too, but looking at Analog's application notes they specify how to use it to sample high resolution RGBHV inputs too. (AN-0978)
kyuusaku wrote:While the DE2 has the TV decoder, it doesn't appear he is using it... [...] I believe the pin headers are strictly GPIO too.
Now that's an actual problem :)
blargg wrote:Since there are only a few levels, perhaps you could have a comparator for each.
A 4 bit uniform ADC, or ~3.5 bit nonuniform ADC is good enough, with the following groupings:

Code: Select all

sync
Colorburst low, 0D attenuated
0D, 1D attenuated
1D, xE, xF, blank, black
2D attenuated
00 attenuated
Colorburst high, 2D
00, 10 attenuated, 3D attenuated
20 attenuated, 30 attenuated, 10
3D
20, 30
User avatar
kyuusaku
Posts: 1665
Joined: Mon Sep 27, 2004 2:13 pm

Re: RGB output from composite PPU

Post by kyuusaku »

It'd be far too obnoxious to recover the level with a 4-bit ADC since you'd need equipment and skills to develop a preprocessing circuit for level shifting and biasing. Instead you could stick a very typical 8-bit ADC between VDD & VSS and maybe have enough resolution, or definitely have enough with a simple resistive VDD/2 bias, since the DAC should swing 0.7V somewhere around VSS.

For a really low cost, high speed ADC you could probably bias the CMOS inputs (or better yet differential inputs) to act as comparators, but that would take quite a bit of wizardry...
lidnariq
Posts: 11432
Joined: Sun Apr 13, 2008 11:12 am

Re: RGB output from composite PPU

Post by lidnariq »

kyuusaku wrote:It'd be far too obnoxious to recover the level with a 4-bit ADC since you'd need equipment and skills to develop a preprocessing circuit for level shifting and biasing.
<blink blink blink> There's nothing hard, other than maybe that 4-bit ADCs don't exist. But an array of 15 trimpots and 15 comparators is awfully hard to screw up.
User avatar
thefox
Posts: 3134
Joined: Mon Jan 03, 2005 10:36 am
Location: 🇫🇮
Contact:

Re: RGB output from composite PPU

Post by thefox »

Yeah no, I'm not using ADC, and I'm pretty sure it's wired up in such a way in DE2 that it can only be used for decoding composite video. And I'm not using any PLL either, the PLL of the FPGA can only be used with specific clock pins, none of which the GPIO ports are connected to (there is an external clock input on the board, but...)

I'm using the EXT-pins of PPU. The only "emulated" part is the capturing of the PPU palette writes.
Download STREEMERZ for NES from fauxgame.com! — Some other stuff I've done: fo.aspekt.fi
User avatar
thefox
Posts: 3134
Joined: Mon Jan 03, 2005 10:36 am
Location: 🇫🇮
Contact:

Re: RGB output from composite PPU

Post by thefox »

lidnariq wrote:How many blocks does your design take?
Blocks of memory or logic elements? The global palette lookup is 512 * 24 bits (but could be reduced by using less bits for RGB and calculating the emphasis dynamically). Shadow palette is about 16 * 6 bits and scanline buffers are 512 * 9 bits each (extra space is for borders, could be optimized). Logic utilization is at about 1% if I remember correctly, there's not a lot of it.
Download STREEMERZ for NES from fauxgame.com! — Some other stuff I've done: fo.aspekt.fi
User avatar
HardWareMan
Posts: 209
Joined: Mon Jan 01, 2007 11:12 am

Re: RGB output from composite PPU

Post by HardWareMan »

thefox wrote:I'm using the EXT-pins of PPU. The only "emulated" part is the capturing of the PPU palette writes.
But HOW?! (C) Moss / The IT Crowd
Didn't EXT output displays only part of the information? Should be 5 bit color (4 bits of background and 4 bits of sprite), while the width of the EXT only 4 bits.
Image
And EXT shuold be enabled as output by writing to PPU control register, isn't it?
User avatar
MottZilla
Posts: 2837
Joined: Wed Dec 06, 2006 8:18 pm

Re: RGB output from composite PPU

Post by MottZilla »

I hope this means someone out there now will look into making a separate board for RGB output now. That would be awesome.
SkinnyV
Posts: 427
Joined: Wed May 04, 2011 2:41 pm
Location: Montréal, Canada
Contact:

Re: RGB output from composite PPU

Post by SkinnyV »

All around the globe, the remaining thousand or so VS. Duck Hunt arcade board are breathing a sigh of relief knowing that their PPU won't be violently extracted anymore :lol:
Post Reply