Sunday, September 25, 2022

Atari 400 - An Atari 2600 on Steroids and More

The Atari 400 and Atari 800 were released by Atari in late 1979 as a follow up to the successful Atari Video Computer System (VCS).  Unlike the VCS, the 400 and 800 came with keyboards as well as more powerful hardware and more RAM.  Having recently acquired an Atari 400, let me talk about some of the issues I have encountered with it.

The Atari 400 straddled the rather fuzzy dividing line between console and home computer.  It had a full keyboard, but so did the Magnavox Odyssey^2.  It came with four controller ports, but the Apple II could connect two controllers.  It came with 8KiB of RAM and later 16KiB of RAM, much more than its predecessor (256 bytes in the VCS) and more than what your average cartridge game of the time required.  It has a cartridge slot that can support 8KiB cartridges without any kind of cartridge bankswitching but it also has a special serial port (SIO) for connecting cassette decks, floppy drives, modems, printers and a serial/parallel interface.  

All this power came at a price, $550 in 1979 dollars.  By 1982 the costs of manufacturing the system had fallen so significantly that the hardware could be re-purposed as the Atari 5200 for $269.  The Atari 5200 was the official console successor to the Atari 2600, which the Atari VCS had been renamed.  The Atari 5200 uses the same chipset as the Atari 400 and came with the same amount of RAM, 16KiB, but uses a cut-down OS compared to the 400 and 800 (2KiB vs 10KiB), uses controller keypads instead of a keyboard and analog joysticks over digital joysticks.

The Atari 400 and 800 were very advanced for their time and were quick to knock off the Apple II computer as "the gaming computer."  Texas Instruments provided competition in graphics and sound with the TI-99/4A, but the 400 could play many more games and the 800 had more RAM most of the time.  The Commodore VIC-20 competed more on price than on specs, it had nothing like sprites, its text modes could manage just about 22-colums, the CPU was slower and the computer only came with 5KiB of memory.  Not until the Commodore 64 was released did Atari have competition that could eclipse them in the computer-console hybrid market.

Basic Specs

Inside the Atari 400 are four circuit boards, the Main Board, the Power Board, the CPU Board and the RAM Board.  The main board contains the three ROM chips which comprise the OS, the POKEY and PIA and the cartridge slot.  The CPU board has the 6502 CPU, the ANTIC and CTIA or GTIA chips.  The RAM board contains eight 8K x 1bit or 16K x 1-bit chips.  The Power Board board supplies +5v, -5v and +12v to the system and has the power LED, the power jack, the On/Off switches, the RF modulator, channel select switch, RCA connector (not externally accessible) and the SIO port connector.

The Atari 400 and 800 use a 6502 running at 1.79MHz, faster than the same CPU being run in the Apple II, the VIC-20 or C64 (1.02MHz).  Both use a 61-key keyboard and the systems are capable of displaying 40-column text with lower case characters.  Both systems support four controller ports for 4 joysticks or 8 paddles.  The graphics are handled by two chips, ANTIC and GTIA.  ANTIC handles text modes, background playfield graphics and can instruct GTIA how to mix and match text and graphics modes during a frame.  GTIA can show colors from a 256 color palette and supports sprites in the form of 4 player graphics and 4 missile graphics.  The visible graphic resolution is generally 320x192 or 160x192 and some modes can show up to 16 colors on screen.  Early 400s and 800s came with the CTIA instead of GTIA, which cannot use some of the most advanced display modes and only shows 128 colors.  

POKEY handles, among other things, sound duties, providing four channels of square wave audio and capable of playing many kinds of noise effects.  The system has an internal speaker but this speaker is not connected to the POKEY's audio output.  It is intended to provide audio feedback for key presses, is unique to the 400 and 800 and the tones are generated by the GTIA.  

ROM and RAM

There are two revisions of the ROM for the 400 and 800, OS Rev. A and OS Rev. B, with Rev. B being by far the most common.  BASIC is not included in the 400 & 800's internal ROMs as it is in many other systems, it comes on a cartridge.  BASIC is required to load many tape images and a few floppy games but many other floppy games and machine-language cassette games require its absence.  

