The memory map
The 7800’s 6502C sees 64 KiB. The explorer’s names for the parts are in the table; the ranges of the chips follow the register addresses that js7800
uses (its Memory.js), and the RAM ranges are from general knowledge and not checked.
| Address | What |
|---|---|
$0000-$001F | TIA (the 7800 uses its input and audio registers only). INPTCTRL is the lock register: a program writes it once to switch the machine into 7800 mode and to show the cartridge instead of the BIOS |
$0020-$003F | MARIA registers |
$0040-$00FF | RAM (the zero page) |
$0100-$013F | TIA and MARIA mirrors |
$0140-$01FF | RAM (the stack) |
$0280-$02FF | RIOT I/O and timer |
$0440-$047F | Expansion: a POKEY or the XM module’s chips, where a cartridge adds them |
$1800-$27FF | RAM |
$4000-$FFFF | The cartridge (and a POKEY at $4000 or RAM there for some types) |
Vectors
NMI at $FFFA, RESET at $FFFC, IRQ/BRK at $FFFE: three little-endian 16-bit addresses in the last six bytes of the ROM that is at the
top of memory. MARIA raises the NMI at the start of vertical blank, so most programs run their frame update from it. See
ROM layout for which bytes those are in a banked cartridge.
TIA registers (7800)
| Address | Name | What |
|---|---|---|
| $01 | INPTCTRL | Input port control, and the lock that selects 7800 mode and the cartridge |
| $08 | INPT0 | Read: paddle input 0, right fire button of joystick 0 |
| $09 | INPT1 | Read: paddle input 1, left fire button of joystick 0 |
| $0A | INPT2 | Read: paddle input 2, right fire button of joystick 1 |
| $0B | INPT3 | Read: paddle input 3, left fire button of joystick 1 |
| $0C | INPT4 | Read: fire button of joystick 0 (2600 style) |
| $0D | INPT5 | Read: fire button of joystick 1 (2600 style) |
| $15 | AUDC0 | Audio control of channel 0 |
| $16 | AUDC1 | Audio control of channel 1 |
| $17 | AUDF0 | Audio frequency of channel 0 |
| $18 | AUDF1 | Audio frequency of channel 1 |
| $19 | AUDV0 | Audio volume of channel 0 |
| $1A | AUDV1 | Audio volume of channel 1 |
MARIA registers
Eight palettes of three colours (P0C1 to P7C3) are interleaved with the other registers.
| Address | Name | What |
|---|---|---|
| $20 | BACKGRND | Background colour |
| $21 | P0C1 | Palette 0, colour 1 |
| $22 | P0C2 | Palette 0, colour 2 |
| $23 | P0C3 | Palette 0, colour 3 |
| $24 | WSYNC | Write: halt the CPU until the end of the line |
| $25 | P1C1 | Palette 1, colour 1 |
| $26 | P1C2 | Palette 1, colour 2 |
| $27 | P1C3 | Palette 1, colour 3 |
| $28 | MSTAT | Read: MARIA status (vertical blank in bit 7) |
| $29 | P2C1 | Palette 2, colour 1 |
| $2A | P2C2 | Palette 2, colour 2 |
| $2B | P2C3 | Palette 2, colour 3 |
| $2C | DPPH | Display list list pointer, high byte |
| $2D | P3C1 | Palette 3, colour 1 |
| $2E | P3C2 | Palette 3, colour 2 |
| $2F | P3C3 | Palette 3, colour 3 |
| $30 | DPPL | Display list list pointer, low byte |
| $31 | P4C1 | Palette 4, colour 1 |
| $32 | P4C2 | Palette 4, colour 2 |
| $33 | P4C3 | Palette 4, colour 3 |
| $34 | CHARBASE | Character map base address, high byte |
| $35 | P5C1 | Palette 5, colour 1 |
| $36 | P5C2 | Palette 5, colour 2 |
| $37 | P5C3 | Palette 5, colour 3 |
| $38 | OFFSET | Reserved for future expansion |
| $39 | P6C1 | Palette 6, colour 1 |
| $3A | P6C2 | Palette 6, colour 2 |
| $3B | P6C3 | Palette 6, colour 3 |
| $3C | CTRL | MARIA control: colour kill, DMA, character width, border, kangaroo mode, read mode |
| $3D | P7C1 | Palette 7, colour 1 |
| $3E | P7C2 | Palette 7, colour 2 |
| $3F | P7C3 | Palette 7, colour 3 |
RIOT registers
The same chip at the same addresses as in the Atari 2600: SWCHA $280, SWACNT $281, SWCHB $282, SWBCNT $283, INTIM $284, INSTAT
$285, TIM1T $294, TIM8T $295, TIM64T $296, T1024T $297. See the 2600 page for the descriptions. On the 7800
SWCHA reads both joysticks and SWCHB reads the console switches.
POKEY
A cartridge may carry a POKEY, the Atari 8-bit computers’ sound and input chip, for better sound. Its 16 registers have the layout and names of the
Atari 8-bit POKEY (AUDF1, AUDC1 and so on, then AUDCTL, STIMER, SKREST, POTGO, SEROUT and the rest) and sit at the address the
header chooses: $4000, $0450, $0440 or $0800. The explorer takes the names from the same table the Atari 8-bit pages use
and moves them: $4000 is AUDF1/POT0, $4001 AUDC1/POT1, and so on up to $400F SKCTL/SKSTAT.
The BIOS and the signature
A real 7800 starts in its BIOS ROM, which shows a logo, and which in the NTSC version checks the cartridge: a digital signature in the last bytes of the ROM decides whether the cartridge is allowed to run in 7800 mode. Header-less and homebrew ROMs are run by emulators without that check. This is described from general knowledge; the explorer does not check a signature.
Not described
Known, not yet covered
- Reference: the bits of each register (MARIA CTRL, the TIA input control, the RIOT timers), the MARIA display list format, and the RAM and mirror ranges in detail.
- Reference: the BIOS signature: where it is, how it is computed.
Unknown
- Reference: no 7800 hardware manual was available; the register names were compared with js7800 only, and the RAM ranges not at all.