Atari 8-bit guide for lr-atari800 and Retropie

 

EDIT: There is now a script, found below, which will:

  • Automatically launch PAL games in PAL.
  • Automatically enable BASIC for games that require it.
  • Let you choose from the four NTSC artifacting modes at the runcommand menu by setting an emulator for a specific rom.
  • Automatically launch games that requires OSa or OSb with the correct settings

If you want an authentic Atari 8-bit experience with minimal fuss, give it a try.

Atari 8-bit guide

As those of you who have tried to get Atari 8-bit computers and Atari 5200 going at the same time know, the Atari emu can be picky.

Here’s what’s going on:

The lr-atari800 core has a tiny handful of options implemented in the GUI reached by pressing Select+X. These change the following:

  • Whether to boot from cassette (almost certainly no, any roms you have in .CAS format should also be available in one of the various disk formats).
  • Whether to poll the keyboard (yes)
  • NTSC or PAL (to taste, but I’m going to make a case for NTSC as your default setting)
  • Internal resolution, leave it as is
  • SIO acceleration (turn this on, it speeds game loading from all disk formats. Occasionally, you may hit something that won’t load with it on, but I haven’t).
  • System (either one of the 8 bit models, or the 5200). You almost certainly want to select a system with greater than 16K RAM, so don’t pick the 400 or the 600XL.
  • Whether internal BASIC is disabled. For most things, you want this set to disabled. See below.
  • Autodetect 5200 cart. There are like 8 different types of 5200 carts, and you may have seen the menu that pops up asking you to identify what your cart is. I would leave this disabled, and follow the instructions below.
  • Artifacting: this enables or disables a core-wide setting to replicate a quirk of the Atari’s NTSC signal which allowed it to display more colors than two when in high-res mode.

All of these are stored in /opt/retropie/configs/all/retroarch-core-options.cfg. But these are a TINY FRACTION of the options that the emulator lets you set. The bulk of them are set via the emulator’s internal menu which is accessed by pressing F1 (and which is also mapped by default to the right shoulder button).

Any options set in Retroarch will always override the options set in the emulator’s internal menu. It’s quite common to look at the two menus and see that they don’t at all match.

Many of the options that are present on the emulator menu are critical, and not implemented in Retroarch. Among the key bits of functionality you may want:

  • Load a palette. Atari800 supports .act files that are carefully built color palettes that more closely mimic actual Atari colors. These don’t seem to be installed on the Pi anywhere, but these can easily be found by downloading the Windows version of the emu, and then can be placed somewhere (I keep mine in /opt/retropie/configs/atari800/act and prefer Real.act with some additional adjustments for vibrancy).
  • Play multi-disk games, which are quite common, including the ability to create and format blank disks for player or map data (Ultima games, Seven Cities of Gold, and many more require the latter). You can do this via the Disk Management menu.
  • Side note: for multidisk games, you may get your hopes up that “Disk Sets” could let you load up all the disks at once direct from the gamelist. Alas, this is not the case. There is no way to load a disk set from the command line in Atari800 standalone, and definitely not in the libretro method of loading libraries. You can make disk sets, but you’d have to come to this menu to load them by hand.
  • Convert pesky 5200 carts. See below in the 5200 section.
  • If you mess about, you may find that you have a cart attached at the same time you have a disk attached. The cart will win. You can use the Cartridge Management menu to eject the cart.

All of these options are NOT saved in any retroarch config. Instead, they are saved in a file called atari800.cfg which in the libretro version is located in /opt/retropie/configs/atari800. This is also symlinked from ~\.atari800.cfg (so you’ll need to ls -a to see it).

Further, this is the ONLY COPY of this file, which means any settings in it will apply equally to both the Atari 8 bit games AND the Atari 5200.

Getting 5200 working

Fortunately, the biggest thing you want to change between platforms is which machine you are emulating, and this is present in both the atari800.cfg and in the RGUI settings which go in retroarch-core-options.cfg. If you have a a core options file in your atari5200 directory, it will let you have separate settings for just the 5200 system.

Make sure you have a file called /opt/retropie/configs/atari5200/retroarch-core-options.cfg with this in it:

atari800_artifacting = "enabled"
atari800_cassboot = "disabled"
atari800_internalbasic = "disabled"
atari800_keyboard = "poll"
atari800_ntscpal = "NTSC"
atari800_opt1 = "disabled"
atari800_opt2 = "disabled"
atari800_resolution = "336x240"
atari800_sioaccel = "enabled"
atari800_system = "5200"

