HD-AE5000 Hard Disk Expansion

The HD-AE5000 is an optional hard disk expansion for the KN5000 that provides 1.08GB storage for music files. This page documents the reverse engineering of its firmware.

Overview

Property Value
ROM File hd-ae5000_v2_06i.ic4
ROM Size 512KB
Base Address 0x280000
Firmware Version 2.33J (file version “V2.06i”)
Development Period Juli-Oktober 1996
Author M. Kitajima
Developers Technosoft (CH-Samstagern), Pointstyle (CH-Buttisholz)
Languages English, German, French (Latin-1 encoding)

The HDAE5000 firmware runs on the main CPU (TMP94C241F) when the expansion is present. It provides hard disk management, PC communication via parallel port, and file transfer capabilities.

August 2026 correction. Four disassembly packages (commits db26eca, b893ee8, b7752bc, abdf0ea) rewrote the second half of this ROM’s map. The short version: the 413,907-byte blob whose file is still named code_29af2d_2fffff.bin is, past its first 3 KB, not code. It is bitmaps, palettes, text and pointer tables. The old label HDAE5000_Font_Data has been retired — there is no font there — and several regions that the disassembler had rendered as instructions (long runs of nop) were 0x00 string padding. Sections below marked (corrected) replace earlier text on this page.

Hardware Interface

Physical Connection

The HD-AE5000 connects to the MAIN board’s CN6, a 70-pin two-row connector marked “FOR HSO (OPTION)” on the wiring diagram (service manual II-1, PDF page 27; the pin list is on the MAIN P.C. diagram, II-8, PDF page 30). The wiring sheet draws no cable to it; the cable W3 (QEXGZA34060B) on that sheet belongs to CN5. (This page used to say the option’s cable was W3, “QEX0ZA34008”, labelled “HSQ(OPTION)”: the label reads HSO, and W3 is not the option’s cable.) The wiring sheet’s “1 … 34 / 35 … 68” counts without the last two ground pins, 69 and 70.

Pin Signal Pin Signal Pin Signal Pin Signal Pin Signal
1 E 15 D2 29 A9 43 A5 57 D4
2 E 16 D9 30 IORST 44 A4 58 HDINT
3 +15M 17 D1 31 RYBY 45 A3 59 PPIFCS
4 +5A 18 D8 32 A1 46 A2 60 +5D
5 E 19 D0 33 E 47 E 61 LRCK
6 E 20 HSORAM 34 E 48 HSOROM 62 D03
7 DACCK 21 A18 35 E 49 RD 63 E
8 BCK 22 A17 36 E 50 D15 64 E
9 +5D 23 A16 37 WRLL 51 D7 65 +15A
10 HDDCS 24 A15 38 WRLH 52 D14 66 -15A
11 HDRDY 25 A14 39 A10 53 D6 67 E
12 D11 26 A13 40 A8 54 D13 68 E
13 D3 27 A12 41 A7 55 D5 69 E
14 D10 28 A11 42 A6 56 D12 70 E

E = ground. “D03” is printed so on the sheet; next to BCK / LRCK / DACCK it is [inference] a serial audio data line, not a data-bus bit.

The connector carries the 16-bit bus (D0-D15, A1-A18 with no A0: a word bus, RD, and separate low / high write strobes WRLL / WRLH), four chip selects (HSOROM for the option ROM at 0x280000, HSORAM for its SRAM at 0x200000, HDDCS for the drive registers, PPIFCS for the PPI at 0x160000), the drive’s HDINT (pin 58) and HDRDY (pin 11), IORST (pin 30) and RYBY (pin 31, the flash’s ready / busy), and also digital audio (DACCK, BCK, LRCK, D03) and analog supplies (+15M, +15A, -15A, +5A) beside +5D, which the HD-AE5000 does not use [inference: CN6 is a general option port, “HSO”]. The presence line PE.0 that the firmware tests is not on this list by that name; [inference] it is one of the lines above seen from the CPU sheet (PE.0 would need tracing on sheet II-11).

The board side (the HD-AE5000’s own connector and its PPI / ATA / flash wiring) is not documented: the KN5000 service manual has no HD-AE5000 sheet, and neither the board nor its service manual is in hand. Source: the disassembly’s notes/open4-kn5000-b/hdae/README.md, “kn5000-mzz”, which gives the pdftoppm crop recipe.

Note: The KN5000 service manual (EMID971655) does not include a dedicated HDAE5000 schematic page. The HD-AE5000 is documented as an option, and its internal schematic (PPI, ROM, IDE controller, parallel port) would require a separate HD-AE5000 service manual or physical board examination. The signal names above are derived from the main board schematic and firmware analysis.

Main CPU Bus Signals

The following HDAE5000-related signals appear on the main board schematic (CPU Section A, page II-11; this page used to read PPIFCS as “PPPCS”, HDDCS as “HDOCS” and HSORAM as “HSQRAM”):

Signal Direction Description
PPIFCS Output (Main CPU) PPI chip select (directly decoded from address bus for 0x160000)
HDDCS Output (Main CPU) drive (ATA) register chip select
HDDRDY Output (Main CPU PE.2) “HD ready” by its schematic name, drawn as an output from the CPU sheet; the firmware makes PE.2 an output (PECR = 0x46 in CPanel_InitHardware) and never reads it
HSORAM Output (Main CPU) chip select of the option’s SRAM (0x200000)
D0-D15 Bidirectional 16-bit data bus
A0-A18 Output (Main CPU) Address bus (subset)
PE.0 Input (from HD) Presence detection (active low)

PPI (8255) at 0x160000

The main CPU communicates with the HDAE5000 hardware via an Intel 8255-compatible Programmable Peripheral Interface (NEC uPD71055 on the HD-AE5000 board).

Address Port Direction Function
0x160000 Port A Output at boot; input while a byte is read (0x99) Data byte to/from the PC
0x160002 Port B Input at boot; output in PC-link mode (0x89) Handshake lines to the PC
0x160004 Port C Output at boot; input in PC-link mode Handshake lines from the PC (bits 0-2 polled)
0x160006 Control Write 0x82 from the main CPU’s HDAE5000_Parport_Setup; 0x89 / 0x99 from the PC link (HDAE5000_PPORT_InitPort, HDAE5000_PPORT_RecvByte)

PPI Control Register Configuration at boot (0x82):

  • Bit 7 = 1: Mode set active
  • Port A: Mode 0, Output
  • Port B: Mode 0, Input
  • Port C: Output (both nibbles)

Presence Detection

The HD-AE5000 presence is detected via PE port bit 0 (active low):

BIT 0, (PE)           ; Check PE port bit 0
JR NZ, skip_ppi_init  ; If set, skip HDAE5000_Parport_Setup only

PE.0 gates only the PPI set-up, which also requires Get_Region_Code to return something other than 4. The extension ROM itself is found by its “XAPR” signature: Xapr_DetectAndCallBootInit (reached from ScreenGroup_ReInit) compares 0x280000 with “XAPR”, sets XAPR_PRESENT_FLAG (0x03DD04) and calls 0x280008 without testing PE.0.

ROM Entry Points

The HDAE5000 ROM has two primary entry points called by the main CPU firmware:

Address Function Target Description
0x280008 Boot Init JP 0x28F576 Called during system initialization
0x280010 Frame Handler JP 0x28F662 Called each frame for PPORT polling

Boot Initialization (0x28F576) (corrected)

Called by the main CPU’s Xapr_DetectAndCallBootInit when the ROM at 0x280000 starts with “XAPR” (PE.0 is not consulted). The initialization sequence:

  1. Clear work buffer and load .data - HDAE5000_Clear_Work_Buffer (0x28F785) zeroes 0xF52A bytes at 0x22A000 and copies the 0x0C82-byte initialised-data image from ROM 0x2F94B2 to RAM 0x23952A (see Initialised .data image)
  2. Store workspace pointer - saves the main CPU workspace address (passed in XWA) at 0x23A1A2
  3. Register object tables and a title - HDAE5000_Handler_Registration (0x280020) registers 11 object tables with the main CPU as module 0x0A, then title 0x7F "TT_HDDEXT" (RootFn_RegisterTitle)
  4. Load the boot palette - lda XWA,0x2E5DCE, then HDAE5000_Load_Palette writes all 256 entries to the VGA DAC
  5. Blit the boot splash into VRAM - queries the splash’s resource descriptor for its base (0x2E61CE), then copies it into VRAM as two 0x9600-byte halves, to 0x1A0000 and 0x1A9600
  6. Claim the DISK MENU entry - RootFn_GetViewInstance(0x00600002) (workspace[0x0E0A][0x02C4]) returns the DISK MENU’s expansion item, a RAM-resident AcTitleMenu record; the ROM writes class id 0x016A0005 (its own class 5, HDTitleMenu) at +0x00 and the “HD-AE5000” string pointer 0x2F8DCE into its str field at +0x2A (details)
  7. Fetch sequencer-variable addresses - HamaFn_GetAdr_sqsrtc, HamaFn_GetAdr_sqbtof and HamaFn_GetAdr_sq_beadt (workspace[0x0E88] +0x108/+0x100/+0x104) return the addresses of main-CPU RAM 0x0421 / 0x041C / 0x041B (SEQ_TRANSPORT_STATE / SEQ_BEAT_COUNT / SEQ_BEAT_TICK in the maincpu source; see the song clock), stored at 0x230ECC, 0x230ED2, 0x230ED6 for the frame handler
  8. Check HD presence - HDAE5000_Check_HD_Present (0x2971A3); result stored at 0x230EDA
  9. Request the HD title - when that result is non-zero, RootFn_ApPostEvent(0xFFFFFFFF, 0x01C00016, 0x01A0007F) (workspace[0x0E0A][0x0124]), a request for title 0x7F. What a non-zero result means here is disputed between the source’s comments; see Boot Sequence
  10. Reset UI state - HDAE5000_Finalize_Init (a ret) and HDAE5000_UiState_Reset at 0x2803C2

Steps 6, 7 and 9 were earlier read as “register callback”, “initialize callback pointers” and “a full HD init”. The function names come from the firmware’s own name tables; see HDAE5000 Homebrew — Workspace Pointer.

Step 5 was previously described on this page as “copies 76,800 bytes to work areas” with no statement of what the data was, and the disassembly’s own comment had the copy direction backwards. It is a screen blit: 0x1A0000 is the linear 320×240 8bpp framebuffer (see Display Subsystem), 0x9600 = 38,400 bytes = 120 rows, and the two destinations are adjacent, so the two copies paint the top and bottom halves of one full screen. The picture is the boot splash.

Key RAM Variables

