Post by samiam on Jan 4, 2020 5:43:42 GMT
Overview:
As turboxray demonstrated in another thread, the PCE's analog RGB output and its composite video output are essentially based on two separate color palettes, with the latter being arguably truer to developers’ intentions. While composite video itself leaves a lot to be desired, modding for S-Video gives us a chance to see the “real” PCE palette in a relatively clean format.
However, the S-Video mod that's been commonplace to date has multiple shortcomings. Let's see if we can come up with something better.
What S-Video looks like:
Y / luma signal:
C / chroma signal:
Including the negative sync tip, luma should be 1Vp-p and chroma should be 0.7Vp-p.
The relevant section of the PCE schematic:
(Click for full size)
Luma comes out of pin 40 of the HuC6260. Chroma is a combination of the output of pins 33 and 26. The color burst from pin 20 is also necessary for the chroma line.
Note that PCE models with on-board composite video output will not be identical to this, but I'm not sure what the exact differences are. It might simply be this plus what's inside the Turbo Booster.
The current mod:
It’s very simple. Take a single NPN transistor, connect the collector to 5V and the base to pin 40 of the HuC6260. Put a 220 ohm resistor in series after the emitter and connect that to the TV as luma. Then, tap composite video somewhere on the board, put a ~1000pf ceramic capacitor in series with it and run that to the TV as chroma.
The current mod's problems:
1. Cross-contamination. Luma is polluted by some amount of chroma that leaks into it via the 4.7k resistor that sits between them. Meanwhile, chroma has to be obtained from composite video via high-pass filtering that removes luma. There is no need to settle for this when both signals are available in pure form.
2. Impedance mismatching. This applies mostly to luma, but could also be relevant for chroma depending on whether you tap composite video from a proper source. By not having the output resistor at 75 ohms to match the 75 ohm termination resistor at the signal’s destination, you create a situation where the longer your cable is, the more distortion in the signal you get.
3. Drawing too much current from the HuC6260. Pin 40, which I measured, is only able to source 30-35 microamps of current. That’s about what the PCE’s on-board amp draws. Once you go beyond that, the signal begins to distort in a non-uniform way, starting with an ugly collapse in the signal's highest range. The current mod’s single-transistor/220-ohm-resistor configuration draws about 95 microamps by itself at full brightness, and since it doesn’t disconnect Y from the PCE’s on-board amp, you’re looking at a total of roughly 125 microamps drawn from pin 40. On top of that, the chroma pins are also having to supply extra current to this luma amp and may be suffering from a degree of signal collapse as well.
The solutions:
1. Remove the 4.7k resistor after pin 40 to isolate it. With this, chroma and luma don’t contaminate each other, plus none of the currents from the HuC6260 will be cross-loaded. The on-board composite video output should now effectively become your chroma signal without need of any filtering.
I'd recommend doing this to someone who has the current mod and doesn't want to reverse it but would like a quality boost.
2. Design an amp for Y with 75 ohm output impedance. This could get complicated if we wanted to be OCD about achieving an absolutely perfect 75 ohms (there are more factors involved than you might expect), but we don’t need to do that. A basic solution will be 99% accurate and vastly less issue-prone than the current mod.
The on-board composite video output should work as a source for chroma once the 4.7k resistor is removed, but the white PCE and US TG16 will need a small amount of extra circuitry equivalent to what’s inside the Turbo Booster to bring it up to spec.
3. Use multiple transistors to buffer the luma signal and reduce the current draw from pin 40. I’m not sure if this can be accomplished with two transistors yet. 75 ohm output impedance needs so much current that a single buffer might not do it. We may need three transistors, in which case we might as well just completely copy the on-board amp. This is the next thing that I’m going to try.
About YPbPr, aka component video:
R-Y and B-Y come out of the HuC6260 already amplitude-modulated to 3.58MHz. If we want to get Pb and Pr from these signals for use as component video, we’ll need to build demodulation circuits. I admit, I don’t know jack about this, but at a glance it appears that it can be done using a handful of basic, off-the-shelf parts.
Question for those who know: Is the PCE’s chroma carrier frequency always the same regardless of the dot-clock being used? It seems like it should be for general NTSC compliance, but I thought I’d ask. It’ll probably simplify things if we only have to deal with one carrier frequency.
Whether going through all this would even result in significantly better video quality than S-Video is somewhat doubtful. There is not a huge quality difference between S-Video and component in the first place, at least at low resolutions, and the modulation/demodulation process will take a toll on R-Y and B-Y. However, if anyone wants to get really nuts and build a converter to output RGB, perhaps in order to integrate into an RGB-only setup, then having YPbPr would simplify things a lot.
You can begin to imagine a single board with all of this crap on it: luma amp, final-stage chroma amp option, R-Y and B-Y demodulators and amps, and a YPbPr-to-RGB transcoder. Audio options should probably be included as well. However, I think you’d have a really hard time fitting a board with this much inside of a white PCE.
Anyway...
S-Video alone should be a piece of cake. Let’s get a really good design pinned down. I’ll share whatever I come up with.
As turboxray demonstrated in another thread, the PCE's analog RGB output and its composite video output are essentially based on two separate color palettes, with the latter being arguably truer to developers’ intentions. While composite video itself leaves a lot to be desired, modding for S-Video gives us a chance to see the “real” PCE palette in a relatively clean format.
However, the S-Video mod that's been commonplace to date has multiple shortcomings. Let's see if we can come up with something better.
What S-Video looks like:
Y / luma signal:
C / chroma signal:
Including the negative sync tip, luma should be 1Vp-p and chroma should be 0.7Vp-p.
The relevant section of the PCE schematic:
(Click for full size)
Luma comes out of pin 40 of the HuC6260. Chroma is a combination of the output of pins 33 and 26. The color burst from pin 20 is also necessary for the chroma line.
Note that PCE models with on-board composite video output will not be identical to this, but I'm not sure what the exact differences are. It might simply be this plus what's inside the Turbo Booster.
The current mod:
It’s very simple. Take a single NPN transistor, connect the collector to 5V and the base to pin 40 of the HuC6260. Put a 220 ohm resistor in series after the emitter and connect that to the TV as luma. Then, tap composite video somewhere on the board, put a ~1000pf ceramic capacitor in series with it and run that to the TV as chroma.
The current mod's problems:
1. Cross-contamination. Luma is polluted by some amount of chroma that leaks into it via the 4.7k resistor that sits between them. Meanwhile, chroma has to be obtained from composite video via high-pass filtering that removes luma. There is no need to settle for this when both signals are available in pure form.
2. Impedance mismatching. This applies mostly to luma, but could also be relevant for chroma depending on whether you tap composite video from a proper source. By not having the output resistor at 75 ohms to match the 75 ohm termination resistor at the signal’s destination, you create a situation where the longer your cable is, the more distortion in the signal you get.
3. Drawing too much current from the HuC6260. Pin 40, which I measured, is only able to source 30-35 microamps of current. That’s about what the PCE’s on-board amp draws. Once you go beyond that, the signal begins to distort in a non-uniform way, starting with an ugly collapse in the signal's highest range. The current mod’s single-transistor/220-ohm-resistor configuration draws about 95 microamps by itself at full brightness, and since it doesn’t disconnect Y from the PCE’s on-board amp, you’re looking at a total of roughly 125 microamps drawn from pin 40. On top of that, the chroma pins are also having to supply extra current to this luma amp and may be suffering from a degree of signal collapse as well.
The solutions:
1. Remove the 4.7k resistor after pin 40 to isolate it. With this, chroma and luma don’t contaminate each other, plus none of the currents from the HuC6260 will be cross-loaded. The on-board composite video output should now effectively become your chroma signal without need of any filtering.
I'd recommend doing this to someone who has the current mod and doesn't want to reverse it but would like a quality boost.
2. Design an amp for Y with 75 ohm output impedance. This could get complicated if we wanted to be OCD about achieving an absolutely perfect 75 ohms (there are more factors involved than you might expect), but we don’t need to do that. A basic solution will be 99% accurate and vastly less issue-prone than the current mod.
The on-board composite video output should work as a source for chroma once the 4.7k resistor is removed, but the white PCE and US TG16 will need a small amount of extra circuitry equivalent to what’s inside the Turbo Booster to bring it up to spec.
3. Use multiple transistors to buffer the luma signal and reduce the current draw from pin 40. I’m not sure if this can be accomplished with two transistors yet. 75 ohm output impedance needs so much current that a single buffer might not do it. We may need three transistors, in which case we might as well just completely copy the on-board amp. This is the next thing that I’m going to try.
About YPbPr, aka component video:
R-Y and B-Y come out of the HuC6260 already amplitude-modulated to 3.58MHz. If we want to get Pb and Pr from these signals for use as component video, we’ll need to build demodulation circuits. I admit, I don’t know jack about this, but at a glance it appears that it can be done using a handful of basic, off-the-shelf parts.
Question for those who know: Is the PCE’s chroma carrier frequency always the same regardless of the dot-clock being used? It seems like it should be for general NTSC compliance, but I thought I’d ask. It’ll probably simplify things if we only have to deal with one carrier frequency.
Whether going through all this would even result in significantly better video quality than S-Video is somewhat doubtful. There is not a huge quality difference between S-Video and component in the first place, at least at low resolutions, and the modulation/demodulation process will take a toll on R-Y and B-Y. However, if anyone wants to get really nuts and build a converter to output RGB, perhaps in order to integrate into an RGB-only setup, then having YPbPr would simplify things a lot.
You can begin to imagine a single board with all of this crap on it: luma amp, final-stage chroma amp option, R-Y and B-Y demodulators and amps, and a YPbPr-to-RGB transcoder. Audio options should probably be included as well. However, I think you’d have a really hard time fitting a board with this much inside of a white PCE.
Anyway...
S-Video alone should be a piece of cake. Let’s get a really good design pinned down. I’ll share whatever I come up with.