CPU memory map

From PCEdev Wiki
Revision as of 13:25, 28 August 2023 by Fiskbit (talk | contribs) (Adds initial CPU memory map.)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search

Virtual address space

Address Purpose
$2000-$20FF Zero page
$2100-$21FF Stack
$FFF6-$FFF7 IRQ2/BRK vector
$FFF8-$FFF9 IRQ1 vector
$FFFA-$FFFB Timer vector
$FFFC-$FFFD NMI vector
$FFFE-$FFFF Reset vector

The zero page, stack, and vectors exist at fixed locations within the virtual address space. The physical memory backing these can be swapped to any bank at any time, but the virtual addresses cannot be changed. The rest of the virtual address space has no special meaning to the hardware.

Physical address space

The physical address space varies by console type. The following mapping applies to the PC Engine, CoreGrafx, CoreGrafx II, and TurboGrafx-16. Differences and additions to this in other variants are documented in sections below.

Bank Device
$00-$7F HuCard
$80-$F7 (unmapped)
$F8 RAM (8 KiB)
$F9-$FB RAM mirrors
$FC-FE (unmapped)
$FF Hardware registers
Bank $FF offset Device
$0000-$03FF VDC (4 registers mirrored)
$0400-$07FF VCE (8 registers mirrored)
$0800-$0BFF PSG
$0C00-$0FFF Timer (2 registers mirrored)
$1000-$13FF I/O port (1 register mirrored)
$1400-$17FF Interrupt controller (4 registers mirrored)
$1800-$1FFF (unmapped)

Any unmapped address in physical memory can potentially be mapped by an expansion port device or a HuCard, but most HuCards lack any sort of memory mapper and simply use the highest address bit as a chip enable.

SuperGrafx

Bank Device
$F8-$FB RAM (32 KiB)
Bank $FF offset Device
$0000-$0007 VDC1 registers
$0008-$000F VPC registers
$0010-$0017 VDC2 registers
$0018-$001F (unmapped)
$0020-$03FF Mirrors of $0000-$001F