Introduction
An .a52 file is the ROM of an Atari 5200 SuperSystem cartridge (1982), byte for byte: no file header, no signature. The 5200 is built from the
Atari 8-bit computer’s chips, a 6502C with ANTIC, GTIA and POKEY, in a console with a different memory map. The cartridge occupies
$4000-$BFFF, 32 KiB of address space, and the top of the ROM is always at $BFFF. A smaller cartridge (4, 8 or 16 KiB) is seen repeated through that
window. The extension .bin is used for 5200 ROMs as well, but it is shared with 2600 ROMs and many other things, so it is not claimed: open such a file
with “Read as” in the explorer.
The last 24 bytes of the image are the cartridge header the console’s BIOS reads at start-up: a 20-character title, two more bytes and the address where the program starts. The explorer decodes it, shows the code from the start address (instruction decoder for the 6502, an instruction decoded at every byte) with the 5200’s register names (memory map), and lets you choose the address the image is shown at. The cartridge does not hold the interrupt vectors: those are in the BIOS.
Structure
0x0000ROM: program and datasize − 24 bytessize − 24Title, 20 bytes in the Atari screen character set ($BFE8-$BFFB)20 bytessize − 4Two bytes at$BFFC-$BFFD;$BFFDof$FFskips the title screen2 bytessize − 2Start address, little-endian ($BFFE-$BFFF)2 bytes
Real files used while the viewer was written: emudemo.a52 and charset.a52 (32 KiB, written for this site’s emulator, titles “ATARI 5200 EMU DEMO”
and “ATARI 5200 CHARSET”, start $5000) and train1_5200.bin (32 KiB, $BFFD is $FF, start $96BE).
Cartridge sizes
| Size | Where the CPU sees it |
|---|---|
| 32 KiB | all of $4000-$BFFF |
| 16 KiB, one chip | $4000-$7FFF, repeated at $8000-$BFFF (as the emulators.org 5200 core does it) |
| 16 KiB, two chips | each 8 KiB chip repeated: the first at $4000-$5FFF and $6000-$7FFF, the second at $8000-$9FFF and $A000-$BFFF. This is from memory of the atari800 documentation and is unverified; the options bar offers it as a choice |
| 8 KiB | repeated through $4000-$BFFF (the emulators.org core); a program is usually written for $A000-$BFFF |
| 4 KiB | repeated through the window; usually written for $B000-$BFFF |
The explorer shows the image once, at the repeat that contains the start address (or the last repeat, if none does), and lets you choose another in the options bar.
The processor
The 5200 has a 6502C, an NMOS 6502. The explorer decodes it as an NMOS 6502 with the undocumented opcodes marked; the options bar can switch to the 65C02. See the 6502 instruction set.
Not described
Known, not yet covered
- Viewer: bank-switched 5200 cartridges (the “Super Cart” types of 64 to 512 KiB, Bounty Bob Strikes Back at 40 KiB). They are listed in the cartridge types of the .CAR file; a raw image bigger than 32 KiB shows only its first 32 KiB.
- Reference and viewer: the BIOS: its start-up screen, its RAM vectors at
$0200(only four are named, from the AltirraOS BIOS) and its entry points. See Memory map and registers. - Viewer: which bytes are code and which are data; every byte is decoded.
Unknown
- Reference: what the real Atari BIOS does with the bytes at
$BFFC-$BFFD. The only BIOS available here was AltirraOS, which tests$BFFDagainst$FF; the original Atari firmware is not on this machine. - Reference: the two-chip 16 KiB layout (see above) and the placement of 8 KiB and 4 KiB cartridges on real hardware.
- Reference and viewer: only three real files exist here, all 32 KiB, two of them written for this site; commercial cartridges were not available.
Other Atari cartridge formats
These are separate formats, not variants of one: the hardware, the file and the pages differ.
- Atari 2600 ROM image (A26) – raw ROM of the 2600, bank switching chosen by hand
- Atari 7800 ROM image (A78) – a 128-byte header, then the ROM
- Atari 5200 ROM image (A52) – raw ROM with a header at its top
- Atari cartridge file (CAR) – a 16-byte header and a type number, for the 8-bit computers and the 5200
Links
Software
Reference
- De Re Atari – the Atari programmers’ guide to ANTIC, GTIA and POKEY, which the 5200 shares
- Atari Compendium – articles and documents about Atari machines