# Interrupts and the small peripherals ## Interrupts: the i8214 MAME fits an "Intel 8214 PICU" (OBSERVED, `-listdevices`). Eight levels, highest first (YK-IO E4h): **0** RS-232C receive, **1** VRTC (vertical retrace from the uPD3301), **2** the 1/600-second timer, **3** INT4 (expansion), **4** sound (OPN/OPNA timers), **5** INT2 (expansion), **6** FDINT1, **7** FDINT2. Port E4h sets the current level (an interrupt is taken only if its level is above the one written: "E4h に 03h をセットしたら、レベル3以下 (3-7) の割り込みはかからない") and the SGS bit (compare with the level, or plain priority); E6h masks RS-232C receive, VRTC and the timer (YK-IO). The ROM's handlers re-arm E4h (MAME run: 93 writes to E4h in 3 s on `pc8801mk2sr`, OBSERVED). The main CPU is in IM 2 with the 8214's level forming the vector's low bits (the exact formula and the ROM's table address are U9: read them from KAISEKI's interrupt chapter; HYPOTHESIS until then). ## The 1/600-second timer A fixed timer interrupt at 600 Hz on level 2 (YK-IO). Its source (a divider of which clock) is U10. ## uPD8251 USART (20h, 21h) RS-232C and the cassette (CMT at 600/1200 baud, chosen with the motor and carrier bits in 30h) (YK-IO 30h; NEC82 p. 631). From the FH on, port 6Fh sets the RS-232C baud rate (75-19200). Cassette load from T88/CMT images is a later milestone. ## uPD1990A calendar clock Driven by bit-banging: command bits C2-C0 and data CDO on port 10h (shared with the printer data), clock and strobe on 40h bits 2 and 1, data read back on 40h (YK-IO 10h, 40h). MAME: "uPD1990A RTC @ 32.76 kHz" (OBSERVED). No family core (NEC part; no other family board uses it yet): in board. ## Beeper 40h bit 5 (BEEP: a 2.4 kHz tone, MAME "Beep @ 2.40 kHz", OBSERVED) and bit 7 (FBEEP: the bit itself to the speaker) (YK-IO). ## Keyboard and DIP switches Keyboard: a matrix read directly at 00h-0Eh (no keyboard MCU: YK-IO, YK-KBD). DIP switches: 30h and 31h reads (YK-DIP). The boot mode (N or N88, V1/V2, 4/8 MHz) comes from them. ## Unknowns - U9 The IM 2 vector formula and the ROM's interrupt table. - U10 The 1/600-second timer's source. - U11 The 8214's exact behaviour when E4h is written while a request is pending.