As was shipped from the factory, the Atari 400 only came with 8KiB or 16KiB of RAM.  The system can be upgraded to 48KiB of RAM to be equivalent to the Atari 800 and Atari even released a kit that could do this.  Any RAM upgrade will require soldering 2-4 wires to the Main Board to accomodate for the extra addressing and select lines.  Atari's solution used DRAMs and required soldering 4 wires.  The RAM Board also requires +12v and -5v and it is the only part of the system that requires -5v.  Modern SRAM-based solutions only use +5v, which reduces power consumption of the system significantly compared to adding extra DRAMs.  

As long as your program or hardware does not say 64K or XL/XE Required on it, it should work with the Atari 400 and 800.  Most floppy and cassette games only require 48KiB but 14 of Atari's 32 XEGS cartridges generally require 64K or some feature of the XL and XE machines to work properly or at all.  The XL and XE have their own way to bankswitch memory to present 64K to the programmer, but that required sacrificing the two extra cartridge ports.  

The 14 XEGS cartridges that do not work in a 400 and 800 are Ace of Aces, Airball, Choplifter!, Crystal Castles, Dark Chambers David's Midnight Magic, Flight Simulator II, Food Fight, GATO, HardBall!, Into the Eagle's Nest, Karateka, Mario Bros., Summer Games.

Power Supply

When I got my system it did not come with a power supply.  The power supply that came with the Atari 400 and 800 is rated for 9v AC, 1.5mA.  Note that the supply is AC to AC, not AC to DC. The power supply of a Nintendo Entertainment System is rated for 9v AC, 1.3mA but the barrel jack is too small with the inner hole to fit the 400's power connector.  You can use a 2.1mm to 2.5mm DC Barrel Plug Adapter to make the adapter's connector fit in the 400.  I bought one from Adafruit and it worked perfectly.  Polarity of the connector does not matter in this case because we are dealing with Alternating Current, which changes polarity 60 times per second.  My NES's AC adapter with the Adafruit adapter worked perfectly with my 400.  

Within a week of powering on the 400 for the first time, I found that the power LED would not light up and the system would only display a black screen.  I thought that reseating the chips on the CPU Board may have done something bad to the system, as I had discovered that I had reinserted the GTIA chip upside down.  Even after I got the chip in the right position the problem did not go away.  Thanks to a help of an electrical engineer friend of mine, he was able to track the cause down to the -5v rail not supplying anything, which means the RAM will not work.  The solution was to replace the power LED, which was located in the circuit which generated -5v.  

Cartridges

Because the Atari 800 came with two cartridge slots, Left and Right, Atari produced cartridges prior to 1983 will invariably say "Left Cartridge" on the top of the cartridge.  The 400's sole Cartridge slot is equivalent to the 800's Left Cartridge slot.  Right Cartridges are not really something you encounter often and they were not meant for games.  When Atari retired the 400 and 800 at the end of 1983, its successors only had one slot and Atari used a new cartridge design that ditched the Left Cartridge label.  

When you wish to insert a cartridge into the Atari 400 or 800, you should lift the lid on your system instead of using the power switch.  Lifting the lid will cut power to the system, as closing the lid will depress a piece of plastic which pushes down on the second power switch on the Power Board.  This allows you to swap cartridges without touching the main power switch.  If your console stays on when the lid is raised, you should manually push the little hole until the plastic piece pops up. 

Cartridge software for Atari's systems almost disappeared after the video game crash of 1984.  However, when Atari released the XEGS system  in 1987, it produced a line of new cartridges for it.  32 cartridges, many of which had been previously released on disk, were released for the system.  While some of these cartridges may be compatible with an Atari 800 or 48KiB 400, many are not.

Audio and Video Output

In the 400 and 800, all external peripherals connect to the system either through the controller ports or through the SIO port.  The two systems differ in their A/V output.  The 400 only comes with an RF cable while the 800 has both an RF cable and a 5-pin DIN proving for audio, composite video, luma and chroma.  Separate Luma and Chroma is essentially S-Video and cables exist to provide that method of connection for sharper picture output than composite video.  

The Atari 400 can be modded to output composite and s-video like its bigger brother.  Two principal methods exist.  The first is the Super Color CPU Card, which replaces the CPU card and provides solderless video output.  The second is the Ultimate Atari Video mod, which requires soldering 

SIO

The SIO bus is what allows the Atari 400 to call itself a home computer. This 13-pin connector is unique to Atari 8-bit computers, but all of them have one.  It is handled by the POKEY and the PIA, with the former providing clock and data signals while the latter provides handshaking signals.  Even though the computer only has one port, up to four devices can be daisy chained to the SIO bus.  Many of Atari's disk drives, printers and other SIO bus adapters will have two SIO ports for this purpose.  

