Home Editorial Maggie 25th Demos Games Serious Stuff Travel Reports Multimedia Humour

An Emulation Deviation

By Kevin Davies

It has been quite some time since my inane scribblings have adorned these hallowed pages (and just as long since my lack of proof reading and poor spelling drove CiH to despair).

In that time my beloved Atari computers have all shuffled off their mortal coil. My 1986 STFM was first to bite the big one with an inability to talk politely to any floppy drive. This was followed by the murder of my Falcon 030 and finally my Milan040. The Milan ran away from home, only to be discovered years later, in a garage, suffering from terminal water damage.

Since that time I have dabbled with emulating my beloved ST with the likes of PacifiST (now defunct), STeem and Hatari. I have been very public about this and as such have suffered the wrath of real ST owners, who with super human senses tell me that the scrolling is not quite right and the sound just isn't so. These people then go on to tell me that they would never seriously consider emulation. Pardon?!

To these people I say; I have owned first, second and third generation TOS machines and I cannot tell the bloody difference.

Most of these people have their ST's connected to SATAN and HxC systems that allow the use of SD cards and USB sticks to be used with their STs. They use little adapters to connect PS2 mice to the 9pin ST mouse ports. You ARE emulating guys! This is hardware emulation, but emulation none the less. The world of ST emulation is much like the world of 16-bit computing 'back in the day'. Where as ST and Ameoba owners used to bicker over the abilities of their respective machines (ST runs at 8MHz, that's all I am saying). But now emulatorists bicker over compatibility and additional features (eg. graphic modes/filters). I think it was the great Snake Pliskin who said "The more things change, the more they stay the same." This is certainly true here.

We are currently at a point where the big two ST emulators, STeem and Hatari are virtually evenly matched. STeem rules the PC users whilst Hatari with its cross format development rules the Mac and Linux brigade. I'm a Hatari fan for three very important reasons. Firstly I have a Mac and Hatari runs very nicely on OSX. It also runs very nicely on my JXD hand-held gaming tablet under the guise of Hatariod. Finally, I have several Raspberry Pi boards and the Hatari build for the pi (particularly the Pi 2) is spectacularly good for the little sub-thirty-pound machines (and with the new Pi Zero, a sub 5 ukp device. Wow!).

But despite my love of all things emulation something is not right. As mentioned earlier I cannot tell the difference in the presentation, and yet...

Something niggles me, something lurks in my psyche that tells me all is not quite right. Maybe its because I'm using a modern usb keyboard, a rather nifty wireless mouse, a joypad that looks like it came from a Super Nintendo (but only cost three pounds from eBay) and it all feeds back through some LED monitory gubbins. Maybe it's all to new to be old?

With this in mind I set off on a quest. A quest to put right these wrongs. A quest to find that long lost feeling of ST-ness. A quest for the holy vest (extra points for getting the reference)? No! A quest to produce the best not- real, faked, and emulated ST I could build.

Off I set, not in search of sandwiches (more points available), but in search of a suitable platform to begin what in my mind would be the stuff of legend. As such I went with the Raspberry Pi 2.

The Rpi2 is a corking little linux based computer with easily programmable GPIO (General Purpose Input/Output) pins, 1 Gb of on board memory and a nice ARM processor that chugs along happily at just sub 1GHz. Ideal, cheap and with a corking build of Hatari 1.9. That was easy I thought (and to be honest it was as I knew enough at this point to know what I was doing). Onto the HID.

HID is a nice little acronym I have picked up during this project. It is something I drop into conversation where ever I can (that should tell you more than it should about my social group hehe). HID is not something that a seeker looks for during a rather exciting party game but rather stands for Human Interface Device or keyboard, mouse and joystick to most people.

The easiest and cheapest part of this operation was connecting authentic ST joysticks to the Rpi 2 due to the aforementioned easily programable GPIO pins. Sure enough someone out there had already coded a nice little utility to allow these pins to be used with arcade style controls. As Atari joysticks use the same switching system, all be they have less fire buttons, all it took was a hacked piece of PC hard drive ribbon cable, some 9 pin-sockets, a soldering iron and some minor 3rd degree burns to my fingertips and as if by magic my Quickjoy II and Konix Speedking are now talking nicely to the emulated ST gubbins within the Rpi2.

After a pause of a few weeks to 'check' the joysticks were working well and to muster some funds it was time to go to work on the keyboard. The internet is full of madcap solutions for connecting ST keyboards to USB devices. Most seem to including the likes of manually soldering each pad from the ST keyboard to that of a PC USB keyboard. That sounded like too much work and with all those wires and solder points something was sure to go wrong. More fingertip burns perhaps.

After some more digging around the not so dark corners of the internet I discovered a chap by the name of Kev Peat. He had coded an Arduino programmable processor to decode the ST keyboard into something your new fangled USB can understand. This is something I can do I thought. Programming an Arduino processor board is surprisingly simple (particularly if you are programming it with somebody else's pre-written code) and I would encourage anybody to give it a go. Needless to say, despite some inevitable burns to my fingers, it worked first time.

Now you wouldn't think that finding a way to connect an Atari ST mouse to USB would be a great chore.. It is! It was only the part of this project where I actually sought help from an expert.

Currently the only way to connect an ST mouse to a USB is to purchase a multi joystick adapter from Retronic Design and re-flash it with the necessary module to allow it to work with the ST mouse. This didn't work.

I contacted Francis Gradel of Retronic Design. who was more than happy to help. Francis lives in Canada and does not own an ST or its accompanying mouse. Thus began one of the most unusual trans-atlantic collaborations of recent years (maybe). Francis would program a module based on his Amiga mouse code and tweak it to theoretically work on an ST. He would then send it to me. I would flash it to my adapter, try it, discover that is didn't work and email my results to Francis. Thirty-three (yes, THIRTY THREE) emails over a timespan of four weeks and we had the adapter code working. Who knew the ST has two different models of mouse that work slightly differently (not me)? Differently enough to bugger up Francis's original code. This module is now available on the Retronic Designs website and a big thank you goes to Francis for all his help.

So here we have a finished emulated ST. It has an ST keyboard, ST mouse and ST joysticks (it even has the ability to use the RaphNet jag-pad adapter for those STe games that need it). This is ST to all my senses. Perhaps the ultimate emulated Atari ST. In many ways superior to my old ST as I can emulate configurations of ST that I could only dream of. 8Mb of memory? No problem. Accelerated to 16Mhz? Easy-peasy. TOS 2.06. Done! All a click away. Strangely though its not the same. That niggle remains, that little worm in my mind that knows, in reality, I am cheating. This is not a real ST and it won't let me forget it.

Maybe one day I will get the real McCoy and silence that mind worm. For now, I will bind him to a chair and make him watch Amiga gameplay videos on YouTube until he shuts up. Hehe.

Here's a little something I've never done before, but feel it would be. For anybody interested I'm gonna list some relevant websites in Maggie.

ST Keyboard to USB -

www.kevinpeat.com/atari_pi_keyboard_wiring.html

ST Mouse to USB -

www.retronicdesign.com/en/

Direct link to the ST mouse firmware:

www.retronicdesign.com/wp- content/uploads/2015/03/AtariST_Mouse_v3.0_fw.rar

Atari Joysticks to Raspberry Pi 2:

http://blog.thestateofme.com/2012/08/10/raspberry-pi-gpio-joystick/

RETROPIE (A truly excellent Distro for the RPi that includes all sorts of emulators including a build of the excellent Hatari v1.9):

blog.petrockblock.com/retropie/

Kev Davies - Maggie 25th in December 2015.

Back to the Seriousness.