Memory beyond 48 KB on 8-bit Ataris is all based on bank-switching, since the 6502 processor only has 16 address lines. The CPU can address 64 KB total, and that has to include ROM and memory-mapped I/O (0xD000-0xD7FF) as well as RAM. On XL/XE Ataris, PIA Port B, at address 0xD301, is used to swap parts of physical memory in and out of various banks, so different physical locations show up in the same address space:
- bit 0 enables or disables the OS ROM, from 0xC000 to 0xCFFF and 0xD800 to 0xFFFF; disabling it gives back 14 KB of RAM
- bit 1 enables or disables the BASIC ROM, from 0xA000 to 0xBFFF; disabling it gives back 8 KB of RAM
- bits 2 and 3 provide bank selection on 130XEs (since they have 128 KB of RAM)
- bits 4 and 5 control CPU/ANTIC access (the CPU and ANTIC can bank-switch independently, which makes sense since ANTIC has its own RAM ports)
- bit 6 enables or disables the Missile Command ROM on XEs, at the same locations as the BASIC ROM
- bit 7 enables or disables the self-test ROM, from 0x5000 to 0x57FF; disabling it gives back 2 KB of RAM
(That PIA port was used for the third and fourth joystick ports on the Atari 400 and 800; memory expansion beyond 52KB on those involved other bank-switching schemes. See the FAQ, linked below, for details.)
Memory expansion modifications typically involve adding a bank-switching chip and memory chips, and use more bits for bank selection. There were many different memory expansions sold back when 8-bit Ataris were current, and there are still a few varieties available now — e.g. the Ultimate 1MB (which isn’t just a memory expansion). 4 MB is the maximum possible, using 256 16 KB banks (with 8 selection bits).
“Standard” software doesn’t know about it, but there is some software which does; any software which could benefit from a 130XE would know how to use bank switching. (This is mostly games and demos though.) There were various switching standards, and some modern boards support different approaches; you’ll find mentions such as “RAMbo 320KB”, “CompyShop 576KB” and “RAMbo 1088KB”. Expansions end up being most useful as RAM disks.
Some expansions include a replacement 16-bit CPU, the 65816, which has a default 6502-compatible mode but has 24 address lines and can be used to access up to 16MB of RAM.
The Atari 8-bit FAQ section 6.11 covers memory expansion boards. a8.fandal.cz lists software which can use 130XE-style memory expansions.