Slackware 15 kHz retro gaming box


I used to enjoy playing games on my Commodore 64, Commodore Amiga 500/1200 and arcade machines in the 90’s so I decided to re-live some of those old memories by building my own retro gaming box. For the real retro experience, I wanted a way to connect a Linux box running my favourite emulators to a CRT television using a 15 kHz signal, exactly the same way those old retro machines worked. Games in those days were designed for CRT televisions and arcade monitors, which makes everything look crisp, smooth, and bright.

Nothing beats the look of authentic scan lines when it comes to retro gaming!

alternate text

Equipment

Sony Trinitron KV-14LT1U
Keene Electronics RGBHV RGBS Sync Convertor Transcoder
Thinkstation Lenovo M58p – Intel Core 2 Duo 3.20 GHz, 4GB Ram, 120GB SSD
Asus ATI Radeon HD4350 Low Profile
Native Instruments Audio Kontrol 1
Blue PS2 to USB Adapter
Sony PlayStation 2 Controller x2

Sony made some of the best CRT televisions using Trinitron technology, nice flat screens, black blacks, and bright crisp colours, perfect for retro gaming. The Sony Trinitron KV-14LT1U is a nice 14” CRT television with RGB SCART input.

The Keene Electronics Sync Convertor Transcoder is a left over from when I used MythTV PVR, this box converts VGA output from graphic card to RGB SCART on television. RGB SCART provides the best quality, rather than using non-RGB SCART.

The Thinkstation Lenovo M58p came with a Intel Core 2 Duo 2.8 GHz CPU, I upgraded it to a Intel Core 2 Duo 3.20 GHz CPU which was bought on eBay next to nothing. CPU Clock cycles are more important than the amount of cores when it comes to retro emulators, a rule of thumb is to use anything above 3.00 GHz. I removed the hard drive caddy to make room for the graphic card and attached a SSD to the roof of the case.

I did lots of research on what graphic card to use, not all cards can produce a 15 kHz signal. One what kept on getting lot of recommendations is the Asus ATI Radeon HD4350, there are lots of others which work too, research before you buy.

The Native Instruments Audio Kontrol 1 is also a left over from the past, the Windows and Mac drivers are pretty old and have not been updated for years, however, the Linux kernel has the driver built in and works flawlessly. This soundcard uses a high quality Cirrus Logic DAC.

I bought a Blue PS2 to USB adapter which automatically got recognised by the Linux kernel. This will enable me to use a pair of Sony Playstation 2 controllers for gaming.

Software

Slackware Linux
GroovyMAME (arcade emulator)
FS-UAE (Commodore Amiga emulator)
Vice (Commodore 64 emulator)

The following guide works with the hardware listed above, certain changes might be required if using different graphic card, controllers, etc. I will assume you already have good knowledge on how to configure Slackware Linux. The first thing to do is patch the Slackware kernel to allow 15 kHz video output during boot process. Patches can be found here, make sure they match your Kernel version:

https://github.com/Ansa89/linux-15khz-patch/releases

Copy the “edid” directory from patches to /lib/firmware

Amend the following line in /etc/lilo.conf to the following:

append="vt.default_utf8=1 i915.modeset=0 nouveau.modeset=0 video=DVI-I-1:e drm_kms_helper.edid_firmware=DVI-I-1:edid/edid_generic15.bin"

The following xorg.conf will allow the first Sony PlayStation 2 Controller to act as a mouse. It also provides suitable modelines for FS-UAE 360x288 (Amiga Emulator) and Vice 384x282 (Commodore 64 Emulator). I have also added some options in the “Device” section which will stop graphics from tearing.

/etc/X11/xorg.conf

Section "ServerLayout"
        Identifier      "General"
        Screen  0       "Screen0" 0 0
EndSection

Section "InputClass"
        Identifier "Sony PS2 Controller"
        MatchIsJoystick "on"
        MatchDevicePath "/dev/input/js0"
        Driver "joystick"
