The memory map
The 65816 sees 16 MB, and Project 816 fills all of them with RAM. Only four small pages of the first bank are used to talk to the peripherals.
The full table
| Addresses | Contents | Signal |
|---|---|---|
$00:0000 – $00:9BFF | RAM | PSRAM through the 9K |
$00:9C00 – $00:9CFF | 9K registers: sound, interrupts, DMA, configuration | internal to the 9K |
$00:9D00 – $00:9DFF | video (Tang Nano 20K) | video select |
$00:9E00 – $00:9EFF | Pico: SD, USB, Wi-Fi, clock, serial link | Pico select |
$00:9F00 – $00:9FFF | expansion port | /IOSEL |
$00:A000 – $00:FFFF | RAM, including the 65816 vectors, loaded at start-up | PSRAM through the 9K |
$01:0000 – $7F:FFFF | RAM: the rest of the first PSRAM (banks $00 to $7F, 8 MB) | PSRAM through the 9K, CS0# |
$80:0000 – $FF:FFFF | RAM: the second PSRAM (8 MB) | PSRAM through the 9K, CS1# |
There is no longer an area reserved for an expansion card: the 16 MB of RAM fill the whole space. An
expansion card keeps its page of registers at $00:9F00.
The input/output pages
The peripherals occupy whole 256-byte pages in bank $00. The 9K decodes them from A8 to A15
and the latched bank.
Each peripheral exposes only 32 registers, selected by A0 to A4. These 32 registers repeat
throughout its 256-byte page: $9D00 and $9D20 refer to the same register.
The register map
The detailed map of the 32 registers of each block (9K, video, Pico) exists in version 0.1, as a proposal to be validated: see The register map. It must be validated before writing the corresponding Verilog or firmware. It is the contract between the three programmable devices and the 65816 software: any change to a register will have to be carried over on both sides.