Next problem is “cart types.” Often when you boot an Atari 5200 game, it gets stuck at the Atari logo, or just crashes, or it asks you to specify a cart type. There’s a bunch of kinds, and they all have to do with how much memory was embedded in the cart, and how many chips that memory was using, and what order the banks were in, etc. There is supposed to be a header on the cart that tells the machine how to interpret it, but lots of cart dumps don’t have the header.

The emulator, though, has the facility to create carts, and this can add the missing header back in. Then you’ll never see this menu again. Do this by going to Cartridge Management, Extract ROM from cartridge, save it, then Create Cartridge from ROM image, and select the file you just created. You will be asked which cart type to use. A handy list gathered by forum members is here: https://retropie.org.uk/forum/topic/16556/cartridge-type-code-list-for-atari-5200-games. Be sure to test after making your choice; if it doesn’t work, just try another one. Go through the entire 5200 library (it’s not that big!) and you’ll never get the choose cart menu again. Be sure to have a backup of all your 5200 roms, of course.

…and your Atari 5200 stuff should work as well as it can in a 3.1.0 build of Atari800. In particular, don’t expect Missile Command, Gorf, and other games that use analog absolute position to work correctly. Atari800 emulates these using a mouse, and I have not been able to get that to work in the libretro core. Let me know if you have (there’s also the older build made by @future-child which did a bunch of work on getting Atari 5200 controls working better, but i think it’s not actively maintained anymore).

OK, now on to stuff that non-Atarians probably don’t know, which I will post in replies.

BASIC

The Atari 400 and 800 systems ran a Memo Pad when you turned the machine on without loading a program or having a cartridge inserted. The BASIC cart was packed into the box.

All the XL and XE models came with BASIC built into the machine. This meant that when booting the system, you had to tell the machine “the BASIC cart isn’t actually plugged in” whenever you wanted to load anything else. This was accomplished by holding down the Option key while booting (this does not seem to work in lr-atari-800). If you didn’t load anything, you ended up instead in a self-test mode. Lastly, carts always disabled BASIC automatically.

  • 400/800 with BASIC: Blue screen with READY. This is BASIC.
  • 400/800 with cart: the cart.
  • 400/800 without BASIC: Memo Pad.
  • 400/800 with .atror .bin or .xex etc: the program
  • XL/XE with BASIC: Blue screen with READY.
  • XL/XE without BASIC: Self-test.
  • XL/XE with cart: the cart.
  • XL/XE with .atror .bin or .xex: likely a crash
  • XL/XE with .atror .bin or .xex and BASIC disabled: the program
  • 5200 without cart: nothing but Atari logo.
  • 5200 with cart: the game.

Most games you will find for the Atari are machine language, and require that BASIC be disabled. But there were MANY commercial games that were written partially or wholly in BASIC, including many classics.

Among them:

  • Crush Crumble and Chomp and most other early Epyx games
  • all of the Dunjonquest aka Apshai games
  • lots of SSI turn-based strategy games like Panzer-Jagd
  • the Fantasyland series
  • Floyd of the Jungle
  • Hellcat Ace
  • all the Sierra Hi-Res adventures (Dark Crystal, etc)
  • All the Marc Benioff Artworx adventures, like Gwendolyn
  • A huge pile of games from ANALOG and ANTIC magazines
  • the always-charming “insult AI” Abuse

These will give you “The Atari computer has crashed!!!” or worse when you try to boot them.

In the standalone emu, you handle this with a -nobasic command line argument. There are no command line arguments in Retroarch, AFAIK, so instead you need to create game specific option files. Fortunately, disabling and enabling BASIC is a retroarch core option, so you can do this from the GUI. Hit Select-X and navigate to Options, set BASIC to disabled, then use the top line of that screen “save game options file” to save a config file just for that game. Then exit the emu entirely (you can’t just restart from the RGUI menu choice). EDIT: if you use the script below, you don’t need to do this, all filenames with BASIC in the name will just work. In fact, you might save a game options file that has the wrong value in it by accident, and baffle yourself — I did it while testing! I would suggest that if you use this script, you NOT save any game overrides.

(You CAN also enable BASIC via the F1 emulator menu and restart the game, but then you can’t save a per-game override.)

The resulting config file will be saved in /opt/retropie/configs/all/retroarch/config/Atari800 nowhere near your other configs. šŸ™‚ What’s more, it will actually basically be a complete copy of your retroarch-core-options.cfg rather than just the one line change.

That said, I have tested and verified that all you actually need is for the file to have the Atari specific settings in it:

gamefilename.opt

