# Start here: the Donkey Kong board (TKG-4) Two boards: a CPU board with a Z80A, an Intel 8257 DMA controller and a complete sound section (a Fujitsu MB8884 microcontroller, a DAC and discrete circuits), and a video board whose sprite hardware runs at 61.44 MHz in ECL. Tags follow the methodology (DOC, OBSERVED, HYPOTHESIS); sources in [sources.md](sources.md). ## Parts (DKM, the TKG4-UP operation manual's parts lists; DOC) **CPU board TKG4-11-CPU:** Z80A; **8257-5** DMA controller; **MB8884** "8-bit microprocessor" (Fujitsu's 8035-type MCU, the sound CPU) with a **6.000 MHz** crystal; **DAC08CQ** 8-bit DAC; NE556 dual timer; MB3614 quad op-amp; CD4049UB; four 2532 (4 KB) program EPROMs; two 2716 (2 KB) EPROMs; two 24S10 256 x 4 PROMs; six MB8114 1K x 4 static RAMs; two 74LS259 addressable latches; 74LS373/74LS175/74LS174 latches. **Video board TKG4-11-VIDEO:** a **61.44 MHz** crystal oscillator; six 2716 EPROMs (graphics); one 24S10 PROM; two MB8114 and two MB8148 1K x 4 static RAMs; one MB93419 64 x 9 bipolar RAM; two MB7074 ECL RAMs (MBM10422); ECL logic (MB10105, MB10116, MB10136) with TTL-to-ECL and ECL-to-TTL translators (MB10124, MB10125); fourteen 74LS157 multiplexers; 74LS299 shift registers; 74LS283 adders. The ECL parts point at the sprite line buffer running at the 61.44 MHz master clock (HYPOTHESIS until the video board's sheets are traced: U3). ## Clocks | Signal | Value | Source | | --- | --- | --- | | Master | 61.44 MHz | DKM (DOC) | | Pixel clock | 6.144 MHz (master / 10) | MAME `-listxml dkong`: pixclock 6144000 (OBSERVED) | | Z80 | 3.072 MHz (master / 20) | MAME `Zilog Z80 @ 3.07 MHz` (OBSERVED); the divider chain is on the sheets (U1) | | 8257 | 3.072 MHz | MAME `dma8257 @ 3.07 MHz` (OBSERVED) | | MB8884 | 6.000 MHz crystal, 15 clocks a machine cycle: 400,000 cycles a second | DKM (DOC); mcs48-python `docs/timing.md` | | Line | 384 pixel clocks, 256 visible | MAME: htotal 384, hbstart 256 | | Frame | 264 lines, visible 16-239 (224 lines); 60.606061 Hz | MAME: vtotal 264, vbend 16, vbstart 240 | The monitor is turned (MAME `rotate="270"`): the player sees 224 x 256. ## Memory map and control (main CPU) **HYPOTHESIS throughout until DKS's CPU sheet is traced (U2).** The addresses the MAME trace touched (6900, 7000, 7800-7808, 7D80-7D85: [mame-oracle.md](mame-oracle.md)) are OBSERVED; the rest of this table comes from Computer Archeology's page, which its own site labels "(AI)" and which cites MAME's driver, so it is a list of things to check, not evidence: | Range | What | | --- | --- | | 0000-3FFF | program ROM (four 4 KB EPROMs: DKM's four 2532s) | | 6000-6BFF | work RAM, with a sprite staging area the DMA reads (6900 in the trace) | | 7000-73FF | sprite RAM (the DMA's destination, 7000 in the trace) | | 7400-77FF | tile RAM (32 x 32) | | 7800-780F | the 8257's registers ([dma.md](dma.md)) | | 7C00 | read: player 1; write: the tune number latched for the MB8884 (BUS input) | | 7C80 | read: player 2 | | 7D00-7D07 | read: coins and starts; write: a 74LS259, one bit per address: discrete sound triggers and MB8884 inputs | | 7D80 | read: DIP switches; write: the MB8884's interrupt | | 7D82-7D87 | writes to a second 74LS259: flip, sprite bank, NMI enable (7D84), DMA request (7D85), palette bank (7D86-7D87) | ## Interrupts One NMI a frame at the start of vertical blank (line 240), enabled by 7D84. Observed in MAME: three entries at 0x0066 in three frames, all on line 240; the handler clears 7D84 at once and sets it again at about line 32. ## Reading on [video.md](video.md), [dma.md](dma.md), [sound.md](sound.md), [rows.md](rows.md), [cpu-cores.md](cpu-cores.md), then the [handoff brief](handoff-brief.md).