mmmonkey

VGA Scanlines

To improve the look of retro games on LCD TVs you may like to add 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 Upscalers, I recently discovered you can buy a Scanline Generator called the SLG3000 to add and alter scanlines on a VGA signal - UPDATE - there is a new kid in town, Toodles has been working on the T-SLG, another brilliant looking bit of kit :-) 

It seems a lot of people want this setup.  Well arcadeforge have developed and now sell the Sync Strike, I've tried one out and it works brilliantly with this VGA scaler.  You can even buy the complete setup, Sync Strike, VGA Scaler and SLG3000 as a kit now, a plug and play kit for playing retro consoles on your HD TV via VGA with an awesome picture.  Thanks Jochen :-)

And then, thanks to Gamesx I found 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 used the cheaper, easily available replacements 74HC74 and 74HC125 (plus they don't need capacitors).

Dreamcast Dashboard Saturn KoF 97 RGB Modded N64

My prototype board

My first attempt prototype board above is a bit big, but I plan on mounting it in a project box with VGA sockets on it so I can use it on different devices if I need to.  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 connectors.

Just in case the diagram ever vanishes from the forum post, 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 devices, on another though, it didn't.  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 RGB to VGA box, I soldered it to the power plug on the RGB VGA board), the chips are meant to require 5v, but at the moment mine are working at 3v.

The VGA pinout I used

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 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)

More link wires.

 Now the RGB wires are soldered into place.  Remember to link the wires to the chip legs with blobs of solder.

Links highlighted

And then the Horizontal and Vertical Sync wires

Link points highlighted

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)

(I guess there's nothing stopping you try H Sync either.)

This is the board stuck to the underside of my RGB to VGA upscaler

I also took my prototype board and put it in an project box.  If I was going to do this again, then I'd have a VGA cable coming out of the Project box with a Male Connector on (to plug into the VGA out on whatever VGA device you're using - update, in fact - I've just done this!), and a Female socket at the other end.  As it is currently though, I can use the short 50cm VGA extension cable that I bought to connect it up.

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 socket, then one wire used for GND).

Then wired in the signals from the circuit board, it doesn't matter if you put them on the VGA in or VGA out sockets, 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.

Notes

Here's how I made the holes for switches, sockets.

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-Off switch, wired up exactly the same and  you'll get 3 options - Odd Scanlines, No Scanlines, Even Scanlines!  (actually, when I tried this, it only worked if I used the 74LS74 and 74LS125 chips, not the slightly cheaper 74HC74, 74HC125 chips)

It's very easy to add this to a Dreamcast VGA box, just like adding it to the RGB to VGA Upscaler project.

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.

This works absolutely great on my LCD monitor.  My telly is okay, there is some slight horizontal banding where I guess my TV is doing some of it's own scaling still which is a bit annoying once you notice it.  If I increase the resolution of my VGA device to match the number of vertical lines that my TV handles then it works fine, but the higher resolution means smaller scanlines also, it does however look a lot better still.

Scanline Width
Thanks to Toodles (and bootsector) for sharing how to alter the width of the scanlines (check around post 329), 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 upscaler, I didn't want to pull it apart too much, so altered as little as possible.  Here's some diagrams I made and/or altered for it..

Here's a couple of screenshots showing MOTW running at 1024x768.  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.

.

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)

Notes
 The original post on GamesX 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, I'll try this on the next one I make to see if it makes using an on-off-on works properly on the HC chips (thanks bigsanta):

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.

 !! H E L P !!

Game console modifications