EndSection

Section "Monitor"
        Identifier      "DVI-0"
        VendorName      "Unknown"
        ModelName       "Unknown"

        HorizSync       15-50
        VertRefresh     40-80

        Option          "DPMS" "False"

        Option          "DefaultModes" "False"
        UseModes        "ArcadeModes"
EndSection

Section "Device"
        Identifier      "Card0"
        VendorName      "Unknown"
        BoardName       "Unknown"

        Driver          "radeon"
        Option          "GLXVBlank" "true"
        Option          "TearFree" "on"
        Option          "EXAVSync" "yes"
        BusID           "PCI:01:00:0"
        Option          "ModeDebug" "true"
        Option          "monitor-DVI-0" "DVI-0"
EndSection

Section "Screen"
        Identifier      "Screen0"
        Device          "Card0"
        Monitor         "DVI-0"
        DefaultDepth 24
        SubSection "Display"
                Viewport 0 0
                Depth 8
        EndSubSection
        SubSection "Display"
                Viewport 0 0
                Depth 16
        EndSubSection
        SubSection "Display"
                Viewport 0 0
                Depth 24
        EndSubSection
        EndSection

Section "Modes"
        Identifier "ArcadeModes"
        Modeline "384x282" 7.380 384 395 430 472 282 287 289 312  -hsync -vsync
        Modeline "360x288" 6.860 360 368 400 440 288 290 293 312  -hsync -vsync
EndSection

The Blue PS2 to USB Adapter automatically got detected by the Linux kernel. It looks like this in dmesg:

pantherlord 0003:0810:0001.0001: input,hidraw0: USB HID v1.10 Joystick [Twin USB Joystick] on usb-0000:00:1a.0-1/input0
pantherlord 0003:0810:0001.0001: Force feedback for PantherLord/GreenAsia devices by Anssi Hannula <anssi.hannula@gmail.com>

GroovyMAME, FS-UAE and Vice can be installed from http://slackbuilds.org/

There is a BASH script for each emulator. The script disables the Sony PlayStation 2 Controller from acting as a mouse, then it changes screen resolution according to what emulation is required. The emulator is then launched, once it quits, the Sony PlayStation 2 Controller acts as a mouse again and the screen resolution reverts back to 640x480. GroovyMAME uses built-in switchres to automatically change resolution, depending on what game is loaded. I have created launchers in XFCE for each of these scripts.

/usr/local/bin/15khz-fs-uae

#!/bin/bash
xinput set-prop "Twin USB Joystick" "Device Enabled" 0
xrandr --display :0 --output DVI-0 --mode 360x288
fs-uae-arcade
xinput set-prop "Twin USB Joystick" "Device Enabled" 1
xrandr --display :0 --output DVI-0 --mode 640x480i

/usr/local/bin/15khz-vice

#!/bin/bash
xinput set-prop "Twin USB Joystick" "Device Enabled" 0
xrandr --display :0 --output DVI-0 --mode 384x282
x64sc -pal +VICIIdsize -VICIIfull
xinput set-prop "Twin USB Joystick" "Device Enabled" 1
xrandr --display :0 --output DVI-0 --mode 640x480i

/usr/local/bin/15khz-mame

#!/bin/bash
xinput set-prop "Twin USB Joystick" "Device Enabled" 0
/usr/games/mame
xinput set-prop "Twin USB Joystick" "Device Enabled" 1

You should now be able to launch any of the above emulators into a perfect native screen resolution. Scrolling will be silky smooth, with no tearing, exactly how those retro machines looked in the old days!

To fine tune horizontal and vertical position on the television, I accessed the engineers service menu. Be warned, you can damage the television with incorrect settings, make sure you make a note of any setting before adjusting anything.

This box can play my favourite Commodore 64, Commodore Amiga 500/1200 and arcade machine games and demos from the past as good as the real machines.

Comments


There are no comments yet.

Add a Comment

 Atom Comments Feed