View Full Version : Adding S-Video to TG-16/PCE Duo...
goombakid
09-08-2011, 10:19 PM
Anyone has a schematic or guide to add S-video to the TG-16 or PCE Duo? I'm trying to wrap my head around RGB and whatnot, which most guides Google leads me to talks about, but I guess I'm not understanding what process goes into getting those signals to S-Video. Anyone can help?
There isn't an easy way to do it. The TG16 supports composite and RGB output. In order to get S-Video you'll need to get a video encoder (such as the Sony CXA1645) and wire up a circuit to output S-Video from RGB.
I made an attempt at it and never got it to work, still not sure why. Seems the TG16 has crappy A/C adapters amongst other things. The CXA1645 is also $15 on eBay and highly sensitive to bad soldering.
tomaitheous
09-11-2011, 01:58 AM
The VCE has the outputs necessary components to do s-video without any extra encoder chip. Though you'll need to amp it. Matter of fact, the VCE outputs 4 signals to build composite in the analog domain; Y+sync, color burst, R-Y, B-Y. The circuit simply combines all four (resistor levels on each) before feeding an amp(driver). R-Y (or is it B-Y) is already 90 degrees out of phase, so you just need to accumulate with the other color component and color burst line. That'll give you Chroma. And Y already has Csync on it. Voila, svideo. Though you'll have to redo the resistor values and run two new drivers (assuming you're keeping the composite circuit intact).
The benefit is that you don't loose the PCE/TG16's unique color palette in the above method like you do with an external encoder. The VCE has a unique 9bit RGB to 15bit YUV rom table (3x 5bit output DACs). The stepping (rounding) gives the color palette its uniqueness (and some games do look better with this over RGB). Going RGB->svideo loses this.
l_oliveira
09-15-2011, 04:00 PM
We could use a full pinout of the graphic chip on the PCE.
I would be delighted to have the information and then try to build a S-Video output for my unit!
Calpis
09-15-2011, 04:54 PM
Have the LUT been dumped?
Edit: nevermind, everything in the patent
tomaitheous
09-18-2011, 04:07 AM
Have the LUT been dumped?
Edit: nevermind, everything in the patent
Which patent are you reading? There are two VCE patents and one of them is wrong.
Here's a capture of the luma scale: http://www.pcedev.net/pcetech/vce/luma_scale_capture.png
Which matches up with patent # pat5059955. But unfortunately it doesn't give the whole table. The author of PicchioEngine claims to have an accurate map/LUT, but I tested it and it doesn't match the real hardware.
l_oliveira (http://www.assemblergames.com/forums/member.php?u=8612): This is all you need;
http://i1216.photobucket.com/albums/dd379/PCGenjin/cvbs.png?t=1295176022
The resistor values might be sightly off as I only measured them directly. The board itself doesn't say what the real values are.
Calpis
09-18-2011, 01:54 PM
You measured the resistors in-circuit? If so they could be very off.
Yoder
11-17-2011, 12:34 AM
Ok, resurrecting this thread a little. So has anyone successfully added S-video without an external encoder yet? I like the idea if it does keep the palette accurate, but I'll probably start with an external one and see how it looks, because building the circuit as described above is outside of my skill set...
Ok, resurrecting this thread a little. So has anyone successfully added S-video without an external encoder yet? I like the idea if it does keep the palette accurate, but I'll probably start with an external one and see how it looks, because building the circuit as described above is outside of my skill set...
Trust me, it isn't. The schematic looks daunting if you are unfamiliar with the iconography but its one of the more simpler designs to implement. Trust me, I tried and failed epically with a CXA1645. Ended up eating the cost of parts and bought the guy who sent me his TG16 a new one to the tune of $60 for unrelated reasons. If this design is out of your skill set then an external decoder such as the CXA1645 are WAY out of your skill set. More parts, more places to screw up and not even know why as well as the need to still crack open the console to do some soldering.
The transistors aren't labeled with specific part numbers but the type of resistor needed is (NPN and PNP).
Off hand I can't suggest what transistors to use but I'd imagine similar circuit schematics out there have transistors in them that would work fine.
Yoder
11-17-2011, 04:17 PM
Oh, that's good to hear. Is there actually a schematic for this somewhere? If there is, please point me to it. That would be a big help. As far as the transistors for the amps, I bet NTE85s, 2N3904s, BC548, etc NPNs would do the job.
This is the part that seems like it still needs to be worked out, right? Maybe I'm just not reading it right... Is it just tying together these three lines from the video encoder? So it sounds like I'd just need to do this and then run Y and C to transistor amps ( amI'm assuming it will need a cap and resistor?). Probably a good idea to breadboard this with some variable resistors to get the signals right. Any ideas on approximate values for the cap/resistor combo? Do you think it would be 220 uF/68 ohm similar to the CXA1645 or will we need to start from scratch?
R-Y (or is it B-Y) is already 90 degrees out of phase, so you just need to accumulate with the other color component and color burst line. That'll give you Chroma. And Y already has Csync on it. Voila, svideo. Though you'll have to redo the resistor values and run two new drivers (assuming you're keeping the composite circuit intact).
Thanks for your input! Sorry about the issues with the 1645 ant TG-16. That's a bummer. I know what you mean, though...those things need a 3.58 Mhz clock input, a bunch of small caps on R,G,B, and then you still need to deal with the Y,C, ground and 5V lines.
I'm excited that I can do this. I have a TG-16 and PC-Engine to experiment with :-)
http://i1216.photobucket.com/albums/dd379/PCGenjin/cvbs.png?t=1295176022
The resistor values might be sightly off as I only measured them directly. The board itself doesn't say what the real values are.
This is the schematic I was referring to, and you're probably right about the models. The above ties 4 lines together to produce a composite output which isn't really necessary as the TG16 will do composite already if you know where to find it. Problem is that every TG16 I've seen has annoying "hum bars" on the picture due to a ground loop problem the NEC engineers didn't bother to fix.
Standard output load calls for a 75ohm resistor and 99.9% of amp circuits do call for 220uF capacitors. I'd try it without them to see how the picture looks and add them if it is too dark.
From what I'm gathering R-Y, B-Y need to be accumulated with G-Y and color burst (CB) to form chroma without touching the luma (Y) as S-Video requires chroma and luma be separated. Luma in this case already has the sync signal necessary but I can't find a pinout of the VCE to see where G-Y is.
Keep in mind I am completely unsure if this is accurate as the TG16 isn't my forte.
Yoder
11-17-2011, 10:16 PM
Duh, I can't believe I didn't see the link to that schematic! I was looking for something attached, I guess.
As far as G-Y...I don't think it's part of the picture (no pun in tended :-)). G-Y is formed when combining R-Y and B-Y. Still not clear on how the color wheel translates into these phase shifts.
ref: http://www.damtp.cam.ac.uk/cosmos/private/documentation/library/SGI_bookshelves/SGI_Admin/books/Combiner_UG/sgi_html/go01.html#id15407
Interesting thing is that component video is Y, B-Y, and R-Y..aka YPbPr...so it may actually be able to output component video. Not sure what it would take to really do this, though...but that that would be a cool project.
I agree on the composite video. I think the color looks much better through RF than with composite...hard to believe.
Well, this is going to be a project for a weekend, I guess... I need to read up a bit on video, I guess... Would love to find someone who's done this, though.
tomaitheous
11-18-2011, 04:35 AM
There is no 'composite' output pin on the VCE. That circuit schematic is how the console outputs composite, after the VCE outputs. Unfortunately, the pins in that schematic are only accessible by opening up the console, not from the backplane. All you need for s-video is to accumulate (tied together) the two chroma pins which will make the phase modulated Chroma signal. Well, and tie in Cburst too (which is thankfully also on its own output).
For component video, you'd need to demodulate each chroma line. And IIRC, since one of the chroma lines is out of phase by 90 degrees, you'll need to delay both Y and the other demodulated chroma line to get them all in sync. But other than that, I don't see why you couldn't get component output from the VCE (besides the RGB->component converter method). And again, it'll have the correct internal palette for that method too.
Yoder
11-18-2011, 02:45 PM
Tomaitheous, first of all, thank you for doing all the work to discover these outputs on the VCE. That's a big help to the community. This is actually sounds very straight-forward...at least doing S-video. Yes, having colorburst on its own output and (I'm assuming) with the correct delay is a big help..
Hopefully I can give this a shot after I get back into town...I don't think I can do it while on vacation. I'm also wondering if composite video output could be improved by changing some resistor values. I don't know if that would help the look of the washed out appearance of composite video... That's on the back burner, though.
CoolMod
11-20-2011, 02:57 AM
I looked at trying to do this and it looks annoyingly complicated lol
There is no 'composite' output pin on the VCE.
Correct, but composite can be tapped at the expansion bay without trouble. Albeit with a hum bar. Need to be sure in the future I specify these things as they seem to lead to confusion.
I looked at trying to do this and it looks annoyingly complicated lol
Not really. If I'm understanding what is being said correctly you tie together pins 20, 26 and 33 to form chroma and use pin 40 for luma. In series run a 75ohm resistor through a 220uF capacitor (one set on luma, one set on chroma) and wire it up to an S-Video connector. Done.
Don't take that as gospel, my knowledge of the TG16 is limited as well as my knowledge of crafting a S-Video signal by hand.
Calpis
11-25-2011, 06:10 PM
Sure, tie together outputs if you want to break a chip XD
Creating video amplifiers is very complicated and horribly misrepresented around here. Probably the only reason anyone has any success is because TV have very forgiving automatic gain control circuits that can fix very malformed video. There is a lot more to this stuff than putting a 75 ohm and 220 uF resistor in series and calling it a day.
Yoder
11-26-2011, 12:27 AM
Are you suggesting that these are not the correct outputs? Otherwise, I don't see how tying two signal outputs together would break a chip...
Ok, so you're suggesting that the plan discussed here is wrong. Do you have any suggestions? Do you have experience designing video circuits? If so, I'd love to hear your input. :thumbsup:
Calpis
11-26-2011, 01:59 AM
I'm simply commenting that you do not tie outputs together, unless you know them to be open-collector or something :banghead: Hopefully if you ask yourself what an output is you'll come up with a voltage source, considering a normal totem-pole/class AB output. If you short two voltage sources which are not at the same potential what happens? I guess you'll have to find out.
I do have some experience with video circuits but even after a few analog classes and a lot of independent study I can't call myself an expert. Analog signal processing is messy and crude, and that's when you're doing it right. Even an expert looking at the circuit won't be informed as to which mixing values to use, stuff like that has to be calculated algebraically after analysis and measurements are taken. I don't have the means to do this, but I know that bruteforcing a circuit won't work. That's all.
Yoder
11-26-2011, 02:37 AM
From my understanding, Tomaitheous has put these on the scope and identified these outputs already. Yes, I'm trusting him, but he seems to be be thorough with his work. We're not just tying random lines together.
Besides, from his analysis of the circuit, these lines are already tied together to build composite out...we're just amping the (tied together lines that generate) chroma and luma separately as we do with any s-video mod.
I'm totally open to your suggestions, but I'd like some more specifics.
Calpis
11-26-2011, 03:16 AM
Nowhere do I see where he said he used a scope (nor is that applicable), I suspect he measured the resistors with a DMM (and they are not accurate in-circuit). You aren't understanding me, the circuit he captured DOES NOT TIE LINES TOGETHER. Each output and resistor pair is a Thevenin source, and in parallel you get weighted-averaged MIXING of the sources. This is completely different than tying signals together, and no offense to tomaitheous but tying signals does not sum them nor is it smart nor is summing even what you want to do here since the composite circuit does not sum. Summing requires precision mixing (identical Thevenin resistances for an exact midpoint between the voltages) followed by precision voltage amplification.
I also don't see an analysis anywhere of the circuit but I can give a poor one. Y, I and Q ("R-Y" and "B-Y") are voltage mixed then further mixed with colorburst, in this order seemingly for economical purposes. This node is buffered with a common-collector amp and attenuated, then buffered with a complementary common-collector pair. I think the PNP is to negate the Vbe drop of the final NPN CC which sets the output impedance. Because the 75 R is shunt and not in series, and there is no voltage amplification, and there are no shunt resistors for the DAC output it can be assumed that A) the DAC is voltage-driven and B) the signals are directly ~1 Vpp. This still doesn't make it clear which values to use. Analysis of the DAC and transistors is difficult so it's likely even Hudson adjusted the attenuation for example with a scope.
Yoder
11-26-2011, 11:45 AM
Well the analysis by Tomaitheous wasn't in this thread, of course. Tomaitheous appears to have spent a lot of time looking at the video encoder below. How would you be able to identify the colorburst signal, phase offsets, etc without a scope?
http://pcedev.wordpress.com/2011/01/11/s-video-mod/
http://pcedev.wordpress.com/2011/01/04/more-composite-signal-analyzing/
http://pcedev.wordpress.com/2011/01/03/vce-y-channel-update/
So there are two opinions here that don't agree with each other...that's fine. I'm just trying to figure it all out. That's fine, though. My hope was to get more info to see if this is doable. Thanks for your input. For now, I'll hold off on going any further with this.
See, this is exactly why I put that disclaimer in there.
This is completely different than tying signals together, and no offense to tomaitheous but tying signals does not sum them nor is it smart nor is summing even what you want to do here since the composite circuit does not sum.
I thought it sounded fishy but I couldn't quite figure out why. 99% chance it's due to a total lack of formal EE education. Being self-taught is fun but you tend to break things along the way.
Calpis
11-26-2011, 03:38 PM
@Yoder: with a service manual? I dunno.
@APE: Well for future reference there are very few circumstances where you want to tie outputs, the reason for this is that typically outputs are buffered by current amplifiers which provide the circuit following it with a very low output resistance in order to effectively transfer a signal to a load (which is hopefully high resistance for maximum transfer). If you make a low resistance path between two voltages current flows from the high voltage to the low voltage, only restrained by the resistances and the current-sourcing abilities of the high voltage and current-sinking abilities of the low voltage. In most cases there is no protection against shorts, and transistors will cook themselves if given the opportunity.
Also something I didn't notice for the analysis is that two cascaded common-collectors (PNP, NPN) also probably drastically reduces the NPN's output resistance so the display only sees the 75 R.
Friend of mine did try to tie his 5v and 12v lines together on an ATX power supply to charge some batteries for his R/C car. Thankfully it was a quality power supply and it shut itself down before any damage went down.
Since that would be running the 5v and 12v lines in parallel it wouldn't have the voltage required to charge his 17v batteries. Even if it could and you put in series a diode (probably really stupid) wouldn't you need a diode capable of handling X watts? At that point you might as well just build a proper circuit.
Calpis
11-28-2011, 12:23 AM
Since that would be running the 5v and 12v lines in parallel it wouldn't have the voltage required to charge his 17v batteries. Even if it could and you put in series a diode (probably really stupid) wouldn't you need a diode capable of handling X watts? At that point you might as well just build a proper circuit.
Even joining two diode-protected supplies at different potentials does not sum the potentials/voltages. If only it were that easy... (And that is not stupid, it's actually a common thing to do in battery-backup systems.) When you put diode-protected 12V and 5V in parallel, 12V wins out, and since current doesn't flow from a lower potential to a higher potential, 5V provides 0 current.
tomaitheous
02-04-2012, 01:36 PM
Someone did a quick svideo mod by directly tapping the 6260 pins: http://www.pcenginefx.com/forums/index.php?topic=10850.new#new
Yoder
04-06-2012, 03:36 AM
Thanks for the update! So it turned out to be fairly basic after all! Just as you suspected! I'll have to give this a shot when the semester is over.
Powered by vBulletin® Version 4.2.0 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.