Feb 13

Proper C64 S-Video

NOTE: This article addresses the various S-Video signals available from a few different versions of the US NTSC, brown, breadbox Commodore 64. If you have a C64c, C128 or PAL versions etc., I have no idea how much the below information may be of use to you. Proceed with caution.



When my Commodore 1702 monitor recently bit the dust, I found myself struggling with a decision: Invest in another 30 year old tube-based technology or bring the output of my beloved C64 into the 21st century. I chose the latter and couldn't be happier.

Wouldn't you know it? Right in the middle of converting my 200+ collection of C64 floppies to .d64 images, my Commodore 1702 monitor went black and started squealing like a wounded pig. "Well, that's new", I thought to myself. Now what? A quick browse through the pages of eBay revealed a few overpriced, CRT replacements, each of which would cost at least $40 on top of the buy-it-now price to ship. Then it hit me. I have two LCD monitors I'm not currently using. Why not utilize one of them as my C64 monitor? (Nevermind the fact that neither of them have composite or S-Video in) I mean, how hard could it be, right? Converting the C64 output to VGA or HDMI? Turns out my final result wasn't hard at all. It was the process of getting to that final result that nearly ended my life.

Ok. Maybe that was a melodramatic and totally false account of the process. Had I simply paid attention to the few technical books and blog posts I had read regarding making my own S-Video cable, I wouldn't have been so challenged getting a clean signal to my LCD display. The issue I was facing was that there was way too much noise in the signal. Text was almost unreadable and the picture, overall, was just plain annoying to look at. So, I figured, if I had misinterpreted something along the way, surely, at least one other person could have done the same thing.

This post is for you, that one other person.

After deciding to go with an LCD, I had to find a composite or S-Video to VGA or HDMI converter. I found one of each (S-Vid->VGA and S-Vid->HDMI) on eBay and waited a week for one or the other to show up. The VGA converter showed up this past Thursday and thus, started my C64 video odyssey. (S-Video to HDMI arrived. Updated pics below) In addition to explaining how I soldered myself into a corner, I will share a revelation I had after figuring out the noisy signal, that involves making the more common DIN45326 type 270° 8-pin din plug fit perfectly into the uncommon DIN41524 type 262° 8-pin socket, Commodore so wisely chose to use for the C64's A/V port. I suppose they could have gotten by with a 6-pin din, seeing as how pins 7 & 8 aren't even connected internally to anything. However, had they used another 6-pin port, I can imagine the hordes of Commodore tech support calls that would have poured in after thousands of users plugged their IEC devices into their A/V ports, causing that magic puff of smoke, the soul of all electronic devices, to escape their precious C64s. That would be bad. 8-pin makes much more sense to me now.

A bit About Audio/Video On The C64:

The audio, chroma & luminance of the C64 are internally mixed together, RF modulated and fed to the RCA jack on the back of the computer. Connect this to the Antenna In on an old television set, choose channel 3 or 4, and the tv would then receive, amplify, filter, and finally, demodulate the signals. This process of encoding and decoding was designed for broadcast video. As such, it degrades the very digital signals of the C64 we are trying to see and hear. If only we could get to the signals before they were mixed together!

At first, Commodore did make some of these signals available at the A/V port. Earlier C64s had a 5-pin A/V port that contained Audio Out, Audio In, Composite Video Out (read as: chroma & luminance combined... important!) and Luminance Out. Most of the technical information I found on the A/V port was for this older, 5-pin solution. All of them said using pin 4, Video Out, was "ok" to be used as the Chroma signal on an S-Video In. That's where I didn't pay complete attention. Using only Luminance with S-Video will get you a pretty clean looking black and white picture, but no color. Adding a composite video signal as if it were Chroma will indeed get you color, but it also comes with some nasty, jpg-like, jaggy artifacts as a bonus. YAY!

Here's the really stupid thing on my part... Later in the C64 lifecycle, Commodore upgraded the 5-pin A/V port with an 8-pin port that contained one, single addition: the Chroma signal on pin 6! (as stated before, pins 7 & 8 are not physically connected to anything internally) Even though I have this 8-pin port on my C64, and even though I knew pin 6 was Chroma, since the 270° 8-pin connector I had didn't fit, I stuck with using one of the hundreds of 5-pin din (MIDI) connectors I had laying around (the DIN41524 180° 5-pin connector pin layout matches the first 5 pins in the 8-pin port). I mean, all the technical data I found said pin 4 was fine... DOH!

Note on video signal levels: It seems the Luminance & Chroma signals on the C64 were not the same voltages as todays S-Video. It works great for the Luma & Chroma input on Commodore monitors, which is why some people refer to it as Commodore video and not S-Video. A few books and blog posts pointed out that adding a 300Ω resister to pin 6 of the updated 8-pin port will make it behave with S-Video systems. The signal is slightly noisy without the resistor and better with. I jumped straight into thinking that that was why I had such a bad signal, so I started playing around with inserting and adjusting a 1k potentiometer on the pin I was using for chroma, pin 4. Didn't make a bit of difference, other than dimming the saturation level of the color. The problem, of course, was because I was using pin 4 video as chroma and not pin 6.

