# The machines, their maps and the rows Abbreviations for sources (full entries in [sources.md](sources.md)): **TDB86** NEC, *PC-9800 Series Technical Data Book* (1986-08-15, OCR text); **TDB93H** the 1993 HARDWARE volume; **UND** *UNDOCUMENTED 9801/9821 Vol.2* (Kodaka and Kono), cited as file and entry, e.g. UND `io_tcu` 0071h; **MAME** MAME 0.285's `-listxml` and the runs in [mame-oracle.md](mame-oracle.md) (tier 5, a detector). Evidence tags as the charter's. ## The rows | Row | Year | CPU (clock) | RAM | Graphics | Floppy | Sound | Status here | | --- | --- | --- | --- | --- | --- | --- | --- | | **PC-9801** (original) | 1982 | Intel 8086 (4.9152 MHz: UND `memsys` 0501h bit 7, SCLK1 on "PC-9801初代・E・F・M") | 128 KB standard | 2 x uPD7220 (UND `io_disp` head), 640x400 8 colours from 3 planes, **one bank** ("PC-9801初代・U以外" have two: UND `io_disp` VRAMプレーン切り換え) | none in the box: the 320 KB (2D) interface to a PC-8031-style intelligent drive (UND `io_2d`), and the 1 MB 8-inch interface at 0090h (UND `io_fdd` 0090h) | beeper only (fixed tone; see [sound.md](sound.md)) | **first row** | | PC-9801E / F / M | 1983-84 | 8086 (5/8 MHz series switch on F and M: HYPOTHESIS, from UND `memsys` 0501h bit 7 naming both series) | 128-256 KB | as the original, two banks | F: built-in 640 KB (2DD) drives at 00C8h; M: built-in 1 MB (2HD) at 0090h (UND `io_fdd` 0090h table) | beeper | rows after M2 | | **PC-9801VM** (VM0/VM2/VM4; VM21 later) | 1985 | NEC uPD70116 **V30** at 10 or 8 MHz (9.8304 / 7.9872 MHz: UND `memsys` 0501h; MAME 10 MHz) | 384 KB (VM2) | 2 x uPD7220 (VM2: uPD7220 per UND `io_disp`), GRCG, 8 colours; **16 colours from a 4096-colour palette only with the 16-colour board** on VM (UND `io_disp` 16色モード) | built-in 2HD dual-mode interface ("両用FD I/F", from the PC-98XA and VM on: UND `io_fdd` head) | beeper on PIT counter 1; the PC-9801-26(K) board optional | **second row** | | **PC-9801VX** (VX0/VX2/VX4; VX01/21/41) | 1986 | **80286 at 8/10 MHz and a uPD70116 V30 at 8 MHz**, one selected at a time (TDB93H machine table, line 1511 of the OCR; the switch is I/O 00F0h bit 0, UND `io_cpu` 00F0h) | 640 KB | uPD7220A pair, GRCG and **EGC** (UND `io_egc`: "machines with V30HL, V33A, 80286 or later"), 16 colours standard | 2HD dual-mode | beeper; -26K optional | **third row, V30 mode only**; the 286 recorded | | PC-9801U / UV / UV21 / VF | 1985-87 | V30 | | uPD7220 (U, VF) | 2DD/2HD | UV21: OPN built in (TDB86 section on the YM-2203 interrupt: "PC-9801U/UV" lines) | recorded | | PC-9801UX, RA, RS, RX, DX, ... | 1987-92 | 80286 / 386SX / 386 | | uPD7220A or uPD72020, EGC | | | recorded only | | PC-9821 and 486 models | 1992- | 386/486/Pentium | | + PEGC 256 colours | | -86 or built-in | recorded only | **Correction to the brief's framing:** the brief groups "VM/VX" as V30/8086 machines and the 286 as later. The VX is a 286 machine that also carries a V30 (TDB93H; UND `io_cpu` 00F0h: writing bit 0 selects the V30 or the 286, resets the CPU and masks A20). This board can run the VX only in its V30 mode until an 80286 core exists (open decision 2). ## Clocks (DOC unless tagged) | Signal | 5/10 MHz series | 8 MHz series | Source | | --- | --- | --- | --- | | SCLK1 (expansion bus, CPU on early models) | 4.9152 MHz (original, E, F, M); 9.8304 MHz (later) | 7.9872 MHz | UND `memsys` 0501h bit 7 | | 8253 input, all three counters | **2.4576 MHz** | **1.9968 MHz** | UND `memsys` 0501h bit 7 and UND `io_prn` 0042h bit 5 ("8MHz (タイマクロック2.0MHz)"); checked by arithmetic against UND `io_tcu`'s own baud table; UND `io_tcu`'s summary table has the two swapped (C1 in the brief) | | OPN on the PC-9801-26 | 3.9936 MHz (7.9872 / 2) | same | MAME (`pc9801_26:opn` 3993600, tier 5); TDB86 to confirm (U5) | | OPNA on the PC-9801-86 | 7.9872 MHz | same | MAME (`pc9801_86:opna` 7987000, tier 5, rounded) | | GDC clock | 2.5 MHz, or 5 MHz by DIP SW2-8 | | TDB86 chapter 6 switch table (SW2-8 "GDC 5MHz / 2.5MHz モード") | | Display (normal mode) | 640x400, 24.83 kHz horizontal, 56.42 Hz vertical | | UND `memsys` (the CRT mode table) | The SCLK figures are crystal divisions of 19.6608 MHz (x 1/4 = 4.9152, x 1/2 = 9.8304, x 1/8 = 2.4576) and of 15.9744 MHz (x 1/2 = 7.9872, x 1/8 = 1.9968): arithmetic, the crystals themselves are HYPOTHESIS until a schematic or board photo names them (U1). MAME rounds: the original's 8086 at 5,000,000 Hz and the VM's V30 at 10,000,000 Hz (`-listxml`). A lockstep against MAME has to scale time by 4.9152/5 and 9.8304/10 or compare instruction streams, not timestamps (validation.md). ## Memory map (normal mode; real mode, 20-bit) | Range | Contents | Source | | --- | --- | --- | | 00000-9FFFF | RAM (128 KB on the original, up to 640 KB) | TDB86 | | A0000-A1FFF | text VRAM, character codes (16-bit cells; the odd bytes absent on the original and E without the kanji ROM: UND `io_disp` head) | UND `io_disp`; TDB86 (line 38787: "A0000-A1FFE") | | A2000-A3FFF | text VRAM, attributes | TDB86 | | A4000-A4FFF | CG window (the character generator projected into memory, on models that have one) | UND `io_disp` キャラクタジェネレータ ("A400:0000h~") | | A8000-AFFFF, B0000-B7FFF, B8000-BFFFF | graphics planes (blue, red, green), 32 KB each | UND `io_disp` グラフィックGDC (A800, B000, B800) | | E0000-E7FFF | the fourth plane (16-colour models) | UND `io_disp` グラフィックGDC (E000) | | E8000-FFFFF | ROM: N88-BASIC(86) and the BIOS (96 KB on the original: twelve 8 KB ROMs, MAME region `ipl`) | MAME `-listxml`, [census.md](census.md) | The PC-98's text VRAM is word-organised (a JIS code per cell, kanji as two cells); the graphics planes are bit planes. Bank switching of the planes is through I/O 00A4h (display) and 00A6h (drawing) on every normal-mode model except the original and the U (UND `io_disp` VRAMプレーン切り換え). ## I/O map (the ports the first rows use) PC-98 peripherals sit on **odd or even byte lanes at every second address**: an 8-bit chip on the low lane answers at even ports, on the high lane at odd ports. The MAME runs show both (mame-oracle.md). | Ports | Device | Source | | --- | --- | --- | | 00h, 02h / 08h, 0Ah | 8259A master / slave | UND `io_pic` | | 01h-0Fh (odd), 11h-1Fh (odd), 21h-27h (odd), 29h | 8237A DMA, its bank registers | UND `io_dma` | | 20h (and 22h on later models) | calendar clock: uPD1990A on MAME's 8086 sets, uPD4990A on its VM and VX (device lists, tier 5); the data bit is read through the system 8255 | UND `io_cal` | | 42h (read) | the printer 8255's port B, which also carries system status: system type (bits 7-6, 00b = original), clock series (bit 5); read 3,401 times in the VM run | UND `io_prn` 0042h, first entry | | 31h, 33h, 35h, 37h | 8255A system port (DIP switches, beeper, CRT and memory status) | UND `io_syste` | | 41h, 43h | 8251A keyboard interface | UND `io_kb` | | 40h, 42h, 44h, 46h | 8255A printer | UND `io_prn` | | 30h, 32h | 8251A RS-232C | UND `io_rs` | | 50h, 52h | NMI flip-flop set and reset | UND `io_nmi` | | 51h, 53h, 55h, 57h | 8255A to the 320 KB drive subsystem (original, E, F, M only) | UND `io_2d` | | 60h, 62h | text GDC (master) | UND `io_disp` | | 64h | VSYNC interrupt trigger (one INT 0Ah at the next VSYNC) | UND `io_disp` 0064h | | 68h, 6Ah | mode flip-flops | UND `io_disp` | | 70h-7Ah (even) | text line counter controls (PL, BL, CL, SSL, SUR, SDR) | UND `io_disp` | | 71h, 73h, 75h, 77h (and 3FD9h-3FDFh on later models) | 8253 | UND `io_tcu` | | 7Ch, 7Eh | GRCG mode and tile | UND `io_disp` | | 90h, 92h, 94h / C8h, CAh, CCh; BEh | uPD765A, 1 MB / 640 KB interfaces; dual-mode control | UND `io_fdd` | | A0h, A2h | graphics GDC (slave) | UND `io_disp` | | A1h, A3h, A5h, A9h | character generator access (kanji code, line, pattern) | UND `io_disp` | | A4h, A6h | display and drawing bank | UND `io_disp` | | A8h-AEh (even) | palette | UND `io_disp` | | F0h, F2h | CPU reset (and CPU select on the VX), A20 | UND `io_cpu` | | 188h, 18Ah (18Ch, 18Eh on the -86) | OPN / OPNA | UND `io_sound` | | A460h-A46Eh, A66Eh | the -86's ID, PCM FIFO and mute | UND `io_sound` |