FPGA Composite video, some questions and findings

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

Moderators: B00daW, Moderators

User avatar
Quietust
Posts: 1787
Joined: Sun Sep 19, 2004 10:59 pm
Contact:

Re: FPGA Composite video, some questions and findings

Post by Quietust »

HardWareMan wrote:L10 is used to turn off the video output by shunting to GND, thus video pin have zero voltage level. I don't know right now what condition causing that, but it doesn't matter for now.
If it's what I think you're talking about, L10 (t5865 in visual2c02) is actually for color emphasis - the transistor is very small (and thus can't sink as much current), and it's connected to the VCC end of the resistor ladder through a long and thin strip of diffusion (which increases resistance), so all it does is reduce all of the other voltage levels (by about 25%, as observed by others on real hardware).
Quietust, QMT Productions
P.S. If you don't get this note, let me know and I'll write you another.
pyroholic
Posts: 13
Joined: Thu May 16, 2013 1:33 am

Re: FPGA Composite video, some questions and findings

Post by pyroholic »

Basically it should be possible to determine the length between the taps on the resistor and determine some relative value, and get some idea what the voltages would be on each tap, then there would also be an additional voltage drop over the pass transistors but i assume that there is not much current so it should be small except when the transistor has just turned on and current is flowing into capacitive elements.

I guess it is the tint transistor that HardWareMan is mentioning, although there is also a transistor that grounds video out as well.

The output levels measured by kevtris should only be an offset of those voltages caused by the voltage drop over the bipolar transistor he measured the output on. Since the color burst seems to be triangular the peak voltages on the output are most likely attenuated so the actual voltage from the taps on the resistor for color burst should be lower/higher to achieve that shape.
User avatar
Quietust
Posts: 1787
Joined: Sun Sep 19, 2004 10:59 pm
Contact:

Re: FPGA Composite video, some questions and findings

Post by Quietust »

pyroholic wrote:although there is also a transistor that grounds video out as well.
That would be the "sync" voltage. I've just updated some of the node names in visual2c02 to more clearly identify the logical video voltage levels.
Quietust, QMT Productions
P.S. If you don't get this note, let me know and I'll write you another.
User avatar
HardWareMan
Posts: 206
Joined: Mon Jan 01, 2007 11:12 am

Re: FPGA Composite video, some questions and findings

Post by HardWareMan »

Quietust wrote:
HardWareMan wrote:L10 is used to turn off the video output by shunting to GND, thus video pin have zero voltage level. I don't know right now what condition causing that, but it doesn't matter for now.
If it's what I think you're talking about, L10 (t5865 in visual2c02) is actually for color emphasis - the transistor is very small (and thus can't sink as much current), and it's connected to the VCC end of the resistor ladder through a long and thin strip of diffusion (which increases resistance), so all it does is reduce all of the other voltage levels (by about 25%, as observed by others on real hardware).
Indeed, there are resistor between L10 and transistor. I was baffled TINT connection to the management of colors and one PPU register, but now everything has fallen into place.
pyroholic
Posts: 13
Joined: Thu May 16, 2013 1:33 am

Re: FPGA Composite video, some questions and findings

Post by pyroholic »

I hooked my pal nes up to an oscilloscope today and checked the video-out pin from the ppu, the color burst and regular color waves seem to be equally attenuated so there should be no phaseshift between them. Anyway, what i found interesting was that since the attenuation is pretty high and the waves are almost ideal triangle waves the video signal for colors are pretty far off from the peak values, color 00 resulted in a voltage of 1270 mV, 0d 448 mV and colors 0x oscillated between 576mV and 904mV, and sync was 88mV above ground. I made some quick measures on the output from the video-amplifier while connected to a tv as well, and it seems that low frequency signals retain their amplitude while high frequency signals are amplified so the end result is a pretty nice sinusoid oscillating at a higher amplitude than the triangular one from the PPU. I didn't get any good measurements done since i was running out of time for today and only held the probe agains the soldering point for the av-out video connector. I made measurements of all the voltage levels if anyone is interested about pal version of the PPU.
SuperFXMaster
Posts: 6
Joined: Thu Jul 18, 2013 10:39 am

Re: FPGA Composite video, some questions and findings

Post by SuperFXMaster »

Can anyone tell me what's the value of each resistor found in the DAC of the PPU? (The resistor ladder)(PPU Patent #4,824,106, FIG. 8)
Last edited by SuperFXMaster on Mon Jul 22, 2013 6:38 am, edited 1 time in total.
lidnariq
Posts: 10677
Joined: Sun Apr 13, 2008 11:12 am
Location: Seattle

Re: FPGA Composite video, some questions and findings

Post by lidnariq »

pyroholic wrote:I made measurements of all the voltage levels if anyone is interested about pal version of the PPU.
I don't know how I missed this.
If they differ from the the 2C02 voltages, we'd love to have them.
SuperFXMaster
Posts: 6
Joined: Thu Jul 18, 2013 10:39 am

Re: FPGA Composite video, some questions and findings

Post by SuperFXMaster »

Sorry about my ignorance, but why do I think the multiplexer diagram from the PPU Patent is wrong in some parts? (Missing NOT gates in some places)

EDIT: Yes, yes, we'd love to have these voltages!!!
pyroholic
Posts: 13
Joined: Thu May 16, 2013 1:33 am

Re: FPGA Composite video, some questions and findings

Post by pyroholic »

Ok, sorry for the late response, but here is all of the data from the measurement. The voltages are measured directly on the video pin on the PPU.

Code: Select all

Gray scale:
00 : 1270 mV
10 : 1670 mV
20 : 2200 mV
30 : 2200 mV

0d:  448 mV
1d:  640 mV
2d: 1150 mV
3d: 1780 mV

Colors:

0x-low:   576 mV
0x-high:  904 mV
1x-low:   848 mV
1x-high: 1220 mV
2x-low:  1380 mV
2x-high: 1720 mV
3x-low:  1880 mV
3x-high: 2010 mV

Color burst:
low:   360 mV
high: 1440 mV
sync:   88 mV
tepples
Posts: 22345
Joined: Sun Sep 19, 2004 11:12 pm
Location: NE Indiana, USA (NTSC)
Contact:

Re: FPGA Composite video, some questions and findings

Post by tepples »

The lows are supposed to be the same as xD and the highs x0. You might be seeing some low-pass filtering.
lidnariq
Posts: 10677
Joined: Sun Apr 13, 2008 11:12 am
Location: Seattle

Re: FPGA Composite video, some questions and findings

Post by lidnariq »

The numbers given, once normalized such that color $20 is 1 and color $1d is 0, are equivalent to the NTSC voltages (except for colorburst, but for reason Tepples gave I'm not certain these are trustable)
pyroholic
Posts: 13
Joined: Thu May 16, 2013 1:33 am

Re: FPGA Composite video, some questions and findings

Post by pyroholic »

tepples wrote:The lows are supposed to be the same as xD and the highs x0. You might be seeing some low-pass filtering.
Yes, both NTSC and PAL nes suffer low pass filtering, that's why the output are triangle waves instead of square. The PAL color burst frequency is also higher (almost 25%) than NTSC so that is why the color waves are more attenuated than for NTSC.

The oscilloscope probe should not have any noticable effect on the measurement so it should only be the parasitic capacitances of the driver transistors in the video dac as well as the base capacitance of the emitter follower transistor that causes the low pass effect.
User avatar
blargg
Posts: 3717
Joined: Mon Sep 27, 2004 8:33 am
Location: Central Texas, USA
Contact:

Re: FPGA Composite video, some questions and findings

Post by blargg »

Outputting several pixels of a given color/gray is a good way to avoid capacitance effects
tepples
Posts: 22345
Joined: Sun Sep 19, 2004 11:12 pm
Location: NE Indiana, USA (NTSC)
Contact:

Re: FPGA Composite video, some questions and findings

Post by tepples »

That'd help with grays ($x0 and $xD). But even if the test were done with full screen solid colors, capacitance would still affect the rises and falls that encode the color.
pyroholic
Posts: 13
Joined: Thu May 16, 2013 1:33 am

Re: FPGA Composite video, some questions and findings

Post by pyroholic »

Yes, that is also what i did, 32 pixel wide bars. That is why the difference is so clear between grays and colors. It was also clear on the scope that it took more than half a period for the different grays to settle.
Post Reply