atari800_artifacting = "enabled"
atari800_cassboot = "disabled"
atari800_internalbasic = "enabled"
atari800_keyboard = "poll"
atari800_ntscpal = "NTSC"
atari800_opt1 = "disabled"
atari800_opt2 = "disabled"
atari800_resolution = "336x240"
atari800_sioaccel = "enabled"
atari800_system = "130XE (128K)"

Many Atari 8 bit software collections will helpfully tag files that require BASIC for you in the filename. Maybe someone will be inspired to make a little shell script that generates all the .opt files for an Atari800 rom collection based on the filename including the substring… EDIT: not needed anymore if you use the runcommand script below

Typical File Formats

  • .atr: an Atari disk image. Typically needs BASIC disabled. You load these from the gamelist, basically you boot the Atari with this in the drive.
  • .dcm and .xfd are two other disk formats that lr-atari800 can read.
  • .cas is an Atari cassette image. It’s not listed on the Retropie page, but I’d be surprised if the emu couldn’t load it. You can actually boot from a cassette.
  • .rom and .bin are typically cartridges. Note that you can have a disk in the drive AND a cart in the cartridge slot at the same time. Carts always take precedence over disks. Also note that these formats are not the same as a .car file.
  • .a52 and .car are typically Atari 5200 cartridges, but you can find .car Atari 8 bit carts as well. These have header information, because there are over a dozen cart formats with added banks of memory, etc. See “5200” above for how to convert a cart to a bin and back in order to put the right header info on the cart.
  • .bin and .xexare executables. You may also see .com. These are just binary executables, but not entire disk images. You can load these from the gamelist, or from the Disk Operating System, which on an Atari was a menu. Boot a disk with DOS on it (and there were like a dozen different DOSes you could use, often with incompatible disk formats) and you can use the menu to launch the executable. Game compilation disk images often have collections of these.
  • .bas is a BASIC file. You cannot run these directly from the gamelist. You have to load them from disk while in BASIC (use LOAD "D:FILENAME.EXT" and once it loads, type RUN.) Many games consist of a disk image with DOS (a directory listing of the disk contents will show DOS.SYS and DUP.SYS), a BASIC program, and a little executable named AUTORUN.SYS. This basically makes the disk bootable and runs the .BAS program directly. These end up being .atr images that require BASIC.

See here for way more formats than you would have thought possible: http://www.atarimania.com/faq-atari-400-800-xl-xe-what-file-formats-for-entire-disks-tapes-cartridges-are-there_106.html

Note that the emu lets you fully manipulate disks! You can accidentally reformat your rom, and it will look the same from the outside. Many games require you to have a blank disk to save player state on. Don’t mess up and save your player file over the game! Similarly, quite a lot of “player disks” and “scenario disks” and the like out there actually have people’s saved games on them.

Artifacting Introduction

High resolution graphics mode on Atari 8 bits was a one-color, two luminance mode. You could have one color for the background, and the same color at a different brightness for the pixels drawn.

However, similar to the Apple II, the Atari supported what is called artifacting. This is a literal “artifact,” a graphical glitch, caused by the way the chroma circuits in the original hardware worked. There are some great explanations of why and how it works on AtariAge and similar forums, but suffice it to say:

Draw one white pixel in an even column next to an empty pixel in an odd column, and it’d come out as color 1.

Draw one white pixel in an odd column next to an empty pixel in an even column, and it’d come out as color 2.

Draw two white pixels next to each other, and they’d come out as the true color.

Draw specific sorts of dithered patterns, and pull tricks with background colors (since the artifact colors blended), and you could get even more colors.

BUT — this only worked this way on NTSC. On PAL, the chroma logic is different. There are some PAL artifacts, but by and large, artifacting this way doesn’t work on PAL.

Bottom line? You may have seen a lot of Atari 8 bit games that look like this screenshot from archive.org:

d9ba5274-5e51-4878-bdaa-0f9073dcfad8-image.png

But on an NTSC screen on actual hardware, it likely looks like this image from MobyGames:
451e2582-89a8-46a5-92cc-ccf53fdc83d8-image.png

The list of games that uses artifacting to get colors is HUGE and includes classics like Lode Runner, Flight Simulator II, the Ultima series, and more.

NTSC and PAL

lr-atari800 defaults to PAL. Which is why the Internet is full of images like the black & white first one, rather than color ones like the second one. These are all generated on emulators set to PAL or with artifacting turned off, by people who have never seen the games on actual hardware.

Now, there are PAL games that were created in Europe and therefore assumed there wasn’t any artifacting. Two good examples are 180, the darts game, and Head Over Heels.