Address Name Purpose
0x22A000 HDAE5000_WORK_BUFFER Work buffer (0xF52A bytes, cleared at init)
0x23952A HDAE5000_DataSegmentImage (RAM copy) Destination of the 0x0C82-byte .data image
0x23A19E HDAE5000_RAM_LyricBoxObj object id of the open lyric box; 0xFFFFFFFF when none is open
0x23A1A2 HDAE5000_RAM_MainWorkspacePtr the main CPU’s object table (0x027ED2)
0x230EC2 HDAE5000_RAM_LyricPosEvt parameter block of the 0x01CA0004 (EV_TICKS) post to the lyric box
0x230EC4 HDAE5000_RAM_LyricPosStep (sq_beadt >> 3) + 1 at the last post
0x230EC6 HDAE5000_RAM_LyricPosition sqbtof × 12 + (sq_beadt >> 3) + 2
0x230ECC HDAE5000_RAM_SqSrtcPtr address of the main CPU’s sqsrtc byte
0x230ED0 HDAE5000_RAM_SqSrtcBit2Prev bit 2 of sqsrtc at the previous frame
0x230ED2 HDAE5000_RAM_SqBtofPtr address of the main CPU’s sqbtof word
0x230ED6 HDAE5000_RAM_SqBeadtPtr address of the main CPU’s sq_beadt byte
0x230EDA HDAE5000_RAM_HdPresent HDAE5000_Check_HD_Present’s result

The names are the .equ block at the top of hdae5000/hd-ae5000_v2_06i.s; each carries its evidence. The older names in this table (“secondary workspace pointer”, “registered handler function 1-3”, …) were wrong. The full set of HD-AE5000 RAM variables is on the Memory Map and HDAE5000 Filesystem pages.

Frame Handler (0x28F662)

Called repeatedly during normal operation to:

  • Drive the lyrics display: while a lyric box is open, read the main CPU’s song position and post it to the box (0x01CA0004, EV_TICKS)
  • Watch bit 2 of the main CPU’s sqsrtc byte and, when it falls, post the file-load events or request the HD title 0x7F
  • Poll for PC parallel port commands (it exits through HDAE5000_Frame_Handler_Exit into HDAE5000_PPORT_ServicePending)

PPORT Command Protocol

The PPORT (PC Parallel Port) protocol enables communication with the HD-TechManager5000 Windows software. Commands are sent from the PC to the KN5000 via the parallel port.

See Hard Disk Interface - PC Parallel Port Protocol for detailed handshaking protocol documentation derived from ppkn50.dll disassembly analysis.

Command List

Handler names drop the HDAE5000PPORT prefix; the request and reply layouts, per command, are in HDAE5000 Filesystem: PC-link packets.

Code Handler Reply / transfers
01 Cmd01_SendInfosAboutHd drive geometry and file-format version; failure when the PC’s version major differs (“Error Wrong Dll Ver”)
02 Cmd02_ExitPport no reply; service 18 posts EVT_CHANGE_MODE NAKA_MODE_MD_NORMAL (back to play)
03 Cmd03_ReadFsbFromHd status only (HDAE5000_HD_LoadTables: all 323 table sectors)
04 Cmd04_SendFsbToPc the three block descriptors, then blocks 0, 1, 2 to the PC
05 Cmd05_RcvFsbFromPc the three block descriptors, then blocks 0, 1, 2 from the PC
06 Cmd06_WriteFsbToHd status only (HDAE5000_HD_StoreTables)
07 Cmd07_LoadHdToMemory song info, then the masked parts are loaded into the keyboard’s memory; status
08 Cmd08_SendDataToPc as 07, then one block per mask bit from the part’s memory to the PC
09 Cmd09_SendFilesToPc song info with nine part sizes, then each part streamed from the disk
10 Cmd10_RcvDataFromPc receives each masked part into fixed main-CPU RAM
11 Cmd11_SaveMemoryToHd saves the song in memory to disk under the given name; status
12, 15, 19 Cmd12/15/19_Nothing status record only, no reply
13 Cmd13_RcvDataFromPc writes the PC’s sectors straight to a new chain, one status byte per step
14 Cmd14_SendInfosToPc the reply of 09 without the data
16 Cmd16_DeleteFiles deletes the masked parts (service 27, HDAE5000_DeleteSongParts); status
17 Cmd17_FormatHd status only
18 Cmd18_SwitchHdMotorOff status only
20 Cmd20_SendXapFileFlash v2.x only; see PC-link flash; no reply packet

FSB (File System Block)

“FSB” is the whole table set: directory names, song records and FLS records, all 323 table sectors. Commands 03 and 06 read and write all of them, and 04 and 05 move the three blocks between the keyboard’s memory and the PC (HDAE5000 Filesystem).

PPORT Debug/Test Mode

The firmware includes a built-in test mode with diagnostic strings at 0x2E21D8:

  • PPORT TEST — Parallel port communication test
  • HDD ID READ — Hard disk identification read
  • FD TEST — Floppy disk test
  • Port test results: “=======> Port Test OK” / “=======> Port Test Error”
  • HDD test results: “=======> HDD OK” / “=======> HDD NG!”
  • Free capacity display: “Fre Capa: %3.1f [MB]”
  • HD type identification: “HD-TYPE : “

These indicate a service/diagnostics mode accessible during development or field service.

Registered Object Names (corrected — these are firmware names, not PC-side callbacks)

This page previously listed names such as LyricBackColorCheck, FlsOverWrSwCatch, AttenHDFormatSwCatch, LBNMdBitCheck and DelTlxEditCheck under the heading “Windows DLL Callbacks”, describing them as callbacks used by the HD-TechManager5000 PC software. That attribution was wrong. Every one of those names is an entry in the HD-AE5000 firmware’s own object registry: the .data image at ROM 0x2F94B2 holds two index-parallel 70-entry arrays — 69 code pointers and 69 name pointers — and every code pointer lands inside this ROM, between 0x280395 and 0x28F2F7. HDAE5000_HardTestPage = 0x282811, HDAE5000_PC_DATA_LINK_PAGE = 0x284E53, HDAE5000_LyricBackColorCheck = 0x286065, and so on for all 69.

