To improve the look of retro games on LCD TVs you may like to try Scanlines. It’s beyond me to be able to explain them, and there’s already the perfect guide on the web for it.
I found out about Scanlines when I learnt about different scalers, I then discovered you can buy a Scanline Generator called the SLG3000 to add and alter scanlines on a VGA signal. Since the SLG3000 was released, a couple of other interesting products have come onto the market.
And then, thanks to GamesX I found this page which shows that you can make your own VGA Scanline Generator, it’s a lot more basic than the SLG3000 because it only lets you select odd or even scanlines, but it’s certainly impressive and costs only a couple of pounds to make. The original post shows it using 74LS74 and 74LS125, I’ve also used the 74HC74 and 74HC125.
I really should get some prototyping breadboard to save me some time and parts! But, this was my prototype I made.
You can’t see the VGA sockets that are on the end of the wires coming off the board, but there’s a male and female VGA connector, they are linked together and the +5v, GND, R, G, B, H and V signals from the board attach to the relevant pins on one (doesn’t matter which) of the VGA connectors.
Just in case the diagram ever vanishes from the forum post or website linked above, here’s a copy of it..
..and here’s my scribble on how to wire this thing up, I haven’t used veroboard this time, I’ve gone for Matrix board
When I drew the diagram above, I used a seperate pin for power (VGA 9) which had 5v on one of my VGA devices, on another though, it wasn’t connected, so it’s not a reliable source for power. I’d read that you can use the Vertical Sync signal as a power source, I tried this and it worked, so you could just link up Pins 1 and 14 of the 74HC74 chip.
If you’re incorporating this into something else, you can always use a separate PSU for it (like when I added this to my RGBS to VGA scaler, I soldered it to the power plug on the scaler), the chips are meant to require 5v, but at the moment mine are working at 3v without any problems.
I’m afraid I haven’t got time to do a complete step by step guide for this. But I’m hoping that the diagrams above, photo’s below and any notes I made are enough to help you out :-) The design can fit comfortably on a piece of matrix board 9 x 10 holes.
The following photos show me making two boards up at the same time, allowing me to show you both sides of the board as I go along.
I started by soldering the chips in place. The 74 chips is at the top of the photos, the 125 chip at the bottom. Then solder the links up for GND and Power. I use the parts of legs that I’ve previously cut off of resistors, LEDs etc, you can use wire or whatever you have to hand. Remember to bridge the gap between the links and the relevant chip legs. Heat up both points and add some additional solder and it will fill the gap.
Now I’ve used more old left over resistor legs to link up more points on the underside of the board.
A few more links now, this time I’ve used Kynar wire, stripped, bent and soldered into place (you might be able to make out from the first photo how I strip the W shaped piece of wire, the wire strippers are indispensable)
Now the RGB wires are soldered into place. Remember to link the wires to the chip legs with blobs of solder (in the second photo, I have highlighted the links) Strictly speaking, it doesn’t matter which of these 3 points is red, green or blue.
And then the Horizontal and Vertical Sync wires
Here’s my switch wired up, the wire is from an IDE cable, to keep things simple I used the red wire for the middle of the switch
Nearly there, it’s just power now. You have two options, get power from an external source (right of the photo), or power from Vertical Sync (may or may not work, depends on your VGA device, I think the LS chips are able to work with a lower voltage)
Here’s one of the boards stuck to the underside of my RGBS to VGA scaler (GBS-8220).
I also took my prototype board and put it in an project box. For this to work I needed a nice and short VGA extension – so I soldered one up to the right length.
That’s my short VGA extension cable I soldered up (R, G, B, H, V and GND wired up, all GNDs linked together on the VGA sockets, then I use a single wire to join GND on the male and female connectors).
Then wired in the signals from the circuit board, it doesn’t matter if you put them on the male or female connectors, you can even split them between the two if you so want.
That’s the inside of the box finished, the black and red wires going to the top-right are power to an LED to show if the box is receiving power or not. These wires are just going to the power and ground supplies to the chips.
Here’s how I made the holes for switches, sockets on the project box.
The links I used are usually legs that I’ve cut off of resistors, LEDs etc, very useful for projects like this.
You can easily add an On/Off switch to this, just add it into the power wire. In fact, if you have a On-Off-On switch then you could put it in place of the On-On switch, wired up exactly the same and you’ll get 3 options – Odd Scanlines, No Scanlines, Even Scanlines!
It’s very easy to add this to small board to some other products – Dreamcast VGA box, GBS-8220 budget RGBS to VGA scaler (I’ll add some links when I have transferred and updated the guides – PG).
You can squeeze it onto a tiny bit of strip board to fit into smaller project boxes, poke the wires through the same holes as the legs to remove excess rows/columns of holes.
Thanks to Toodles (and bootsector) for sharing how to alter the width of the scanlines (it’s in this long thread, around post 329 I think), excellent if you’re running at a resolution higher than 640 x 480 (I’m using it at 1024 x 768). I added this to the SLG on my VGA scaler, I didn’t want to pull it apart too much, so altered as little as possible. Here’s a diagram I made to show the difference.
Here’s a couple of screenshots showing MOTW running at 1024×768. The first one will shows the narrow scanlines, the second shows the wide scanlines – they may look too big in the photo, but when sat back from my TV, they look much better, the original narrow ones at this resolution are too narrow. But, it’s down to personal preference I guess!
New Diagrams and Options
In the following diagrams, the legs coloured in Red are the ones that need power (3.3v to around 5v), the ones Blacked in are to look to GND.
Click each diagram to see an enlargement. There are two diagrams for each option, the upper side of the board and the solder side – this should make it easier to assemble!
Very Basic Option
Odd/Even Scanline Option Switch
Odd/Even and Width Options
Odd/Even, Width and Resolution Option
Vertical Sync needs inverting for the SLG to work at 800×600 Resolution.
Below are some more photos when I made one to test the diagrams above. I managed to miss one of the link wires, so I’ve drawn it onto the photos!
A few of the ready made solutions include Potentiometers to adjust the strength of the scanlines. I’ll add some diagrams here to show how to include those if you wanted to try them out.
Alternatively, you could just try some resistors on the R, G and B output of the 74LS125 chips, 75 ohm looks good on my TV.
Summary of Components needed
- 1 x 74HC74 chip
- 1 x 74HC125 chip
- Wires, Matrix Board
- 1 (or more depending on options) x On/Off Switch (or On/Off/On Switch)
The original post onGamesX has since been updated with a description of how the ScanLine Generator works, also, bigsanta says it’s advisable to link up the unused inputs on the 74ls74 chip to ground, don’t leave them floating.
From ニユ－マン on GamesX
74LS74 changes state with every HSync pulse, so one line is untouched and the next one is blanked (or vice-versa).
The switch selects if the blanking circuit (74LS125) has to erase the even or the odd lines.
When 74LS125 is active the RGB lines are grounded and you see a black line.