When old 400/800 programs stop working on the new XL/XE computers
The Operating System of the Atari 400 & 800 remained very stable for a few years:
The initial OS known as "Rev. A" (June 1979, NTSC & PAL versions) was updated only once to "Rev. B" (Sept 1981, NTSC version).
When the new Atari 1200XL was released, the OS was updated once more to "Rev. 10" (26 Oct 1982, NTSC version only).
As a result of this change, a number of programs originally developed for the Atari 400 & 800 refused to run properly on the Atari 1200XL (and subsequent XL/XE models).
Note that the incompatibility with the OS of the XL/XE models can manifest itself in a multitude of ways:
- The program stubbornly refuses to load.
- The program refuses to successfully load & run.
- The program loads & runs but displays nothing on the screen.
- The program loads & runs but displays garbage on the screen.
- The program loads & runs but crashes.
Perpetrator?
The problem is due solely to developers who have not followed Atari's recommendations for producing quality source code. These developers used unofficial tricks and shortcuts that worked for the Atari 400 & 800, but stopped working with the new Atari 1200XL OS. This was all to be expected.
It should be noted that even internally, at Atari, some programmers violated Atari's recommendations.
What is the actual problem?
I'll use an easy-to-understand analogy. Imagine a large government office building. Next to the lifts, in the lobby, there's a huge sign giving the names of the services available in the building as well as their floor + office number.
The official recommendation is as follows: to use a service, consult the panel in the lobby, and then use the service by going to the address indicated.
If the building is extended or the space reorganised, no problem: just look at the panel in the lobby to find the service you need, even if it has moved.
On the other hand, if you walk into the building and head straight for the 3rd floor, office 150, you'll find the service you need ... until the day that service moves.
And that's exactly what happened: instead of respecting Atari's recommendation to use a vector, an official entry point, to a memory address to use a service, some careless programmers directly "hard-coded" in their programs the memory address of the service, instead of the address of its vector — a vector that indirectly allows you to find the service, for sure.
Atari needed to update the Atari 400/800 OS to take advantage of the new features offered by the Atari 1200XL. As a result, some services were moved in the memory. As announced, this has had no untoward consequences for programs developed in compliance with the recommendations. On the other hand, poorly developed programs have ceased to function normally.
Atari had warned everyone
No surprises; no one was caught unawares. These recommendations are written in black and white in the developer's bible:
DE RE ATARI, Ref: APX-90008, Section "Operating system", Page 8-20.
Just read the following passage:
One measure of the power of any operating system is its adaptability. In this regard, the OS for the ATARI Home Computer System would score well. In practically every instance where access to system routines could be beneficial, the OS has "hooks" where you can attach or replace system routines with your own.
This flexibility is provided by a combination of several different mechanisms. The first of these is a ROM table of JMP instructions to crucial OS routines. In future versions of the OS, the location of this Jump table will not change, although the values there probably will. Thus, if your software accesses the main OS routines via this table, it will also work on future versions of the OS. If your software does not use these ROM vectors, but instead jumps directly into the OS ROM, then it will almost certainly crash on future versions of the OS.
The second mechanism is a series of address vectors in RAM which link many of the interrupt processing routines together. To alter the handling of a particular interrupt, one need change only a single vector to point to the replacement code. The OS initializes these vectors as part of the power-up sequence. Again, though the initialized contents of these vectors may change, their location is guaranteed not to.
How do you solve this kind of problem?
There are two solutions:
- Either modify the program.
- or modify the Operating System.
Modifying the program
The offending program must be updated with a correctly developed version that uses the official vectors. This "good quality" version can run immediately on all computers: the old Atari 400/800 and the new 1200XL (and subsequent XL/XE models).
Modifying the Operating System
Obviously, it's too late to change the physical components on the 1200XL (and subsequent XL/XE models) motherboard. The computer was produced with a new OS, which was burnt into a ROM installed on the motherboard. The computers have been manufactured, distributed and sold to users: they are in the wild.
Atari does have a solution
Consider these few facts:
- The 6502 CPU/microprocessor has 64 KiB of addressable memory space, between $0000 and $FFFF (0 - 65.535). This means that the computer's ROM and RAM must share these 64 KiB.
- The Atari 1200XL is the first 8-bit Atari computer to come with 64 KiB of RAM.
- On an Atari 8-bit computer with 64 KiB of RAM, the RAM directly accessible to the user is between $0000 and $BFFF (0 - 49.151); while the ROM is just above, between $C000 and $FFFF (49.152 - 65.535).
From the 1200XL onwards (and also on all subsequent models equipped with 64 KiB), the OS in ROM can be completely "disabled" and replaced by the RAM located at the same addresses, between $C000 and $FFFF (49.152 - 65.535).
The only exception is the 2 KiB memory area between $D000 and $D7FF (53.248 - 55.295), which cannot be disabled because it is essential for accessing chips such as ANTIC, CTIA/GTIA, POKEY, etc.
So 64 KiB - 2 KiB = 62 KiB of RAM is effectively available.
Immediate consequences:
- On the 1200XL (and also on all subsequent models equipped with 64 KiB of RAM), it is possible to replace the computer's OS with another version, loaded into the computer, and stored in RAM at the usual $C000 - $FFFF (49.152 - 65.535) ROM addresses.
- On the 1200XL (and also on all subsequent models equipped with 64 KiB of RAM), it is possible to load — from a diskette or cassette — the OS of the old Atari 400/800 which immediately solves all the problems of compatibility with poorly developed programs. This is exactly what the various "Translators" programs distributed by Atari do.
Atari's XL/XE Translators
Atari has officially released a Translator program that can be used on all XL/XE computers with 64 KiB of RAM. The Translator diskette is a two-sided diskette, providing two slightly different versions of the Translator:
- The Side A provides a version of the 400/800 OS that is slightly modified to allow the "RESET" key to be pressed without reverting to the XL/XE OS on ROM.
- The Side B provides an even higher degree of compatibility, including support for programs that boot the Atari 850 interface, but the 400/800 OS in RAM would be disabled if the "RESET" key is pressed.
This Translator program also exists in two variations, for NTSC or PAL/SECAM computers:
- Atari Translator DX5063 NTSC version:
This version will substitute the current XL/XE OS with the NTSC Atari 400/800, OS Rev. B - Atari Translator FK100807 PAL version:
This version will substitute the current XL/XE OS with the PAL Atari 400/800, OS Rev. A
All these versions determine whether BASIC is present or not (enabled or disabled) and act accordingly.
Both versions are available on the AtariMania website: NTSC (DX5063) and PAL (FK100807) versions.
The various translators are described in full details in the FAQ (section: "How can I run older programs using the Atari Translator?").
Requirement: Min. 64 KiB of RAM
A computer with a minimum 64 KiB of RAM is an essential prerequisite. This excludes the Atari 600XL computers — natively with 16 KiB of RAM — which are not equipped with an Atari 1064 memory module (or equivalent). This 1064 memory module transforms an Atari 600XL into an Atari 800XL, complete with 64 KiB of RAM. Any attempt to use the Translator on an Atari 600XL with only 16 KiB of RAM will result in an error message:
The Atari Translator diskette requires a "Memory Expansion Module" for proper operation!
More than 64 KiB of RAM memory — such as the 128 KiB of the Atari 130XE — poses no problem.
Requirement: XL/XE computer
The Translator program also checks that it runs on an XL/XE computer. Any attempt to run it on an Atari 400/800 will result in an error message:
The Atari Translator diskette was designed for use on XL-series computers only!
You will also get this error message if you press "SELECT" once the Translator has been loaded, without changing the diskette.
When the Translator is loaded, the Atari 400/800 OS is loaded.
When you press "SELECT" and leave the Translator in the floppy disk drive, the computer — now an equivalent of an Atari 400/800 — will try to load the Translator again.
The Translator will conclude that it has been launched on an Atari 400/800 and will display this error message.
Limitations
Your XL/XE computer can no longer access the specific features that have appeared on the XL/XE.
Obviously, after loading the Translator, it is the Atari 400/800 OS that is running into your XL/XE computer.
So this OS only knows the specifics of the Atari 400/800. It cannot recognise the specific features introduced on models in the XL/XE range, such as:
- The "HELP" key,
- The "F1-F4" function keys (1200XL, 1400XL & 1450XLD),
- The international character set,
- The user-redefinable keyboard,
- The quick power-up self-test,
- The full self-test,
- The PBI/ECI port (all but 1200XL and some 65XE),
- The PCB option jumpers (1200XL),
- The additional new ROM vectors,
- The additional screen modes (BASIC GR. 12-15),
- The text fine scrolling,
- The enhanced embedded disk handler,
- The unique ROM for NTSC or PAL (or SECAM) computers,
- The L1 & L2 LEDs (1200XL & 1450XLD),
- The built-in modem (1400XL & 1450XLD),
- The built-in Votrax SC-01 (1400XL or early 1450XLD) or Votrax SC-02 (late 1450XLD) speech synthesizer,
- and so on.
This shouldn't be a problem at all, as you're using the Translator precisely to load a program developed specifically for the Atari 400/800, unware of their very existence.
Your XL/XE computer cannot access features that were only available on the 400/800.
You are running the Atari 400/800 OS on an XL/XE computer which may not have some features specific to Atari 400/800 computers.
For instance, the XL/XE computers have only two joystick ports (and not 4 as on the Atari 400/800) and also only one cartridge slot (and not 2 as on the Atari 800).
This might be a problem, if your program requires 4 joystick ports for instance.
Required conditions
The Translator assumes the following conditions for proper operation:
- 64 KiB RAM system (ie. Atari 600XL with Atari 1064 memory module), see above.
- Not running on an Atari 400/800 computer, see above.
- The program does not write to PORTB ($D301, 54.017).
- IRQs and NMIs are not permanently disabled by the program (or "RESET" may not function correctly).
- On an Atari 1450XLD computer, program is booted from SIO-based disk.
- Program does not alter locations $0160 thru $0170 (352 - 368).
- Program does not expect RAM in 4 KiB block at $C000 (49.152).
Cassette tape version?
Diskette version:
It is perfectly possible to load the diskette version of the Translator, in order to then load a recalcitrant program on cassette tape.
Cassette tape version:
Some other Translator programs — such as XL Fix, by Computer Software Services (CSS) — are available in cassette tape version, if you do not own a floppy disk drive.
SECAM?
From the Atari 1200XL onwards, all OS are identical for the NTSC, PAL and SECAM versions of the computers: there is now only one OS version, independent of the colour standard.
As the PAL and SECAM versions of the computers share a lot of common technical characteristics, the PAL version of the Translator can be used on a SECAM computer.
How to use the Translator diskette?
Using the Translator program is really simple.
Choose the NTSC or PAL version, depending on the computer you are using (see above).
Choose Side A or B to suit your needs (see above).
Boot your computer with the Translator diskette, with BASIC or not, to suit your needs (see above).
When it is loaded, remove the Translator diskette and replace it with the recalcitrant program you wish to load.
Press the "SELECT" key as requested on the screen, and voilà! Your old 400/800 badly written program will now accept to load and to run on your XL/XE computer.
Please read the "How to run a program on tape, diskette, cartridge - Advanced scenarios" article in the knowledge base for all the details.
Atari Translator in action
On an Atari 800XL, I will try to load "Demon attack (1982) (Imagic) (USA)", a game known to require the Atari 400/800 OS.
First, I'll show you what happens when you try to load the game directly
The game starts to load and shows a title page, but refuses to load the remaining data, with a strange noise.
For the video: Altirra emulator, Atari 800XL, PAL, 1983 OS rev. 2.
Then I'll show you how to use the Translator to load and run the game successfully
With the help of the Translator, the game loads without a hitch.
For the video: Altirra emulator, Atari 800XL, PAL, 1983 OS rev. 2, with PAL Atari XL/XE Translator.
Special thanks to AtariMania for the Required conditions section.
Knowledge base article: kb-software-0006-atari-400-800-to-xl-xe-translators
REV. 008.