Atari ST em­u­la­tion

Nick Peers pulls on a pair of baggy jeans and stripy top, and trav­els back in time to re­veal how to trans­form your Pi into a fully fledged Atari ma­chine.

Linux Format - - CONTENTS -

Nick Peers trav­els back in time to re­veal how to trans­form your Pi into a fully fledged Atari ST ma­chine and run his old flop­pies.

You’ll al­most cer­tainly re­mem­ber the late 80s when the eight-bit com­put­ing rev­o­lu­tion grad­u­ally gave way to the rise of 16-bit ma­chines. Atari and Com­modore stood at the fore­front of this rev­o­lu­tion, with the Amiga even­tu­ally win­ning out. But for a while dur­ing the late 80s and early 90s, the Atari ST ran it close. And thanks to the bril­liant Hatari ( http://hatari.tux­fam­, you can now res­ur­rect the ST (and its suc­ces­sors) on your Rasp­berry Pi. First steps You’ll need a desk­top en­vi­ron­ment to run Hatari – we’re us­ing Rasp­bian PIXEL. The lat­est ver­sion of Hatari uses SDL2 to ren­der graph­ics, so you’ll need to en­able the OpenGL driver, not­ing that it’s still ex­per­i­men­tal and may be slightly un­sta­ble. It also means Hatari re­quires a Pi 2 or bet­ter to run op­ti­mally. To en­able the driver, open a Ter­mi­nal win­dow, type

sudo raspi-con­fig and hit En­ter. Select Advanced Op­tions>GL Driver>GL (Full KMS) OpenGL desk­top drive with full KMS. Re­boot when prompted.

From here, in­stal­la­tion is sim­ple: open Pi>Pref­er­ences >Add/Re­move Soft­ware, type ‘hatari’ into the Search box and you’ll see one hit: tick this and click OK to in­stall it. Once in­stalled, open the Pi>Games menu – you’ll see two en­tries: Hatari and Hatari UI. Choose the for­mer op­tion, where you’ll im­me­di­ately come across a mes­sage about not be­ing able to load a TOS file.

TOS is the Atari’s op­er­at­ing sys­tem, and comes in a range of re­vi­sions and ver­sions depend­ing on which 16-bit Atari ma­chine you’re try­ing to em­u­late. Tech­ni­cally, you should sup­ply this your­self, but thank­fully the hard work of ob­tain­ing any ver­sion of TOS has been done for you.

Be­fore pro­ceed­ing, a quick note about le­gal­i­ties: when run­ning em­u­la­tor soft­ware, it’s as­sumed in most cases that you own the orig­i­nal com­puter as well as any soft­ware you play on it. From a le­gal stand­point, you should re­ally honour this, but prac­ti­cally speak­ing there’s noth­ing but your con­science pre­vent­ing you from run­ning what­ever you like, even if it’s no longer buried away in your loft some­where.

Let’s be­gin by ob­tain­ing TOS for Hatari. Open your web browser and head to www.atari­ tos-rom where you’ll find ev­ery sin­gle ver­sion of TOS from the orig­i­nal 1.0 re­lease up to TOS 4.92 for the Atari Fal­con. Which one do you need? It de­pends on what you’re plan­ning to em­u­late. The orig­i­nal STFM model, which cov­ers most bases, runs best on TOS 1.4, but you may want to down­load TOS 1.02 for some older games. Those em­u­lat­ing the STE want TOS 1.62, while TOS 2.06 (both STFM and STE) is a good choice when copy­ing lots of files via the ST’s GEM desk­top.

A word to the wise – the TOS 2.06 ROM file has the wrong per­mis­sions as­signed to it – you need to rightclick the IMG file af­ter ex­tract­ing it and choose Prop­er­ties> Per­mis­sions. Make sure View con­tent is set to Any­one and Change Con­tent is set to Only owner be­fore click­ing OK and copy­ing the file across.

If you’re de­ter­mined to stay the right side of the law and have no Atari gath­er­ing dust in the at­tic, try EmuTOS in­stead ( http://emutos.source­ /en). It’s is a free ver­sion of TOS that can run on phys­i­cal com­put­ers via floppy disk as well as your new Hatari em­u­la­tor, but note it’ll be hit and miss what games and soft­ware you’ll be able to run on it.

When it comes to down­load­ing each ver­sion, choose the English UK link. A zip file will be saved to your Down­loads folder, ready for use shortly. You now have all the el­e­ments that you need to start con­fig­ur­ing Hatari it­self. The walk­through ( page57) re­veals the key steps you need to fol­low.

Down­load floppy disk images

As things stand, your Hatari setup is now a fully func­tional Atari ma­chine – the only thing miss­ing is soft­ware. Most games come on floppy disks, and once

again the painstak­ing process of con­vert­ing ST floppy disks into im­age files recog­nis­able by your Pi has been done by oth­ers. All you need to do is lo­cate and down­load these images, which come in MSA, ST or STX for­mat.

There are a wide range of sites of­fer­ing images – Google “Atari ST ROMs” for a long list. If you can cope with the fact it’s French ( Chromium will of­fer to trans­late the pages for you), then we like www.plan­

roms/atari-st-games-st in par­tic­u­lar. Here you’ll find some games are listed sev­eral times based on who’s sub­mit­ted the images – try one and then down­load an­other if it doesn’t work.

As with ROMs, floppy disk images are down­loaded in zip for­mat, so you’ll need to ex­tract them first, where you’ll be pre­sented with files in .ST or .STX for­mat (thought­fully as­so­ci­ated with Hatari, so you’ll see a nice floppy ST icon to help iden­tify them). These can be stored any­where on your hard drive, but we rec­om­mend setting up a ded­i­cated folder – say atarist – in­side your home folder for easy ac­cess. Play ST games There are two ways to load floppy disks into Hatari. The sim­plest thing to do is sim­ply browse to the folder con­tain­ing your disks and dou­ble-click the .ST or .STX file. Hatari will launch us­ing the con­fig­u­ra­tion you’ve saved un­der hatari.cfg and then – af­ter a pause that can be quite lengthy – the fa­mil­iar green ST desk­top will ap­pear or the game will au­to­mat­i­cally load. Dou­ble-click the A drive icon if nec­es­sary, fol­lowed by the game file to start load­ing it.

If you plan to play a game that comes on two floppy disks, it’s eas­ier to start things off in­side Hatari it­self: press F12 to bring up the con­fig­u­ra­tion screen and click Floppy disks. Click Browse next to Drive A to load disk one into drive A, then re­peat with Drive B for disk two. Leave Auto insert B se­lected, then click Re­turn to main menu fol­lowed by OK.

Keep an eye on the sta­tus bar at the bot­tom of the screen, which should hope­fully in­di­cate the floppy disk is still load­ing. It can be a slow process, but check out the Quick Tip ( page56) for some pos­si­ble tweaks to try. Once done, the game’s main screen should ap­pear and it’s then a case of nav­i­gat­ing it with your mouse, key­board or – if you’ve got one plugged in and con­fig­ured – game con­troller.

To set up the lat­ter, press F12 and click Joy­sticks. From here you can select whether to dis­able the port, use a “real” joy­stick or de­fine the keys used to sim­u­late the joy­stick, namely up, down, left, right and fire. Up to four ports can be con­fig­ured – two reg­u­lar ST joy­sticks plus two ad­di­tional STE-only joy­pads.

When it comes to us­ing a real joy­stick, any game con­troller that’s plugged in and recog­nised by your Pi should be im­me­di­ately vis­i­ble – our wired PC/PS3 Gioteck con­troller was de­tected in­stantly, for ex­am­ple. As you’ll have seen when defin­ing keys to sim­u­late a joy­stick, ST joy­sticks were ba­sic and only sup­ported four di­rec­tions of move­ment and one fire but­ton – use the ana­logue stick and the top fire but­ton to em­u­late the joy­stick, while the sec­ondary fire but­ton emu­lates the space bar key. Cre­ate your own blank flop­pies If you’re try­ing soft­ware that ap­peared on magazine cov­er­mount disks – yes, we’re talk­ing STFor­mat – then chances are they were com­pressed to en­able more con­tent to be placed on the disk. You’ll need to ex­tract these to a sep­a­rate “disk” – we’ll cover hard drives in a mo­ment, but if you sim­ply want to run them from their own vir­tual floppy im­age, click Cre­ate blank im­age on the

Floppy Disks con­fig­u­ra­tion screen. Leave the de­fault set­tings – 80 tracks, nine sec­tors and two sides – as they are, give your floppy a la­bel and click Cre­ate.

Next, choose where to save the floppy – your de­fault folder is best – and again name it for the game you plan to copy to it. Click OK, then Back fol­lowed by Drive B: to insert it into drive B. You can now ei­ther copy the com­pressed file across be­fore dou­ble-click­ing it to un­pack the game or use the cov­er­mount’s own pro­gram to ex­tract the files to the new disk. Be warned, it’s a slow process, and you may end up hav­ing flash­backs, or per­haps that’s just this magazine’s for­mer disk edi­tor talk­ing. Speak­ing of which, visit

atari/STF for a com­plete list­ing and down­load links for STF’s disks.

Beyond the ba­sics

As things stand, you now have a fully work­ing Atari ma­chine, run­ning at de­cent speed. If all you’re in­ter­ested in is re­liv­ing some past glo­ries, you should have ev­ery­thing you need to play games on your Atari. But you can push the en­ve­lope fur­ther, too.

First, look beyond the ST as a mere gam­ing ma­chine – it was also renowned as a mu­sic-mak­ing tool and as the games mar­ket waned, ma­jor ap­pli­ca­tions con­tin­ued to be de­vel­oped, from video edit­ing and word pro­cess­ing to desk­top pub­lish­ing. Visit www.plan­etemu.

net/ma­chine/atari-st where you’ll have ac­cess to a wider range of ti­tles, in­clud­ing de­mos, magazine cover disks, pub­lic do­main re­leases and ap­pli­ca­tions.

As the num­ber of ti­tles grows, you may get tired of hav­ing to press F12 to swap floppy disks around. Use the AltGr+D to swap disks, fol­lowed by AltGr+R to per­form a warm re­set or AltGr+C for a cold re­set. Al­ter­na­tively, why not con­nect a vir­tual hard disk to your ST – the box re­veals the sim­plest way to add a sin­gle 80 MB ACSI hard disk. You can du­pli­cate this blank im­age file to cre­ate mul­ti­ple hard disks, but you can only con­nect one at a time.

An­other op­tion is GEMDOS, which en­ables you to mount a folder on your Pi’s stor­age as a vir­tual drive, mak­ing it eas­ier to copy files di­rectly to the drive from your Pi stor­age. Note, how­ever, that you’ll ei­ther need a ded­i­cated hard disk driver or ac­cess the drive us­ing EmuTOS, which sup­ports GEMDOS na­tively.

If you find your­self get­ting into an old game or two, you may want to know how to save your progress. If the game it­self has a save op­tion, you could al­ways cre­ate a blank floppy im­age as out­lined ear­lier and insert it into drive B. Al­ter­na­tively, you could use Hatari’s own mem­ory snap­shots fea­ture, which are ob­vi­ously quicker.

Start by press­ing F12 and se­lect­ing Mem­ory. Click Save, type a suit­ably de­scrip­tive file­name (with the al­limpor­tant .sav ex­ten­sion) and click OK. Re­turn to your game, press­ing AltGr+K at any time to up­date the saved file with your lat­est progress, or AltGr+l to reload your last saved state.

You can also snap screen­shots at any point – press AltGr+G to take a screen grab in PNG for­mat. Press AltGr+A to record an AVI movie (you’ll see the Rec but­ton turn red in the Hatari sta­tus bar), and press it again to stop record­ing. Fi­nally, press AltGr+Y to start and stop record­ing your ST’s sound. All recorded ma­te­rial can be found in your home folder.

MIDI for mu­si­cians

The ST was a big draw from mu­si­cians with its built-in MIDI ports and was used by ma­jor artists in­clud­ing the likes of Queen for The Mir­a­cle. If you have a USB-toMIDI cable then you can hook up a MIDI key­board to use with the likes of Cubase.

First, you need to ver­ify your cable has been de­tected by Rasp­bian. Open a Ter­mi­nal win­dow and type the fol­low­ing: $ lsusb

You should see your MIDI adap­tor listed. Now type the fol­low­ing, which should ver­ify at least one MIDI port is avail­able. $ aplaymidi -l

If they’re avail­able, open Hatari and press F12, then click De­vices. Click the two Browse but­tons un­der En­able MIDI em­u­la­tion and point them to whichever midi en­try ap­pears un­der /dev/snd. Tick En­able MIDI em­u­la­tion and restart your vir­tual ST.

If you don’t have a MIDI de­vice, try a soft­ware MIDI syn­the­siser in­stead. First, in­stall Vir­tu­alMIDIPiano

Key­board (search Pi>Pref­er­ences>Add/Re­move Pro­grams for ‘vmpk’). Next, launch QSynth from Pi>Sound & Video fol­lowed by VMPK. In VMPK select Edit>Con­nec­tions, click the Out­put MIDI con­nec­tion and choose FLUID Synth to con­nect the two. Hit the vir­tual keys and you should hear sound to ver­ify that it’s work­ing cor­rectly.

Now open a Ter­mi­nal win­dow and type the fol­low­ing: $ sudo mod­probe snd-vir­midi $ acon­nect -i -o

Make a note of the client num­bers and then type the fol­low­ing: $ acon­nect <sen­der> <re­ceiver>

Sub­sti­tute <sen­der> with the client num­ber of VMPK Out­put and <re­ceiver> with the client num­ber of the first Vir­tual Raw MIDI port. Now re­peat the com­mand, this time sub­sti­tut­ing <sen­der> with the Vir­tual Raw MIDI port, and <re­ceiver> with Synth in­put port – for ex­am­ple, like this: $ acon­nect 128 28 $ acon­nect 28 130

Now open Hatari, press F12 and click De­vices, then point it to­wards the cor­rect con­nec­tion. Tick En­able MIDI em­u­la­tion, and you should be able to use your vir­tual syn­the­siser to in­put mu­sic into se­quenc­ing soft­ware like Cubase while lis­ten­ing back through

Qsynth. Job done!

You can con­nect a real game con­troller to Hatari, or use key­board em­u­la­tion to play games that re­quire a joy­stick.

You can press F12 at any time to pause Hatari and ac­cess its com­pre­hen­sive con­fig­u­ra­tion op­tions.

Your vir­tual Atari ST can em­u­late the old high-res­o­lu­tion mono dis­play, too – two mon­i­tors for the price of one!

Armed with the right knowl­edge you can set up MIDI em­u­la­tion on your Atari ST – ei­ther with proper hard­ware or vir­tual soft­ware.

Newspapers in English

Newspapers from Australia

© PressReader. All rights reserved.