3 ms·
The RAM appears at every page where lines 9 and 12 of the 16-bit address space are zero. Bit 9 means pages $00xx, $01xx, $04xx, $05xx, $08xx, $09xx, $0Cxx, $0D
by vikingerik 5y ago
The RAM appears at every page where lines 9 and 12 of the 16-bit address space are zero. Bit 9 means pages $00xx, $01xx, $04xx, $05xx, $08xx, $09xx, $0Cxx, $0Dxx. Furthermore, then all that is also mirrored for every even-numbered topmost hex digit ($20xx, $21xx, etc), because the 2600's motherboard just omits address lines 13 or higher so those bits don't do anything.
When bit 9 is 1 (pages $02xx, $03xx, $07xx, $08xx, etc), you're accessing the timer and console input registers instead. When bit 12 is 1, you're accessing ROM instead of anything onboard.
It's not really useful to mirror the RAM anywhere else besides page 1 for the stack, but the architecture just ended up that way for simplicity - no need to decode any other lines than 9 and 12. It would have been possible to use that address space for more ROM, but at the cost of more logic gates - as-is, address line 12 is simply directly wired to the ROM chip-enable line.