Cassette Software 

Cassette drives were more affordable than disk drives and during the earlier period of the Atari 8-bit line many educational software titles were released exclusively on cassette.  Some U.S. games were released simultaneously on cartridge and cassette or disk, or disk and tape.  8-bit software was still commonly released on tape in Europe until the 1990s, in particular in the United Kingdom.  The Atari 8-bit systems load cassette software with special cassette decks which plug into the SIO port.  The Atari 410 Program Recorder is the first of these devices. 

In order to load a cassette program that requires BASIC to run, you boot the system with Atari's BASIC Cartridge in the cartridge slot and the Program Recorder plugged into the SIO port.  When the cartridge shows the READY prompt, you type in CLOAD. and press Return.  The machine will emit a buzz.  Then press Play on the Cassette Recorder.  At this point the cassette reels will not start moving, so press Return again and tape will start to move.  When the program finishes loading, then you type in RUN and press Return.  After 1984 some tape programs may only work on PAL systems.

Some cassette programs contain machine language programs instead of BASIC programs.  To boot these programs, you must hold down the Start key when turning on the system.  If you did it right the TV will emit a buzz.  Then press play on the cassette deck, but you will not see the cassette motor turn on just yet.  Press the Return key on the keyboard and then the cassette motor will turn on and your program will begin to load.  

Disk Software

People who are new to external disk drives may find their usage a little unusual.  Atari and Commodore systems have floppy drives which are externally powered and they must be powered on before the system is powered.  These drives have microprocessors, ROM and RAM. Atari's drives are easier to use than Commodore's drives because they boot automatically when the system is started.  Commodore VIC-20s and 64s require typing in a command to get a disk to boot.  Atari DOS, which comes on disk, is menu-driven and therefore much easier to use to perform ordinary tasks like list the contents of a disk, format disks and copy and delete files from a disk.  Commodore DOS generally requires you to use cryptic BASIC commands to perform the simplest of disk tasks.  Atari supported up to four disk drives on the SIO bus but support for two disk drives in games is very rare.  

The first disk drive Atari released was the Atari 810, a single sided, single density drive.  This beast used FM encoding to store data on 40 tracks, 18 sectors per track, 128 bytes per sector, giving a total formatted capacity of 90KiB per side.  Single and double density drives use double density disks.  This was rather unimpressive compared to Apple's 113-143KiB or Commodore's 170KiB.  While the Atari 1050 disk drive, released in mid-1983, offered 130K per side and backwards compatibility with 90KiB disks, its release came too late and virtually all floppy disk software came on 90KiB disks.

Keyboard

Now let's talk about the elephant in the room, the keyboard.  The Atari 400's keyboard is among the worst ever made.  It has no tactile feedback when you press a key and you won't want to type on it.  The internal speaker is useful for audio feedback as it makes a click if you press a key but the speaker does not output the 4-voice audio from the POKEY chip.  The keyboard is needed in games like Star Raiders to select options and for that purpose it is passable.  The four keys on the right, System Reset, Select, Option and Start, are function keys which are often used by games to start them or select options (except for System Reset).  

There were replacement keyboards made BITD to give a better typing experience to the 400 but the only modern design I know of requires you to source and solder your own key switches and find some solution for key caps (blanks with stickers).  Sourcing replacement membrane keyboards is expensive these days, they are all either pulls or new old stock.  Best Electronics may still sell them.  

Controller Ports

One of the best features of the Atari 400 is that it has four controller ports,  These accept Atari joysticks or Atari paddles but should not be used with Sega Genesis controllers or other controllers which expect +5v on Pin 5.  Atari provides +5v on Pin 7.  The best Atari 4-player game is undoubtedly M.U.L.E., so if you upgrade your Atari 400 to 48KiB, you will have an ideal M.U.L.E. machine.  As Atari paddles come in pairs, you can have up to 8 players with a paddle game.  Super Breakout supported this, but simultaneous play for more than 4 players using paddles is not known.  The XL and XE machines only have two controller ports, so you will lose the 4/8 player functionality unless you find workarounds for various games.

