# I/O map and memory (main CPU) Source: youkan's I/O map (YK-IO) and memory map (YK-MEM), his own HTML transcription of NEC's PC-8801mkIIMR User's Guide and the books on his reference page (PC-Techknow8800mkII, the mkIISR Technical Map and others). Tier 3 (a transcription of manufacturer and book material; not hardware-captured). Ports are 8-bit (MAME maps the space as 8-bit, OBSERVED). Our summary; the pages are the authority. ## Ports | Port | R/W | Use (YK-IO) | | --- | --- | --- | | 00h-0Eh | R | keyboard matrix rows (0Ch-0Eh only on FH and later keyboards) | | 10h | W | printer data; also the uPD1990A's command (C2-C0) and data (CDO) bits | | 20h, 21h | R/W | uPD8251 data, control | | 30h | W | system control: USART channel (CMT 600/1200 baud or RS-232C), motor, carrier, colour/mono text, 40/80 columns; R: DIP switches | | 31h | W | system control: 25-line high-resolution, graphics colour/mono, graphics on, **RMODE** (N88/N-BASIC ROM), **MMODE** (ROM/RAM or 64 KB RAM), 200-line; R: DIP switches | | 32h | R/W | (SR and later; undecoded before) sound interrupt mask, GVRAM access mode, palette mode (digital 8 / analogue 512), high-speed text RAM (F000h-FFFFh, V1H/V2), screen output, extension ROM bank select | | 34h, 35h | W | extended-access ALU per plane, GVRAM access/multiplexer control and compare data | | 40h | W | strobes: beeper (BEEP, FBEEP), joystick pin 8, graphics high-speed (V1S), CRT sync, calendar clock and strobe, printer strobe; R: status (VRTC, calendar data, ...) | | 44h, 45h | R/W | OPN (SR to MR) or OPNA part 1 (SSG, FM 1-3): address, data | | 46h, 47h | R/W | OPNA part 2 (ADPCM, FM 4-6), on OPNA machines only | | 50h, 51h | R/W | uPD3301 parameter/status and command | | 52h | W | background colour (digital) | | 53h | W | display enables: text and the three GVRAM planes | | 54h-5Bh | W | palette: 8 colours digital, or 512-colour analogue with two writes per entry | | 5Ch-5Fh | W | GVRAM bank select in independent mode (BLUE, RED, GREEN, main RAM); R 5Ch: bank status | | 60h-68h | R/W | uPD8257 channels and mode/status | | 6Eh | R | CPU clock (bit 7: 0 = 8 MHz, 1 = 4 MHz) (FH and later) | | 6Fh | R/W | RS-232C baud rate (FH and later) | | 70h | R/W | text window offset (high byte) | | 71h | R/W | extension ROM select (bit 0: the 4th ROM) | | 78h | W | text window offset + 1 | | A8h-ADh | R/W | the Sound Board II (OPNA) and its interrupt mask (an option) | | E2h, E3h | R/W | expansion RAM read/write enables and card/bank (M models) | | E4h | W | **interrupt level** (8214): levels 0 RS-232C receive, 1 VRTC, 2 1/600-s timer, 3 INT4, 4 sound, 5 INT2, 6 FDINT1, 7 FDINT2; SGS bit | | E6h | W | interrupt masks: RS-232C receive, VRTC, 1/600-s timer | | E8h-EBh | R/W | kanji ROM level 1: address low/high, read right/left halves, start/end | | ECh, EDh | R/W | kanji ROM level 2 | | FCh-FFh | R/W | the disk link 8255: A (from the disk unit), B (to it), C (handshake), control | The SSG's ports A and B carry the joystick (SR and later; YK-IO "ジョイスティック"). ## Memory (YK-MEM and its figure `memmap.gif`) - 0000h-7FFFh: main RAM, or (MMODE = 0) the N88-BASIC ROM over 0000h-7FFFh (RMODE = 0) or the N-BASIC ROM over 0000h-5FFFh (RMODE = 1). Writes while a ROM is selected go to main RAM. - 6000h-7FFFh: the 4th ROM (extension ROMs 0-3, bank by 32h bits 1-0) when 71h bit 0 = 0 in N88 mode. - 0000h-7FFFh: also where the M models' expansion RAM appears (E2h, E3h; four cards of four banks). - 8000h-83FFh: the **text window**: with RMODE = MMODE = 0 this 1 KB shows main RAM at the page named by port 70h (high byte); otherwise plain RAM. - C000h-FFFFh: GVRAM 0-2 (three 16 KB planes) when selected by 5Ch-5Eh (independent mode) or 35h bit 7 (extended mode); otherwise main RAM. - F000h-FFFFh: the high-speed text RAM (SR and later, 32h bit 4 = 0, V1H/V2 modes). ## Unknowns raised here - U1 Open-bus reads of undecoded ports (e.g. 32h before the SR, which YK-IO warns about). - U2 The exact GVRAM access wait states (the "high-speed mode" 40h bit 4 in V1S, and the extended modes): YK-IO gives the controls, not the waits.