Here’s 180 without artifacting on, the way it was meant to be:
752e90cb-1ef2-40a8-95af-98050e78fe37-image.png

And with it on, which is much worse:
26ef4794-4fe7-419e-ab24-19bd59f88cfe-image.png

Technically, to get the right version, we should also be in PAL. Here’s Head Over Heels in NTSC with artifacting in the emu:

51d6d410-0fac-4722-a782-27b6ca059450-image.png

Here it is in NTSC with no artifacting:
7a075c68-46f4-4179-a450-6e41c43c3600-image.png

And here it is in PAL with accurate PAL blending turned on:

49861e7a-7601-4062-b2b9-7a5dfe3c70fc-image.png

Note the different aspect ratio. If you, like me, have used overlays and a custom viewport size, you won’t see an aspect ratio difference, most likely.

So, not only do we have two different video systems to worry about, but games coded for one will tend to look wrong on the other. The first thing to do is set your lr-atari800 RGUI option to NTSC; the vast majority of well-known games that use this monochrome high-res graphics mode are NTSC games, not PAL games. Just like how BASIC is usually noted in the filename, PAL is also usually noted in the filename, so you can find PAL games and save options just like you did for BASIC games, because PAL vs NTSC is an RGUI option. EDIT: I recommend not doing this, and using the script below instead.

But here’s the bad news.

The four artifacting modes

The chroma circuit on the Atari 8 bits evolved a lot over the course of the decade plus that the computers were sold. They started out with a CTIA graphics chip. Then they went to a GTIA graphics chip. Then the circuit itself changed more than once.

The artifact colors are different on every single one of these.

In fact, there’s even an actual knob to turn on the actual hardware that lets you adjust the tint of the artifacts.

lr-atari800’s core supports

NTSC:

  • no artifacting
  • blue-brown 1
  • blue-brown 2 (which should actually be called brown-blue)
  • GTIA
  • CTIA

PAL:

  • no artifacting
  • simple PAL blending
  • accurate PAL blending

But these detailed options are not available in the RGUI. The libretro core is hardcoded to only use blue-brown 1, I checked the source.

However, you can use the in-game menu accessed via F1, go to Display Settings, and select

Video artifacts: old NTSC artifacts
NTSC artifacting mode: blue/brown 1 (or blue/brown 2, or GTIA, or CTIA).

And these will be saved in /opt/retropie/configs/atari800/atari800.cfg as

ARTIFACT_NTSC=NTSC-OLD
ARTIFACT_NTSC_MODE=1

where

ARTIFACT_NTSC_MODE=0  // off
ARTIFACT_NTSC_MODE=1  // blue/brown 1
ARTIFACT_NTSC_MODE=2  // blue/brown 2
ARTIFACT_NTSC_MODE=3  // GTIA
ARTIFACT_NTSC_MODE=4  // CTIA

(Sorry, haven’t done the same experiment for PAL to get the index numbers, but I suggest you just set those to on and accurate because they look fine that way).

Now, here’s the problem. First of all, you’ll have to change this by hand every time you put in a different game. And secondly…

  • CTIA gives, more or less, green and blue-to-purple depending on your tint.
  • GTIA gives, more or less, the reverse: what was green is blue, what was blue is green.
  • Blue/brown 2 and blue/brown 1 are likewise inverse of one another. And brown is a misnomer; on a well-saturated screen, it looked closer to red.

The fact of the matter is that on real hardware, you don’t know what you will get, but at the same time, at given periods of the hardware existing, developers clearly assumed one set of artifacting colors or the other.

Ultima III with artifacting off, or in PAL:
b78d3986-04ca-4416-815d-92fd977e4f6e-image.png

CTIA, note the green flame from the dragon:
3e212af3-ec6a-4ab0-991b-7aeb6bbff6c6-image.png

GTIA, now the flame is purplish red:
b5f8ee65-6279-422c-b07f-0ff1c44b0ab3-image.png

Brown/blue 2, flame is blue:
991184a1-4eb3-4306-89f0-a491f7318a02-image.png

Brown/blue 1, flame is red:
9b214cf7-8d31-4f0b-a1fb-fe706b009b6b-image.png

If you want an accurate experience that is closest to what the developers intended, you need to know what it was meant for. Luckily, we can compare to games on other platforms, screenshots on the box, or even cover art, to figure that out in many cases. For example, It’s safe to say that in 3D Red Baron, the enemy plane is probably supposed to be red. In Ultima games, we probably want to aim for blue water and green grass, which is what the developers intended, but it’s hard to get that setting with what we have exposed in lr-atari800.