The controller ports are controlled by the GTIA and PIA while the keyboard handling is shared between the GTIA and POKEY.  The PIA is responsible for reading the joystick directionals and paddle fire buttons.  The POKEY reads paddle inputs and the keyboard inputs except for Start, Option and Select.  Those keys and the joystick fire buttons are read by the GTIA.

Solid Blue Screen Troubleshooting

When I first plugged in my 400, it booted to a solid blue screen and printed a cursor character.  Normally this screen should only appear for 2 second and produce a stuttering sound before printing "Atari Computer - Memo Pad" (assuming no cartridges or disks were trying to boot).  In my case, the screen would not get to the Memo Pad until I pressed the Break key on the keyboard.  

At first this only appeared to be a minor nuisance because my cartridges would boot.  I also got most cassette images to load as well.  But when it came to booting disks or loading programs off a floppy drive, I was unable to boot any.  No communication appeared to be happening between the disk drive and the computer.  

After a lot of troubleshooting and reviewing old posts on AtariAge, I found two other people who had the same issue, even though they had later systems like the 800XL and 130XE.  The solution was to replace the POKEY chip.  Unfortunately POKEY chips are rather coveted these days, they were used in several Atari arcade machines and in some 7800 cartridges, so supplies are limited.   I contacted Best Electronics, who still sells new POKEY chips at more reasonable prices than eBay recyclers but limits them to one per customer.  They sent me a POKEY and all my problems went away.  

File Types

There are many types of files that contain Atari 8-bit software.  Cartridges generally use the .bin, .car or .rom extensions.  They may or not have headers.  Game cartridges that are 16KiB or less do not need headers.  Cartridges larger than 16KiB should have a header but most game cartridges of a given size should use a standardized mapper, Bounty Bob Strikes Back! being a rare exception.  .car files should have a header, but other binary ROM dumps from cartridges may also include a header.  

Cassette programs come in two formats, either as .cas files or as audio recordings. .cas files are binary representations of the data encoded as audio.  Atari program cassettes can include prerecorded music and speech on one of the tracks in parallel with the data on the other track and the system will output this audio with the Pokey sound, so those programs must be stored as wave files.  

Disk software also has two formats, .atr and .atx  .atr is the standard sector dump disk format, the equivalent to a .dsk for Apple II computers, ima for PCs and .d64 for Commodore 64s.  Most programs were copy protected when released on disk, so these files tend to have cracked versions of games, sometimes with cracker graffiti.  .atx is the format the Atari 8-bit community has adopted that preserves the information needed to implement copy protections, even though it is not a true bitcell or flux-level format.  

There are files with a .com and a .xex extension, these are files executable by Atari DOS, similar to how PC DOS executes .com and .exe files.  Most emulators can load these files automatically without having to boot DOS first.  .bas files are files which contained saved BASIC programs and emulators load them automatically.  

There are other formats floating around, but these are the main ones you will likely encounter.  

SDrive Max

Unless you are a huge collector of Atari 8-bit games, you may find yourself without much in the way of software to try on your computer.  There are programs that can convert .cas files to wav files you can copy to tape, but cassette games take minutes to load, so that's not a very fun option.  

Flash cartridges are a better way to get your foot in the door.  Unfortunately the only one that is really available is the Atarimax Maxflash.  This is a cartridge which comes in 8Mbit and 1Mbit varieties can handle 8KiB and 16KiB ROM (.bin, .car,. rom) files and .xex files.  It requires a separate special programmer to add ROM files to the flash carts and will cost about $100 USD for the 8Mbit version plus the programmer.  Most of the XEGS games used bankswitched cartridges from 32KiB to 128KiB.  You can get a fair number of games on the larger cart but it is rather pricey for outdated technology.

A more versatile solution is to use a floppy disk drive emulator, and the options available today are reasonably priced. Just about everything was put on floppy disk, either officially or otherwise.  I went with the SDrive Max because I wanted a device that could function without needing a full-fledged PC.  The SDrive Max comes with a pressure-sensitive touch screen with enough control over the device to satisfy me.   A stylus is included, which is very handy as some of the areas you have to touch are small and the screen shows off every fingerprint that comes into contact with it.  It has full support for floppy images, including the protected images using the .atx format. 

The SDrive Max also has basic functionality as a tape drive, but it cannot start and stop the tape motor like a real Atari Program Recorder, so you have to stop the tape manually and sometimes quickly.  It also cannot play back analog audio through the computer, which was a nice feature used by some of Atari's cassette programs.  

