YPbPr ouput mod for SNES consoles

Discussion of hardware and software development for Super NES and Super Famicom. See the SNESdev wiki for more information.

Moderator: Moderators

Forum rules
  • For making cartridges of your Super NES games, see Reproduction.
Locked
User avatar
marvelus10
Posts: 243
Joined: Fri Feb 09, 2007 5:01 pm
Location: Nanaimo, BC Canada

YPbPr ouput mod for SNES consoles

Post by marvelus10 »

I have been following this thread http://www.racketboy.com/forum/viewtopi ... 25&t=37716 for the past few weeks, I tried out the mod and it worked great. Figured some people here would like this if they didn't already know about it.

Read through it all though because there was a couple of different ideas thrown about.

This worked and the picture is so clear, however it worked with issues (image shakes) on my 720p plasma because of the fact the TV didn't like the 240p signal, but on my CRT it was smooth sailing. You can pick up inexpensive upscalers that will accept 240p then I'm sure it would be fine if you were to run into the issue I had on my plasma.
Last edited by marvelus10 on Thu Jun 07, 2012 2:03 pm, edited 2 times in total.
User avatar
kyuusaku
Posts: 1665
Joined: Mon Sep 27, 2004 2:13 pm

Post by kyuusaku »

Not surprisingly it doesn't look like anybody is using the signals correctly, even after 10 pages of wall-o-texts. The datasheet apparently shows 1K resistors to GND at the outputs, those are required because the last stage is a common-collector/drain amplifier buffering the matrix output. The actual output impedance will be very low. For proper use the Pb/Pr outputs must be amplified 2X (approx 6 dB gain) and series terminated with 75 ohm. It may be possible to do single-ended parallel termination, or dual-parallel termination to skip the amplifier, but they present a heavy load to the output.

Since apparently only Y has internal gain, and it sounds like people are simply series terminating the output with 75 ohms, that means their Pb and Pr will have half the appropriate amplitude leading to incorrect color (not brightness which is constrained to luminance).

The correct use is: output pin -> high impedance 6 dB amp (PNP input) -> 100 or 220 uF C -> series 75 ohm R -> out

or with single parallel: pin -> 100 or 220uF C -> out

dual-parallel termination: pin -> 100 or 220uF C -> shunt 75 ohm R to GND -> output

The caps and circuit order are very important because significant current can be saved by removing the DC offset. The caps can probably be smaller since Pb and Pr technically don't have low-frequency components like Y does.
Near
Founder of higan project
Posts: 1553
Joined: Mon Mar 27, 2006 5:23 pm

Post by Near »

Realllllly shouldn't call it easy. Easy to skilled people, sure, but that's obvious enough.

Even with a few months of soldering experience, I totally botched my first SNES Jr when soldering to those pins. I did eventually pull it off, but it wasn't fun.

Chances are if you're of the skill level of using Radio Shack irons, you probably shouldn't attempt something like this unless you know you can do it or don't care about the hardware much.

Also, there's a tiny bit of interference when running your own wires off that chip and out the SNES. But still absolutely worth it compared to the horrible RGB output quality of older SNES units.
User avatar
marvelus10
Posts: 243
Joined: Fri Feb 09, 2007 5:01 pm
Location: Nanaimo, BC Canada

Post by marvelus10 »

@ kyuusaku - After reading your reply I remembered reading about the internals and their differences for PAL/NTSC scart cables. This got me to doing some reading and searching old posts for RGB issues with SNES/SFC even ones that you had posted in several years ago. Thank you for the little memory jog and further excersize, tomorrow I am going to rewire this mod based on what you have said and others likewise.

@ byuu - it's not easy anymore :wink:


thank you
User avatar
marvelus10
Posts: 243
Joined: Fri Feb 09, 2007 5:01 pm
Location: Nanaimo, BC Canada

Post by marvelus10 »

@ kyuusaku - After further reading and asking a few question at other places it seems that information you presented in your post is not necessary with the particular ENC chip I have in my SFC.
User avatar
kyuusaku
Posts: 1665
Joined: Mon Sep 27, 2004 2:13 pm

Post by kyuusaku »

Doing things the right way is rarely necessary in life.

I know that video needs to be terminated correctly. I know that TVs have very forgiving AGC and most people will never know that they're doing it wrong. I know that when issues do arise people will apply fallacies and will blame everything but the true culprit, which is probably out of their repertoire. That's the nature of electronics and everyone is guilty of it, some are just more guilty than others.

As someone who strives to understand the "right way", it irritates me to see bad design succeed as it often does, especially when it involves the alteration of remaining video game stock. That was the only point of my post--to help anyone else on their quest for the "right way".
Near
Founder of higan project
Posts: 1553
Joined: Mon Mar 27, 2006 5:23 pm

Post by Near »

Indeed, I am constantly amazed at how forgiving electronics are.

Most times when you are required to ground a pin, I find just lifting it "gets the job done." Yet it's obviously horribly wrong.

