george-hardware/memory.md

2.4 KiB

Sketching out our address space

Memory Map

CPU Addressable

Address Usage
$0000 32k ram (16k addressable)
$1000 ...
$2000 ...
$3000 ...
$4000 I/0 & Hardware Control Registers
$5000 ...
$6000 32k vram
$7000 ...
$8000 ...
$9000 ...
$A000 ...
$B000 ...
$C000 ...
$D000 ...
$E000 32k eeprom (8k addressable)
$F000 ...

Hardware Control Register $4000

Bit 7 6 5 4 3 2 1 0
Usage ROM Page MSB ROM Page LSB RAM Page 32k Bank Page Character/Hires Video Mode Unused Unused Unused

Video Controls $4200 & $4201

When the system starts or when the video mode is changed, crt timing/character size information has to be sent to the 6845. This is done by writing

Keyboard Rows $4300, $4301, $4302, $4303, $4304, $4305

Each keyboard row is mapped to a read-only 8-bit register, with each key mapped to a single bit. Due to the design of this keyboard, Row 5 has 5 unused bits

Address Desc Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0
$4300 Row 0 esc w e r t u o backspace
$4301 Row 1 tab q s g y i p enter
$4302 Row 2 shift d v h k " ? a
$4303 Row 3 control z f b j l 2 4
$4304 Row 4 alt x c n m ' 1 3
$4305 Row 5 meta sp 1 sp 2

Character ROM Layout