With the 400 and 800, you should not use the SIO port power option.  The 400 and 800 boot too quickly for the device to be ready, and these systems expect the drive to be ready before they are turned on.  Any 12v switching power supply with the normal Type-A barrel plug can power the device, as can a USB port.  Use a quality brand SD card, the one that came with the unit I ordered was just not up to the standard the system expects.  

Selecting games is a bit of an issue due to the UI.  When you navigate you will see files in the DOS 8.3 name format.  Touching a file name will show the full name in the blue area at the bottom, so once you find your file just hit OK to load the disk into the virtual floppy drive.  Then turn on your computer.  There is a handy button on the main menu, >>>, which loads the next disk in the directory.  

One important feature is that the SDrive provides a special disk image that can be used to load other images.  This disk image is set to boot as D0:, and will show a screen with a file browser on the Atari itself.  You use the joystick to move the selector to the file you want and press enter to make the selection.  Then press System Reset on your computer and the system will boot the image you selected in D1:.  Files in the browser will only appear in 8.3 format.

The SDrive is not a perfect product.  The device can read .atx files well but it cannot write them.  Alternate Reality: The City writes to disk 2 side 1 when a character is created, but the SDrive does not work with this and thus the game will not start unless an .atr image is used for that disk side.  Also, if the device is stuck loading a disk or a tape and you do not want it to do this anymore, the touchscreen will become unresponsive and you will have to cut power to the device.  Documentation is a bit scanty but for $70 the device does more or less what it needs to do.

Separating the 400 from the 800

An Atari 400 may function like an Atari 800 but there are still differences.  The RAM should be upgraded to 48K if you want to run all the software that the Atari 800 can run.  I used a card like this and now my 400 no longer needs a -5v signal, but there is no equivalent for the 800, so it still needs that signal.  The Atari 400 does not have a Right Cartridge connector, but unless you want to use one of these cartridges, it does not matter.  The keyboard is not made for extended typing, but to be fair the 800's keyboards are not great even though they are more-or-less mechanical.  The in development keyboard replacement for the 400 will result in a better keyboard than those that came with any other Atari 8-bit computer.  The final difference is with artifact color, but that deserves a blog article of its own.

8 comments:

  1. Thanks for the info! Recently bought an eBay lot containing an 800 that is up and running. We've played Zork I on it! The lot also had an 800XL which was toast unfortunately.

    ReplyDelete
  2. I know I don’t need more systems but I have a strange desire to pick up an 800 despite not having any nostalgia. It was released the year I was born and it’s amazing that this was cutting edge up until at least 1982 at least for gaming. I’ve played around with my mister fpga and that’s probably as far as I should go. Playing robotron on this system is impressive and im jealous of those that got to experience that way back in the early 80s with dual joysticks. As always excellent write up, your blog is essential.

    ReplyDelete
  3. I’ve always wondered- what makes the right cartridge slot different from the left? The first computers I used in school were Atari 400’s. I spent a lot of time on LOGO getting that turtle to move around the screen. We had one on a cart in 6th grade and it rotated around the classrooms. I had a VIC 20 at home at the time, and the Atari seemed like a big step up.

    ReplyDelete
    Replies
    1. The right slot uses addresses $8000-9FFF and the left slot addresses $A000-BFFF. The original idea is that a Left Cartridge would only be 8KiB and a Right Cartridge would only be 8KiB. The Left Cartridge had the ability to access $8000-9FFF whereas the Right Cartridge could not access $A000-BFFF, so once 16KiB ROM cartridges became inexpensive enough to produce, whatever use the Right Cartridge had disappeared.

      Delete
  4. My school district had a mix of Atari 400s and 800s as classroom computers when I was in elementary school and up into 8th grade. All of my computing time in 6th grade was on the one 400 we had on a cart in rotation between multiple classrooms. We never did anything but logo, but I always looked forward to using it. Did yet more logo in middle school on the 800. I feel like they never really figured out how to use these computers in an educational environment.

    ReplyDelete
  5. Hi there. In the Power section, did you mean “ 9v AC, 1.5 AMPS” rather than 1.5 milliAmps? :)

    ReplyDelete
  6. The FujiNET device really opens up a lot of options without having to copy files to an SD card by connecting to software repositories via WiFi. It will also emulate a whole host of other devices, including a printer.

    ReplyDelete