Other color adjustments

There are several video adjustment settings presented in the emulator menu, and all of them are broken. Again, the ones to not mess with even in config files: “New NTSC artifacts” renders incorrectly in all modes. “NTSC full filter” likewise renders incorrectly, and also doesn’t properly read and write settings to the atari.cfg file when you make adjustments under “NTSC filter settings.”

However, things that do work, sorta:

  • The various “color preset” sliders are all broken; when you make a choice, they will jump to -1 or 1, which will be wrong. (Again, you can use Restore Default Colors to put these back). But you can edit the atari.cfg file, put in values, and they will be read correctly. There have been various posts around the forums on what makes for good values there. Note that the GTIA value here is, more or less, the same knob for adjusting the chroma circuit that the full NTSC filter provides. However, it interacts with the Tint slider in somewhat unpredictable ways.

  • There are also a few default configs: Vibrant, deep black, and standard. vibrant is more saturated, deep black does what it says. Both are quite nice though a tad ahistorical, particularly when coupled with a palette.

  • External palettes DO work, and will affect artifacting colors. Just note that the “Also adjust external palette” option needs to be set if you want to use both a palette and these controls at the same time.

One option for messing with the sliders and seeing what you are doing is to launch the standalone emulator, where these functions do work, and once you have found something you like, paste the values in. Alas, this does not work for the full NTSC filter, which is what we would totally all be using if we could.

NTSC filter and “New Artifacting”

There are additional options for artifacting visible in the F1 emulator menu. They don’t work in lr-atari800. The “new artifacting” settings simply render wrong. The “NTSC filter” settings have sliders that don’t work, turning it on will blow out the colors. (You can fix this by going to Display Settings->Restore Default Colors). Even though the NTSC filter settings will be written to the config, editing them there will still not work, so you should not bother turning this on.

What the standalone emu can do (version 4.1.0, though I am unsure when the full NTSC filter was implemented) is bypass the hacky “four choices of artifact settings” and go to a true analog system that emulates NTSC circuitry. This means it gains an analog slider called burst phase, which is the equivalent of that knob that adjusted the colors.

Its defaults are weird:
853e3152-47ac-432b-a3a2-2dab4d8b7824-image.png

Supposedly, burst filter around -1, -.5, .5, and 1 are reasonable typical values. But by running the NTSC filter, I can get what Richard and Chuck probably actually meant for U3 by setting burst phase to around -0.76, which gives me green grass and blue water. It’s close to what we get with mode 1 (blue/brown 1).

10b8a2b5-7ef3-4d06-9e8c-b6cb5c4b5c0b-image.png

The four settings we can use in lr-atari cannot, alas, quite replicate this.

Off 9f83b762-3793-4806-9dc6-193019f4ac38-image.png
Mode 1 458e01a1-4986-4ff3-b4cc-243fbb0de955-image.png
Mode 2 4bbff3df-52b9-49bd-ba5a-6a630f3e238f-image.png
GTIA 64d1df4e-e359-4f3a-923c-7cb6e87f7c58-image.png
CTIA 81609d0c-67fe-49e4-ab06-fd07bbd20517-image.png

Ā 

Choosing the right artifacting mode

As a rule of thumb, you’ll find that most games are either mode 1 or GTIA. The CTIA chip was not around for very long. Some of the very early games, like The Dark Crystal, actually show you an artifacted square and ask you what color you see, and change their artifacting based on your answer.

You will also find that some games have hacks to make them color by changing them to use a graphics mode 15 that only existed on XL/XE machines. Among the games you can find with this hack are Lode Runner, Choplifter, and Drol. Frankly, they don’t look as good, because they have half the horizontal resolution. But they tell us what the colors ought to be like.

Here’s my best stab at what you should pick from what’s available in lr-atari800:

Default for all games should be artifacting off, because having it on will mess up text display in color games. This is not at all how it was on the original hardware. This would affect games like

  • Archon
  • M.U.L.E.

Some games that you might think use artifacting but will look better with it off include

  • Caverns of Callisto
  • The Nightmares
  • Transylvania (check out that font at the bottom!)

Where hi res text mode was used mixed in with the graphics.

Hi res PAL games should have game options files with PAL set, and accurate PAL blending on (mode 2).

  • 180
  • Head Over Heels

Artifacting games should have a game options file with artifacting turned on at the RGUI level, set to NTSC. In the atari800.cfg, you should have

ARTIFACT_NTSC=NTSC-OLD
ARTIFACT_NTSC_MODE=1

