This is a basic guide for connecting your Win 7 or Win 10 PC to your CRT using crt_emudriver 2.0 in order to run GroovyMAME or other emulators at 15kHz 240p. This is the best option for emulation currently available, especially MAME. Bear in mind that this document was last updated for June 2020, and it's getting a bit patchy because the available tools are constantly updating.
It's not hard to connect a Windows PC to an SD consumer CRT TV, professional CRT like a PVM, or Arcade Monitor, but there's lots of small steps you need to get right. This is meant to be a guide to those steps. It tells you what you’re doing, and a little bit about why you’d be doing it and not doing something else. This should help prevent you making egregious mistakes. You're trying to make the image on your CRT look as close to the original hardware as possible - no filters, no shaders, no effects, no artificial scanlines. It's about games looking right, and believe it or not this also helps eliminate lag so they play right. I learned almost all the information in here from other people, it's a mess of disconnected bits, and you'll have to bear with me while i spend months cleaning it up. There’s some general information about CRT’s and modelines (resolutions) included, and if you don’t know where to start when it comes to connecting a PC to a CRT you may want to read it through. It's not short, however, so if you’re frustrated, use the index or ctrl-f. EDIT: it's now so long i'm going to add info as individual posts, so read the thread as well!
Before you start modifying your PC, backup your windows install or make sure you have a copy. You’re not likely to do any harm, but it’s not impossible if you fail to read properly. And remember that your PC normally boots in 480p or higher, so every time you turn the machine on you'll need to protect or unplug your CRT until Windows loads.
Everything you need to do can probably be done with a PC, software and cables, and possibly a converter. But if you decide you need to open your TV, remember that any exposed CRT can be dangerous even when unplugged. If you're going to open and play around with a CRT at any point, make sure you know how to discharge the tube correctly, and how to be safe around live equipment.
Contents
PART 1
a) Intro
b) What is GroovyMAME?
c) Why is GM better for a CRT? (Vertical Stretching is baaaaad, k?)
d) What are Super Resolutions? (What about Horizontal stretching?)
e) I want to use GM and Super Resolutions! How do I connect my Windows PC to my old CRT? (And what are these 15kHz modes people keep talking about?)
f) I read about a method to get 15kHz out of my PC but I can’t make it work! (Nvidia/Soft15Khz/ArcadeVGA/Powerstrip/CRU/Dongles/EDID-overrides/other)
g) What about using the TV-out (S-Video) port of some GPU’s? Or a cheap video converter from Ebay? (Transcoding & Component Video)
h) So what’s the best way to get 15kHz out of my PC? (AMD Radeon cards & crt_emudriver)
i) Which AMD Radeon card or setup should I pick? (Including boot-protection using Atom-15)
j) But I already *have* a Radeon card or ArcadeVGA - can’t I use it?
k) Where do I get crt_emudriver?
l) How do I install crt_emudriver? (How do I use VMM/ArcadeOSD?)
PART 2
m) The physical connection - Cables, and combining sync.
PART3
n) Basic troubleshooting.
The Guide
a) Intro
First, let’s establish a few things.
This guide is about connecting a Windows PC to an SD CRT using an RGB or technically RGBS signal. S-Video and component/YPbPr are also covered.
Expecting everything to go smoothly the first time you try to connect your Windows PC to an SD CRT is unrealistic. You will almost certainly encounter a few hiccups, have to figure out what's going wrong, reinstall everything and start again at least once. Prepare for this. Get a picture up on the CRT first, then look at customising your emulators, etc. Spend as little money as possible to get things working, and upgrade later. When you do finally get everything set up, consider a free program like Macrium Reflect to take a backup image of your drive.
You probably want to connect your PC to a CRT to get the visual image from an emulator to look like real hardware, as good as it can look. Some emulators are better at this than others. This guide doesn’t cover emulator configuration beyond a few tips for using GroovyMAME and Super Resolutions. You may also want to watch old SD TV shows or movies and anime.
Ideally you want to use a 15kHz-capable CRT for emulation if that's what the original hardware outputted to. This covers ordinary old Standard Definition (SD) consumer CRT TVs, along with most PVMs and Arcade Monitors. PC CRT's are not usually 15kHz capable at all; they can look very nice, but they're not specifically covered by this guide. Later CRT’s, widescreen or 100Hz EDTV or HDTV consumer models for example, are NOT natively 15kHz capable either. If anything they take that signal and upscale it digitally, similar to an LCD TV or the way a unit like the Framemeister works. But the upscaler built into any TV is garbage, adding lag and losing fidelity. HD CRT TV's have their uses, but retro gaming is not foremost among them.
Is it worth spending money to use a 15kHz CRT? Well, how long is a piece of string? Connecting a Windows PC to an old CRT gives you all sorts of options that consoles and linux don't, and personally there's no way I could go back to using an LCD for retro gaming. The way the phosphors of a CRT screen produce light and the behaviour of the display just can't be recreated any other way. In my opinion the result is definitely worth it, but sadly it's not always as easy as installing a single piece of software and plugging in a cable.
Next, we need to consider the fact CRT’s are analogue. Some have digital processing, and are to be avoided for our purposes here, but even they finish up with an analogue signal. A PC will often output an analogue signal too, called VGA for convenience. But VGA is actually a resolution and not a plug or signal type. The plug is an HD15 or DB15HD, and the signal type is RGBHV – Red, Green, Blue, Horizontal sync & Vertical sync. Sync is what gives you a stable picture - remember when TV's used to have a v-hold knob, to stop the picture rolling? R, G & B combine to give you the brightness and colours in that stable picture. Sometimes there is more information going back and forth than just the RGBHV lines, but those are all you strictly need. And a ground line. All video signals need one of those, but it’s usually omitted from the description just because. VGA ground lines are normally all connected inside your PC, thus you only need to connect ground once. Google the VGA pinout if you like. (Don't confuse signal ground with mains earth!)
PCs output other signal types as well. HDMI, DVI-D, and Display Port are all more common than RGBHV(VGA) now, but they’re all digital signals, and not any good for us. They can be converted to VGA or other analog formats (to minimise lag i recommend something like an HD Fury 2 or 3, or a Tendak AV-107-BK) but this guide doesn't really cover that. To do things right we really want a VGA port (HD15 connector), or a DVI-I port, which does the RGBHV signal through a different plug (along with the DVI-D signal we don’t need). And not just any RGBHV signal will do; we want an output controlled in such a way that we can get the low-resolution video modes we need like 240p.
Back to RGBHV for now. If you combine the H-sync and V-sync elements of RGBHV into Composite Sync, you get RGBS. More on combining sync in section m). RGBS is a standard used for highest-quality low-resolution video. It uses 4 video cables – Red, Green, Blue & Sync. RGBS is NOT the same as the Red, Green, and Blue cables with RCA plugs on the end with no fourth plug for sync. That’s referred to as Component video, or more correctly as YPbPr, often YCbCr if digital, or occasionally as YUV. Do not mistake the red and white audio plugs for a fourth or fifth video line, or for sync! RGBS is also not the same thing as RGsB, or sync-on-green, which Sony fell head-over-heels in love with during the nineties.
So, what signal does your CRT take? PVM’s normally take RGBS. SD CRT Arcade Monitors all take RGBS if nothing else, though you may need a video amplifier (Ultimarc’s Jpac, for example). Note that later arcade monitors may be multisync, or even 31kHz-only, and it's very important to check the sync range and details for the arcade monitor you have. If your consumer CRT doesn’t take RGBS (often, SCART) or RGBHV, and you don't want to hack RGBS into the set with the help of the excellent guys and gals on the Shmups thread (if you know how to be safe around electricity I'd recommend looking into this option) then you need a way to convert RGBHV into something else like YPbPr, S-video or Composite video. Composite video compresses all the video information into a single cable (normally with a yellow RCA plug) at a significant loss in quality, and I recommend against it unless you really have no other option. S-Video can work for PC use, but you need the right converter. If you want to use the YPbPr/Component inputs on your TV, a good RGB to YPbPr transcoder introduces no lag, and only a very, very slight drop in picture quality. I know only a little about transcoders, so do your own research there.
Section g) contains notes about converting video types. And there's a list of viable 1:1 converters in post #10 below, and even some links to schematics for building one. Remember that CRT’s use a variety of connector plugs. From RF aerial plugs, to RCA sockets, SCART connectors, the BNC bayonet-type connectors often seen on professional gear, and more. And Arcade Monitors normally have their own special plugs, often making cutting and soldering required. It's important to plan ahead and figure out what you need before spending money.
b) What is GroovyMAME?
GroovyMAME, created by Chris Kennedy, maintained and updated now by Calamity with input from Intealls, Bytebit and others, is a parallel build of MAME, the Multiple Arcade Machine Emulator. GM, to save typing it out every time. There’s a bit to know about GM, but it’s no harder to actually use than MAME. Getting an image from your PC to show up on an old CRT is the problem.
This guide does not tell you how to use MAME, or how to find games for it (roms). One thing I will say, because it often seems to be missing from other sources, is that for any version of MAME it’s best to use the same version roms. So for MAME 0.182, you want the 0.182 roms/romset/bioses/CHDs. The further away the two versions are, the more likely you'll get errors. I do go on to recommend crt_emudriver a bit later, so I should add that you might need the latest version of the driver for newer versions of GM to run. (At least the beta10 version, at this point.)
Note that a lot of features from GM are being integrated into mainline MAME, and eventually the two may merge. That hasn’t happened at time of writing, however.
c) Why is GM better for a CRT? (Vertical stretching at 1:1)
GM has a built-in function called switchres, which, when left on default settings, selects a video mode with a 1:1 vertical ratio, ideally from a list of "super" resolutions, and adjusts the modeline so the refresh rate matches the original hardware and the sizing is right. Vertical resolution is absolutely critical for a CRT. I'm going to talk about horizontal resolution first, in the paragraphs below, but i do come back to vertical resolution and why it's so important.
The switchres utility works amazingly well with 2D arcade games, and also with the MESS emulator that’s now built into MAME. It’s about the most important feature of GM, but GM also has frame-delay to combat input lag, V-sync offset, and audio latency options. At this point GM on Linux has caught up with Win7/10 in terms of input lag, but i'm a Windows fanboy, so here we are
RetroArch is another powerful emulation package to look into, but for the most part falls outside this guide as i don't have a lot of experience with it. Its run-ahead feature is about the best way to go in cases where original consoles used extra frames of input lag.
EDIT: Calamity is working on an optional update to GM called frame slicing or beam chasing. Modern CPU's are so fast they can update a video frame during the time that frame is being drawn on screen, and this allows GM to respond to control inputs during the current frame. This helps compensate for any input delays and other factors, but it only works in special cases as most games in MAME can't handle partial frame updates. Consider it highly experimental.
d) What are Super Resolutions? (What about Horizontal stretching?)
Super just means horizontally larger, here. The picture still looks normal on your screen, of course. In short, a super-wide resolution allows the image to stretch more evenly in the horizontal direction, at the same time allowing you to install, say, only five or six modelines in order to run 99% of games. This means there is far less configuring and tweaking required to get your setup working as well as it can. It also means that when you pick a game your system switches resolutions much, much faster and the game pops up quicker - in some cases ten to fifteen seconds quicker.
2560 pixels wide is the default super resolution trigger GM uses, controlled by the "super_width" variable in mame.ini. The analogue circuitry in a CRT TV will hit a bandwidth limit above which the transistors won't be able to respond fast enough and the image becomes dim and mushy, depending. (Thanks to NEO-GEO Man for clueing me in, there). Any functioning analogue TV can do 2560 though, even before taking into account how super resolutions are meant to work. A resolution 2560 pixels wide at 15kHz has a bandwidth of about 40MHz. When dealing with analogue video the bandwidth is also called the dot clock. Section e) will talk a bit more about dot clocks. Again, when using super resolutions what you seen on screen is not compressed or stretched out, it looks just like normal.
To go into more detail... CRT's are limited by their horizontal scan rate, or the number of horizontal lines of pixels they can draw each second. This is the same as vertical resolution, because a raster CRT draws or scans each line of a video frame as a stream of dots from left to right, one line after the next, down the screen. Hence, scanlines. That's what a raster is, a continuous stream of bits broken up by line markers. CRT's are not, however, limited by horizontal resolution, and the number of dots within each line can be 2560, or higher, as above. The overall screen width is unchanged, the electron beam sweeps across the face of the tube in the same interval, so the 2560 horizontal pixels are drawn into the same physical space over the same length of time as 384 would be, or 320, or whatever. CRT's are not fixed-pixel like LCD or OLED because while there are discrete phosphors of three colours that light up, each can do so partially or unevenly. Think of two flyscreens with slightly different mesh sizes lain on top of each other - the electron guns fire a grid of pixels at the shadow mask, and the two never line up perfectly - they can't, it's not physically possible. Increasing the horizontal resolution is like spraypainting much finer dots over the visible flyscreen. There's more to it than that, but it's a convenient analogy. Don't expect to resolve the fine details of a 1920x1080p image on your SD TV, obviously. We're using the super-wide resolution for a special purpose, and the fact the pixels are in groups (see below) makes a difference too.
Why bother increasing the horizontal resolution? Because it saves massive amounts of time, and because using a large horizontal resolution eliminates scaling artifacts. Take the CPS1 arcade system (SF2, Final Fight + more) at an unusual resolution of 384x224. Sounds unusual anyway, doesn't it? Obviously the computer has to draw the first flyscreen first, the one the colour guns will fire at the physical phosphor-coated screen, and it does so digitally, dot by dot. Selecting a resolution of 320x240 dots would mean that while the vertical will fit at 1:1, with eight blank lines at the top and eight at the bottom, you'd be losing pixels horizontally trying to fit 384 into 320, or just enabling some filter or effect that would warp the original image. Even using 640x480 isn’t a great help, and will not produce a very even picture. The answer is to use a ‘super’ resolution of 2560 pixels wide, giving a 7/7/6 group for each three pixels of the original 384. As long as the horizontal resolution is sufficiently high, the effect is seamless.
Vertical resolution is different, being one of the main limiting factors of a CRT. Individual pixels are covered above, this time we're talking about lines of pixels. The scanlines of a progressive SD video frame are separate and distinct. This means that you have to scale 1:1 in the vertical direction because most old systems output at about 240 lines, the lines are spaced out, and if you stretch that 240 slightly into say 256, or even 288 or so, the distortion is huge, and scrolling backgrounds or moving sprites stand out like dogs' balls. And no way are you going to be able to push the (progressive) vertical resolution beyond about 288-300 on an SD CRT (see section e). An LCD with 1080 lines would have more room to stretch evenly. You could even use integer (whole number) stretching so the pixels scale perfectly, and leave some blank space. However our example of 384x224 isn’t 4:3 when displayed on an LCD, integer stretching or no. You could always use partial stretching in the horizontal only, on an LCD, but you wanted a CRT for visual fidelity, didn’t you?
To use super resolutions you need modelines like 2560x240p and 2560x256p installed on your system. Sure you can run everything in 320x240p with a single modeline, but even the SNES has several video modes it uses. The Amiga has four primary ones in each of two regions. And arcade games are all over the shop. Different devs used different tricks in different regions at different times, let alone the fact different consoles pick different on-screen positions for their video output. Super resolutions work to circumvent most of these issues, and look the same if not better than plain old 320x240p. Some people swear by a 3840-wide image as being an integer multiple of a greater number of native resolutions, but as the number of pixels in each line gets above 2000 or so, increasing it makes less and less difference.
Done right, using Super Resolutions saves tons of time and looks awesome, just like real arcade hardware or consoles. If you don't use super resolutions, you need to have the native resolution installed for every game you want to play, or you'll be settling for a lower-quality video image. Setting native resolutions for everything balloons out configuration time even if it's physically possible to size everything right on your CRT, and if you have to make changes you'll find yourself facing the same huge task over and over. And don't kid yourself, even if you buy a Hyperspin drive you'll be spending several days configuring things, and then more in a month or two when you realise you didn't do everything quite right the first time.
If you're going to try super resolutions, remember to keep a few normal resolutions too, like 640x480i, so the desktop remains useable! And not everything will use super resolutions, so having a few fallbacks (320x240p, 256p, 640x480i, even 800x600@50i) is a good idea. The guide linked to in section l) covers installing resolutions with VMM, super or otherwise.
e) I want to use GM and Super Resolutions! How do I connect my Windows PC to my old CRT? (And what are these 15kHz modes people keep talking about?)
This might sound obvious, but assuming you have an old standard definition TV, PVM or arcade monitor, the first step is to get the right video mode out of your PC. Modes like 240p and 480i, named for the number of visible horizontal lines (vertical resolution) and whether they are (p)rogressive or (i)nterlaced. All these modes have a horizontal scan rate of 15kHz or thereabouts – the rate at which horizontal lines of pixels are drawn on the screen each second. An old standard definition CRT is often limited to a 15kHz scan rate, give or take. Pushing things too far can do damage, so make sure you read carefully.
(Nominal NTSC Standard Definition scan rate) = (Horizontal lines each frame) x (Frames per second)
(FYI if we multiply the scan rate by the horizontal resolution, we get the Dot Clock, or Pixel Clock, which is the bandwidth of the modeline, but we’re not so concerned with the number of pixels within each line here. Horizontal resolution is not limiting, and super resolutions always have a higher dot clock than the lower limit of some GPUs, that limit being ~8 MHz. EDIT: some newer GPU's won't output analogue video at all, and have even higher limits).
For 240p, we have:
15.750 kHz = 262 lines x 60 FPS
The number 262 represents the total number of lines in the video frame, 240 visible lines and a blanking interval of 22 lines, the latter being as named, blank, and usually drawn off the screen. The vertical blanking interval contains the vertical sync pulse. Each of the 262 lines of a frame is drawn left to right, one after the other pretty much, then the vertical sync pulse returns the beam to the top to start again. This happens ~60 times a second for 240p. (There are horizontal sync pulses too, which size/position/center each line, then tell the beam to return to the beginning position one line lower.) Note that this is for 240p; the mode I'm using above for WinUAE is 262p, and probably has about 284 total lines.
When used alone, the term 240p normally refers to the standard 320x240@60hz mode. But remember that at the same horizontal scan rate you can slot in as many horizontal pixels per line as you like, subject to concerns mentioned in section d).
For 480i, we see:
15,750 = 525 x 30
Interlaced modes, like 480i, typically run at 60 fields per second. The first field draws odd lines – lines 1,3,5,7 through to 521,523,525. The beam then returns to the top and the second field draws even lines - 2,4,6,8…522,524. The two fields make one frame, so that’s 30 frames per second, with each frame drawn in two parts. This method achieves a higher vertical resolution (more horizontal lines per frame and thus more detail) but creates visible flicker in so doing. (Don't worry about that framerate, a CRT at 30Hz will get less motion blur than a top-end LCD at 120Hz). Games at native resolution normally look fine using interlaced modes, but you don't want to be using the desktop that way for long periods.
The numbers in these equations are not fixed, they have range limits. A PVM or Arcade monitor will normally tolerate a horizontal scan rate of between 15.5 and 16.2kHz, along with a vertical scan rate (FPS) of 48-65Hz (Fields or FPS here, whichever is higher). A consumer TV will normally handle a slightly narrower range than this, and you can find those limits if you want to. Different games and consoles play with them a little. This is important to note, and it becomes more important the more obscure the titles you want to run. You can get a 600i mode into a 16.2kHz scan rate (about where an arcade monitor or PVM will normally cut off) but only at 50 fields per second, or 25FPS - the desktop will flicker a little more noticeably, but games will mostly be fine. This will let you run 800x600 games - I have not yet encountered a game or emulator on windows that cared about interlacing or refresh rate, though some titles do slow down to 5/6th speed if V-sync is locked. And I hear Retroarch has some issues that are being looked into or worked around. Different TV’s are different, and it shouldn't hurt to try and find the scan limits of yours while testing. If a stable picture doesn't come up, even when you adjust whatever V-hold and H-hold settings you have, then you've pushed a bit far. The VMM suite of tools included in the crt_emudriver package will allow you to play with these numbers in a graphical format, though doing so may take a little getting used to.
Remember that certain arcade monitors have weird or finicky limits, and you should use google to find out about anything specific to yours. Nanao MS8 monitors for example, and only MS8's, have a very narrow safe scan range, and although they can sync to a much larger range, using them outside their sweet spot will work at first but then burn out the horizontal sync circuitry pretty quickly. Note that this is extremely rare, most arcade monitors are not limited this way, but i take no responsibility for yours. And CRT TV's from the early 90's and on, and certainly PVM's, are designed to be more versatile.
The numbers in the equations and the advice above are all for 15kHz monitors. The equations themselves, however, apply to all video modes and monitors, CRT or fixed-pixel, but in slightly different ways, and with different limits. For example: VGA=480p=31.5kHz=525x60. An LCD will almost certainly have a couple of fixed refresh rates, and you can't trade resolution for frames all the time even if your GPU thinks you can. The equations are still handy for finding pixel clock limits, etc, if you run into problems with these refresh rates or output formats.
It's not hard to connect a Windows PC to an SD consumer CRT TV, professional CRT like a PVM, or Arcade Monitor, but there's lots of small steps you need to get right. This is meant to be a guide to those steps. It tells you what you’re doing, and a little bit about why you’d be doing it and not doing something else. This should help prevent you making egregious mistakes. You're trying to make the image on your CRT look as close to the original hardware as possible - no filters, no shaders, no effects, no artificial scanlines. It's about games looking right, and believe it or not this also helps eliminate lag so they play right. I learned almost all the information in here from other people, it's a mess of disconnected bits, and you'll have to bear with me while i spend months cleaning it up. There’s some general information about CRT’s and modelines (resolutions) included, and if you don’t know where to start when it comes to connecting a PC to a CRT you may want to read it through. It's not short, however, so if you’re frustrated, use the index or ctrl-f. EDIT: it's now so long i'm going to add info as individual posts, so read the thread as well!
Before you start modifying your PC, backup your windows install or make sure you have a copy. You’re not likely to do any harm, but it’s not impossible if you fail to read properly. And remember that your PC normally boots in 480p or higher, so every time you turn the machine on you'll need to protect or unplug your CRT until Windows loads.
Everything you need to do can probably be done with a PC, software and cables, and possibly a converter. But if you decide you need to open your TV, remember that any exposed CRT can be dangerous even when unplugged. If you're going to open and play around with a CRT at any point, make sure you know how to discharge the tube correctly, and how to be safe around live equipment.
Contents
PART 1
a) Intro
b) What is GroovyMAME?
c) Why is GM better for a CRT? (Vertical Stretching is baaaaad, k?)
d) What are Super Resolutions? (What about Horizontal stretching?)
e) I want to use GM and Super Resolutions! How do I connect my Windows PC to my old CRT? (And what are these 15kHz modes people keep talking about?)
f) I read about a method to get 15kHz out of my PC but I can’t make it work! (Nvidia/Soft15Khz/ArcadeVGA/Powerstrip/CRU/Dongles/EDID-overrides/other)
g) What about using the TV-out (S-Video) port of some GPU’s? Or a cheap video converter from Ebay? (Transcoding & Component Video)
h) So what’s the best way to get 15kHz out of my PC? (AMD Radeon cards & crt_emudriver)
i) Which AMD Radeon card or setup should I pick? (Including boot-protection using Atom-15)
j) But I already *have* a Radeon card or ArcadeVGA - can’t I use it?
k) Where do I get crt_emudriver?
l) How do I install crt_emudriver? (How do I use VMM/ArcadeOSD?)
PART 2
m) The physical connection - Cables, and combining sync.
PART3
n) Basic troubleshooting.
The Guide
a) Intro
First, let’s establish a few things.
This guide is about connecting a Windows PC to an SD CRT using an RGB or technically RGBS signal. S-Video and component/YPbPr are also covered.
Expecting everything to go smoothly the first time you try to connect your Windows PC to an SD CRT is unrealistic. You will almost certainly encounter a few hiccups, have to figure out what's going wrong, reinstall everything and start again at least once. Prepare for this. Get a picture up on the CRT first, then look at customising your emulators, etc. Spend as little money as possible to get things working, and upgrade later. When you do finally get everything set up, consider a free program like Macrium Reflect to take a backup image of your drive.
You probably want to connect your PC to a CRT to get the visual image from an emulator to look like real hardware, as good as it can look. Some emulators are better at this than others. This guide doesn’t cover emulator configuration beyond a few tips for using GroovyMAME and Super Resolutions. You may also want to watch old SD TV shows or movies and anime.
Ideally you want to use a 15kHz-capable CRT for emulation if that's what the original hardware outputted to. This covers ordinary old Standard Definition (SD) consumer CRT TVs, along with most PVMs and Arcade Monitors. PC CRT's are not usually 15kHz capable at all; they can look very nice, but they're not specifically covered by this guide. Later CRT’s, widescreen or 100Hz EDTV or HDTV consumer models for example, are NOT natively 15kHz capable either. If anything they take that signal and upscale it digitally, similar to an LCD TV or the way a unit like the Framemeister works. But the upscaler built into any TV is garbage, adding lag and losing fidelity. HD CRT TV's have their uses, but retro gaming is not foremost among them.
Is it worth spending money to use a 15kHz CRT? Well, how long is a piece of string? Connecting a Windows PC to an old CRT gives you all sorts of options that consoles and linux don't, and personally there's no way I could go back to using an LCD for retro gaming. The way the phosphors of a CRT screen produce light and the behaviour of the display just can't be recreated any other way. In my opinion the result is definitely worth it, but sadly it's not always as easy as installing a single piece of software and plugging in a cable.
Next, we need to consider the fact CRT’s are analogue. Some have digital processing, and are to be avoided for our purposes here, but even they finish up with an analogue signal. A PC will often output an analogue signal too, called VGA for convenience. But VGA is actually a resolution and not a plug or signal type. The plug is an HD15 or DB15HD, and the signal type is RGBHV – Red, Green, Blue, Horizontal sync & Vertical sync. Sync is what gives you a stable picture - remember when TV's used to have a v-hold knob, to stop the picture rolling? R, G & B combine to give you the brightness and colours in that stable picture. Sometimes there is more information going back and forth than just the RGBHV lines, but those are all you strictly need. And a ground line. All video signals need one of those, but it’s usually omitted from the description just because. VGA ground lines are normally all connected inside your PC, thus you only need to connect ground once. Google the VGA pinout if you like. (Don't confuse signal ground with mains earth!)
PCs output other signal types as well. HDMI, DVI-D, and Display Port are all more common than RGBHV(VGA) now, but they’re all digital signals, and not any good for us. They can be converted to VGA or other analog formats (to minimise lag i recommend something like an HD Fury 2 or 3, or a Tendak AV-107-BK) but this guide doesn't really cover that. To do things right we really want a VGA port (HD15 connector), or a DVI-I port, which does the RGBHV signal through a different plug (along with the DVI-D signal we don’t need). And not just any RGBHV signal will do; we want an output controlled in such a way that we can get the low-resolution video modes we need like 240p.
Back to RGBHV for now. If you combine the H-sync and V-sync elements of RGBHV into Composite Sync, you get RGBS. More on combining sync in section m). RGBS is a standard used for highest-quality low-resolution video. It uses 4 video cables – Red, Green, Blue & Sync. RGBS is NOT the same as the Red, Green, and Blue cables with RCA plugs on the end with no fourth plug for sync. That’s referred to as Component video, or more correctly as YPbPr, often YCbCr if digital, or occasionally as YUV. Do not mistake the red and white audio plugs for a fourth or fifth video line, or for sync! RGBS is also not the same thing as RGsB, or sync-on-green, which Sony fell head-over-heels in love with during the nineties.
So, what signal does your CRT take? PVM’s normally take RGBS. SD CRT Arcade Monitors all take RGBS if nothing else, though you may need a video amplifier (Ultimarc’s Jpac, for example). Note that later arcade monitors may be multisync, or even 31kHz-only, and it's very important to check the sync range and details for the arcade monitor you have. If your consumer CRT doesn’t take RGBS (often, SCART) or RGBHV, and you don't want to hack RGBS into the set with the help of the excellent guys and gals on the Shmups thread (if you know how to be safe around electricity I'd recommend looking into this option) then you need a way to convert RGBHV into something else like YPbPr, S-video or Composite video. Composite video compresses all the video information into a single cable (normally with a yellow RCA plug) at a significant loss in quality, and I recommend against it unless you really have no other option. S-Video can work for PC use, but you need the right converter. If you want to use the YPbPr/Component inputs on your TV, a good RGB to YPbPr transcoder introduces no lag, and only a very, very slight drop in picture quality. I know only a little about transcoders, so do your own research there.
Section g) contains notes about converting video types. And there's a list of viable 1:1 converters in post #10 below, and even some links to schematics for building one. Remember that CRT’s use a variety of connector plugs. From RF aerial plugs, to RCA sockets, SCART connectors, the BNC bayonet-type connectors often seen on professional gear, and more. And Arcade Monitors normally have their own special plugs, often making cutting and soldering required. It's important to plan ahead and figure out what you need before spending money.
b) What is GroovyMAME?
GroovyMAME, created by Chris Kennedy, maintained and updated now by Calamity with input from Intealls, Bytebit and others, is a parallel build of MAME, the Multiple Arcade Machine Emulator. GM, to save typing it out every time. There’s a bit to know about GM, but it’s no harder to actually use than MAME. Getting an image from your PC to show up on an old CRT is the problem.
This guide does not tell you how to use MAME, or how to find games for it (roms). One thing I will say, because it often seems to be missing from other sources, is that for any version of MAME it’s best to use the same version roms. So for MAME 0.182, you want the 0.182 roms/romset/bioses/CHDs. The further away the two versions are, the more likely you'll get errors. I do go on to recommend crt_emudriver a bit later, so I should add that you might need the latest version of the driver for newer versions of GM to run. (At least the beta10 version, at this point.)
Note that a lot of features from GM are being integrated into mainline MAME, and eventually the two may merge. That hasn’t happened at time of writing, however.
c) Why is GM better for a CRT? (Vertical stretching at 1:1)
GM has a built-in function called switchres, which, when left on default settings, selects a video mode with a 1:1 vertical ratio, ideally from a list of "super" resolutions, and adjusts the modeline so the refresh rate matches the original hardware and the sizing is right. Vertical resolution is absolutely critical for a CRT. I'm going to talk about horizontal resolution first, in the paragraphs below, but i do come back to vertical resolution and why it's so important.
The switchres utility works amazingly well with 2D arcade games, and also with the MESS emulator that’s now built into MAME. It’s about the most important feature of GM, but GM also has frame-delay to combat input lag, V-sync offset, and audio latency options. At this point GM on Linux has caught up with Win7/10 in terms of input lag, but i'm a Windows fanboy, so here we are
RetroArch is another powerful emulation package to look into, but for the most part falls outside this guide as i don't have a lot of experience with it. Its run-ahead feature is about the best way to go in cases where original consoles used extra frames of input lag.EDIT: Calamity is working on an optional update to GM called frame slicing or beam chasing. Modern CPU's are so fast they can update a video frame during the time that frame is being drawn on screen, and this allows GM to respond to control inputs during the current frame. This helps compensate for any input delays and other factors, but it only works in special cases as most games in MAME can't handle partial frame updates. Consider it highly experimental.
d) What are Super Resolutions? (What about Horizontal stretching?)
Super just means horizontally larger, here. The picture still looks normal on your screen, of course. In short, a super-wide resolution allows the image to stretch more evenly in the horizontal direction, at the same time allowing you to install, say, only five or six modelines in order to run 99% of games. This means there is far less configuring and tweaking required to get your setup working as well as it can. It also means that when you pick a game your system switches resolutions much, much faster and the game pops up quicker - in some cases ten to fifteen seconds quicker.
2560 pixels wide is the default super resolution trigger GM uses, controlled by the "super_width" variable in mame.ini. The analogue circuitry in a CRT TV will hit a bandwidth limit above which the transistors won't be able to respond fast enough and the image becomes dim and mushy, depending. (Thanks to NEO-GEO Man for clueing me in, there). Any functioning analogue TV can do 2560 though, even before taking into account how super resolutions are meant to work. A resolution 2560 pixels wide at 15kHz has a bandwidth of about 40MHz. When dealing with analogue video the bandwidth is also called the dot clock. Section e) will talk a bit more about dot clocks. Again, when using super resolutions what you seen on screen is not compressed or stretched out, it looks just like normal.
To go into more detail... CRT's are limited by their horizontal scan rate, or the number of horizontal lines of pixels they can draw each second. This is the same as vertical resolution, because a raster CRT draws or scans each line of a video frame as a stream of dots from left to right, one line after the next, down the screen. Hence, scanlines. That's what a raster is, a continuous stream of bits broken up by line markers. CRT's are not, however, limited by horizontal resolution, and the number of dots within each line can be 2560, or higher, as above. The overall screen width is unchanged, the electron beam sweeps across the face of the tube in the same interval, so the 2560 horizontal pixels are drawn into the same physical space over the same length of time as 384 would be, or 320, or whatever. CRT's are not fixed-pixel like LCD or OLED because while there are discrete phosphors of three colours that light up, each can do so partially or unevenly. Think of two flyscreens with slightly different mesh sizes lain on top of each other - the electron guns fire a grid of pixels at the shadow mask, and the two never line up perfectly - they can't, it's not physically possible. Increasing the horizontal resolution is like spraypainting much finer dots over the visible flyscreen. There's more to it than that, but it's a convenient analogy. Don't expect to resolve the fine details of a 1920x1080p image on your SD TV, obviously. We're using the super-wide resolution for a special purpose, and the fact the pixels are in groups (see below) makes a difference too.
Why bother increasing the horizontal resolution? Because it saves massive amounts of time, and because using a large horizontal resolution eliminates scaling artifacts. Take the CPS1 arcade system (SF2, Final Fight + more) at an unusual resolution of 384x224. Sounds unusual anyway, doesn't it? Obviously the computer has to draw the first flyscreen first, the one the colour guns will fire at the physical phosphor-coated screen, and it does so digitally, dot by dot. Selecting a resolution of 320x240 dots would mean that while the vertical will fit at 1:1, with eight blank lines at the top and eight at the bottom, you'd be losing pixels horizontally trying to fit 384 into 320, or just enabling some filter or effect that would warp the original image. Even using 640x480 isn’t a great help, and will not produce a very even picture. The answer is to use a ‘super’ resolution of 2560 pixels wide, giving a 7/7/6 group for each three pixels of the original 384. As long as the horizontal resolution is sufficiently high, the effect is seamless.
Vertical resolution is different, being one of the main limiting factors of a CRT. Individual pixels are covered above, this time we're talking about lines of pixels. The scanlines of a progressive SD video frame are separate and distinct. This means that you have to scale 1:1 in the vertical direction because most old systems output at about 240 lines, the lines are spaced out, and if you stretch that 240 slightly into say 256, or even 288 or so, the distortion is huge, and scrolling backgrounds or moving sprites stand out like dogs' balls. And no way are you going to be able to push the (progressive) vertical resolution beyond about 288-300 on an SD CRT (see section e). An LCD with 1080 lines would have more room to stretch evenly. You could even use integer (whole number) stretching so the pixels scale perfectly, and leave some blank space. However our example of 384x224 isn’t 4:3 when displayed on an LCD, integer stretching or no. You could always use partial stretching in the horizontal only, on an LCD, but you wanted a CRT for visual fidelity, didn’t you?
To use super resolutions you need modelines like 2560x240p and 2560x256p installed on your system. Sure you can run everything in 320x240p with a single modeline, but even the SNES has several video modes it uses. The Amiga has four primary ones in each of two regions. And arcade games are all over the shop. Different devs used different tricks in different regions at different times, let alone the fact different consoles pick different on-screen positions for their video output. Super resolutions work to circumvent most of these issues, and look the same if not better than plain old 320x240p. Some people swear by a 3840-wide image as being an integer multiple of a greater number of native resolutions, but as the number of pixels in each line gets above 2000 or so, increasing it makes less and less difference.
Done right, using Super Resolutions saves tons of time and looks awesome, just like real arcade hardware or consoles. If you don't use super resolutions, you need to have the native resolution installed for every game you want to play, or you'll be settling for a lower-quality video image. Setting native resolutions for everything balloons out configuration time even if it's physically possible to size everything right on your CRT, and if you have to make changes you'll find yourself facing the same huge task over and over. And don't kid yourself, even if you buy a Hyperspin drive you'll be spending several days configuring things, and then more in a month or two when you realise you didn't do everything quite right the first time.
If you're going to try super resolutions, remember to keep a few normal resolutions too, like 640x480i, so the desktop remains useable! And not everything will use super resolutions, so having a few fallbacks (320x240p, 256p, 640x480i, even 800x600@50i) is a good idea. The guide linked to in section l) covers installing resolutions with VMM, super or otherwise.
e) I want to use GM and Super Resolutions! How do I connect my Windows PC to my old CRT? (And what are these 15kHz modes people keep talking about?)
This might sound obvious, but assuming you have an old standard definition TV, PVM or arcade monitor, the first step is to get the right video mode out of your PC. Modes like 240p and 480i, named for the number of visible horizontal lines (vertical resolution) and whether they are (p)rogressive or (i)nterlaced. All these modes have a horizontal scan rate of 15kHz or thereabouts – the rate at which horizontal lines of pixels are drawn on the screen each second. An old standard definition CRT is often limited to a 15kHz scan rate, give or take. Pushing things too far can do damage, so make sure you read carefully.
(Nominal NTSC Standard Definition scan rate) = (Horizontal lines each frame) x (Frames per second)
(FYI if we multiply the scan rate by the horizontal resolution, we get the Dot Clock, or Pixel Clock, which is the bandwidth of the modeline, but we’re not so concerned with the number of pixels within each line here. Horizontal resolution is not limiting, and super resolutions always have a higher dot clock than the lower limit of some GPUs, that limit being ~8 MHz. EDIT: some newer GPU's won't output analogue video at all, and have even higher limits).
For 240p, we have:
15.750 kHz = 262 lines x 60 FPS
The number 262 represents the total number of lines in the video frame, 240 visible lines and a blanking interval of 22 lines, the latter being as named, blank, and usually drawn off the screen. The vertical blanking interval contains the vertical sync pulse. Each of the 262 lines of a frame is drawn left to right, one after the other pretty much, then the vertical sync pulse returns the beam to the top to start again. This happens ~60 times a second for 240p. (There are horizontal sync pulses too, which size/position/center each line, then tell the beam to return to the beginning position one line lower.) Note that this is for 240p; the mode I'm using above for WinUAE is 262p, and probably has about 284 total lines.
When used alone, the term 240p normally refers to the standard 320x240@60hz mode. But remember that at the same horizontal scan rate you can slot in as many horizontal pixels per line as you like, subject to concerns mentioned in section d).
For 480i, we see:
15,750 = 525 x 30
Interlaced modes, like 480i, typically run at 60 fields per second. The first field draws odd lines – lines 1,3,5,7 through to 521,523,525. The beam then returns to the top and the second field draws even lines - 2,4,6,8…522,524. The two fields make one frame, so that’s 30 frames per second, with each frame drawn in two parts. This method achieves a higher vertical resolution (more horizontal lines per frame and thus more detail) but creates visible flicker in so doing. (Don't worry about that framerate, a CRT at 30Hz will get less motion blur than a top-end LCD at 120Hz). Games at native resolution normally look fine using interlaced modes, but you don't want to be using the desktop that way for long periods.
The numbers in these equations are not fixed, they have range limits. A PVM or Arcade monitor will normally tolerate a horizontal scan rate of between 15.5 and 16.2kHz, along with a vertical scan rate (FPS) of 48-65Hz (Fields or FPS here, whichever is higher). A consumer TV will normally handle a slightly narrower range than this, and you can find those limits if you want to. Different games and consoles play with them a little. This is important to note, and it becomes more important the more obscure the titles you want to run. You can get a 600i mode into a 16.2kHz scan rate (about where an arcade monitor or PVM will normally cut off) but only at 50 fields per second, or 25FPS - the desktop will flicker a little more noticeably, but games will mostly be fine. This will let you run 800x600 games - I have not yet encountered a game or emulator on windows that cared about interlacing or refresh rate, though some titles do slow down to 5/6th speed if V-sync is locked. And I hear Retroarch has some issues that are being looked into or worked around. Different TV’s are different, and it shouldn't hurt to try and find the scan limits of yours while testing. If a stable picture doesn't come up, even when you adjust whatever V-hold and H-hold settings you have, then you've pushed a bit far. The VMM suite of tools included in the crt_emudriver package will allow you to play with these numbers in a graphical format, though doing so may take a little getting used to.
Remember that certain arcade monitors have weird or finicky limits, and you should use google to find out about anything specific to yours. Nanao MS8 monitors for example, and only MS8's, have a very narrow safe scan range, and although they can sync to a much larger range, using them outside their sweet spot will work at first but then burn out the horizontal sync circuitry pretty quickly. Note that this is extremely rare, most arcade monitors are not limited this way, but i take no responsibility for yours. And CRT TV's from the early 90's and on, and certainly PVM's, are designed to be more versatile.
The numbers in the equations and the advice above are all for 15kHz monitors. The equations themselves, however, apply to all video modes and monitors, CRT or fixed-pixel, but in slightly different ways, and with different limits. For example: VGA=480p=31.5kHz=525x60. An LCD will almost certainly have a couple of fixed refresh rates, and you can't trade resolution for frames all the time even if your GPU thinks you can. The equations are still handy for finding pixel clock limits, etc, if you run into problems with these refresh rates or output formats.


Comment