Adding S-Video to TG-16/PCE Duo...

Discussion in 'PC Engine / Turbografx Discussion' started by goombakid, Sep 8, 2011.

  1. goombakid

    goombakid Spirited Member

    Joined:
    Sep 2, 2010
    Messages:
    169
    Likes Received:
    0
    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?
     
    Last edited by a moderator: Feb 27, 2012
  2. APE

    APE Master Baiter

    Joined:
    Dec 5, 2005
    Messages:
    6,170
    Likes Received:
    39
    Location:
    Caleefornya
    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.
     
    Last edited: Sep 9, 2011
  3. tomaitheous

    tomaitheous Rapidly Rising Member

    Joined:
    Jun 29, 2007
    Messages:
    98
    Likes Received:
    0
    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.
     
  4. l_oliveira

    l_oliveira Officer at Arms

    Joined:
    Nov 24, 2007
    Messages:
    3,363
    Likes Received:
    27
    Location:
    Brazil
    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!
     
  5. Calpis

    Calpis Champion of the Forum

    Joined:
    Mar 13, 2004
    Messages:
    5,907
    Likes Received:
    15
    Location:
    .ma.us
    Have the LUT been dumped?

    Edit: nevermind, everything in the patent
     
    Last edited: Sep 17, 2011
  6. tomaitheous

    tomaitheous Rapidly Rising Member

    Joined:
    Jun 29, 2007
    Messages:
    98
    Likes Received:
    0
    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: 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.
     
    Last edited: Sep 18, 2011
  7. Calpis

    Calpis Champion of the Forum

    Joined:
    Mar 13, 2004
    Messages:
    5,907
    Likes Received:
    15
    Location:
    .ma.us
    You measured the resistors in-circuit? If so they could be very off.
     
  8. Yoder

    Yoder Member

    Joined:
    Jul 25, 2010
    Messages:
    12
    Likes Received:
    0
    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...
     
  9. APE

    APE Master Baiter

    Joined:
    Dec 5, 2005
    Messages:
    6,170
    Likes Received:
    39
    Location:
    Caleefornya
    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.
     
  10. Yoder

    Yoder Member

    Joined:
    Jul 25, 2010
    Messages:
    12
    Likes Received:
    0
    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?

    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 :)
     
  11. APE

    APE Master Baiter

    Joined:
    Dec 5, 2005
    Messages:
    6,170
    Likes Received:
    39
    Location:
    Caleefornya
    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.
     
    Last edited: Nov 17, 2011
  12. Yoder

    Yoder Member

    Joined:
    Jul 25, 2010
    Messages:
    12
    Likes Received:
    0
    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/p.../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.
     
    Last edited: Nov 17, 2011
  13. tomaitheous

    tomaitheous Rapidly Rising Member

    Joined:
    Jun 29, 2007
    Messages:
    98
    Likes Received:
    0
    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.
     
  14. Yoder

    Yoder Member

    Joined:
    Jul 25, 2010
    Messages:
    12
    Likes Received:
    0
    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.
     
  15. CoolMod

    CoolMod Spirited Member

    Joined:
    Dec 31, 2006
    Messages:
    166
    Likes Received:
    0
    Location:
    Somewhere in Japan!
    I looked at trying to do this and it looks annoyingly complicated lol
     
  16. APE

    APE Master Baiter

    Joined:
    Dec 5, 2005
    Messages:
    6,170
    Likes Received:
    39
    Location:
    Caleefornya
    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.

    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.
     
  17. Calpis

    Calpis Champion of the Forum

    Joined:
    Mar 13, 2004
    Messages:
    5,907
    Likes Received:
    15
    Location:
    .ma.us
    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.
     
    Last edited: Nov 25, 2011
  18. Yoder

    Yoder Member

    Joined:
    Jul 25, 2010
    Messages:
    12
    Likes Received:
    0
    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:
     
  19. Calpis

    Calpis Champion of the Forum

    Joined:
    Mar 13, 2004
    Messages:
    5,907
    Likes Received:
    15
    Location:
    .ma.us
    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.
     
    Last edited: Nov 26, 2011
  20. Yoder

    Yoder Member

    Joined:
    Jul 25, 2010
    Messages:
    12
    Likes Received:
    0
    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.
     

Share This Page