…and use the .opt file to turn artifacting on and off, which will leave these settings intact. EDIT: If you use the script below, this is not required anymore. This will cover most games looking right, such as

  • AE by Broderbund
  • Choplifter by Broderbund (cart and disk; the cart by Atari uses 4-color Gr. 15)
  • Crossfire (disk version)
  • Dark Crystal
  • Das U Boot pinball
  • David’s Midnight Magic by Atari (cart.)
  • David’s Midnight Magic by Broderbund (disk)
  • Diamond Mine
  • Dragon’s Keep
  • Drol
  • Escape From Vulcan’s Island
  • Gwendolyn
  • Hard Hat Mack
  • High Rise by Joe Calabrese (not the other one)
  • Lode Runner by Atari
  • Lode Runner by Broderbund (disk)
  • Lunar Leeper
  • Malpass
  • Mission Asteroid
  • Ogre
  • Pensate
  • Pinball Construction Set (and all pinballs created with it!)
  • Pool 1.5
  • Pool 400
  • The Wizard and the Princess
  • Ultima 2
  • Ultima 3
  • Ultima 4
  • Ulysses and the Golden Fleece

Unfortunately, there’s no way I know of to save alternate atari800.cfg files for the games that look better in other modes. EDIT: The script below basically creates this alternate file on the fly.

Correct in mode 2:

  • 221B Baker St (the bottom display uses artifacting; it’s correct when Sherlock’s colors here match his colors in the iso map above).
  • 3d Red Baron (assuming you are fighting the Red Baron, his plane should be red not blue)
  • Flight Simulator II (the control panel uses artifacting, and the level gauge is the clearest use of it; the sky in the level gauge should be blue)
  • Fooblitzky (I went off the color of the roads and crosswalks)
  • Marauder (based on box shots and other platforms)
  • Mr. Do (Only for EXTRA and at bottom of screen — should match the color graphics parts of the screen)
  • Night Mission Pinball (based on screenshots and box images)
  • Threshold (based on screenshots from other platforms)

Correct in GTIA:

  • AutoDuel (other platforms show the blocked hexes as red)
  • Aztec (bit of a guess here based on the release date and the color on other platforms)
  • Bug Off (green stems for the flowers)
  • Twerps (the alien on the box is green; if you have the version with the title screen, you get a large full screen alien, and this is only mode he’s green in).
  • Jawbreaker could go either GTIA or CTIA, I’m unsure.

CTIA:

  • Micro League Baseball is supposed to have a green baseball field, not purple, red, or blue.

Adding the missing artifacting options

A request: if anyone can come up with a clever solution for changing the value of ARTIFACT_NTSC_MODE as part of the loading process for the game, please let me know. I tried setting up separate emulators for it, but they all end up referencing the same atari.cfg file. I suspect that the only fix might be to actually back up the old file, copy in one with the one line change (or maybe sed it in?) in a runcommand shell script. EDIT: done, see below