Successful Cable Construction:

Once it dawned on me to try pin 6, Chroma, I went to work on a custom connector. I started by heating up individual pins of a 5-pin connector and pulling them out of the black plastic housing. I only needed three pins for testing: Luminance (pin1), Chroma (pin6) & Gnd (pin2). I had them sticking gently into the proper pins of the 8-pin port, connected the S-Video connector on the other end of the cable to the S-Video-> VGA converter and turned on the C64. The result? Perfection. Aside from the vertical lines I've read can't be dealt with, all of the jpg-like artifacts were magically gone. It looked pretty close to the Vice C64 emulator. I was ecstatic, to say the least!

Sharing The Revelation:

I instantly logged into commodoreserver.com's chat so I could tell someone who would understand and appreciate that I figured out my video issue. While explaining it to AgentFriday (who so nicely congratulated me on overcoming my stupidity ) I started talking about how I pulled the pins from a 5-pin connector etc.. that the Commodore 8-pin din was the 262° version, unlike the more commonly found 270° version... and then it dawned on me that maybe the only difference between the two connectors might happen to be the position of pins 7 & 8, which aren't used anyway. So I grabbed my 8-pin connector that didn't fit, heated up pins 7 & 8 with my soldering iron, pulled 'em out and the connector fit perfectly into the A/V port!! I now had a clean way of accessing pin 6, Chroma, from the A/V port and didn't have to wait for a specially ordered connector in the mail.

Pinouts: as seen from the solder side of connectors

DIN41524 5-pin 180°



Older 5-pin A/V port

1. Luminance

2. Ground

3. Audio Out

4. Composite Video

5. Audio In 1. Luminance2. Ground3. Audio Out4. Composite Video5. Audio In

DIN41524 8-pin 262°



Newer 8-pin A/V port

1. Luminance

2. Ground

3. Audio Out

4. Composite Video

5. Audio In

6. Chroma

7. N.C.

8. N.C. 1. Luminance2. Ground3. Audio Out4. Composite Video5. Audio In7. N.C.8. N.C.

MiniDIN-4



S-Video Connection

1. Luminance Ground

2. Chroma Ground

3. Luminance + Sync

4. Chroma 1. Luminance Ground2. Chroma Ground3. Luminance + Sync4. Chroma

Connections: Choose which C64 port you have: 5-pin or 8-pin

S-Video C64 5-pin C64 8-pin 1 2 2 2 2 2 3 1 1 4 4 6 <--300Ω resistor on pin6 of 8-pin port only.

NOTE: If you have the older, 5-pin DIN, you are stuck connecting pin 4, composite video out, to chroma. This will give you the same crappy video signal in the 'before' pics below. NOTE: If you have the older, 5-pin DIN, you are stuck connecting pin 4, composite video out, to chroma. This will give you the same crappy video signal in the 'before' pics below. Alpha has a very detailed C64 mod page that shows you where to find the individual chroma signal on the C64's motherboard. Proceed with caution!





Cable Construction: *click images for full sized version

DIN45326 8-pin 270° connector with pins 7 & 8 removed

Now it fits into the DIN41524 8-pin 262° C64 connection

Showing connections for Audio Out, Ground, Luminance.

(twisted both L&R wires in audio cable together to make one connection)

(2) 150Ω resistors in series on pin 6 Chroma - measured 298.9Ω

(didn't have a single 300Ω on hand)



Heat shrink over the two resistors, Chroma wire soldered to the open end

Second heat shrink over the end, covering the soldered Chroma wire



Connector just prior to closing up...

and final cable. I like a single cable coming out, hence the extra sheeth and shrink.

Before / After Shots:

REALLY must click to inspect large versions. Even large, doesn't look as bad as it does in person

Still a little bleed on bright reds (no pun intended) turning down color saturation cures that.

Final: Added Bonus 5-1/4 floppy for scale. Even though Most TVs and Commodore monitors have a 4:3 aspect ratio, the 320x200 resolution of the C64 works great on a 16:10 aspect ratio. This is a 24" monitor that can do 1920x1200, but the VGA converter looked better at this 1440x900 resolution. 1920x1200 was 2" to far to the left, leaving space on the right.

The graininess is because the overall brightness in the room was pretty dim and this is the best my iPhone's HDR could do. It looks very clear in person. Also, I have no idea what the resolution ends up being on the projector. There isn't a choice for output on the converter. Here's a shot of the C64 going through the S-Video to HDMI converter connected to my HD projector. When playing Bruce Lee, Bruce is the same height as the coke can on the left speaker! 118" of C64 heavenThe graininess is because the overall brightness in the room was pretty dim and this is the best my iPhone's HDR could do. It looks very clear in person. Also, I have no idea what the resolution ends up being on the projector. There isn't a choice for output on the converter.

Whew! That was long!

Hope this helps at least one other person stay sane during their quest for a home-made S-Video connection with their C64.

Thanks for reading!

-=Randy.....In LA