I've even managed to get an SNES controller working without the +5V line connected. Somehow it pulls the power from the other lines by some magic I don't understand.

Certainly possible the hardware will fail later as a result of these shortcuts, sadly.

Definitely good to list the correct way for those who are able and not lazy. I may attempt this info on my RGB circuit. Right now I just have 220uF cap + 100ohm resistor (no 75's here) on each line (RGB+CSync [-not- CVBS]) Resistor's only needed on SNES Jr because the image is -way- too bright otherwise.
User avatar
kyuusaku
Posts: 1665
Joined: Mon Sep 27, 2004 2:13 pm

Post by kyuusaku »

I've even managed to get an SNES controller working without the +5V line connected. Somehow it pulls the power from the other lines by some magic I don't understand.
Most chips have clamp diodes to suppress (mis)termination over/undershoot, ESD and overvoltage. As long as the input voltage is >0.6 V greater on that pin than the VDD/VCC rail potential the diode will forward conduct and supply current. For something like the CD4021 in a SNES controller which are super low power I guess the chip capacitance alone keeps the rail stable enough for operation.
Right now I just have 220uF cap + 100ohm resistor (no 75's here) on each line (RGB+CSync [-not- CVBS]) Resistor's only needed on SNES Jr because the image is -way- too bright otherwise.
I'm not sure about the Jr without a datasheet, but it's possible that the Jr's lines DO have gain which case a series capacitor and 75 ohm resistor is the proper use.

The old chip's do not have this gain because they aren't meant for transmission, they are meant to be externally filtered and looped back into the chip.

For the old chip you don't want a series resistor because it will attenuate the signal. Series termination technically isn't necessary (as evidenced), but if the coax cable's characteristic impedance doesn't match the display input impedance as it inevitably won't, especially over all frequencies, there will be some signal reflection which will go undamped and end up distorting the signal.

For the old chip beyond the series caps, if nothing else I would follow the datasheet app note's 1K "pull-downs" on Pb and Pr, this could affect the linearity of the current-amplifier driving the outputs.
SkinnyV
Posts: 427
Joined: Wed May 04, 2011 2:41 pm
Location: Montréal, Canada
Contact:

Post by SkinnyV »

Very interesting read. I decided that my SNES S-Video output was doing a good job so the mod was not really needed for me, specially after hearing some people mentioning the component video mod was giving them a ''weird'' image or color. But if kyuusaku would be willing to redesign the circuit with his recommendation I would definitely try it.

Also, I like the comment about the proper thing rarely being done because it's deemed "unnecessary". You know, deodorant is unnecessary but I sure as hell like the fact that most people still choose to go that route :lol:
User avatar
mikejmoffitt
Posts: 1353
Joined: Sun May 27, 2012 8:43 pm

Post by mikejmoffitt »

I'm the one who first posted about the mod after finding that wacky datasheet - apparnetly 1K to ground is the way to go. I've had different results between two seemingly identical SNES machines, however - one shows up perfectly on any TV which takes YPbPr, while another was almost completely washed out (prompting the need for the 1K resistor...). Can anyone shed some light as to why the two machines would act differently?

The Jr doesn't have an even vaguely compatible encoder I don't believe... I thought they all had the S-RGB encoder that spits out clamped RGB, S-video, and composite, like the late model 1 SNES.

@Kyuusaku, thanks for your clear explanation of how the signals should be properly terminated. I will modify my guide accordingly.
User avatar
Firebrandx
Posts: 50
Joined: Fri Aug 26, 2011 3:20 am

Re: YPbPr ouput mod for SNES consoles

Post by Firebrandx »

kyuusaku wrote:

Since apparently only Y has internal gain, and it sounds like people are simply series terminating the output with 75 ohms, that means their Pb and Pr will have half the appropriate amplitude leading to incorrect color (not brightness which is constrained to luminance).

The correct use is: output pin -> high impedance 6 dB amp (PNP input) -> 100 or 220 uF C -> series 75 ohm R -> out

or with single parallel: pin -> 100 or 220uF C -> out

dual-parallel termination: pin -> 100 or 220uF C -> shunt 75 ohm R to GND -> output

The caps and circuit order are very important because significant current can be saved by removing the DC offset. The caps can probably be smaller since Pb and Pr technically don't have low-frequency components like Y does.
I'm a bit of a noob with electronics, so I don't quite understand how all that is suppose to be done. Right now, the color is indeed about half as saturated as it should be on my direct component feed. For the luminance, I cracked open a pair of standard SNES A/V cables and swiched the #9 pin (composite) over into the #7 slot. This turns the yellow video jack into a luminance feed that plugs into the green jack for component input. For the two color signals, I'm tapped direct into pins #1 and #24 on the S-ENC B chip.

What I need to know in plain English is what exactly I need to put onto the color lines before I plug them into my TV set. I don't understand what "single parallel" or "dual-parallel" mean. For me to understand, I'd need it explained like this : Take the color line and solder this cap (link to pic of cap from a supply shop or something), then solder this resistor (same deal again), and so on. For those of us that don't know terminology, using it to describe an 'easy' process just sounds like confusing Greek salad.
User avatar
kyuusaku
Posts: 1665
Joined: Mon Sep 27, 2004 2:13 pm

Re: YPbPr ouput mod for SNES consoles

Post by kyuusaku »

For the best video quality you'd need 2x video amplifiers, on Pb and Pr. TI makes pretty good video amplifiers. Basically connect the outputs to the amplifier's inputs. How to connect them depends on the amplifier. The output of the amplifier always connects to the multi-out through a 75 ohm resistor though.

If you don't want to use an amplifier then you can *possibly* safely use the signal directly as instructed in the original tutorial. If you put the signal through a 75 ohm resistor the signal quality will increase, and there will be less stress on the encoder chip, but depending on your display it might be problematic because the amplitude will be halved and the display may not know to compensate for it.
User avatar
Ziggy587
Posts: 194
Joined: Fri Oct 08, 2010 6:08 pm
Location: NY, USA

Re:

Post by Ziggy587 »

kyuusaku wrote:The correct use is: output pin -> high impedance 6 dB amp (PNP input) -> 100 or 220 uF C -> series 75 ohm R -> out
kyuusaku wrote:For the best video quality you'd need 2x video amplifiers, on Pb and Pr. TI makes pretty good video amplifiers. Basically connect the outputs to the amplifier's inputs. How to connect them depends on the amplifier. The output of the amplifier always connects to the multi-out through a 75 ohm resistor though.

I haven't had the time to work on this during the past few months, but I haven't lost interest. I am very interested in doing it the correct way.

http://www.ti.com/litv/pdf/sbos294e

Would this particular amp do the trick?

If not, could you please recommend one?
User avatar
mikejmoffitt
Posts: 1353
Joined: Sun May 27, 2012 8:43 pm

Re: YPbPr ouput mod for SNES consoles

Post by mikejmoffitt »

I recently re-did this mod, using two 220uF capacitors on the Pb and Pr chanels. For Luma/Y, I used the one from S-video. They are the same, after all! Doing this resulted in a very clear image with proper color balance and proper saturation.

I want to note that the S-ENC encoder and the BA6592 are pin-compatible, but the signals coming off of them in the different SNES revisions are NOT the same.

Also, I only ever did this mod because pulling RGB off of the S-RGB chip didn't work. I'm a stupid numbnut though; fully functional RGB is on the multi-AV port and pulling from there works fine now.

Here's how I have the SNES now:

Image
User avatar
Ziggy587
Posts: 194
Joined: Fri Oct 08, 2010 6:08 pm
Location: NY, USA

Re: YPbPr ouput mod for SNES consoles

Post by Ziggy587 »

mikejmoffitt wrote:I recently re-did this mod, using two 220uF capacitors on the Pb and Pr chanels. For Luma/Y, I used the one from S-video. They are the same, after all! Doing this resulted in a very clear image with proper color balance and proper saturation.
Mike, the problem though is that what might work for you might not work for others. There's two main factors (as I see it) that come into play: Your particular TV and your personal tastes. Personal tastes is easy to understand. What might look perfectly fine to you, wont look good or *perfect* to others. The TV you're using also matters a great deal. This is something I've always known, but I only recently discovered how wide the margin is here.

Back when I first attempted this mod, I was testing it on a Samsung CRT and some times my HDTV for comparison (the picture always looked identical on both TVs). Since then, I was lucky enough to score a Trinitron from a thrift store and have been using it as my main retro gaming TV. A few days ago, I decided to mess with the YPbPr mod again. I've been using the S-Video's Y. After attempting a few ideas (like 220uF caps) I decided to take out all caps and resistors and wire Pr and Pb straight to the RCA jacks. This is something I haven't tried on the Trinitron yet. To my surprise, the colors actually looked better (very close to composite or S-video).

So after seeing this, I went back and looked through the pictures Jamisonia (from Racketboy) posted. He also just wired Pr and Pb straight to the RCA jacks, and he also has a Trinitron (though not the exact model I have). If you look at his pictures, you can see that the colors are almost identical to S-Video. If you look at my pictures (from my HDTV / Samsung CRT), you can notice a decent color difference (most notably the green grass and the docks in DKC3). So being that we were both doing the mod the same way, the different results that we were getting was due mainly (if not all) to the TVs we were using. Now that I tried it on my Trinitron, my results are closer to Jamisonia's (though it's worth noting that his colors are gonna be different than mine because he calibrated his TV with a DVE disc and my TV has yet to be calibrated properly).

My point of all this is, adding caps could make it look better for you. It could possibly also make it look better on my Samsung CRT. But it definitely makes it worse on my Trinitron. That is why I'm after the correct way to output Pr and Pb. After all, it would be nice if it could work the same on all my TVs. And it would also mean that every one could perform the mod the same way without much variances in the results.
Locked