The full 69-name registry, with the ROM address of each handler, is on the HDAE5000 Resources & Object Registry page. The names are the developer’s own identifiers, which is why the naming conventions are so legible: *Check are validation callbacks, *Catch are event sinks, *Page/*PAGE are page constructors and Bitmap* are image providers.

Nothing here rules out the PC software using matching strings on its side of the wire — but the evidence on this page is firmware-side, and the section header claimed more than the evidence supported.

File Types

The HDAE5000 handles various KN5000 file types, identified by suffix codes:

Extension Suffix Full Name Description
.MD Md Melody MIDI melody files
.RCM Rcm Rhythm Composer Memory Custom rhythm patterns
.MSP Msp Music Style Programmer Custom style programs
.TM Tm Technical MIDI Technical MIDI data
.CMP Cmp Composer Composer sequences
.SQT Sqt Sequencer Track Sequencer track data
.PMT Pmt Performance Memory Track Performance memories
.LSW Lsw (Unknown) Possibly “Live Sound Workshop”
.TLX Tlx Technics Link Exchange files with other Technics products
.SEQ Seq Sequence Sequencer data files
.SQF Sqf Sequencer File Sequencer file (alternate format)
.TTX Ttx (Unknown) Possibly text/lyrics data
.SDA Sda (Unknown) Sound Data Archive or similar

File info debug strings in the firmware show adr and size fields for each type, indicating structured binary formats with address and size metadata. The rb (read binary) mode string appears paired with each extension, confirming binary file I/O.

The “Full Name” column above is older guesswork, and the firmware disagrees with several rows. The save- and delete-selection screens label the same nine suffixes on screen, and the two screens agree with each other suffix-for-suffix: LSW = CURRENT PANEL, PMT = PANEL MEMORY, SQT = SEQUENCER, CMP = COMPOSER, TM = SOUND MEMORY, MSP = MSP, RCM = RHYTHM CUSTOM, MD = USER MIDI SETTINGS, TLX = TECHNICS LYRICS (not “Technics Link”). The evidence is in the UI object table. The table above is kept as-is until someone reconciles it against a KN5000 manual, but where the two conflict, prefer the on-screen title.

The suffix set itself is not a guess. Sfx*BitCheck and Del*EditCheck in the object registry each run LSW, PMT, SQT, CMP, TM, MSP, RCM, MD, TLX in exactly that order; LBN*BitCheck repeats the first eight (there is no LBN entry for TLX); and the RAM_EDIT_* and DEL_EDIT_* families in the UI object table carry the same nine suffixes with an on-screen title attached to each.

Event, Message and Class Names (corrected)

The block at 0x29D97E is 660 bytes long and has two parts. Its first 16-bit word is 0x000D — and the label HDAE5000_RECORD_COUNT is right about that word: HDAE5000_Handler_Registration reads it with ld wa, (HDAE5000_RECORD_COUNT:24) and passes it as the record count (13) when registering handler 0x016A. The remaining 658 bytes are a name string pool holding 44 NUL-terminated names in three groups. Earlier text on this page said “46 named event handler callbacks”; the pool holds 44, and they are not all event handlers.

Each group is the target list of one pointer table inside the .data image at 0x2F94B2:

Group Count Pointer table Registered as
EV_* event names 13 HDAE5000_EventName_Table (ROM 0x2F9772) table 0x01CA, class id 0x0160000C (ResEventProc)
MT_* message names 18 HDAE5000_MessageName_Table (ROM 0x2F97AC) table 0x01EA, class id 0x0160000D (ResMethodProc)
UI class names (*Proc) 13 HDAE5000_ClassName_Table (ROM 0x2F9832) table 0x040A, class id 0x01600001 (FunctionProc)

The values 0x0160000n are class ids (entry n of the main CPU’s root class table), not “PPI ports” as this page used to say. See UI Framework — Module numbers. Because object table 0x1CA holds the event names, event 0x01CA0000 + n is entry n of HDAE5000_EventName_Table. The code’s uses agree: 0x01CA0004 (EV_TICKS) carries the song position to the lyric box, and 0x01CA0008/0x01CA0009 (EV_Alldraw/EV_Drawsyllable) ask it to redraw. See Event Codes.

Event Callbacks (EV_ prefix)

Triggered by system events during file operations and lyrics display:

Name Purpose
EV_DrawFDText Draw file dialog text
EV_InitFDFileSelect Initialize file selection dialog
EV_Scrollline Scroll line in display
EV_Drawsyllable Draw lyrics syllable
EV_Alldraw Redraw entire display
EV_Initlyrics Initialize lyrics display
EV_SETPOSITION Set playback position
EV_BEATMESSAGE Beat/timing message
EV_TICKS Tick counter event
EV_INITLYRICPARAM Initialize lyrics parameters
EV_TimerBack Timer callback
EV_AfterLoad Post-load event handler
EV_SeqStop Sequencer stop event

Method Callbacks (MT_ prefix)

Method dispatchers for UI operations:

Name Purpose
MT_FdSaveLyric Save lyrics to file
MT_FdLoadLyric Load lyrics from file
MT_FdInfo File dialog info display
MT_FdFreshUp Refresh file dialog
MT_SelectDelFile Select file for deletion
MT_SelectDEL Confirm deletion
MT_LOOP Loop control
MT_SetStrAdr Set string address
MT_SelectAll Select all items
MT_SelectSAVE Save selection
MT_SelectOK / MT_SelectOK2 Confirm selection
MT_AckSelNum Acknowledge selection number
MT_ReqSelNum Request selection number
MT_SetSelNum Set selection number
MT_ChangeSelNum Change selection number
MT_UnderFlow Underflow handler
MT_OverFlow Overflow handler

UI Class Procedures

The 13 UI classes described by HDAE5000_RECORD_TABLE (0x29C0AA, 13 records of 24 bytes) are class definitions in the main CPU’s own format: {proc, parent, allsize, selfsize, name, propdata, propname} (see UI Framework — The class system describes itself). +0x10 points at the per-field type-letter string and +0x14 at the field-name list inside the RAM copy of the .data image. Signature length equals parameter count for all 13 records (11, 2, 0, 0, 1, 0, 0, 0, 0, 0, 0, 6, 3). The source types them as 13 records (HDAE5000_Record_SelectList …). Since commit 1b98c8603 (2026-10-02) it spells +0x04 as the parent class (.long NAKA_CLASS_VwBox …) and +0x08/+0x0A as allsize/selfsize. notes/hdae-class-records-2026-10-02/hdae_class_fields_probe.py proves those fields for all 13 records, and hdae5000/tools/verify_record_table.py checks their procedure, name and signature pointers.

This table used to be spelled as roughly 6,150 lines of instruction mnemonics that re-assembled byte-exact. A byte-identity rebuild cannot catch that kind of misreading.

Class Procedure Parent (root class) Params Component
SelectList 0x2807D9 VwBox 11 Main selection list
DbMemoCl 0x28122A DbMemo 2 Database/memo
TtlScreenR 0x280489 TtlScreen 0 Title screen
AcHddNamingWindow 0x281411 Window 0 HDD naming dialog
IvHddNaming 0x282681 PsInvisibleBox 1 HDD naming input
HDTitleMenu 0x2827A8 AcTitleMenu 0 DISK MENU entry
TtlScreenR2 0x280567 TtlScreen 0 Title screen variant
TtlScreenR3 0x280645 TtlScreen 0 Title screen variant
AcWindowPage1 0x28043C AcWindowPage 0 Window page
IvScreenR2 0x280723 IvScreen 0 Screen input handler
AcLanguageText1 0x28B554 AcLanguageText 0 Language text display
LyricBox 0x28CD08 VwBox 6 Lyrics display box
FDFileSelect 0x28E61B PsInvisibleBox 3 File selection dialog

All 13 obey allsize = parent.allsize + selfsize against the main CPU’s class sizes; the per-class check is on HDAE5000 Homebrew.

UI Pages

Page Name Purpose
PC_DATA_LINK_PAGE PC data link interface
HDD_UTIL_PAGE HDD utility operations

Both are entries in the object registry, at ROM 0x284E53 and 0x284596 respectively. A further 14 top-level screens are published under their own registration IDs — see Screens, and 789 UI objects with 178 developer names are catalogued in the UI object table.

Trilingual UI Messages

The firmware contains a large block of trilingual UI messages at 0x2E3704 (HDAE5000_Multilingual_Messages, 9,340 bytes). Messages appear in groups of three: English, German, French. French strings use Latin-1 encoding for accented characters (e.g. é=0xE9, è=0xE8, ê=0xEA).

Sample messages:

English German French
Would you really delete the selected directory? Moechten Sie das angewaehlte Verzeichnis wirklich loeschen? Voulez-vous effacer ce répertoir?
Would you really delete the selected title? Moechten Sie den angewaehlten Titel wirklich loeschen? Voulez-vous effacer ce titre?
COPY FD TO HARD DISK COPY FD TO HARD DISK COPY FD TO HARD DISK

Note: German strings use ASCII transliterations for umlauts (“oe” for ö, “ae” for ä), while French uses actual Latin-1 accented characters.

Additional data sections. The hdae lane re-cut the C program’s .rodata object by object from the addresses the code names (scripts/generators/gen_hdae5000_rodata.py). The old span labels (Config_Strings, Test_Strings, Dir_Strings, Char_Tables, Path_Strings, UI_Icons, Lang_Codes) are gone:

Address Label Content
0x29BAFC registered-object name pool the 69 registered-object names. Was decoded as instructions until b893ee8
0x29BFE0 HDAE5000_UI_Config class field names (“infofont”, “reversecolor”, “fontcolor”, “dial”, …)
0x29D97E HDAE5000_RECORD_COUNT 0x000D word + the 44 EV_*/MT_*/*Proc names
0x2A849A HDAE5000_GFX_INIT_PARAMS misnomer: 15 screen and switch-catch name strings, among them "TT_HDDEXT", the name RegisterTitle gets
0x2E1C82 - 0x2E3063 objects from HDAE5000_Str_V206i on the C program’s .rodata: version string “V2.06i”, status/test/directory strings, printf formats, UI object-id lists, templates, and the 51 compiled switch tables (typed by scripts/converters/hdae5000_switch_tables.py)
0x2E3064 HDAE5000_Palette_Button01 grey-ramp palette of the STORE button; no reader in this ROM (an admission in the source)
0x2E3464 HDAE5000_Bitmap_Button01 the STORE button, 42×15 8bpp
0x2E36DA HDAE5000_Str_Aclanguage1 “AcLanguage1” and the language codes “LANENG00” / “LANDEU00” / “LANFRA00”
0x2E3704 HDAE5000_Multilingual_Messages 9,340 B of trilingual UI messages (EN/DE/FR), 232 strings, all pushed by HDAE5000_AcLanguageText1Proc’s 80-entry switch
0x2E5B80 - 0x2E5DCD objects from HDAE5000_Str_Blank40 on the lyrics module’s .rodata: lyric messages, “TLhd”/”TLtr”, “.TLX”/”.TTX”/”.MID” (47 objects)
0x2F8DCE HDAE5000_Display_Params file extensions, the part-signature table at 0x2F8E20, format strings, debug-trace banners

The old labels’ spans had run through the STORE button’s palette and bitmap. That is why their bytes decoded as runs of )BBBB… and BZZZZ…: pixel value 0x29 prints as ), 0x42 as B, 0x5A as Z.

Embedded Graphics (rewritten)

One layout rule, six pairs

The graphics in this ROM are laid out by a single rule, established in commit b7752bc for five pairs:

Every bitmap is immediately preceded, with no padding, by its own 1,024-byte palette — 256 entries of RGBX, where the fourth byte of every entry is 0x00.

The four-slice split that this page used to describe was wrong in a way worth recording: its boundaries fell inside pictures. HDAE5000_Font_Data began at 0x2BA1A6, which is 0x11818 bytes into the first bitmap, so one slice ended mid-picture and the next began mid-picture. That label is retired: there is no font data anywhere in the region.

The evidence for the boundaries is the copy code itself. The title-screen class procedures (HDAE5000_TtlScreenRProc, HDAE5000_TtlScreenR2Proc and HDAE5000_TtlScreenR3Proc, plus HDAE5000_IvScreenR2Proc for the standalone palette-2 reload) never move a full-screen bitmap in one call — HDAE5000_MemCopy takes a 16-bit length, so each picture goes as two 0x9600-byte halves followed by a 0x400-byte palette copy:

Site Source Length Destination
0x2804BB 0x2A898E (HDAE5000_Bitmap_TitleLogo) 0x9600 0x056800
0x2804CE 0x2B1F8E (HDAE5000_Bitmap_TitleLogo+0x9600) 0x9600 0x05FE00
0x2804E1 0x2A858E (HDAE5000_Palette_TitleLogo) 0x0400 0x069400
0x280599 / 0x2805AC / 0x2805BF bitmap 2 halves + palette 2   same three destinations
0x280677 / 0x28068A / 0x28069D bitmap 3 halves + palette 3   same three destinations
0x280753 0x2BB58E 0x0400 0x069400 (palette 2 reloaded on its own)

Those three destinations are the addresses this site already documents as OFFSCREEN_BUFFER_2, OFFSCREEN_BUFFER_3 and OFFSCREEN_BUFFER_4 (see Display Subsystem). A copy block first calls a resource descriptor with request 0x01E000A1 and checks the answer for NULL, then copies from immediates equal to the same addresses: the calr at 0x2804B1 resolves to HDAE5000_Alloc_Memory_1 (0x28030E), and the one at 0x280749, guarding the standalone palette-2 reload, resolves to HDAE5000_Alloc_Memory_2 (0x28033B).

The bitmaps

# Palette Bitmap Geometry Bytes Contents
1 0x2A858E 0x2A898E 320×240 @ 8bpp 76,800 “HD-AE5000” wordmark embossed over a photograph of a bare hard-disk mechanism
2 0x2BB58E 0x2BB98E 320×240 @ 8bpp 76,800 The same drive-mechanism photograph without the wordmark — the second frame of the title sequence
3 0x2CE58E 0x2CE98E 320×240 @ 8bpp 76,800 File-selection panel background: three sunken list wells on a blue stone fill, grey scroll strip along the bottom
4 0x2E158E 0x2E198E 27×27 @ 8bpp, 28-byte stride 756 Hard-disk platter-and-head icon
5 0x2E3064 0x2E3464 42×15 @ 8bpp 630 A raised STORE button — see below
6 0x2E5DCE 0x2E61CE 320×240 @ 8bpp 76,800 Boot splash — see below

Palettes 1 and 2 are byte-identical: the two title frames share one palette. Palette 4 is the Windows halftone palette (all 256 entries distinct); palette 5 is an exact identity greyscale ramp (entry i = i,i,i). Total graphics content: 308,586 bytes of pixels plus 6,144 bytes of palette = 314,730 bytes, 60% of the 512KB ROM.

Each bitmap has a resource descriptor — a small constant-lookup routine that answers three request codes. Despite the Alloc_Memory names inherited from an earlier pass, these routines allocate nothing:

Routine Address A1 → base A2 → width A3 → height Firmware’s own name
HDAE5000_Alloc_Memory_1 0x28030E 0x2A898E 320 240 —
HDAE5000_Alloc_Memory_2 0x28033B 0x2BB98E 320 240 —
HDAE5000_Alloc_Memory_3 0x280368 0x2CE98E 320 240 —
HDAE5000_BitmapHdd_icon 0x280395 0x2E198E 27 27 BitmapHdd_icon
HDAE5000_BitmapButt01 0x28B527 0x2E3464 42 15 BitmapButt01
HDAE5000_Alloc_Memory 0x28F543 0x2E61CE 320 240 —

The A1 answer is the bitmap base, not a palette pointer. This page and the disassembly comments both used to say “palette data pointer”; commit abdf0ea corrected the summary comments, and the firmware settles it independently — object 39 of the registry pairs the handler 0x280395 with the name BitmapHdd_icon.

Two of the six descriptors are published to the main CPU by name (BitmapHdd_icon, BitmapButt01); the other four are reached from inside this ROM.

The boot splash at 0x2E61CE

HD-AE5000 boot splash

320×240, 8-bit indexed — ROM offset 0x661CE (CPU 0x2E61CE), rendered with its own palette at 0x2E5DCE

This image had never been identified before commit abdf0ea. It reads “HD-AE5000 / Version 2 / Start-up ! / Please wait . . .” in red and white over a photograph of an opened hard disk, and it is the first thing an HD-AE5000-equipped KN5000 puts on screen.

It had been hiding in plain sight: the old HDAE5000_Palette_BootSplash slice claimed to be “VGA palette data (256 entries)” but ran for 0x13000 bytes — 0x400 of palette followed by an entire unlabelled bitmap. Four independent facts pin it down:

  • its resource descriptor at 0x28F543 answers 0x2E61CE / 320 / 240;
  • HDAE5000_Boot_Init copies exactly 2 × 0x9600 = 76,800 bytes of it into VRAM;
  • 320 × 240 × 1 byte = 76,800 exactly, and 0x2E61CE + 0x12C00 = 0x2F8DCE = HDAE5000_Display_Params, so the bitmap tiles the gap with nothing left over;
  • rendered with the palette immediately above it, it is legible text.

The picture is hdae5000/images/HDAE5000_SplashScreen.png in the disassembly repo; scripts/build/hdae5000_images.py build writes the bytes the source .incbins from it, byte-identical to ROM 0x2E61CE. (The raw HDAE5000_SplashScreen.bin extraction was deleted on 2026-10-31: nothing read it.)

A sixth pair: the STORE button

HDAE5000_BitmapButt01 (0x28B527) is registered under the firmware’s own name BitmapButt01, object 65 of the registry. It answers A1 = 0x2E3464, A2 = 42, A3 = 15. 42 × 15 = 630 bytes, and the 1,024 bytes immediately before it (0x2E3064) are a well-formed RGBX palette, a grey ramp with byte 3 = 0x00 throughout. Rendered, the bitmap is a raised button reading STORE. The disassembly now labels the pair HDAE5000_Palette_Button01 / HDAE5000_Bitmap_Button01. The three older labels that cut across it are gone. The source’s header on the palette admits that no code in this ROM reads it; whether the main CPU does (at the bitmap pointer − 0x400) is not established.

Palette handling at run time

The HDAE5000 uses memory-mapped VGA DAC registers for palette control. VGA I/O ports are mapped to CPU address 0x170000 + port_number:

VGA Port CPU Address Function
0x3C8 0x1703C8 Palette index register (write)
0x3C9 0x1703C9 Palette data (R, G, B sequentially)

Palette Loading Sequence:

  1. HDAE5000_Load_Palette at 0x28F8E0 loops through indices 255 to 0
  2. For each index, calculates offset = index × 4 into palette data
  3. Calls HDAE5000_Palette_Setup at 0x28F813 with index and RGBX pointer
  4. Palette_Setup writes index to 0x3C8, then R/G/B values to 0x3C9
  5. Each 8-bit ROM channel is narrowed with srl a, 4; if bit 3 of the source byte is set and the byte is below 0xF0, the result is incremented (round-to-nearest without overflowing the top value)

Only the boot-splash palette goes to the DAC at start-up. The other palettes travel with their bitmaps into OFFSCREEN_BUFFER_4 and are installed by the main CPU when the corresponding screen is drawn.

See the Image Gallery for the images themselves.

ROM Layout (rewritten)

The table below tiles the entire 512KB ROM with no gaps and no overlaps — the 51 rows sum to exactly 524,288 bytes.

Address Size Contents
0x280000-0x28001F 32 Header: “XAPR4” magic, entry vectors (JP 0x28F576, JP 0x28F662)
0x280020-0x28030D 750 HDAE5000_Handler_Registration — registers 11 object tables and title 0x7F (DISASSEMBLED)
0x28030E-0x2803C1 180 Four bitmap resource descriptors, 45 bytes each (DISASSEMBLED)
0x2803C2-0x28F542 61,825 Code section 1: HDAE5000_UiState_Reset, screens, list and filesystem UI, lyrics player
0x28F543-0x28F56F 45 HDAE5000_Alloc_Memory — boot-splash resource descriptor (DISASSEMBLED)
0x28F570-0x28F575 6 HDAE5000_Get_Init_Flag (DISASSEMBLED)
0x28F576-0x28F661 236 HDAE5000_Boot_Init (DISASSEMBLED)
0x28F662-0x28F6DF 126 HDAE5000_Frame_Handler (DISASSEMBLED)
0x28F6E0-0x28F780 161 HDAE5000_Frame_Handler_Status (DISASSEMBLED)
0x28F781-0x28F784 4 HDAE5000_Frame_Handler_Exit — JP to PPORT (DISASSEMBLED)
0x28F785-0x28F7DC 88 HDAE5000_Clear_Work_Buffer (DISASSEMBLED)
0x28F7DD-0x28F7ED 17 HDAE5000_Delay_Loop (DISASSEMBLED)
0x28F7EE-0x28F812 37 HDAE5000_VGA_Port_Write (DISASSEMBLED)
0x28F813-0x28F8DF 205 HDAE5000_Palette_Setup (DISASSEMBLED)
0x28F8E0-0x28F90A 43 HDAE5000_Load_Palette (DISASSEMBLED)
0x28F90B 1 HDAE5000_Finalize_Init — just RET
0x28F90C-0x2953E1 23,254 HDAE5000_HD_FormatDrive (was HDAE5000_Display_Init), the song/FLS record layer, song load/save/delete, PC-link services
0x2953E2-0x295411 48 PC-link command table, entries 6-17 of the 20 (HDAE5000_PPORT_Cmd_Table)
0x295412-0x295641 560 entries 18-20 of that table, then the PC-link status records (24-byte stride)
0x295642-0x2971A2 7,009 PC-link command handlers HDAE5000_PPORT_Cmd01_SendInfosAboutHd … HDAE5000_PPORT_Cmd20_SendXapFileFlash
0x2971A3-0x29AE9E 15,612 HDAE5000_Check_HD_Present, HDAE5000_HD_Init, the ATA driver, the FAT/cluster-chain layer, table I/O, sprintf library
0x29AE9F-0x29AF2C 142 HDAE5000_MemCopy, HDAE5000_MemFill, HDAE5000_StrCat (was HDAE5000_StrCopy) (DISASSEMBLED)
0x29AF2D-0x29BAFB 3,023 Buffer validate, memcompare, multiply, divide
0x29BAFC-0x29BFDF 1,252 Registered-object name pool (69 names)
0x29BFE0-0x29C0A9 202 HDAE5000_UI_Config — class parameter-name strings
0x29C0AA-0x29D97D 6,356 HDAE5000_RECORD_TABLE: 13 class definitions × 24 B, a 5,832-byte zero gap, then the class names and signatures (typed as data; see UI Class Procedures)
0x29D97E-0x29DC11 660 EV_* / MT_* / *Proc name pool (44 names)
0x29DC12-0x2A5D2B 33,050 UI object pool: the 769 ROM-resident objects of the GUI tree in hdae5000/hdae5000_ui_tree.s (one NAKA class macro per object, nested; menu map)
0x2A5D2C-0x2A6983 3,160 HDAE5000_UiObject_PtrTable: object table 0x7F, 790 × .long, generated from the tree (ui_object_table)
0x2A6984-0x2A75DB 3,160 HDAE5000_UiObjectName_PtrTable: 790 × .long, generated from the tree (ui_name_table)
0x2A75DC-0x2A8499 3,774 HDAE5000_UiObjectName_Pool — 178 names + padding
0x2A849A-0x2A858D 244 15 screen / switch-catch name strings (label HDAE5000_GFX_INIT_PARAMS, a misnomer)
0x2A858E-0x2A898D 1,024 Palette 1 (TitleLogo)
0x2A898E-0x2BB58D 76,800 Bitmap 1 — TitleLogo, 320×240 8bpp
0x2BB58E-0x2BB98D 1,024 Palette 2 (DriveMech) — byte-identical to palette 1
0x2BB98E-0x2CE58D 76,800 Bitmap 2 — DriveMech, 320×240 8bpp
0x2CE58E-0x2CE98D 1,024 Palette 3 (FilePanel)
0x2CE98E-0x2E158D 76,800 Bitmap 3 — FilePanel, 320×240 8bpp
0x2E158E-0x2E198D 1,024 Palette 4 (HddIcon) — Windows halftone
0x2E198E-0x2E1C81 756 Bitmap 4 — HddIcon, 27×27 8bpp with 28-byte stride
0x2E1C82-0x2E3063 5,090 the C program’s .rodata, object by object (strings, formats, object-id lists, 51 switch tables)
0x2E3064-0x2E3463 1,024 Palette 5 — greyscale ramp (HDAE5000_Palette_Button01)
0x2E3464-0x2E36D9 630 Bitmap 5 — STORE button, 42×15 8bpp (HDAE5000_Bitmap_Button01)
0x2E36DA-0x2E3703 42 “AcLanguage1”, “LANENG00”, “LANDEU00”, “LANFRA00”
0x2E3704-0x2E5B7F 9,340 HDAE5000_Multilingual_Messages (EN/DE/FR)
0x2E5B80-0x2E5DCD 590 the lyrics module’s .rodata (47 objects)
0x2E5DCE-0x2E61CD 1,024 Palette 6 (HDAE5000_Palette_BootSplash) — the boot-splash palette
0x2E61CE-0x2F8DCD 76,800 Bitmap 6 — boot splash, 320×240 8bpp
0x2F8DCE-0x2F94B1 1,764 HDAE5000_Display_Params — file extensions, part-signature table, format strings, debug-trace banners
0x2F94B2-0x2FA133 3,202 Initialised .data image, copied to RAM 0x23952A
0x2FA134-0x2FFFFF 24,268 ROM tail: the 16-bit value 0x000E, then 24,266 bytes of 0x00

The last non-zero byte in the ROM is at file offset 0x7A134 (CPU 0x2FA134). Earlier versions of this page split the final region as “3,266B config + 24,204B padding”; the real split is 3,202 + 24,268, and the .data image’s length is not a guess — HDAE5000_Clear_Work_Buffer copies exactly 0x0C82 bytes.

Initialised .data image at 0x2F94B2

HDAE5000_Clear_Work_Buffer (0x28F785) copies this 3,202-byte block verbatim to RAM 0x23952A during boot. It is the firmware’s .data section: nine pointer tables holding 96 code pointers and 166 string pointers, plus the initial values of the window/dialog state records.

Every table boundary is confirmed by the entry counts that HDAE5000_Handler_Registration passes to the main CPU — the registration counts 0x45 (69), 0x0D (13) and 0x0E (14) are exactly the entry counts of these tables:

ROM RAM Entries Registered as Contents
0x2F94B2 0x23952A 69 ID 0x012A Object handler entry points
0x2F95CA 0x239642 69 ID 0x042A Object names (parallel array)
0x2F96E2 0x23975A 13 lists via RECORD_TABLE+0x14 Per-class parameter names
0x2F9772 0x2397EA 13 ID 0x01CA EV_* event names
0x2F97AC 0x239824 18 ID 0x01EA MT_* message names
0x2F97FA 0x239872 13 ID 0x010A UI class procedures
0x2F9832 0x2398AA 13 ID 0x040A UI class names (parallel array)
0x2F986A 0x2398E2 — — Window/dialog run-time state initial values
0x2F9F5A 0x239FD2 14 ID 0x014A Screen procedures
0x2F9F96 0x23A00E 14 ID 0x044A Screen names (parallel array)

The block must be copied rather than read in place: several of its pointers are already resolved to RAM addresses inside the copy (0x23999A, 0x239B84, 0x239B86, 0x239B88), which only make sense once the image is at 0x23952A.

Full listings — the 69 registered objects, the 14 screens, the 13 classes and their parameter names — are on the HDAE5000 Resources & Object Registry page.

PPORT Command Handler Jump Table

The PC-link command loop (HDAE5000_PPORT_CommandLoop) takes command byte n (1-20) and jumps through entry n − 1 of the 20-entry HDAE5000_PPORT_CommandTable (0x2953CE). The 12-entry block at 0x2953E2 that this page used to list as commands 1-12 is entries 6-17. Each handler is named after the status record it shows first:

Command Address Handler
06 0x2958D6 HDAE5000_PPORT_Cmd06_WriteFsbToHd
07 0x295914 HDAE5000_PPORT_Cmd07_LoadHdToMemory
08 0x2959F6 HDAE5000_PPORT_Cmd08_SendDataToPc
09 0x295D3C HDAE5000_PPORT_Cmd09_SendFilesToPc
10 0x29605A HDAE5000_PPORT_Cmd10_RcvDataFromPc
11 0x296294 HDAE5000_PPORT_Cmd11_SaveMemoryToHd
12 0x29632A HDAE5000_PPORT_Cmd12_Nothing
13 0x29633C HDAE5000_PPORT_Cmd13_RcvDataFromPc
14 0x2964A6 HDAE5000_PPORT_Cmd14_SendInfosToPc
15 0x296588 HDAE5000_PPORT_Cmd15_Nothing
16 0x29659A HDAE5000_PPORT_Cmd16_DeleteFiles
17 0x296680 HDAE5000_PPORT_Cmd17_FormatHd

Commands 01-05 (HDAE5000_PPORT_Cmd01_SendInfosAboutHd … HDAE5000_PPORT_Cmd05_RcvFsbFromPc, 0x295642-0x295802) and 18-20 (HDAE5000_PPORT_Cmd18_SwitchHdMotorOff, HDAE5000_PPORT_Cmd19_Nothing, HDAE5000_PPORT_Cmd20_SendXapFileFlash) complete the table. The handlers call 30 PC-link services, HDAE5000_PPORT_Svc01_GetInfoBlockPointer … HDAE5000_PPORT_Svc30_WakeUpMainTask. Services 1-25 are named from the banners of a compiled-out debug trace. See HDAE5000 Filesystem.

Key Routine Addresses

Code Section 1 (0x280020-0x28F575)

Address Name Description
0x280020 HDAE5000_Handler_Registration Registers 11 object tables via RegisterObjectTable, then title 0x7F via RegisterTitle (DISASSEMBLED)
0x28030E HDAE5000_Alloc_Memory_1 Bitmap resource descriptor → 0x2A898E, 320×240
0x28033B HDAE5000_Alloc_Memory_2 Bitmap resource descriptor → 0x2BB98E, 320×240
0x280368 HDAE5000_Alloc_Memory_3 Bitmap resource descriptor → 0x2CE98E, 320×240
0x280395 HDAE5000_BitmapHdd_icon Bitmap resource descriptor → 0x2E198E, 27×27, named after the firmware’s own registry name BitmapHdd_icon
0x2803C2 HDAE5000_UiState_Reset Resets the browser selection, the load-by-number block and the save options, then HDAE5000_Set_Menu_Visibility(1); called at the end of Boot_Init. The old label HDAE5000_Register_Frame named a 9,266-byte conversion region, not a routine
0x28B527 HDAE5000_BitmapButt01 Bitmap resource descriptor → 0x2E3464, 42×15 (STORE button)
0x28F543 HDAE5000_Alloc_Memory Bitmap resource descriptor → 0x2E61CE, 320×240 (boot splash)
0x28F570 HDAE5000_Get_Init_Flag Return HDAE5000_Check_HD_Present’s stored result (0x230EDA)

Code Section 2 (0x28F662-0x2FFFFF)

Address Name Description
0x28F662 HDAE5000_Frame_Handler Main entry: posts the song position to an open lyric box
0x28F6E0 HDAE5000_Frame_Handler_Status Watches bit 2 of the main CPU’s sqsrtc byte
0x28F781 HDAE5000_Frame_Handler_Exit Exit via JP to HDAE5000_PPORT_ServicePending at 0x29501C
0x28F785 HDAE5000_Clear_Work_Buffer Clear 0xF52A bytes at 0x22A000, copy the 0xC82-byte .data image
0x28F7DD HDAE5000_Delay_Loop Nested delay loop - decrements XWA until zero
0x28F7EE HDAE5000_VGA_Port_Write Write byte C to VGA port WA (mapped at 0x170000+port)
0x28F813 HDAE5000_Palette_Setup Set one VGA palette entry (index in A, RGB in XBC)
0x28F8E0 HDAE5000_Load_Palette Load all 256 palette entries from ROM data
0x28F90B HDAE5000_Finalize_Init Just returns - 1-byte stub
0x28F90C HDAE5000_HD_FormatDrive Format the drive, bracketed by main-CPU callbacks (was HDAE5000_Display_Init)
0x29501C HDAE5000_PPORT_ServicePending PC-link entry from the frame handler (was HDAE5000_PPORT_Handler)
0x2950F8 HDAE5000_PPORT_CallService From the PC-link coroutine, ask the main context to run service WA (59 call sites; was HDAE5000_Display_String)
0x2952D6 HDAE5000_PPORT_LinkMain PC-link main (was HDAE5000_PPORT_Menu)
0x2971A3 HDAE5000_Check_HD_Present Runs HDAE5000_HD_Init (SRAM test, drive bring-up) and returns its step code, 0 = ready
0x2999B2 HDAE5000_Version_Info 112-byte version record (author, “2.33J”, “2.21”, “TECHNICS KN5000”), copied into the drive’s signature sector by HDAE5000_HD_SaveSettings
0x29AE9F HDAE5000_MemCopy Memory copy utility (optimized word/dword operations)
0x29AEC7 HDAE5000_MemFill Memory fill (aligns to 4-byte, uses 32-bit writes)
0x29AF0B HDAE5000_StrCat Append a string: finds the destination’s end, copies with null (was HDAE5000_StrCopy)
0x29B72D HDAE5000_Multiply 32-bit multiply routine
0x29BAFC HDAE5000_Str_* pool The 69 registered-object name strings
0x29BFE0 HDAE5000_UI_Config Class parameter-name strings
0x29C0AA HDAE5000_RECORD_TABLE 13 UI class records, 24 bytes each
0x29D97E HDAE5000_RECORD_COUNT Record-count word (0x000D) + name pool: 44 EV_* / MT_* / *Proc strings
0x29DC12 HdaeUi_HDDMENU … 769 UI object records, one class macro per object in hdae5000_ui_tree.s (the records are HdaeUi_<name>)
0x2A5D2C HDAE5000_UiObject_PtrTable 790-entry pointer array (was GFX_DATA_1)
0x2A6984 HDAE5000_UiObjectName_PtrTable 790-entry pointer array (was GFX_DATA_2)
0x2A75DC HDAE5000_UiObjectName_Pool The 178 UI object names
0x2A849A HDAE5000_GFX_INIT_PARAMS Misnomer — 15 screen/switch-catch name strings
0x2A858E HDAE5000_Palette_TitleLogo 256 RGBX entries
0x2A898E HDAE5000_Bitmap_TitleLogo 320×240 8bpp
0x2BB58E HDAE5000_Palette_DriveMech 256 RGBX entries (= TitleLogo palette)
0x2BB98E HDAE5000_Bitmap_DriveMech 320×240 8bpp
0x2CE58E HDAE5000_Palette_FilePanel 256 RGBX entries
0x2CE98E HDAE5000_Bitmap_FilePanel 320×240 8bpp
0x2E158E HDAE5000_Palette_HddIcon Windows halftone palette
0x2E198E HDAE5000_Bitmap_HddIcon 27×27 8bpp, 28-byte stride
0x2E1C82 HDAE5000_Str_V206i First object of the C program’s .rodata (“V2.06i”)
0x2E5DCE HDAE5000_Palette_BootSplash Boot-splash palette
0x2E61CE HDAE5000_Bitmap_BootSplash 320×240 8bpp boot splash
0x2F8DCE HDAE5000_Display_Params File extensions (.SEQ through .TTX)
0x2F94B2 HDAE5000_DataSegmentImage Initialised .data image, copied to 0x23952A

Retired labels: HDAE5000_Font_Data (0x2BA1A6 — no font exists there, and the address falls inside bitmap 1), HDAE5000_GFX_DATA_1 / HDAE5000_GFX_DATA_2 (0x2A5D2C / 0x2A6984 — pointer tables, not graphics).

Frame Handler Flow

The frame handler at 0x28F662 performs these steps (from its header in hdae5000/hdae5000_ui_display.s):

  1. If no lyric box is open (0x23A19E = -1), skip to step 4
  2. Read sq_beadt and sqbtof through the addresses at 0x230ED6 / 0x230ED2; position = sqbtof × 12 + (sq_beadt >> 3) + 2, stored at 0x230EC6
  3. When (sq_beadt >> 3) + 1 changed, RootFn_ApPostEvent(lyric box, 0x01CA0004, &0x230EC2); the lyric box then runs HDAE5000_Lyrics_PlayToPosition
  4. (HDAE5000_Frame_Handler_Status) When bit 2 of the sqsrtc byte (address at 0x230ECC) falls to 0 and HDAE5000_Fls_GetAutoLoadPending is 1: on the HD title (GetTitleNow = 0x01A0007F) post the file-load events, else HDAE5000_RequestTitle15(0x7F)
  5. Exit via JP to HDAE5000_PPORT_ServicePending at 0x29501C

The earlier reading (“workspace pointer at 0x23A19E”, “handler states”, “display offset”, “registered callbacks”) was wrong on every variable.

Handler Registration (0x280020) – FULLY DISASSEMBLED

The HDAE5000_Handler_Registration routine registers 11 object tables with the main CPU via RegisterObjectTable (0xFA42FB), then makes a final call through offset 0x0270, which is RegisterTitle (0xFA4D80): title 0x7F, "TT_HDDEXT", module 0x0A. It is not a graphics initialization. Each table registration copies a 14-byte parameter block to object_table[index * 14] at the workspace base (0x027ED2).

For table 0x016A (class id 0x01600004), the proc is read from workspace[0x0E0A][0x0168], which resolves to ClassProc (0xFA44E2), the proc of every module’s class table. The firmware’s names for the dispatch system are SendEvent (0xFA9660), ClassProc (0xFA44E2), ObjectProc (0xFA3D85), InheritedProc (0xFA4409), PostEvent (0xFA9752) and ApPostEvent (0xFA9D58).

Registration Structure (14 bytes on stack):

Offset Size Field Description
0x00 4 Class id e.g. 0x01600004 = root class Class (not a “PPI port”)
0x04 4 Proc the class’s procedure, read from the workspace function table
0x08 2 Count Number of entries in the data table
0x0A 4 Data Pointer Pointer to RAM or ROM data area

Registered Handlers (corrected):

ID Class id Proc offset Count Data Pointer Purpose
0x016A 0x01600004 0x0168 13, read from ROM 0x29D97E 0x29C0AA 13 UI class records
0x01CA 0x0160000C 0x013C 13, read from RAM 0x239822 0x2397EA EV_* event names (RAM copy)
0x01EA 0x0160000D 0x0140 18, read from RAM 0x239870 0x239824 MT_* message names (RAM copy)
0x012A 0x01600002 0x0248 0x45 0x23952A 69 object handler entry points
0x042A 0x01600002 0x0248 0x45 0x239642 69 object names
0x010A 0x01600001 0x0244 0x0D 0x239872 13 UI class procedures
0x040A 0x01600001 0x0244 0x0D 0x2398AA 13 UI class names
0x014A 0x01600003 0x024C 0x0E 0x239FD2 14 screen procedures
0x044A 0x01600003 0x024C 0x0E 0x23A00E 14 screen names
0x007F 0x01600010 0x0280 0x315 0x2A5D2C UI object descriptor table
0x037F 0x0160000F 0x0148 0x315 0x2A6984 UI object name table

The 0x315 field on the last two rows was previously annotated “size = 789 bytes”. It is an entry count: 0x315 = 789 objects, and both tables hold 790 .long entries — 789 plus a terminator. Commit db26eca corrected the annotation in six places.

Handler 0x016A Data Record Table (at 0x29C0AA): the module’s 13 class definitions, 24 bytes each. See UI Class Procedures above for the list with parameter counts and parent classes. Each definition’s +0x04 is its parent class id in the root module (0x0160), which is the inheritance chain InheritedProc follows. Class 5 (HDTitleMenu, a subclass of AcTitleMenu) is the DISK MENU entry, matching the slot+0x00 = 0x016A0005 class id.

RAM Test and HD Initialization (0x2971A3)

The HDAE5000_Check_HD_Present routine performs hardware validation:

  1. RAM Test Pattern Fill - Fills 32KB (0x230F1C-0x238F1C) with 0x5A5A
  2. Verify Pattern - Reads back and compares each word
  3. Clear RAM - Fills same range with 0x0000
  4. Bring the drive up - HDAE5000_ATA_SoftReset, HDAE5000_ATA_IdentifyDevice + HDAE5000_HD_ParseIdentify, read the settings sector, check its signature, copy the six setting bytes to 0x229DA9-0x229DAE, build blank tables, count free clusters, read the 323 table sectors, and end with HDAE5000_ATA_Standby

Returns (per HDAE5000_Check_HD_Present’s header): L = HDAE5000_HD_Init’s step code from 0x229D92. 0 = drive up and formatted. Otherwise the step that failed: 2 SRAM, 3 soft reset (a missing drive times out here), 5 IDENTIFY, 6 reading sector 1, 1 no signature (unformatted), 7 counting free clusters, 8 reading the tables. The page used to say “L = 0 if no HD present”. See HDAE5000 Filesystem.

Memory Utility Routines (0x29AE9F)

Optimized memory manipulation functions:

Address Function Description
0x29AE9F MemCopy Stack params: dest, src, count (16-bit). Uses LDIRW for words.
0x29AEC7 MemFill Aligns to 4-byte boundary, then uses 32-bit writes
0x29AF0B StrCat strcat: walks to the destination’s terminator, then copies the source with its null (was named StrCopy)

MemCopy’s 16-bit length is why every full-screen bitmap in this ROM is moved as two halves.

Version Info Block (0x2999B2)

309 bytes of .ascii (0x2999B2-0x299AE6), containing identification strings:

  • “Technics Software section M. Kitajima”
  • Version “2.33J”, also “2.21”
  • “TECHNICS KN5000”

These bytes also happen to form a chain of valid TLCS-900 encodings with no external references — a self-contained illusion of code that reassembles byte-exact either way, which is why the source now spells this span as .ascii rather than trusting a byte-identical disassembly.

Developer Credits (0x2A477C)

The label HDAE5000_Credits sits inside the UI descriptor pool and picks out two company identification strings:

  • “Technosoft, CH-Samstagern” — Swiss software company (Samstagern, Canton of Zurich)
  • “Pointstyle, CH-Buttisholz” — Swiss company (Buttisholz, Canton of Lucerne)

Caution: 0x2A477C is not a structure boundary. It falls in the middle of the 769-record UI object pool at 0x29DC12-0x2A5D2B, as do the neighbouring names HDAE5000_UI_Descriptors, HDAE5000_UI_Page_Titles, HDAE5000_Panel_Save_UI and HDAE5000_Demo_Data. The re-carved source keeps them as .set aliases for cross-reference.

The GUI is now written as a tree (hdae5000/hdae5000_ui_tree.s, since 2026-10-29). Each object is one line naming its NAKA class and its fields by their firmware names, and ui_sub / ui_endsub nest the children. The macros of hdae5000/shared/naka_ui_macros.s compute every object index and parent / child / sibling link from that nesting: in both v2.06i and v2.01i the object table is the preorder walk of the tree. No class body is undecoded any more: record #0, for example, is TtlScreenR HDDMENU, ..., exit=TITLE_DKMENU, window=HdaeUiVar_HDDMENU_window, icon=idICON_i129, title="HD-AE5000" (class 016A:0002, TtlScreenR < TtlScreen; see UI Framework). The generated menu map lists the 78 screens and dialogs, what opens each, and their widgets: HD-AE5000 Menu Map. (Until 2026-10-29 the pool was 769 typed records with numeric links, written by the retired gen_hdae5000_ui_pool.py, with 13,334 B of class body undecoded.)

Firmware Versions

Multiple firmware versions exist for the HDAE5000:

Version Release Date Notes
v1.10i 1998-07-06 Initial release
v1.15i 1998-10-13 Bug fixes
v2.01i 1999-01-15 Added lyrics display feature (the installer says “v2.0i”; the ROM’s own signature and MAME’s BIOS name are v2.01i)
v2.06i Unknown Analyzed version (2.33J internal)

v1.10i, v1.15i and v2.01i (filed there as “v2.0i”) are archived at archive.org; v2.06i is not in that item.

Four byte-exact source trees

Four versions of the HD-AE5000 ROM are dumped, and all four are now rebuilt byte for byte from source: v2.06i (hdae5000/), v2.01i, v1.15i and v1.10i (hdae5000_v2_01i/, hdae5000_v1_15i/, hdae5000_v1_10i/). make gate reports each IDENTICAL and checks the SHA-1 of the three git-ignored reference copies (verify-hdae5000-v201-reference, -v115i-reference, -v110i-reference). The reference is notes/hdae5000-versions-2026-10-24/README.md in the disassembly repository (lanes wave2/hdae5000-versions, 2026-10-24, and open/hdae-v1, 2026-10-30). Each tree was ported from the nearest other one by scripts/tools/port_hdae5000_version.py; v1.15i from v2.01i, which hdae5000_version_delta.py puts closer than v2.06i (234,727 B of estimated change against 238,707 B):

tree version string ported from objects (in RAM) classes ApFunctions messages (0x1EA) events (0x1CA)
hdae5000/ V2.06i - 789 (20) 13 69 18 13
hdae5000_v2_01i/ V2.01i v2.06i 786 (20) 13 67 18 13
hdae5000_v1_15i/ V1.15i v2.01i 758 (15) 10 63 13 3
hdae5000_v1_10i/ V1.10i v1.15i 755 (15) 10 63 13 3

The registry counts are the tables HDAE5000_Handler_Registration registers, read from each ROM; the object counts come from scripts/converters/hdae5000_ui_tree.py, whose layout check holds for all four versions. Each tree’s sources are 100.0 % source, 0 B verbatim (kn5000_source_coverage.py). In the data-include census snapshot docs/coverage/data-incbin-2026-10-30-04 the trees kn5000-hdae115 and kn5000-hdae110 read 8 generated includes each (4 of them from picture files, 231,156 B), 0 opaque, 0 generic.

v2.01i against v2.06i. v2.06i adds the lyric colour settings (HDAE5000_LyricForeColorCheck, HDAE5000_LyricBackColorCheck, their strings, setting bytes and language messages 65-67), a wider lyric window (x 0-319 against 19-302, lines of 40 bytes against 35) and file-format minor version 6 (v2.01i: 1); v2.01i’s HDD utility page can format the drive, v2.06i’s cannot. Its file-selection backdrop picture differs too (a magenta marble background and five buttons, against a plain dark one and three). The two GUIs are compared object by object on HD-AE5000 Menu Map.

v1.x against v2.x. The v1 firmware is the HD-AE5000 without lyrics: no lyric display, no lyric files (.TLX) on the hard disk or the floppy, and so eight song parts where v2 has nine (“TLhd”, “TLtr”, “.TLX”, “LyricBox” and “FDFileSelect” occur 0 times in either v1 dump). It also lacks the file-selection backdrop picture, the “select all” soft button, the PC link’s XAP flash service (services 0-27, against 0-30) and the PC program version check, and its boot screen has no “Version 2” line. Because it has no MT_SelectAll method, the HD-AE5000’s own message numbers after MT_SelectSAVE are one lower than in v2 (MT_SetStrAdr is 0x01ea0009), so the v1 trees have their own shared/event_codes.s. In both v1 dumps, entry 12 of the PC-link service table is not a valid pointer (it holds its stub’s address AND 0xfff), so that service cannot run ([INFERENCE] a fault of the link). Every tree spells the ROM header’s pointer to the end of the .data image as .long HDAE5000_Init_Data_End, and the naming keyboard’s empty-string pointers by symbol (the v2.x trees since disassembly b3b788b14, 2026-10-31).

v1.10i against v1.15i. Five of the 538 routines differ (routine-diff-v1_10i.txt): HDAE5000_AcLanguageText1Proc, which holds the language messages, and in code HDAE5000_LoadSong_Pmt, HDAE5000_SaveSong_Rcm, HDAE5000_HD_WriteStream and HDAE5000_PPORT_Svc27_DeleteSongParts. v1.10i lacks language message 62 (v1.15i’s evaluation date, “Evaluation 07-07-98”), and its overwrite query ATTEN_OVER_FILE is German-only (“!ACHTUNG!”, “Sie überschreiben einen bestehenden Titel. Sind Sie sicher?”) where v1.15i uses language messages.

The v1.x label review (2026-10-31, lane hdae-ledgers, notes/hdae5000-versions-2026-10-24/README.md, section “v1.x label review”). hdae5000_version_label_check.py had listed 7 rename suggestions on the v1 trees (6 in v1.15i, 1 in v1.10i). scripts/renaming/rename_hdae5000_v1_label_review.sed makes them: the PC link’s Cmd09 per-part blocks are .Lsfsb_bit<k> for mask 1 << k (v1.x has 8 part blocks, and the port had left them one block off), v2.x ninth-part labels on v1.x code with no ninth part are renamed for what they do, and v1.15i’s .Lrfsb_flag2_bit0 is .Lrfsb_exit (v1.x has no flag-byte-2 block). HDAE5000_RAM_PportPartMaskHi, a second name of the part mask in v1.x, is gone. The check now reports 0 rename suggestions in either v1 tree; its remaining “moved” rows (107 in v1.15i, 55 in v1.10i) are data whose first pointers moved and code that really changed.

The ledgers measure all four (same lane). The HD-AE5000 v2.01i, v1.15i and v1.10i, with KN5000 maincpu v8, v6, v5 and sub-CPU v1.40, are images of the data census, the dispatch census, the doc-quality census and the semantic score since disassembly cf8b62847 (keys hdae_v201, hdae_v115, hdae_v110). In the dispatch census every HD-AE5000 version has all its framed tables used (v2.01i 66 of 66, v1.15i and v1.10i 57 of 57), with NOT = newT = U-NOT = D-unres = 0 and no stale table: the census half of the full-coverage criterion. Their data-census figures and semantic names:

image CODE KNOWN-A KNOWN-B UNKNOWN FILLER bytes understood semantic names
hdae_v201 110,476 335,325 45,285 0 33,202 91.36% 6,071 / 6,071 100.00%
hdae_v115 95,884 255,022 42,946 0 130,436 91.81% 5,734 / 5,734 100.00%
hdae_v110 95,632 254,947 42,873 0 130,836 91.82% 5,720 / 5,720 100.00%

(The lane’s measurements, data_range_census.py --images ... and semantic_score.py’s names(); the doc-quality census counts 598, 539 and 539 routines, 187, 167 and 167 without a header, and no numeric operand. The committed snapshots docs/coverage/dispatch-census-2026-10-31-02 and doc-quality-2026-10-31-02, measured at disassembly 6ca33e656, and docs/badges/semantic-score.json read the same.) The committed snapshots are on ROM Reconstruction.

Open: the v1 trees’ prose blocks still quote v2.x facts in places (for example the header of HDAE5000_PPORT_Svc13_SendInfosAboutSong describes the lyrics part, which v1.x lacks), as the banner of each v1 tree warns; and port-edits-v1_10i/replay.sh rebuilds a byte-identical v1.10i that differs from the committed tree in comments and in two labels v1.x should not have (HDAE5000_Palette_FilePanel, HDAE5000_Bitmap_FilePanel), so the committed v1.10i is older than its recipe.

Hardware Features

Based on marketing documentation and firmware analysis:

  • Storage: 2.5” Hard Disk Drive (1.08 GB capacity)
  • Flash-ROM/SRAM: Quick directory access cache
  • Parallel Port: DB-15 connector for PC communication (the cable is DB-25 at the PC end)
  • Audio Outputs: Channel separation options

Limitations

Files cannot be played directly from the hard drive during performance. All file operations occur during breaks to protect the drive mechanism. This is a design decision to prevent disk wear during live performance.

HD-TechManager5000 PC Software

The HD-TechManager5000 is a Windows 95 application developed by Pointstyle (CH-Buttisholz, Switzerland) for Key Soft Service (CH-Schenkon). It communicates with the KN5000 via a CE-approved parallel port cable connected to the HD-AE5000’s DB-15 port on the rear of the keyboard.

  • Copyright: © 1994-97 Pointstyle
  • Programmers: R. Wapf and E. Kruppenbacher
  • Protocol design: A. Fässler (Technosoft, CH-Samstagern)
  • Requirements: Windows 95, 486+ CPU, 16MB RAM, LPT parallel port (does NOT run on Windows NT)
  • Main executable: HD-TechManager5000.exe v1.40, a Visual Basic 5 program over ppkn50.dll (the install script of the archived setup.EXE; the names “HD-TE96.exe” and “ConvKN.dll” that this page used to give are on neither archived disk set). See HD-TechManager5000: The software.

Software Functions

The software has 4 main sections:

Section Function
CHECK PORT Tests parallel port communication (LPT1 default, 2-3 second handshake)
BACKUP Full or incremental backup of HD-AE5000 to PC. Three modes: Main (full mirror), Archive (incremental — only files with archive flag), Selected (resume from interruption point)
RESTORE Writes backup data from PC back to HD-AE5000. ~40% slower than backup. Optional 2-digit password protection per file
TOOLS File management operations on the HD-AE5000

TOOLS Sub-Functions

Tool Description
COPY TO HD-AE Copy KN5000 files from any PC drive to HD. Validates file integrity (rejects manipulated KN3000 files)
RENAME Rename songs (up to 26 characters) and directories. “Text einfügen”/”Text kopieren” for batch renaming
MOVE Logical-only directory reorganization (relinks entries, doesn’t move physical data). Updates F.L.S. references automatically
PRINT Print directory listings. Options: column/directory/alphabetical/F.L.S. layout, small/medium/large font, draft/high quality. Can also export to text file
EDIT-FLS Create and edit F.L.S. (File Load Scripts) — up to 32 file links per script with A.L. (Auto Load after sequencer stop; byte +112) and A.S. (Auto Start: the sequencer starts after loading; the FLS byte +80) for live performance
DELETE Delete files and directories from HD
FORMAT Format the HD-AE5000 hard disk

Keyboard Preparation (Slave Mode)

To use the software, the keyboard must be set to slave mode:

  1. Press MEMORY & CONTROL → (HD-AE5000) HARDDISK → SETUP & TOOLS → PC DATA LINK → START
  2. The keyboard becomes unresponsive during transfer — slave mode ends only when the power is switched off or the PC sends PC-link command 02 (“Exit PPORT”)

Update File Format

HDAE5000 firmware updates use file type ID 6:

Header: "Technics KN5000 HD-AEPRG DATA FILE    " (38 bytes)
Target: 0x280000 (512KB)

The update is loaded via the standard KN5000 firmware update mechanism when the appropriate disk is inserted.

HDAE5000_PPORT_Cmd20_SendXapFileFlash puts the main CPU’s task to sleep (service 29, HDAE5000_PPORT_Svc29_SleepMainTask, which calls RootFn_SleepMainTask), receives as many bytes as request bytes 2-5 say into work DRAM 0x010000 (one block per command, so 64 KB at most before it overwrites what lies above 0x20000; [inference] a PC would send the image in 64 KB pieces, one command each), and runs service 28, HDAE5000_PPORT_Svc28_FlashXapFile, which calls SRAM 0x23FEB0 (HDAE5000_RAM_XAP_FLASH_ENTRY) with XWA = 0x010000 and XBC = a descriptor {“XAP”, pointer to the byte count, 0x280000, 0x2F0000}. It then wakes the main task (service 30, HDAE5000_PPORT_Svc30_WakeUpMainTask) and shows “End Flash Right” when the call returned 0x58, else “End Flash False”. Command 20 exists only in v2.x (v1.x has services 0-27, no 28-30).

Nothing checks a version or the data: the only test is the flasher’s result 0x58. The one version check of the link is command 01’s. Nothing in the HD-AE5000, main-CPU, table-data or custom-data ROMs puts code at 0x23FEB0 (no HD-AE5000 version writes SRAM 0x23F000-0x23FFFF other than the PC-link context’s stack, whose top is 0x23FFFC, HDAE5000_RAM_PportLinkStackTop), no link command can write to a PC-chosen address, and HD-TechManager5000 v1.40’s ppkn50.dll never sends command 20 (HD-TechManager5000). So this path cannot be used with the firmware and software that survive; [inference] it was a feature for a later PC program that had to bring its own flasher by a route not in these ROMs. The type-6 floppy is the working update path. Source: the disassembly’s notes/open4-kn5000-b/hdae/README.md, “kn5000-e7f”.

Disassembly Status

Component Status Notes
ROM rebuild Byte-identical scripts/build/compare_roms.py reports a byte-for-byte match against original_ROMs/hd-ae5000_v2_06i.ic4. This proves the source reassembles to the same bytes — it says nothing about whether the labels are right, which is why the corrections on this page were possible without the rebuild ever breaking
Entry point vectors 100% JP instructions at 0x280008, 0x280010
Boot initialization Disassembled 236 bytes at 0x28F576, splash blit now identified
Handler_Registration Disassembled 750 bytes - registers 11 object tables via RegisterObjectTable and title 0x7F via RegisterTitle
Bitmap resource descriptors Disassembled 6 routines: 5 × 45 bytes + BitmapButt01
0x2803C2 region Disassembled 9,266 bytes from HDAE5000_UiState_Reset on (formerly one label, Register_Frame)
Frame handler group Disassembled 126 + 161 + 4 bytes
Palette/VGA group Disassembled Load_Palette, Palette_Setup, VGA_Port_Write, Delay_Loop
PPORT command table + status records Data the 20-entry HDAE5000_PPORT_CommandTable (0x2953CE; its entries 6-17 and 18-20 carry the labels HDAE5000_PPORT_Cmd_Table and HDAE5000_PPORT_Ptrs), then HDAE5000_PPORT_Strings (0x29541E): 23 status records, 21 at a 24-byte stride and two 22-byte flash-result records, each labelled by command (HDAE5000_PPORT_Cmd03_ReadFsbFromHd_Str_N03_Read_FSB_from_HD …) and named by its call sites (hdae5000/tools/verify_pport_strings_stride.py no longer checks this: since lda_24 was respelled in 8ae043393 it finds 0 call sites and passes 0/0)
Registered-object names Data 1,252 B at 0x29BAFC, was decoded as instructions
.data image at 0x2F94B2 Data 3,202 B: nine tables, 96 code + 166 string pointers, all 96 code targets named
UI object + name tables Data 10,094 B at 0x2A5D2C, was decoded as instructions
Graphics bank Labelled slices 6 palette/bitmap pairs, the STORE button pair now labelled too (HDAE5000_Palette_Button01 / HDAE5000_Bitmap_Button01)
UI object pool Named 33,050 B at 0x29DC12: 769 objects as nested class macros, every field named, links computed from the nesting (menu map)
.rodata 0x2E1C82-0x2E3703 and 0x2E5B80-0x2E5DCD Typed object by object from the code’s references; 51 switch tables typed from their dispatchers
Filesystem Documented HDAE5000 Filesystem — FAT and cluster chains, 323 table sectors, song/FLS records, lyric files
Main-CPU calls Symbolic 953 call sites through WS_RootFnTable / WS_HamaFnTable named with the firmware’s own function names

Census at disassembly commit 3417969c0 (python3 scripts/analysis/data_range_census.py --images hdae5000): CODE 112,324 B, KNOWN-A 371,935 B, KNOWN-B 9,691 B, UNKNOWN 0, FILLER 30,338 B. Strict share (CODE + KNOWN-A + FILLER): 98.15% (514,597 B). The Wave 2 lane report of 2026-09-25 (notes/lanes/wave2-2026-09-25/lane-reports/hdae.json) gave 98.52%. scripts/analysis/hdae5000_reachability.py reports 5,842 B unreachable in 118 ranges. Two honest admissions remain in the source: HDAE5000_Palette_Button01 (1,024 B, no reader in this ROM) and HDAE5000_CType_Table (256 B).

Measured at disassembly commit 3417969c0 (8 .s files including shared/event_codes.s, 62,910 lines; 4,099 symbols in symbols/hdae5000_symbols_reference.txt, all semantic):

  • Everything still held as .incbin in the LLVM/GAS tree is pixel and palette data: 10 slices totalling 313,076 bytes. There are no remaining raw code blobs in that tree. (The ASL mirror under archive/asl/ still bincludes the five original code_*.bin blobs; it is a parallel build, not the primary source.)
  • A labelled binary slice is not documentation. The 313,076 bytes are honest picture data with the right boundaries and names — nothing more is claimed for them.
  • The largest genuinely undone item was inside the 33,050-byte UI descriptor pool: its 769 records were typed, but 13,334 B of class-specific body were not decoded. Since 2026-10-29 that is done: the pool is a tree of class macros with every field named (scripts/converters/hdae5000_ui_tree.py; menu map).

Labels and comments after 2026-10-24 (disassembly lane wave1/hdae5000-locals, merged as f4c773220). The 1,165 address-named local labels (.L<hex>) were renamed after the routine that owns them and the shape of the branch (fc17ceffe; a later review found five _Loop labels that were shared tails and fixed them). Every routine that something calls now has a header comment saying what it does, written lane by lane for the C library, the PC link, the HD file system and ATA layer, song load/save, the UI screens and the boot path, and the RAM and I/O addresses those routines use got names (the 8255 and ATA registers, the PC-link mailbox, the printf engine’s state, …). Comments that only repeated what the operand already said were dropped: the unidasm echo on jr/jrl lines, the branch-target addresses in jp/call/calr comments, MAME-spelling copies of the instruction, and the address comments left after an operand was named. Measured at 2319e9b94 with python3 scripts/analysis/doc_quality_census.py: 0 .L<hex> locals, 0 call targets without a header (of 337), and 406 of the 598 routines it counts with a header (67.9 %; the 192 without one are routines nothing references directly). The undocumented .byte figure from hdae5000/tools/measure_debt.py is unchanged at 1,713 B.

MAME Emulation Status

Component Upstream MAME (mamedev/mame#14068) kn7000_mame overlay
Extension ROM (“XAPR”) Working: ROM at 0x280000, HDAE5000_Boot_Init runs Working
PE.0 presence line always reads 1, so the main CPU skips HDAE5000_Parport_Setup follows the slot (since 2026-09-02)
Extension SRAM Working: 512KB at 0x200000-0x27FFFF (2×256KB, IC5+IC6) Working
IDE/ATA interface Stub: 0x130000-0x13001F reads 0 and ignores writes (TODO: Implement-me!) ata_interface_device at CS0 (0x130010-0x13001F) and CS1 (0x130020-0x13002F); a drive (hdd) is fitted by default
Hard disk image can be mounted on a bare IDE_HARDDISK, but nothing reads it -harddisk (see MAME Setup Guide)
PPI (parallel port) Stubbed: i8255 instantiated, callbacks not connected same
ATA INTRQ not wired wired to TLCS900_INT9, but the firmware never enables it and polls instead
Homebrew ROM loading Working via -extension hdae5000 Working

The device file is src/devices/bus/technics/kn5000/hdae5000.cpp in both trees; the overlay’s copy carries the unmerged patch kn5000-19-hdae5000-ata-intrq.

The boot splash is a useful emulation smoke test: if the driver reaches HDAE5000_Boot_Init and the VRAM path works, the “Start-up ! / Please wait . . .” screen appears before any disk access happens.

Creating Test Disk Images for MAME

This section explains how to create a virtual hard disk image for testing the HDAE5000 hard disk expansion in MAME. It needs the kn7000_mame overlay build: upstream MAME’s hdae5000 device stubs the ATA registers (reads return 0), so no disk can be read there. See MAME Setup Guide.

Prerequisites

You need chdman, the MAME Compressed Hunks of Data manager tool. It is built alongside MAME and should be available at the root of your MAME build directory (e.g. mame/chdman). Verify it is present:

./chdman help createhd

Disk Geometry

The real HD-AE5000 used a 2.5” laptop IDE hard disk with approximately 1.08GB capacity. The firmware reads the drive’s CHS (Cylinder/Head/Sector) geometry via the ATA IDENTIFY DEVICE command (0xEC) and uses CHS addressing for all disk operations.

A reasonable geometry for a ~1GB drive is:

Parameter Value
Cylinders 2100
Heads 16
Sectors per track 63
Bytes per sector 512
Total capacity 1,083,801,600 bytes (~1.08 GB)

These values are representative of typical 2.5” IDE drives from the mid-1990s. The firmware accepts whatever geometry the drive reports, so the exact values are not critical.

Creating a Blank CHD Image

Use chdman createhd to create a blank hard disk image in MAME’s CHD (Compressed Hunks of Data) format:

chdman createhd --output hdae5000.chd --chs 2100,16,63 --sectorsize 512

This creates an uncompressed CHD: chdman refuses to compress a blank hard disk (“Blank hard disk images must be uncompressed”). Its hunks are allocated as they are written, so the file starts small and grows.

MAME also accepts raw disk images with .hd or .hdi extensions. A raw image is simply a file containing the raw sector data:

# Create a 1GB sparse file (instant, uses no actual disk space until written)
truncate -s 1083801600 hdae5000.hd

Raw .hd images are the path that has been exercised (see MAME Setup Guide); a CHD embeds the CHS parameters explicitly but is untested through this device.

Loading the Disk Image in MAME

Use the -hard option to attach the disk image when launching MAME with the HDAE5000 extension:

mame kn5000 -extension hdae5000 -hard hdae5000.hd

The -extension hdae5000 flag loads the HDAE5000 extension board ROM, and -hard attaches the disk image to the IDE interface.

For automated/headless testing, add the standard skip flags:

mame kn5000 -extension hdae5000 -hard hdae5000.hd \
  -skip_gameinfo -seconds_to_run 120 -nothrottle -window

Expected Behavior

When booting with a blank/unformatted disk, the firmware should:

  1. Find the extension ROM’s “XAPR” signature at 0x280000 and call HDAE5000_Boot_Init (PE.0, the presence line, only gates the PPI set-up)
  2. Show the boot splash (“HD-AE5000 / Version 2 / Start-up ! / Please wait . . .”)
  3. Issue IDENTIFY DEVICE (0xEC) to read the drive’s CHS geometry
  4. Read the settings sector (filesystem sector 1) and check its signature longs 0xAA55AA55, 0xF4F1F2F3
  5. Report the disk as unformatted because the signature is missing (HDAE5000_HD_Init step code 1). Messages like “Hard disk FSB read error” or “Hard disk FAT read error” belong to later steps. The “FAT” is the firmware’s own 32-bit allocation table (HDAE5000 Filesystem)

To format the disk, you would normally use:

  • On the keyboard: MEMORY & CONTROL -> (HD-AE5000) HARDDISK -> SETUP & TOOLS -> select format option
  • From a PC: The HD-TechManager5000 software’s TOOLS -> FORMAT function via the parallel port interface (not yet emulated in MAME)

Pre-Formatting Disk Images

The HDAE5000 uses a custom filesystem. It is not a FAT12/16/32 volume, though it keeps its own 32-bit allocation table.

No tool currently exists to pre-format disk images with the HDAE5000 filesystem from outside MAME. The layout is now documented from the code:

  • Sector numbers are 1-based and split head-major into CHS
  • Sector 1: signature longs 0xAA55AA55, 0xF4F1F2F3 and six setting bytes at +0x78
  • Sectors 2-3907: the FAT, 32-bit entries (0 = free, 0xFFFFFFFE = end of chain)
  • Sectors 3908-4230: the 323 table sectors (120 directory names, 1,920 song records of 76 bytes, 120 FLS records of 144 bytes)
  • Sectors 4231 on: data clusters of 0x20 or 0x40 sectors

The earlier description here (FSB in sectors 0-4, a VarInt “sector allocation table”, 37-byte directory entries, 16 partitions of 40 entries) came from the lyrics player and list screens misread as a filesystem.

Building a pre-formatting tool is possible given the filesystem documentation, but the simplest approach is to format the disk through the firmware itself once the MAME emulation is complete enough to support the format operation.

Verifying the Disk Image

To inspect or verify a CHD image:

# Show CHD metadata (geometry, compression, size)
chdman info --input hdae5000.chd

# Extract raw data from CHD for analysis
chdman extracthd --input hdae5000.chd --output hdae5000.raw

# Convert raw image back to CHD
chdman createhd --input hdae5000.raw --output hdae5000.chd --chs 2100,16,63 --sectorsize 512

Workspace Pointer & Object Dispatch System

The main firmware passes workspace pointer 0x027ED2 in XWA when calling Boot_Init. This is the base of the firmware’s object table in main DRAM — a 14-byte-per-entry table supporting up to 1,120 objects (handler IDs 0x0000-0x045F). The HDAE5000 stores this at 0x23A1A2 and uses it to access the firmware’s callback dispatch system via handler table offsets at +0x0E0A and +0x0E88.

The XAPR detection flag at 0x03DD04 controls whether the Frame_Handler is called. The firmware sets this to 1 when the XAPR signature is validated, and checks it on every main loop iteration before calling the frame handler at 0x280010.

Firmware Dispatch Functions

The firmware’s object-oriented dispatch system uses these key functions (names from the main CPU symbol table):

Address Symbol Purpose
0xFA9660 SendEvent Synchronous event dispatch: looks up handler, calls identity query, then calls record function
0xFA44E2 ClassProc Proc of every Class table (class id 0x01600004)
0xFA3D85 ObjectProc Object lifecycle event handler (events 0x10-0x23)
0xFA4409 InheritedProc Runs the parent class (class definition +0x04)
0xFA42FB RegisterObjectTable Copies 14-byte param block to object_table[id * 14]
0xFA431A RegisterObject Registers individual object entry
0xFA43B3 UnRegisterObject Removes object entry
0xFA9752 PostEvent Queues event for asynchronous dispatch (ring buffer at 0x02BC34)
0xFA9D58 ApPostEvent Queues into the same ring; yields while it is full
0xFA40B3 InitializeObjectTable Clears all table entries and registers built-in handlers

See HDAE5000 Homebrew Development for detailed analysis of each function.

External References