Otherwise, I think the only other choice is to hope that developers on the upstream lr-atari800 core add this specific option line to the RGUI interface. It’s currently there, but basically ignored and hardcoded, in the block starting at line 302 in libretro-atari800/libretro/libretro-core.c.

   var.key = "atari800_artifacting";
   var.value = NULL;

   if (environ_cb(RETRO_ENVIRONMENT_GET_VARIABLE, &var) && var.value)
     {
       if (strcmp(var.value, "enabled") == 0)
	 {
	   if (Atari800_tv_mode == Atari800_TV_NTSC)
	     {
	       ARTIFACT_Set(ARTIFACT_NTSC_OLD);
	       ARTIFACT_SetTVMode(Atari800_TV_NTSC);
	     }
	   else if (Atari800_tv_mode == Atari800_TV_PAL)
	     {
	       ARTIFACT_Set(ARTIFACT_NONE); // PAL Blending has been flipped off in config for now.
	       ARTIFACT_SetTVMode(Atari800_TV_PAL);
	     }
	 }
       else if (strcmp(var.value, "disabled") == 0)
	 {
	   if (Atari800_tv_mode == Atari800_TV_NTSC)
	     {
	       ARTIFACT_Set(ARTIFACT_NONE);
	       ARTIFACT_SetTVMode(Atari800_TV_NTSC);
	     }
	   else if (Atari800_tv_mode == Atari800_TV_PAL)
	     {
	       ARTIFACT_Set(ARTIFACT_NONE);
	       ARTIFACT_SetTVMode(Atari800_TV_PAL);
	     }	   
	 }
}```

Anyway... time for bed here, hope this is helpful to anyone else getting Atari 8 bit emulation going on their Retropie setups.

OSa and OSb

I neglected to mention OSa and OSb. Suffice to say, you’ll see this on some filenames too. It basically means that it will or will not work on an XL/XE. Try swapping the machine to the other (from 800 to 130XE perhaps, or the other way around). Once again, you can save custom game options from RGUI for this, because this is an option saved in retroarch-core-options.cfg.

In short, the original OS (OSa) had some bugs. Many later games will have issues on OSa. However, there’s a tiny handful of games that don’t work without the bugs. Hence OSb. There’s also the 1200XL OS, which has additional minor incompatibilities, and the 5200 OS. On top of that, several of these exist in NTSC and PAL formats.

Atari released a Translator Disk that actually allowed you to overwrite the differences in RAM before loading a game, so you could get older games to run on newer hardware.

lr-atari800 doesn’t even support all the different BIOSes known to exist, fwiw, but it covers enough of a spread that you should be able to get stuff working. (I added a table of known BIOSes to the Retropie docs).

A helper script that auto-configures everything for you

The following script will:

  • Automatically launch PAL games in PAL.
  • Automatically enable BASIC for games that require it.
  • Let you choose from the four NTSC artifacting modes at the runcommand menu by setting an emulator for a specific rom.
  • Automatically set the system to OSa for games that require it.

INSTALLATION

  1. Back up these files, or live dangerously. No warranties express or implied, don’t blame me, etc.
  • /opt/retropie/configs/atari800/atari800.cfg
  • /opt/retropie/configs/all/retroarch-core-options.cfg
  • /opt/retropie/configs/atari800/emulators.cfg
  1. Edit opt/retropie/configs/atari800/emulators.cfg so that it has four new emulators. Mine now looks like this. The names matter.
lr-atari800 = "/opt/retropie/emulators/retroarch/bin/retroarch -L /opt/retropie/libretrocores/lr-atari800/atari800_libretro.so --config /opt/retropie/configs/atari800/retroarch.cfg %ROM%"
lr-atari800-ctia = "/opt/retropie/emulators/retroarch/bin/retroarch -L /opt/retropie/libretrocores/lr-atari800/atari800_libretro.so --config /opt/retropie/configs/atari800/retroarch.cfg %ROM%"
lr-atari800-gtia = "/opt/retropie/emulators/retroarch/bin/retroarch -L /opt/retropie/libretrocores/lr-atari800/atari800_libretro.so --config /opt/retropie/configs/atari800/retroarch.cfg %ROM%"
lr-atari800-artifacting1 = "/opt/retropie/emulators/retroarch/bin/retroarch -L /opt/retropie/libretrocores/lr-atari800/atari800_libretro.so --config /opt/retropie/configs/atari800/retroarch.cfg %ROM%"
lr-atari800-artifacting2 = "/opt/retropie/emulators/retroarch/bin/retroarch -L /opt/retropie/libretrocores/lr-atari800/atari800_libretro.so --config /opt/retropie/configs/atari800/retroarch.cfg %ROM%"
default = "lr-atari800"
  1. Ensure that your Atari 8-bit roms follow the naming convention where you see (PD)(GB)[k-file][BASIC] etc in the filenames. For example:
Dreadnought Megastars (1990)(Byte Back)(PAL)(GB)[k-file].atr  // this game will launch in PAL

Beer Shot (1994)(Bednar, Kamil)(PD)[BASIC].atr // this game will enable BASIC

Head over Heels (19xx)(Hit Squad)(GB)[h Homesoft][k-file].atr // this game will run with default of no BASIC and NTSC

Ice Cap (19xx)(MacIlwee, Steven)(GB)[req OSa].atr  // this game will run on a 400/800 with OSa

Galactic Quest (1981)(Crystalware)(US)[req OSa][BASIC].atr // this game will set the system to 400/800 OSa, and will also set BASIC to Rev. A 
  1. Obtain a copy of the BIOS for Atari BASIC Revision A. This is needed for games that require OSa and happen to be in BASIC. Revision A BASIC has an md5 of a4dc52536d526ecc51ea857b9fa2b90f and is not typically called ATARIBAS.ROM. Place it in ~/RetroPie/BIOS — be sure to give it a different filename than the normal Atari BASIC BIOS. Either add this filename to atari.cfg like this:
ROM_BASIC_A=/home/pi/RetroPie/BIOS/BASIC Revision A (19xx)(Atari)(400-800).rom

Or go into the emulator menu and search the ROM system directory again, and then save the configuration file. Verify that on the menu, you are able to select Basic Rev. A.

  1. Edit /opt/retropie/configs/all/runcommand-onstart.sh to include the script found at https://github.com/raphkoster/lr-atari800-runcommand-onstart. Note that if you already have this script, you only need to insert the part starting at # apply Atari 8-bit specific patches...

  2. Test!

  • Try a game like Crush, Crumble and Chomp. It normally would not load because it requires BASIC to be enabled. Now it will. It might need you to hit the fire button when it first starts and sits at the blue screen.
  • But it looks ugly! Yup, it needs artifacting.
  • Exit the game, and relaunch it. Now enter the runcommand menu by tapping space bar or a button.
  • Leave option 1, “Select default emulator for atari800,” set at lr-atari800.
  • Select option 2, “Select emulator for ROM.” You should have several new options there. Select lr-atari800-artifacting1
  • Exit without launching (if you just launch, the setting won’t apply until the next time, for some reason)
  • Launch the game again… you have blue water!
  • Try Drol, also set to artifacting1. You should have red scorpions.
  • Try Lode Runner with artifacting1. You should have blue bricks.
  • Try Choplifter (not “Choplifter!” which is the color XE cart, but the original Broderbund one), with artifacting1. Dark blue sky, green ground.
  • Try Micro League Baseball set to lr-atari800-ctia… the outfield should be green.
  • Try Mr. Do! set to artifacting2. Your lives at the bottom of the screen should be red just like your guy in the playfield.
  • Try Bug Off using lr-atari800-gtia. The flower stems and leaves will be green.
  • Try Head Over Heels. This PAL game should be crisp and clear with no artifacts.
  • Try Clonus, Micro Chess, TwoGun, IceCap, or another OSa game. The game should boot.
  • Try Eggnapper or other OSb games, they should boot regardless of your machine settings.

Enjoy the more authentic Atari 8-bit experience!

EDIT: as Retropie was updated, the locations of some files moved. Depending on your install version, the location in the script needs to be updated from /opt/retropie/configs/all/retroarch-core-options.cfg to /opt/retropie/configs/atari800/retroarch-core-options.cfg

Four player games

I needed to play M.U.L.E. as it should be played, so… I added support for four joysticks to the lr-atari800 core.

To take advantage of this, you just need to set the emulated machine to “Atari 400/800” under Options. The other machine types only had two joystick ports. Be sure to remember to set the two additional joysticks to Atari Joystick, rather than RetroPad.

Just as before, the additional special hotkeys (Select, Option, virtual keyboard, etc) only work on the first controller.

A list of the games that support 4 controllers (taken from Atarimania at http://www.atarimania.com/faq-atari-400-800-xl-xe-what-games-support-4-or-more-simultaneous-players_93.html):

  • Ali Baba and the Forty Thieves by Stuart Smith for Quality Software
  • Aliens a public domain game by ??? using an altered Dandy program (the Dandy font and thus the graphics were changed, however, the levels remain the same and can be used in both games)
  • Asteroids by Tod Frye for Atari
  • Basketball by Alan Miller for Atari
  • Battle Room (CIA vs. KGB) a public domain game by SNACC
  • Dandy disk by John H. Palevich (Jack Palevich) for APX
  • Depth Warrior by ??? for ROM magazine (Canada) v1n7 ***
  • Floyd of the Jungle by MicroProse (1982 and 1983 releases)
  • GEM by Joel Gluck
  • Killa Cycle by Simon Goodwin & David Muncer
  • Hockey by Gamma Software, (c)1981
  • Major League Hockey by Thorn EMI
  • Major League Soccer by Thorn EMI
  • Maze War by ???
  • Mouse Party by Bill Halsall for New Atari User #39 Aug/Sep 1989
  • M.U.L.E. by Ozark Softscape for Electronic Arts
  • The Return of Heracles by Stuart Smith for Quality Software
  • Road Block / Roadblock by Brian Holness for Compute! v5n7 #38 July 1983
  • Silicon Warrior, developed by The Connelley Group for Epyx
  • Sky Warrior by Jack Chung for ROM magazine (Canada) v1n6
  • Soccer by Gamma Software
  • Survivor by Richard Carr for Synapse
  • Tank Battle by Fred Pinho from Antic magazine:
    http://www.atarimagazines.com/v3n2/animate.html
  • Volleyball by ??? (public domain game written in Atari BASIC)
  • Yellow-Brick-Road by ??? for ROM magazine (Canada) v1n2
Ā 

I also found and fixed the bug that prevented typing any characters that needed the SHIFT or CTRL keys. This also opened up lowercase typing, because you can now unlock CAPSLOCK.

Ā