MAME Pull Requests
MAME Pull Requests for KN5000 Emulation
This page records the series of pull requests (all merged by 2026-03-24) to upstream MAME that implement functional emulation of the Technics KN5000 music keyboard. The changes span the TLCS-900/H CPU core, the TMP94C241 microcontroller, and the KN5000 machine driver.
Context: The Technics KN5000 is a 1997 professional arranger keyboard built around dual Toshiba TMP94C241F processors (TLCS-900/H family). Its program (v5-v10, extracted from the update floppies), table-data, custom-data and rhythm ROMs, and one of its four waveform ROMs (IC307), are preserved. Program v3/v4 and waveform IC304-IC306 are not, the sub-CPU boot ROM (IC30) is only partly read, and the control-panel MCU ROMs are undumped. The v7, v9 and v10 programs, the table data, the custom data, the sub-CPU payload and boot ROM and the HD-AE5000 ROM are disassembled into sources that rebuild byte-identically. A MAME skeleton driver has existed since 2024 but could not get beyond early boot because the CPU core lacked features. These PRs fixed that: the driver now boots to its main screen with real voice names and responds to the control panel. Upstream it is still flagged
MACHINE_NOT_WORKING | MACHINE_NO_SOUND: it has no tone generator and no MIDI port, and its floppy controller is not mapped.See Also: SubCPU Payload Loading for the investigation that identified these issues, Boot Sequence for overall firmware flow, and Control Panel Protocol for the serial protocol implemented by the HLE.
Dependency Graph
The PRs form a dependency chain. PR 1 and PR 2 are independent and can be reviewed simultaneously. Each subsequent PR builds on the previous.
PR 1 (LDC CR mapping) ──┐
├── PR 3 (DMA + port fix) ── PR 4 (serial) ── PR 5 (KN5000 driver)
PR 2 (EI/RETI shadow) ──┘
Overview of Changes
| PR | Scope | Files Changed | New Files | Risk Level |
|---|---|---|---|---|
| 1 | TLCS-900/H core | 900tbl.hxx, dasm900.cpp, dasm900.h, tmp94c241.cpp, tmp95c061.cpp, tmp95c063.cpp, tmp96c141.cpp | — | None (additive + structural refactor) |
| 2 | TLCS-900/H core | 900tbl.hxx, tlcs900.cpp, tlcs900.h | — | Low (all variants) |
| 3 | TMP94C241 only | tmp94c241.cpp, tmp94c241.h | — | None (TMP94C241 only) |
| 4 | TMP94C241 only | tmp94c241.cpp, tmp94c241.h | tmp94c241_serial.cpp/h | None (TMP94C241 only) |
| 5 | KN5000 driver | kn5000.cpp, kn5000.lay | kn5000_cpanel.cpp/h | None (KN5000 only) |
PR 1: TLCS-900/H — LDC Control Register Mapping for TMP94C241 DMA Registers
Upstream PR: mamedev/mame#14970 (merged)
Branch: kn5000_pr1_ldc_cr_mapping
Summary
Add TMP94C241 DMA control register encodings to the TLCS-900/H CPU core’s LDC instruction handler, and refactor the disassembler’s CR register name resolution from hardcoded switch blocks into model-specific symbol tables.
Problem
The LDC (Load Control Register) instruction uses an immediate byte to select which internal register to access. The TLCS-900/H family shares the same instruction encoding, but different chip variants place their DMA registers at different offsets within the control register space.
MAME’s existing implementation only handles the TMP96C141/TMP95C061/TMP95C063 encodings:
| Register | TMP96C141/TMP95C061/TMP95C063 | TMP94C241 |
|---|---|---|
| DMAM0-3 (CR8) | 0x22, 0x26, 0x2A, 0x2E | 0x42, 0x46, 0x4A, 0x4E |
| DMAC0-3 (CR16) | 0x20, 0x24, 0x28, 0x2C | 0x40, 0x44, 0x48, 0x4C |
| DMAD0-3 (CR32) | 0x10, 0x14, 0x18, 0x1C | 0x20, 0x24, 0x28, 0x2C |
Without the TMP94C241 cases, LDC cr,DMAMn instructions write to a dummy register and DMA never configures correctly. This was the first bug identified in the KN5000 payload loading investigation — the Main CPU’s firmware uses LDC extensively to set up the HDMA transfers that carry the sub-CPU boot data: nine blocks, 524,288 B in all, of which 192 KB is the payload.
Additionally, the disassembler had all variants’ CR register names hardcoded in the shared dasm900.cpp, which doesn’t scale well as new variants are added. The existing SFR symbolic names already use a model-specific table pattern — CR register names should follow the same approach.
Changes
-
900tbl.hxx: Add TMP94C241 cases to the six existingswitchblocks inprepare_operands()(three for operand 1, three for operand 2). Each block gains four newcaseentries mapping the TMP94C241 offsets to the samem_dmam[],m_dmac[], andm_dmad[]arrays. Existing TMP96C141/TMP95C061/TMP95C063 cases are unchanged. -
dasm900.h: Add acr_symstruct ({size, encoding, name}) for model-specific control register names, a new constructor overload accepting a CR symbol table alongside the existing SFR symbol table, and a privatecr_name()lookup helper. -
dasm900.cpp: Replace six hardcodedswitchblocks forO_CR8/O_CR16/O_CR32operands (two copies — one for operand 1, one for operand 2) with table-driven lookups viacr_name(). This removes all variant-specific register names from the shared disassembler code. -
tmp94c241.cpp: Define atmp94c241_cr_syms[]table with TMP94C241 DMA register encodings and pass it to the disassembler constructor. -
tmp96c141.cpp,tmp95c061.cpp,tmp95c063.cpp: Move their existing DMA CR register names (previously hardcoded indasm900.cpp) into model-specific*_cr_syms[]tables, following the same pattern.
Risk Assessment
None. The CPU core change only adds new case entries to existing switch statements — all existing cases are untouched and the new encodings do not overlap with any existing variant’s register map. The disassembler refactoring is purely structural: the same register names are resolved for the same encodings, just driven by per-variant tables instead of a shared switch. No existing driver is affected.
Design Note: Why 900tbl.hxx Is Not Model-Specific
The disassembler’s CR register names were moved to model-specific files, but the emulation-side CR register mapping in 900tbl.hxx (prepare_operands()) was intentionally left as a shared switch with all variants’ cases together. We considered the same model-specific split but decided against it for three reasons:
-
Performance.
prepare_operands()runs on every instruction inexecute_run()— it is the hottest path in the CPU emulation. The compiler optimizes theswitchinto a jump table. Replacing it with virtual dispatch or a table lookup would add overhead to every LDC instruction for no functional benefit. -
No overlap. The encoding values are disjoint between variants (TMP94C241 uses 0x42–0x4e for DMAM, TMP96C141 uses 0x22–0x2e). A TMP94C241 binary will never contain TMP96C141 encodings, and vice versa. Both sets of
caseentries coexist harmlessly in the same switch — extra cases that are never reached have zero runtime cost. -
Alternatives are worse. Separating the behavior would require one of: (a) virtual method dispatch per LDC instruction, (b) a runtime table search, (c) overriding the entire 2000+ line
prepare_operands()in each variant, duplicating 99% shared logic, or (d) anif (type() == TMP94C241)guard before variant-specific switch blocks, which adds a runtime branch on every LDC and duplicates the shared DMAS0–3 cases into both branches. None of these improve correctness, and all add complexity or overhead.
The encoding byte itself acts as an implicit variant discriminator — a TMP94C241 binary will never emit encoding 0x22 for DMAM0, so the TMP96C141 case for 0x22 is simply never reached when running TMP94C241 firmware. The compiler merges all cases into a single jump table where unreachable entries cost nothing. Each case in the source is annotated with a comment identifying which variant(s) use that encoding, making the shared switch self-documenting.
The disassembler refactoring was worthwhile because disassembly is not performance-critical and the model-specific symbol table pattern was already established. For the instruction decoder, extra case entries in a shared switch are the idiomatic MAME approach for handling variant differences in the TLCS-900 core.
Datasheet Reference
The merged PR cites the Toshiba TMP94C241F Data Sheet, Section 5 “DMA Controller”, Table 5-1 “DMA Register Map”.
None of the section or table numbers in this page’s Datasheet Reference blocks has been checked: no TMP94C241 datasheet exists on this project’s machines (see TMP94C241 Memory Controller). The PR 3 and PR 4 blocks are not in those PRs’ descriptions either.
PR 2: TLCS-900/H — EI/RETI Interrupt Acceptance Shadow
Upstream PR: mamedev/mame#14995 (merged)
Branch: kn5000_pr2_irq_inhibit
Summary
Implement a 1-instruction interrupt deferral after EI and RETI instructions, which the PR takes to be TLCS-900/H hardware behaviour (see the Datasheet Reference below).
Problem
The PR takes interrupt acceptance to be inhibited for one instruction following EI or RETI, as an architectural feature of the TLCS-900/H family. For its source, and a datasheet that disagrees about EI, see the Datasheet Reference below.
Without this deferral, the firmware pattern:
EI 0 ; Enable all interrupt levels
NOP ; This MUST execute before any IRQ is accepted
EI 6 ; Restrict to level 6+ only
fails because EI 0 immediately triggers a pending interrupt before NOP executes. The interrupt handler runs, returns via RETI, and the CPU re-enters the handler infinitely — EI 6 never executes, and the CPU is stuck.
In the KN5000 firmware this exact sequence is the task-scheduler entry: IRQ_Epilogue__enter_kernel in both KN5000 programs (the main CPU’s INTT3_EnterScheduler and the sub CPU’s TaskSwitch_Expired until 2026-11-06; the label of the shared kernel source wsa1/kernel/kernel.s). The one-instruction shadow this PR adds lets the emulated CPU get past it.
Changes
-
tlcs900.h: Addbool m_irq_inhibitmember totlcs900_device(the base class for all TLCS-900/H variants). tlcs900.cpp:- Register
m_irq_inhibitindevice_start()for save states. - Initialize to
falsein bothtlcs900_device::device_reset()andtlcs900h_device::device_reset(). - In
execute_run(): whenm_check_irqsis set andm_irq_inhibitis true, clear the inhibit flag but skip the IRQ check for this cycle. On the next iteration (after one instruction has executed), the IRQ check proceeds normally. Ifm_check_irqsis not set, clearm_irq_inhibitunconditionally.
- Register
900tbl.hxx: Setm_irq_inhibit = trueinop_EI()andop_RETI().
Risk Assessment
Low in code terms: this change affects all TLCS-900/H variants (TMP96C141, TMP95C061, TMP95C063, TMP94C241), and the implementation is minimal (a single boolean flag). Any existing driver that relied on immediate acceptance after EI could see a timing change. The TMP95C061F data sheet describes exactly that immediate behaviour (see the Datasheet Reference below), so the change is not established as correct for every variant.
Drivers using TLCS-900/H variants that should be regression-tested:
ngp(Neo Geo Pocket — TMP95C061)taitotzandtaitopjc(Taito Type-Zero and Taito Power-JC System, whose I/O CPU is a TMP95C063)
Datasheet Reference
The merged PR cites the Toshiba TMP94C241F Data Sheet, Section 2.6.5 “Interrupt Processing”, as saying that the instruction after EI or RETI always executes before any interrupt is accepted. That citation is unchecked: no TMP94C241 datasheet or TLCS-900/H manual exists on this project’s machines. The TMP95C061F data sheet (another 900/H-core part), Section 3.3 “Interrupts”, says the opposite for EI: “The EI instruction becomes effective immediately after execution. (With the TLCS-90, the EI instruction becomes effective after execution of the subsequent instruction.)”
PR 3: TMP94C241 — DMA Subsystem (HDMA + DMAR) and Port Read Fix
Upstream PR: mamedev/mame#15003 (merged)
Branch: kn5000_pr3_dma_and_port
Depends on: PR 1 + PR 2
Summary
Implement the TMP94C241’s complete DMA subsystem and fix the port read behavior to match real hardware.
Problem
The existing TMP94C241 device in MAME has empty stubs for tlcs900_check_hdma() and no DMA transfer logic. The KN5000’s Main CPU relies heavily on DMA for two critical operations:
-
HDMA (Hardware DMA): Triggered by interrupt events. The Main CPU uses HDMA for the sub-CPU boot transfers: 524,288 B in all, five 64 KB blocks from table data plus the 192 KB payload. Each time the SubCPU acknowledges a byte via INT5, the HDMA engine automatically transfers the next byte without CPU intervention. Nine bulk transfers (5x 64KB config blocks + 4 payload blocks) use this mechanism.
-
DMAR (Software DMA): Triggered by writing to SFR register 0x109. The SubCPU uses DMAR to receive inter-CPU command bytes — each INT0 event triggers one DMAR write, transferring a single byte from the latch at
0x120000to RAM. This is how the SubCPU receives sound program change commands, mixer settings, and other real-time data from the Main CPU after boot.
Additionally, port_r() always returned the external pin level, but real TMP94C241 hardware returns the output latch value for bits configured as output. Firmware that reads back its own output port state (a common pattern for read-modify-write operations) got wrong values.
Changes
tmp94c241.h:- Add declarations for
tlcs900_process_hdma(),tlcs900_process_software_dma(), anddmar_w().
- Add declarations for
tmp94c241.cpp:tlcs900_process_hdma(channel): Implements one HDMA transfer for a channel. Looks up the channel’s DMA start vector, checks if the corresponding interrupt flag is pending (the DMA trigger condition), performs one transfer according to the DMAM mode register, decrements the transfer count, and fires INTTC on completion. Clears the triggering interrupt flag after the transfer (consuming the interrupt instead of dispatching to the handler).tlcs900_process_software_dma(channel): Same transfer logic as HDMA but triggered by DMAR register writes instead of interrupt events. One write = one transfer unit.tlcs900_check_hdma(): Checks all four channels in priority order (0 highest). Only processes one transfer per call to maintain correct timing. Skips processing when all interrupts are masked.tlcs900_check_irqs(): Added HDMA priority — interrupts targeted by active HDMA channels are skipped (consumed by DMA instead of dispatching to the interrupt handler). Added INT0 level-detect re-assertion for level-triggered interrupt mode. Addeddebug()->interrupt_hook()for MAME debugger integration.dmar_w(): Handler for SFR 0x109 writes. Each set bit triggers one software DMA transfer on the corresponding channel.port_r(): Now returns(latch & direction) | (external & ~direction), correctly mixing output latch bits with external pin levels based on the port control register.- DMAM decoding: Uses switch-based transfer mode decoding (byte/word/long, increment/decrement/fixed) matching the proven TMP95C061 implementation already in MAME.
Risk Assessment
None. All changes are within the TMP94C241 device. No other TLCS-900/H variant or driver is affected.
Datasheet Reference
TMP94C241F Data Sheet:
- Section 5.1 “HDMA Operation” — interrupt-triggered DMA with priority over normal interrupt dispatch
- Section 5.2 “DMAR Register” — software DMA trigger at SFR 0x109
- Section 5.3 “DMAM Register” — transfer mode encoding (bits 4:0)
- Section 9.2 “Port Read Operation” — output latch vs. external pin multiplexing based on PxCR
PR 4: TMP94C241 — Serial Port Sub-Device
Upstream PR: mamedev/mame#15015 (merged)
Branch: kn5000_pr4_serial
Depends on: PR 3
Summary
Replace the inline serial port stubs with a proper sub-device implementation supporting synchronous I/O interface mode, baud rate generation, TX double buffering, and data callbacks for connecting external devices.
Problem
The existing TMP94C241 serial implementation consists of inline stubs that immediately set the TX-complete interrupt flag on every write to SCxBUF. This was sufficient for early bringup but cannot support any real serial communication. The KN5000 uses both serial channels:
- Serial Channel 0: MIDI In/Out at 31.25 kbaud (standard MIDI rate). Uses UART mode with the baud rate generator.
- Serial Channel 1: Control panel communication at 250 kHz (fc/16 / 4,
BR1CR = 0x14; 31.25 kHz during initialisation) using synchronous I/O interface mode. The Main CPU exchanges button/LED/encoder data with the control panel MCU (whose ROM is not dumped) via a clocked serial protocol.
Changes
tmp94c241_serial.h(new file): Device class fortmp94c241_serial_device. Exposes:txd(),rxd(),sclk_out(),sclk_in()callbacks for connecting to external devicestx_start()callback signaling the start of each byte transmission (with PFFC pin function state, allowing connected devices to distinguish real transmissions from phantom ones during pin reconfiguration)- SFR register accessors:
scNbuf_r/w,scNcr_r/w,scNmod_r/w,brNcr_r/w
tmp94c241_serial.cpp(new file): Full implementation:- I/O interface mode (SCxMOD bits 3:2 = 0): Synchronous clocked serial. Supports internal clock (baud rate generator) and external clock (IOC=1) sources. Data is shifted LSB-first on clock edges.
- Baud rate generator: Configurable via BRxCR register with 4-bit divisor and clock source selection. Drives a timer that toggles SCLK at the configured rate.
- TX double buffering: CPU writes to SCxBUF go to the TX buffer. If the shift register is idle, the buffer auto-transfers immediately. If the shift register is busy, the buffer holds data until the current byte finishes, then auto-loads on the trailing rising edge. This matches real TMP94C241 hardware behavior and prevents byte loss during back-to-back transmissions.
- TX/RX shift registers: 8-bit shift with proper edge timing. TX pre-outputs bit 0 before the first clock edge so the receiver can sample it on the rising edge. RX samples on rising edges and fires INTRX when 8 bits are received.
- SCLK output: Forwarded to connected devices via callbacks, enabling clocked protocols.
- TO2 trigger: not implemented. The selection (SCxMOD bits 1:0 = 0) is logged as “TO2 trigger (Not implemented yet)”, and its only effect is that with IOC=1 the baud-rate timer stops clocking the channel, so the external SCLK clocks it. TO2 itself drives nothing. The 7/8/9-bit UART modes are likewise recognised and logged but not implemented. Forwarding Timer 1 matches to the serial channels was tried on the
ARCHIVED_kn5000_pr4_serial_to2_triggerbranch and not merged.
-
tmp94c241.cpp: Replace inline serial stubs with sub-device delegation. Serial register mappings ininternal_mem()now route tom_serial[0]andm_serial[1]. Adddevice_add_mconfig()to instantiate the two serial sub-devices. Set TX-complete flags (INTES0/INTES1bit 7) atdevice_reset()to indicate empty TX buffers at power-on. tmp94c241.h: Add#include "tmp94c241_serial.h", friend declaration,device_add_mconfig()override,required_device_array<tmp94c241_serial_device, 2> m_serial. Remove old inline serial member variables (m_serial_control,m_serial_mode,m_baud_rate).
Risk Assessment
None. All changes are within the TMP94C241 device and its new sub-device. No other driver is affected. The sub-device’s callbacks are optional — if not connected by a driver, they are no-ops, preserving backward compatibility.
Datasheet Reference
TMP94C241F Data Sheet:
- Section 7 “Serial Interface” — I/O interface mode, UART mode, baud rate generator
- Section 7.3 “Baud Rate Generator” — divisor and clock source configuration
- Section 7.4 “Transmit/Receive Operation” — shift register timing, double buffering
- Table 7-1 “Serial Control Register (SCxCR)” — IOC, SCLKS, error flags
PR 5: KN5000 Driver — Control Panel HLE, SubCPU Payload Transfer
Upstream PR: mamedev/mame#15143 (merged)
Branch: kn5000_interactive_control_panel (the head that merged; kn5000_pr5_driver is an earlier, larger version that also carried MIDI ports and perfect_quantum)
Depends on: PR 4
Summary
Rework the KN5000 machine driver from a non-functional skeleton to a working system that boots to normal operation with sound program selection and control panel interaction.
Problem
The existing KN5000 driver defines the basic hardware layout (two TMP94C241 CPUs, ROM regions, LCD) but cannot proceed past early boot because:
- The firmware validates backup SRAM contents and enters diagnostic mode if validation fails (NVRAM is empty on first run). Not addressed by the merged PR: IC21 became NVRAM only in #15878, and no factory-default seeding was merged.
- The SubCPU memory map lacks mappings for the tone generator, its keybed port, DSP1 and the waveform RAM, causing unmapped memory accesses. (The inter-CPU latches at
0x120000were already mapped.) - No scheduling synchronization between CPUs, making the latched inter-CPU communication unreliable. Not addressed by the merged PR, which has no
perfect_quantum. - The control panel MCU ROM is not dumped, so the serial protocol to the panel has no responder.
- No keybed input mechanism exists. Not addressed: the keybed port is a
noprw()stub.
Changes
kn5000.cpp(major rework):- Sub-CPU payload: Replaces the never-mapped, uncompressed
subprogramregion with version-matched compressed sub-CPU payloads (v1.40-v1.42) overlaid on thecustom_dataregion (IC19) at0xE0000, which is where the system update floppies write them. During boot the Main CPU decompresses the payload from there and sends it to the SubCPU through the inter-CPU latches. - SubCPU memory map stubs: Maps the tone generator (IC303) at
0x100000, its keybed data/status port at0x110000, DSP1 (IC311) at0x130000and the waveform RAM at0x1E0000asnoprw()stubs, so the SubCPU’s initialisation no longer reads0xFFfrom unmapped space and the inter-CPU handshake completes. Device emulation was left for later changes. - Not merged: The earlier, larger
kn5000_pr5_driverbranch also seeded the backup SRAM with factory defaults, calledperfect_quantumon inter-CPU latch writes and wired serial channel 0 tomidi_portdevices. None of that is in #15143: IC21 is plain RAM there, and no MIDI port is wired.
- Sub-CPU payload: Replaces the never-mapped, uncompressed
kn5000_cpanel.cpp(new file): Control panel HLE implementing the serial protocol between the Main CPU and the control panel MCU. The control panel MCU’s ROM is not dumped, so HLE is the only option. Key features:- INTA-driven sessions: The panel asserts INTA to request attention, then exchanges button/LED data via synchronous serial on channel 1. Each session consists of 8 segments of 8 bytes each (64 bytes total), carrying button states inbound and LED states outbound.
- Button mapping: 85+ buttons mapped to MAME input ports, organized by panel region (transport, sound selection, accompaniment, registration, numeric pad, etc.).
- LED output routing: LED states received from the firmware are routed to MAME layout output elements, enabling the layout to display button backlighting.
- Rotary encoder input: Tempo, volume, and data entry encoders generate delta values in the protocol format expected by the firmware.
-
kn5000_cpanel.h(new file): Header for the control panel HLE device class. kn5000.lay: LED output element names updated to match the names emitted by the control panel HLE, enabling proper LED visualization.
Result
With all five PRs applied, the KN5000 driver:
- Boots from power-on through the complete boot sequence (ROM validation, SubCPU payload transfer, hardware initialization)
- Displays the main screen with voice names (Piano, Bigband Brass, Modern E.P.1), rhythm patterns, and mixer levels
- Responds to control panel buttons for sound selection, menu navigation, and parameter editing
- SubCPU processes inter-CPU commands in real-time (no “Sound Name Error” messages)
Risk Assessment
None. All changes are within the KN5000 driver and its new HLE device. No other driver or shared code is affected.
Testing Notes
The complete change set has been tested with the following ROM set:
kn5000_v10_program.rom(Main CPU program, 2 MB; BIOSv10)kn5000_subcpu_boot.ic30(SubCPU boot ROM, 128 KB;BAD_DUMP, partly read)kn5000_table_data_rom_even.ic3+kn5000_table_data_rom_odd.ic1(Table data, 2 x 1 MB)kn5000_custom_data_rom.ic19(Custom data, 1 MB)kn5000_subprogram_v142_compressed.rom(compressed sub-CPU payload v1.42, loaded into the custom-data region at0xE0000)kn5000_rhythm_data_rom.ic14(Rhythm data, 4 MB)kn5000_waveform_rom.ic307(Wave ROM, 4 MB; IC304-IC306 areNO_DUMP)
Test scenarios verified:
- Cold boot (#15143 has no NVRAM: IC21 is plain RAM there and became NVRAM only in #15878, so every boot starts cold)
- SubCPU boot transfers complete (9 HDMA blocks, 524,288 B, including the 192 KB payload)
- Sound program selection via control panel buttons
- Menu navigation (display updates correctly)
MN10300 family: the ROM-record contribution
Submitted 2026-08-18, merged 2026-08-23. A separate line of work from the KN5000 PRs above: those improve an existing driver, this creates one.
Upstream PR: mamedev/mame#15911 — “matsushita/kn7000.cpp: add ROM records for the Technics SX-KN series” (merged 2026-08-23)
Why a driver with no CPU
When this was submitted, MAME had an MN10300 disassembler but no execution core
(scripts/src/cpu.lua said “disassembler only”), so no CPU device could be instantiated for the
KN7000, KN6000, KN6500, KN2400 or KN2600. Rather than wait, the first contribution declares ROM
records only, following the precedent of src/mame/bfm/bfm_sc6.cpp — an 80-line driver with no
CPU and a machine-config body reading // nothing yet. The part is named in a commented-out line in
each machine configuration so the hardware stays documented until a core exists. That has since
changed: #16250 (merged 2026-10-07) added the MN10300
execution core (MN103002A) and the running driver for all five machines, still flagged
MACHINE_NOT_WORKING | MACHINE_NO_SOUND.
What it contains
As merged (one commit, 403 insertions, two files — src/mame/mame.lst and
src/mame/matsushita/kn7000.cpp, nothing modified or deleted): five machines, eleven dumped
images, thirty undumped declarations.
Every device gets a line under its real part number and manual-verified capacity. Anything that is
not an honest dump of that machine’s own part is NO_DUMP with the correct expected size, never
shipped as substitute data — see ROM Dumping Roadmap for what remains.
Follow-up work since then: the flash-device type went upstream in
#16192 (merged 2026-09-19), which added
FUJITSU_29LV160B (the MBM29LV160B) with the KN7000 as its consumer. No MX29LV160B type was
added. The KN6000 expansion connector and its board are open as
#16220 (separate bus/technics/kn6000/ files). The
board is now named the HD-SX6, because the firmware held is the HD-SX6’s; the HD-SX3’s firmware
has not been dumped.
The flash device IDs were read, not guessed
MAME can model a flash chip well enough to answer real erase and program command sequences, but the manufacturer and device ID are functional: the firmware performs a JEDEC autoselect and compares the response against its own table before it will program anything. Get them wrong and the firmware silently refuses the part.
The table is in the ROM, and it carries the part names as plain ASCII:
mfr 0x04 dev 0x2249 35 sectors " MBM29LV160B "
mfr 0xc2 dev 0x2249 35 sectors " MX29LV160B "
mfr 0x1f dev 0x00c0 40 sectors " AT49BV16X4 "
35 sectors is exactly a 16 Mbit bottom-boot map (16K + 2x8K + 32K + 31x64K). The KN6000 and KN6500 tables hold the first and third entries only; the KN7000 (2002) adds Macronix, which the KN6000 (1999) does not have — Panasonic second-sourced over time, so absence from a table is not evidence that a part number is wrong.
This also corrected the driver: the KN7000 service manual captions IC21 as “32M FLASH”, but every part the firmware accepts is 16 Mbit, so a 32 Mbit device would fail its own autoselect check. With a
0x200000sector map and a 2 MB decode window, that is three independent reasons against one printed caption.
Custom-data flash as a BIOS choice
The custom flash is populated from a floppy, not at the factory. Nine images are declared for the
KN7000 as ROM_SYSTEM_BIOS options — the factory Initial Data Disk plus eight published data sets
(Blue Bayou, Piano Player, Jazz Organ Soloist, Bob’s Band, Traditional Melody, Jogeh 1, Vibraphone,
Italian Accordion 7) — because a real instrument holds exactly one at a time. They load at offset
0x20000 in a ROMREGION_ERASEFF region, so the untouched boot sectors read 0xFF as erased flash
does.
Superseded upstream (2026-10-11). #16394 freed the BIOS axis for the program firmware builds (
sp7001,v16(default),v15,v14).kn7000now loads only the factory default01ctmini.ic21directly. The nine data sets moved to thekn7000_flopsoftware list as three reconstructed floppies (idd7000,custom1,custom2).
Build notes
make SUBTARGET=kn7000 SOURCES=src/mame/matsushita/kn7000.cpp USE_QTDEBUG=0 -j6
./kn7000 -validate
Adding a new
#includeto a driver requiresREGENIE=1on aSOURCES=build. Without it the dependency scan stays cached, the new device’s source is never compiled, and the link fails with an undefined constructor that reads like a missing definition rather than a stale project.