mirror of
https://github.com/Abdess/retroarch_system.git
synced 2026-11-11 12:33:53 -06:00
Refs cited cpcemu0.cfg lines, the help file and strace runs. Each now names the loader, the config parser, the M4 board setup or the layout dialog in cpcemu_portable.exe 3.0.2. The loader never checks length, so size leaves validation, and NMIROM.BIN gains its own entry.
302 lines
17 KiB
YAML
302 lines
17 KiB
YAML
emulator: CPCemu
|
|
type: standalone
|
|
core_classification: other
|
|
source: "https://www.cpc-emu.org/"
|
|
upstream: "https://www.cpc-emu.org/"
|
|
version_source:
|
|
url: "https://www.cpc-emu.org/"
|
|
pattern: 'CPCemu (\d+(?:\.\d+)+) released'
|
|
profiled_date: "2026-11-10"
|
|
core_version: "3.0.2"
|
|
version_basis:
|
|
kind: package
|
|
url: "https://cpc-emu.org/Release/2025-04-24/cpcemu_portable-win32-x86-3.0.2.zip"
|
|
pattern: 'cpcemu_portable-win32-x86-(\d+(?:\.\d+)+)\.zip'
|
|
artifact: "cpcemu_portable-win32-x86-3.0.2.zip"
|
|
display_name: "Amstrad - CPC (CPCemu)"
|
|
cores:
|
|
- cpcemu
|
|
systems:
|
|
- amstrad-cpc
|
|
mode: standalone
|
|
|
|
notes: |
|
|
Amstrad CPC emulator by Marco Vieth and Rainer Loritz, closed-source freeware
|
|
for Windows, macOS, Linux, Android and iOS. Machines are the CPC 464, 664 and
|
|
6128. The firmware identifier and the message catalogue also know the 464+,
|
|
the 6128+ and the KC compact.
|
|
|
|
Reversed from cpcemu_portable.exe of the 3.0.2 Windows portable package of
|
|
2025-04-24 (zip sha256 fa2cde7da210b0db, exe sha256 3560e3a9c52095f1, Borland
|
|
C++ PE32). Addresses below are virtual addresses in that executable. The 3.0.2
|
|
Linux archives listed on the download page are absent from the server. The
|
|
2.5 Linux x86-64 package of 2022-08-13 ships the same ROM folder without
|
|
XDDOS210.ROM, and its binary has no National ROM selection.
|
|
|
|
Configuration comes from a file given on the command line, then the
|
|
cpcemu.cfg path assembled at 0x570a8c (FUN_00481bcc 0x481c96-0x481ca5) when
|
|
it exists, then the built-in name cpcemu0.cfg (pointer 0x570a84) in the
|
|
working directory, chosen at FUN_00481bcc 0x481d7a-0x481da2 and parsed by
|
|
FUN_00466680. ROM_PATH ("./ROM/" in the shipped cpcemu0.cfg) is stored by
|
|
FUN_00441008, which appends a backslash when the value does not end in one.
|
|
Each ROM_BLOCK line (FUN_004665d0: ROM number, file name, 16 KB block number)
|
|
becomes a node of the list at 0x5151a0. #IFCPC blocks are kept only when
|
|
their number equals the CPC type at 0x564590, set by -t or CPC_TYPE. The
|
|
shipped cpcemu0.cfg names CPC464.ROM for types 0 and 3, CPC664.ROM for type
|
|
1, CPC6128.ROM for types 2, 4 and 5 (ROM 255 block 0, ROM 0 block 1),
|
|
CPCADOS.ROM as ROM 7 for every type, and M4.ROM as ROM 6 outside any #IFCPC.
|
|
|
|
FUN_004407d0 loads every listed ROM from slot 0 to 255: ROM_PATH + file name,
|
|
an AMSDOS header skipped when its checksum matches (FUN_004721e4), a seek to
|
|
block * 0x4000 and a read of 0x4000 bytes with no length check
|
|
(FUN_0040a59c). A file that cannot be opened prints message 0xb8 "ROM: Cannot
|
|
open file" and counts one error. FUN_0046ac64 returns the count plus 2, and
|
|
FUN_00481bcc shows "CPCemu Error" and ends with that status for any value of
|
|
3 or more, so a single missing file named by a ROM_BLOCK line stops startup
|
|
with status 3, whatever the slot and whatever device it serves.
|
|
|
|
The machine is identified from ROM 0 by FUN_00440bfc: byte 0 has to be 0x80
|
|
(else "ROM: No foreground ROM found.") and byte 2 selects 464 (0), 664 (1),
|
|
6128 (2) or 6128+ (4), anything else giving "ROM: Unknown ROM version.". A
|
|
6128 whose lower ROM has 0x21 at offset 0x5a1 is reported as a KC compact.
|
|
Without an identified machine startup ends on "CPC type not configured or
|
|
ROM for CPC type not available. Unable to continue." ROM 7 is accepted as
|
|
AMSDOS when its header is 01 00 05 or 01 00 07 (FUN_00440cc4), otherwise "ROM:
|
|
No AMSDOS ROM found." and disc support stays off. Types 3, 4 and 5 have no
|
|
dedicated ROM files: the shipped configuration loads the 464 and 6128 files
|
|
for them. There is no cartridge support.
|
|
|
|
The M4 board is set up at every startup by FUN_0044c6c4, called from
|
|
FUN_0046ac64 0x46ae76 without reading M4_ENABLED (0x516cd0). It looks for the
|
|
ROM_BLOCK entry whose file name is exactly "M4.ROM" and checks the ROM's name
|
|
table for "M4 BOARD". It then reads M4_SD_PATH + /NMIROM.BIN, and only when
|
|
that file is absent, ROM_PATH + /HACK.ROM, 0x4000 bytes each. The M4 firmware
|
|
updater (routine at 0x449c1c) downloads cpc/M4FIRM.BIN from spinpoint.org and
|
|
rewrites ROM_PATH + /M4.ROM and /HACK.ROM, 0x4000 bytes each.
|
|
|
|
Alongside the ROMs the program reads the message catalogue cpcemu.msg (name
|
|
passed at FUN_00481bcc 0x481c86) and the colour and key tables cpcemu.dat
|
|
(built-in name at 0x570a88, passed to FUN_0045f734 at FUN_00481bcc 0x481dd9). The help file and the
|
|
poke database are named only by the HELP_FILE and POKE_DATABASE lines of
|
|
cpcemu0.cfg, "./cpcemu.hlp" and "./cpcemu.dbf". The disc, tape and snapshot folders and the M4 SD card folder hold
|
|
user content.
|
|
|
|
files:
|
|
# The 3.0.2 Windows package ships every ROM below in ROM/. The 2.5 Linux
|
|
# package ships all but XDDOS210.ROM.
|
|
# -- Firmware, lower ROM in block 0 and foreground ROM in block 1 --
|
|
- name: CPC6128.ROM
|
|
path: "ROM/CPC6128.ROM"
|
|
system: amstrad-cpc
|
|
required: true
|
|
bundled: true
|
|
min_size: 32768
|
|
validation: [signature]
|
|
md5: b96280dc6c95a48857b4b8eb931533ae
|
|
sha1: 5977adbad3f7c1e0e082cd02fe76a700d9860c30
|
|
source_ref: "cpcemu_portable.exe 3.0.2 FUN_004407d0 0x440848-0x4408b6 (ROM_PATH + ROM_BLOCK file name per slot, ifstream open), 0x4408d1-0x44093f (open failure: message 0xb8, error count), 0x440959-0x440976 (seek block * 0x4000, FUN_0040a59c reads 0x4000, no length check), FUN_0046ac64 0x46ae22-0x46ae2d and FUN_00481bcc 0x481efa-0x481f54 (count + 2 >= 3 ends startup), FUN_00440bfc 0x440c03-0x440c47 (ROM 0 byte 0 = 0x80, byte 2 = machine), cpcemu0.cfg ROM_BLOCK 255 and 0 under #IFCPC 2, 4 and 5, kept by FUN_00466680 0x466871-0x466879"
|
|
note: >-
|
|
CPC 6128 firmware and BASIC, lower ROM in block 0 and foreground ROM in
|
|
block 1, opened once per block. Loaded for the shipped CPC_TYPE 2 and
|
|
for types 4 and 5. Foreground ROM header 80 01 02 00.
|
|
|
|
- name: CPC464.ROM
|
|
path: "ROM/CPC464.ROM"
|
|
system: amstrad-cpc
|
|
required: false
|
|
bundled: true
|
|
min_size: 32768
|
|
validation: [signature]
|
|
md5: a993f85b88ac4350cf4d41554e87fe4f
|
|
sha1: 56d39c463da60968d93e58b4ba0e675829412a20
|
|
source_ref: "cpcemu_portable.exe 3.0.2 FUN_004407d0 0x440848-0x4408b6 (ROM_PATH + ROM_BLOCK file name, ifstream open), 0x4408d1-0x44093f (open failure: message 0xb8, error count), 0x440959-0x440976 (seek block * 0x4000, read 0x4000), FUN_00440bfc 0x440c03-0x440c47 (ROM 0 header), cpcemu0.cfg ROM_BLOCK 255 and 0 under #IFCPC 0 and 3, kept by FUN_00466680 0x466871-0x466879 when the CPC type at 0x564590 matches"
|
|
note: >-
|
|
CPC 464 firmware and BASIC, selected by CPC_TYPE 0 or 3 or the -t
|
|
command line. Foreground ROM header 80 01 00 00.
|
|
|
|
- name: CPC664.ROM
|
|
path: "ROM/CPC664.ROM"
|
|
system: amstrad-cpc
|
|
required: false
|
|
bundled: true
|
|
min_size: 32768
|
|
validation: [signature]
|
|
md5: 5a384a2310f472c7857888371c00ed66
|
|
sha1: 073a7665527b5bd8a148747a3947dbd3328682c8
|
|
source_ref: "cpcemu_portable.exe 3.0.2 FUN_004407d0 0x440848-0x4408b6 (ROM_PATH + ROM_BLOCK file name, ifstream open), 0x4408d1-0x44093f (open failure: message 0xb8, error count), 0x440959-0x440976 (seek block * 0x4000, read 0x4000), FUN_00440bfc 0x440c03-0x440c47 (ROM 0 header), cpcemu0.cfg ROM_BLOCK 255 and 0 under #IFCPC 1, kept by FUN_00466680 0x466871-0x466879 when the CPC type at 0x564590 matches"
|
|
note: >-
|
|
CPC 664 firmware and BASIC, selected by CPC_TYPE 1 or the -t command
|
|
line. Foreground ROM header 80 01 01 00.
|
|
|
|
# -- Disc ROM, slot 7 --
|
|
- name: CPCADOS.ROM
|
|
path: "ROM/CPCADOS.ROM"
|
|
system: amstrad-cpc
|
|
required: true
|
|
bundled: true
|
|
size: 16384
|
|
validation: [signature]
|
|
md5: aa2fb251814bd971b2b9874ab0971b3f
|
|
sha1: 0e247123b9d3204784eeadb4629b9d35b9dfd984
|
|
source_ref: "cpcemu_portable.exe 3.0.2 FUN_004407d0 0x440848-0x4408b6 (ROM_PATH + ROM_BLOCK file name, ifstream open), 0x4408d1-0x44093f (open failure: message 0xb8, error count), 0x440959-0x440976 (read 0x4000, no length check), FUN_0046ac64 0x46ae22-0x46ae2d and FUN_00481bcc 0x481efa-0x481f54 (count + 2 >= 3 ends startup), FUN_00440f10 0x440fae-0x440fbf and FUN_00440cc4 (ROM 7 header 01 00 05 or 01 00 07, else message 0xbb), cpcemu0.cfg ROM_BLOCK 7 under every #IFCPC"
|
|
note: >-
|
|
AMSDOS disc ROM, the 8 KB image zero-padded to 16 KB. Named for every
|
|
machine by the shipped configuration, so startup ends with status 3
|
|
without it. Dropping the ROM_BLOCK line instead boots with "ROM: No
|
|
AMSDOS ROM found." and no disc support.
|
|
|
|
# -- M4 board, ROM slot 6 plus the board's own lower ROM --
|
|
- name: M4.ROM
|
|
path: "ROM/M4.ROM"
|
|
system: amstrad-cpc
|
|
required: true
|
|
bundled: true
|
|
size: 16384
|
|
validation: [signature]
|
|
md5: 28a7e368badca8299ba24a15bb4ebe9b
|
|
sha1: 05f9447d307ab17eae9e2100f91c36b0c9560d4b
|
|
source_ref: "cpcemu_portable.exe 3.0.2 FUN_004407d0 0x440848-0x44093f (ROM_PATH + ROM_BLOCK file name, ifstream open, open failure counted), FUN_0046ac64 0x46ae22-0x46ae2d (count + 2 >= 3 ends startup), FUN_0044c6c4 0x44c6fa-0x44c74c (FUN_00440570 finds the ROM_BLOCK entry named \"M4.ROM\", else \"M4 ROM not found.\"), 0x44c751-0x44c7be (8-byte compare with \"M4 BOARD\" at the name table address in ROM bytes 4-5, else \"M4 ROM not valid.\"), routine at 0x449c1c 0x44a4f4-0x44a548 (updater writes ROM_PATH + /M4.ROM, 0x4000 bytes), cpcemu0.cfg ROM_BLOCK 6 outside any #IFCPC"
|
|
note: >-
|
|
M4 board firmware by Duke. Named by the shipped configuration for every
|
|
machine, so startup ends with status 3 without it, whatever M4_ENABLED
|
|
holds. The board is recognised only by the file name M4.ROM in the
|
|
ROM_BLOCK line. A failed lookup or name table check clears M4_ENABLED and
|
|
emulation goes on without the board.
|
|
|
|
- name: NMIROM.BIN
|
|
path: "SDCARD/NMIROM.BIN"
|
|
system: amstrad-cpc
|
|
required: false
|
|
description: "M4 board NMI ROM on the emulated SD card"
|
|
source_ref: "cpcemu_portable.exe 3.0.2 FUN_0044c6c4 0x44c966-0x44c9c4 (FUN_0044c238 builds M4_SD_PATH from 0x516cd8 + /NMIROM.BIN, fopen rb, fread 0x4000), called from FUN_0046ac64 0x46ae76"
|
|
note: >-
|
|
Read at every startup once M4.ROM has passed its check, in place of
|
|
HACK.ROM when present. The shipped cpcemu0.cfg sets M4_SD_PATH to
|
|
./SDCARD/. Up to 0x4000 bytes are read, the length is not checked.
|
|
|
|
- name: HACK.ROM
|
|
path: "ROM/HACK.ROM"
|
|
system: amstrad-cpc
|
|
required: false
|
|
bundled: true
|
|
size: 7994
|
|
md5: ffcbcbce32223a152753d30766ad6215
|
|
sha1: 582dd1706391f6f0161ad3486ae75a04fb0f7d5b
|
|
source_ref: "cpcemu_portable.exe 3.0.2 FUN_0044c6c4 0x44c966-0x44c9c4 (FUN_0044c238 builds M4_SD_PATH from 0x516cd8 + /NMIROM.BIN, fopen rb, fread 0x4000), 0x44c9c9-0x44ca3f (ROM_PATH from FUN_00440a5c + /HACK.ROM, fopen rb, fread 0x4000 into the buffer at 0x516210), 0x44ca41-0x44ca6a (\"Unable to load HACK.ROM\", returns 0), called from FUN_0046ac64 0x46ae76, routine at 0x449c1c 0x44a5b7-0x44a60b (updater writes ROM_PATH + /HACK.ROM, 0x4000 bytes)"
|
|
note: >-
|
|
M4 hack ROM, the lower ROM behind the Shift+F1 menu. Opened at every
|
|
startup once M4.ROM has passed its check, and only when M4_SD_PATH +
|
|
NMIROM.BIN is absent. Missing prints "Unable to load HACK.ROM" and
|
|
emulation continues. Up to 0x4000 bytes are read, the length is not
|
|
checked.
|
|
|
|
# -- National firmware, configured by the 3.0.2 keyboard layout dialog --
|
|
- name: CPC6128.ROM.UK
|
|
path: "ROM/National/CPC6128.ROM.UK"
|
|
system: amstrad-cpc
|
|
required: false
|
|
bundled: true
|
|
min_size: 32768
|
|
validation: [signature]
|
|
md5: b96280dc6c95a48857b4b8eb931533ae
|
|
sha1: 5977adbad3f7c1e0e082cd02fe76a700d9860c30
|
|
source_ref: "cpcemu_portable.exe 3.0.2 FUN_004866e0 0x486881-0x486908 (system ROM picker: file selector FUN_00462fe0 rooted at ROM_PATH, path made relative, FUN_004405f0 sets ROM 255 or 0), FUN_004407d0 0x440848-0x440976 (ROM_PATH + name, open, read 0x4000 per block), no path constant names this file, the English layout of FUN_0048202c keeps CPC6128.ROM"
|
|
note: >-
|
|
English CPC 6128 firmware, the same image as CPC6128.ROM. Loaded only when
|
|
the user names it in a ROM_BLOCK line or picks it in the setup menu.
|
|
|
|
- name: CPC6128.ROM.FR
|
|
path: "ROM/National/CPC6128.ROM.FR"
|
|
system: amstrad-cpc
|
|
required: false
|
|
bundled: true
|
|
min_size: 32768
|
|
validation: [signature]
|
|
md5: 5ee871d5600eb9b5a22989c295f902a5
|
|
sha1: 200d59076dfef36db061d6d7d21d80021cab1237
|
|
source_ref: "cpcemu_portable.exe 3.0.2 FUN_0048202c 0x482045-0x48207d (layout dialog, keys 1, 3, 4, 5 give 0, 2, 3, 4), 0x4820c5 (layout 2: \"National/CPC6128.ROM.FR\"), 0x4820d8-0x4820f6 (FUN_004405f0 sets ROM 0 block 1 and ROM 255 block 0, reloaded by FUN_004407d0 through FUN_00440304 0x4403cc), called from FUN_00481bcc 0x481e23-0x481e5a when no keyboard layout is configured"
|
|
note: "French CPC 6128 firmware, configured when the French layout is picked on first start."
|
|
|
|
- name: CPC6128.ROM.ES
|
|
path: "ROM/National/CPC6128.ROM.ES"
|
|
system: amstrad-cpc
|
|
required: false
|
|
bundled: true
|
|
min_size: 32768
|
|
validation: [signature]
|
|
md5: 0246740371010333385665dfeb7cd0ec
|
|
sha1: 1acd01c2c03424a78b32c9440f4d890fb1104815
|
|
source_ref: "cpcemu_portable.exe 3.0.2 FUN_0048202c 0x482045-0x48207d (layout dialog), 0x4820cc (layout 3: \"National/CPC6128.ROM.ES\"), 0x4820d8-0x4820f6 (FUN_004405f0 sets ROM 0 block 1 and ROM 255 block 0, reloaded by FUN_004407d0 through FUN_00440304 0x4403cc), called from FUN_00481bcc 0x481e23-0x481e5a when no keyboard layout is configured"
|
|
note: "Spanish CPC 6128 firmware, configured when the Spanish layout is picked on first start."
|
|
|
|
- name: CPC6128.ROM.DK
|
|
path: "ROM/National/CPC6128.ROM.DK"
|
|
system: amstrad-cpc
|
|
required: false
|
|
bundled: true
|
|
min_size: 32768
|
|
validation: [signature]
|
|
md5: ca1635fd992e2aa7a776b30da13467e5
|
|
sha1: a9e7ee6355730f319a37c95ca0a714212b88c3b1
|
|
source_ref: "cpcemu_portable.exe 3.0.2 FUN_0048202c 0x482045-0x48207d (layout dialog), 0x4820d3 (layout 4: \"National/CPC6128.ROM.DK\"), 0x4820d8-0x4820f6 (FUN_004405f0 sets ROM 0 block 1 and ROM 255 block 0, reloaded by FUN_004407d0 through FUN_00440304 0x4403cc), called from FUN_00481bcc 0x481e23-0x481e5a when no keyboard layout is configured"
|
|
note: "Danish CPC 6128 firmware, configured when the Danish layout is picked on first start."
|
|
|
|
- name: CPC6128.ROM.SE
|
|
path: "ROM/National/CPC6128.ROM.SE"
|
|
system: amstrad-cpc
|
|
required: false
|
|
bundled: true
|
|
min_size: 32768
|
|
validation: [signature]
|
|
md5: 8ca256a832e83c875f5432b3dee8a36f
|
|
sha1: 6765a91a42fed68a807325bf62a728e5ac5d622f
|
|
source_ref: "cpcemu_portable.exe 3.0.2 FUN_004866e0 0x486881-0x486908 (system ROM picker: file selector FUN_00462fe0 rooted at ROM_PATH, path made relative, FUN_004405f0 sets ROM 255 or 0), FUN_004407d0 0x440848-0x440976 (ROM_PATH + name, open, read 0x4000 per block), no path constant names this file, FUN_0048202c 0x4820b3-0x4820d3 maps layouts 2, 3, 4 only"
|
|
note: >-
|
|
Swedish CPC 6128 firmware. Loaded only when the user names it in a
|
|
ROM_BLOCK line or picks it in the setup menu, the layout dialog offering
|
|
no Swedish ROM.
|
|
|
|
# -- Expansion ROMs mapped through a user ROM_BLOCK line --
|
|
- name: XDDOS210.ROM
|
|
path: "ROM/XDDOS210.ROM"
|
|
system: amstrad-cpc
|
|
required: false
|
|
bundled: true
|
|
size: 16384
|
|
md5: 1d91a9ef315b302d335cd7e04e8d8d86
|
|
sha1: 2f1bd4d6e2d2e62818b01e6e7a26488362a7a8ee
|
|
source_ref: "cpcemu_portable.exe 3.0.2 FUN_00486fc4 0x487026-0x487113 (expansion ROM picker: file selector FUN_00462fe0 rooted at ROM_PATH, FUN_004405f0 sets the slot), FUN_004665d0 (ROM_BLOCK line parser), FUN_004407d0 0x440848-0x440976 (ROM_PATH + name, open, read 0x4000), cpcemu0.cfg commented ROM_BLOCK 7, no path constant names this file"
|
|
note: >-
|
|
X-DDOS 2.10 by Dobbertin, the disc operating system of the HD20 hard disk
|
|
that DOBBERTIN_HD_ENABLED emulates. Loaded once the user maps it to a ROM
|
|
slot. Its header 01 02 01 is not taken as AMSDOS by FUN_00440cc4, so the
|
|
AMSDOS speedup stays off with it in slot 7. Added in 3.0, not shipped
|
|
with 2.5.
|
|
|
|
- name: COPYMATE.ROM
|
|
path: "ROM/COPYMATE.ROM"
|
|
system: amstrad-cpc
|
|
required: false
|
|
bundled: true
|
|
size: 16512
|
|
md5: e9c4288eab8885a1e6ae7504a4736115
|
|
sha1: 15d52de01320d9b954e03b4c2e71ec75fd301bbb
|
|
source_ref: "cpcemu_portable.exe 3.0.2 FUN_004665d0 (ROM_BLOCK line parser), FUN_004407d0 0x440848-0x440976 (ROM_PATH + name, open, read 0x4000), FUN_004721e4 0x4721ef-0x472246 and 0x4722f8-0x472300 (128-byte AMSDOS header recognised by its checksum over bytes 0-0x42, data read from offset 0x80), cpcemu0.cfg commented ROM_BLOCK 4, FUN_00486fc4 0x487026-0x487113 (expansion ROM picker)"
|
|
note: >-
|
|
Copy utility ROM, carrying a 128-byte AMSDOS file header ahead of the
|
|
16 KB image, which the loader skips. Shipped as the example expansion ROM
|
|
of the configuration file and loaded once the line is uncommented.
|
|
|
|
- name: multface.rom
|
|
path: "ROM/multface.rom"
|
|
system: amstrad-cpc
|
|
required: false
|
|
bundled: true
|
|
size: 8192
|
|
md5: 4c9f014e91d407cc6509fad0095ab909
|
|
sha1: 1431ec628d38f000715545dd2186b684c5fe5a6f
|
|
source_ref: "cpcemu_portable.exe 3.0.2 FUN_00486fc4 0x487026-0x487113 (expansion ROM picker: file selector FUN_00462fe0 rooted at ROM_PATH, FUN_004405f0 sets the slot), FUN_004665d0 (ROM_BLOCK line parser), FUN_004407d0 0x440848-0x440976 (ROM_PATH + name, open, read up to 0x4000), no path constant names this file"
|
|
note: >-
|
|
Romantic Robot Multiface Two ROM. Ships in the ROM folder and enters only
|
|
as an ordinary ROM slot named by the user, no code path naming it.
|