Zez Retro

How To Hook Up MiSTer FPGA S-Video & Composite

With the advent of the tremendous new S-Video cores from Mike Simone, we can now get native S-Video (and by extension, composite) video from the MiSTer’s analog IO board. The goal of this guide is to help you understand how the cores output S-Video and show you a range of options for how you could hook this up to your TV.

For the moment you will need to manually install these cores yourself. Lets start with a primer on how S-Video as this helps us understand the cables you will need.

S-Video Primer

S-Video is comprised of two signals, chroma and luma. Luma is the brightness (or you can say, the picture) and chroma is the color information which gets laid on top of that. Luma technically also has the sync signal mixed in already. When you look at the end of an S-Video plug you see 4 pins: chroma, luma and a ground pin for each.

Firstly you need to enable the “Sync On Green” (sometimes denoted as “SOG”) switch on your analog IO board. Also don’t forget to load a compatible YC core and enable the S-Video option in the menu.

S-Video Cables

If you are using VGA to BNC cables, then your chroma will come out of the red line and luma from the green line.

If you are using any sort of passive VGA to component adapter use red and green.

Then you need some way to get this into a S-Video plug. I found this set on AliExpress for a few dollars. I chose the male BNC ends so they fit right into my VGA to BNC cable above

You can find versions of this plug with RCA ends as well, just look through eBay and AliExpress. For this purpose, I have found the adapters are of ample quality. As a very rough rule rule, if the cable is short, then you can have more confidence it will not introduce interference, but with anything cheap, your mileage may vary. In the above example, my VGA to BNC is quite long but fully shielded.

One thing to note: DO NOT BUY THE ADAPTER SHOWN BELOW. While it seems perfect, the outputs are not wired up to the correct VGA pins. I bought one myself just to test and I could not see even luma (i.e. a B&W picture) from any of the plugs.

Composite Cables

These new YC cores do support composite but you need to combine it yourself. A composite signal is just a combination of the luma and chroma elements “mixed” down into one signal. That’s why composite does not look as good as S-Video: all the signal information that used to be carried in two signals now must fit into one signal. If you extend the analogy in the other direction, that’s why RGBs looks so much better: it breaks out the individual colors and sync into their own discreet signal so they can not interfere with each other as much.

Getting a quick composite signal is as easy as combining the wires. You could literally twist chroma and luma together and get a composite signal. It won’t be the best quality, I’ll explain that later in the article. However if you want to get going, you could use a Y-cable to do the job.

It is often said that Y-cables are not recommended for video signals. That is usually true if you are splitting the signal i.e. having one composite console and using a splitter to run it into 2 TVs. That is bad, don’t do this. In our case, we are going in the opposite direction and combining signals instead. Again as I point out later in the article, this still isn’t the ideal solution but it will work fine for now.

Another example of this is using Antonio Villena’s component breakout adapter. In this case (using an idea from Antonio himself), I ran a bodge wire from chroma to luma and this mixes the signal

If you have already built an S-Video solution, you can use adapters like these to combine the signals. Mike himself was using this adapter from a good electronics store on Amazon.

I found these cheap plugs on AliExpress which also do the job

However, this composite is not perfect

If you want to get going quickly you can mix the signals like this and you will get a servicable but not at all perfect image. I captured this screenshot from the 32x core, via these composite solutions, into a ezCap composite USB capture dongle. You can see a lot of rainbowing with the colors

At the current state of the project (which may change as this is still a work in progress) to get the best quality from composite, you need to add some components to the luma signal BEFORE you mix it with chroma. Mike let me know about this on Twitter.

Note: this rainbowing issue only effects composite. If you are only using S-Video then it is not effected.

To demonstrate this for the less electronically engineering minded like myself, QDA on Twitter posted this photo of his filter cable solution. The solid yellow wire on the left is ground. The inductor and the cap are placed in parallel across the signal line.

Make Your Own Cable

Another option is to make your own cable. Making an S-Video cable is extremely simple and requires a minimal amount of soldering (or none if you buy a special DB15 plug). As chroma and luma are coming out of the IO board ready to go, you just need to wire up an S-Video cable to a VGA plug.

You can easily do this by getting a HD15/VGA plug from your local electronics store. Find an S-Video cable, cut the end off and separate out the 4 wires. Then solder the wires onto pins 1 and 2 (and ground wires to VGA pins 6 & 7 or any ground will do).

If you are hoping to go from S-Video to composite, you could add the extra components into the HD15 plug to make a very clean solution.

If soldering isn’t your thing you could also get one of these HD15 breakout adapters, I found this one on AliExpress. You just have the screw the wire in, however the downside is a rather large plug and you need to cut away more wire to make it fit. You can also find smaller versions of this which don’t expose all 15 pins. As long as you can get to pins 1 & 2 and a ground then you should be fine.

The Future

This article is current as of April 2022. Do be advised that the YC cores for MiSTer are a work in progress and still being perfected. The final result may be sightly different from this, however it seems that it might only differ in the luma filtering method described above.

Mike is already working on a prototype PCB based VGA to S-Video & Composite dongle which would handle all of this stuff. The hope is that the dongle will be open sourced and cheap enough that someone will be able to make a batch of these for sale. When these become available they will certainly be my preferred way to access the S-Video signal from these cores.

It is also my personal hope that S-Video functionality gets rolled into the main cores and we don’t need to double up by having a regular core and YC version of the core. I guess it doesn’t make a big difference in the end but still it would be nice.