lr-atari800, 5200, artifacting, BASIC, and other guidance
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
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 just want to say that while I was not an Atari owner during those days - I started with the ZX Spectrum - this was an awesomely thorough read. Thank you for putting this together!
@pjft you're welcome. I hope it helps out anyone struggling with these platforms in Retropie, or at the least lets them experience some of the key games that otherwise would be confusingly hard to launch.
It's a pity we don't have the 4.1.0 version in libretro... There'd be over 400 commits to integrate to bring lr-atari800 up to date, but it looks like a lot of them are pretty minor. Still a lot of work.
Patching the lack of the artifacting settings is probably very doable. Unfortunately, work is swallowing me whole, else I'd be very tempted to take a stab at it.
Making a script to generate .opt files for games that should be PAL or need BASIC is small enough I am tempted to do it one of these evenings.
I wonder, if I had four alternate emus, each with a runcommand script to basically
sed 'ARTIFACT_NTSC_MODE=./ARTIFACT_NTSC_MODE=1/g' atari800.cfg
... then it's an emu-specific launch operation. One for each of the four modes, plus the default emu would replace with 0. Then you can just pick an emu at the usual runcommand menu and save per rom configs. Hmm.
I have this working. It’s a runcommand-onstart script that modifies retroarch-core-options.cfg and atari800.cfg before launching the emu, based on what emu you selected. I just added four new names to atari800/emulators.cfg and now you can pick one of the four artifacting modes from the runcommand launch menu and assign it to a given rom. They all launch the same emu, but with different config options.
I wish I didn’t have to modify the core options file, but it overrides atari.cfg. You can in theory turn artifacting on and off via a game options file, and then use this method for the artifacting mode, but it seems cleaner to just do it all one way.
On the other hand, doing it this way means that you can in theory change any of the options, basically restoring the ability to do command line switches, as long as you are willing to create a separate emulator.cfg line per combination of switches.
Still testing but I will post it once I feel confident in it.
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.
- Back up these files, or live dangerously. No warranties express or implied, don't blame me, etc.
opt/retropie/configs/atari800/emulators.cfgso 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"
- 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
- 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
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.
/opt/retropie/configs/all/runcommand-onstart.shto 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...
- 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
- 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!
PS, in theory, we could also detect [OSb] or [OSa] and launch with the appropriate machine. There are a few disk images out there that only work with OSb or OSa. It's late though, and I have to stop for today. But it would work the same way, only you need to switch machines to 400/800.
Also -- the above script can be hacked to work with atari800 as well. You need to remove all the sed lines that affect the core options file, retaining only those that affect atari800.cfg. Probably need to change the path to ~/.atari.cfg, IIRC. And of course, change the emulator name from lr-atari800 to just atari800.
I know I'm the only one adding to this thread pretty much, but I just edited a bunch of the preceding, and included new sections explaining OS revisions, the multiplicity of confusing file formats, and a bunch of other things.
This is far too much to go on the Wiki, but maybe a link to here would be appropriate?
@rkoster are you sure this wouldn't deserve its own section in the documentation? It's as detailed as it gets and comparable in depth to things like the xboxdrv mapping guide that @mediamogul wrote at one point, for instance.
Certainly a link would be good, but your call, really.
@pjft Oh, I’m fine with it being in the wiki. Don’t know what the process is for that though!
@rkoster I believe it's all on GitHub, but I imagine someone who's actually documented their own RetroPie contributions (shame on me) would be able to advise better :)
@pjft Well, I added a pile of stuff to the Wiki, including stuff that isn't in the thread (BIOS info mostly).
The script has been updated to handle automatically providing the correct settings for OSa games [edit: and OSb games]. This involves setting both the system to Rev. A 400/800, and setting the BASIC revision to A. You will need to find the BASIC Rev. A rom file and place it in the BIOS folder for that part to work correctly; the instructions above have been amended to walk you through that and provide the correct md5 hash for that version of BASIC.
If you installed the usual recommended ATARIOSB.ROM, you don't need to install anything for the OSb games.
It's also now on github at https://github.com/raphkoster/lr-atari800-runcommand-onstart
I fixed a bug (typo, really) with the handling of OSb games. Updated script is on github.
PCKid last edited by
@rkoster wow this is great. Thanks. Haven’t read it through completely yet as I’m away on business. But what about games like, one of my favourites, Spelunker that require some keyboard commands like space bar for phantom blaster and keys to launch flares and dynamite. Can that be set on say my shanwan ps3 controller to use it? Basically all others work fine as Atari Joystick. I do have a Logitech wireless keyboard with mouse pad so I could use that in front of me as well for extra commands. But would be fiddly if could all be done with the controller.
@PCKid Well, it's a big ask to get a computer to work fully with a controller, of course. There's no way to cover every possible mapping. The most common keys that you tend to run into include the number keys (ex: setting difficulty in Jumpman), space bar (Spelunker, as you mention), and Enter, but something like Star Raiders of course demands that you play with the keyboard, never mind all the text adventures or even just games that require that you type your name.
The mappings in lr-atari800 are:
L2 KEY SPACE
R2 KEY ESCAPE
R TOGGLE UI
A FIRE1/KEY RETURN IN GUI
B KEY RETURN
X FIRE2/KEY ESCAPE IN GUI
Y VKBD ON/OFF
So you do in theory have two keys free where you could put a couple more mappings without stomping something else. I haven't tried this, but you could go to the RGUI (
Select-X) and mapping L3 and R3 to the extra keys you need, and then saving a Game Remap file (not a Core Remap, as that will map those keys for all games). But I haven't tried this to see if it works with the lr-atari800 core.
You're almost certainly still going to need a keyboard attached for a lot of games.
roslof last edited by
Excited about this, but confused about one section.
I downloaded the runcommand-onstart.sh script and placed it in the folder as described, but this is a new file that never existed previously, so nothing is calling/referencing this file.
So if I launch lr-atari800 or any of the new emulator options, there is nothing (I don't believe) referencing the script.
Is there a missing step somewhere?
I do have runcommand.cfg and runcommand-launch-dialog.cfg in the "all" folder. Not sure how this script is actually called.
roslof last edited by roslof
I see now that runcommand is supposed to automatically launch runcommand-onstart.sh if it exists. I added a line to the script to output a text string to /dev/shm/runcommand.log, but it doesn't appear. I don't think runcommand-onstart.sh is actually running.
I'm running the unsupported Buster version of Retropie, so maybe I stumbled on something funky. Will keep playing with this.
EDIT: I didn't change anything, but the script is suddenly working and I can see my custom string in runcommand.log. Excellent. Will tinker with my ROM filenames and see if I could get this to work.
@roslof Hope you got it working! Apologies, I have been busy and not visiting the forum.