Added memory
parent
25ddaa6a8f
commit
53712a1d33
|
@ -0,0 +1,52 @@
|
|||
## memory/system 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 |
|
||||
|
||||
### 6845 crtc register interface at $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 to address `$4200` which internal register you want to access, then reading from or writing to address `$4201`. for example, this is how you would set the number of characters per row to 80:
|
||||
|
||||
```asm
|
||||
LDA #0 ;The "Horizontal Total" register is R0
|
||||
STA $4200
|
||||
LDA #80 ;Set the register value to 80 for 80 characters per row
|
||||
STA $4201
|
||||
```
|
||||
|
||||
### 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` | |
|
Loading…
Reference in New Issue