Files
libretro/emulators/px68k.yml
T
Abdessamad Derraz 315dab82b7 feat: give each set its requirement and one pick
Three changes to the search-list model, one commit because the readers
and the profiles must move together for the schema to hold.

Set requirement in a groups map. pom2 falls back on apple2.rom for the
][ and the ][+, and on apple2e.rom for the //e it boots and for the
unenhanced //e: one required on the file could not say both. A profile
now declares groups: {name: {required}}, a member writes no required
of its own (schema and validate_schemas refuse one) and load_emulator_
profiles derives it, true when one of its sets is. group takes a name,
a list, or a map from set to rank where the rank differs per set. pom2
is grouped from SystemProfile.cpp and MainWindow.cpp:246-296 at its pin.

One member per required set under --required-only. The pick is the
first the code reads among the held members the region filter leaves,
by rank then declaration order; a set the platform declares a member
of is carried by that declaration. The emulator pack, verify
--emulator, the platform pack, its manifest and verify --platform read
alternatives.required_only_spares or core_file_spares.

variant_group is now selection_slot: files a core chooses between by
a rule other than first found (disc territory for PicoDrive and
Pizza Boy SC, the o2em_bios option, a WebAssembly probe in SWF
Player). Where the code takes any one, the field became a group:
ARMSX1 (ArmSxBackend.java:149-157, name order), ePSXe (load_bios
0x433540-0x433621 of the 2.0.5 Linux x64 binary, one configured path,
HLE when BiosHLE is set), FPse and FPse-NG, DXX-Rebirth's HOGs
(inferno.cpp:472-512). odin and zesarux carried it with no effect.
slot.py compares ranks only between candidates that share a set.
2026-11-09 18:19:32 +01:00

136 lines
5.1 KiB
YAML

emulator: "PX68k"
type: libretro
core_classification: community_fork
source: "https://github.com/libretro/px68k-libretro"
upstream: "https://github.com/hissorii/px68k"
profiled_date: "2026-03-25"
source_commit: "5510637a4c0a08ac0302087ea498093dcc3e9d17"
core_version: "0.15+"
version_basis:
kind: file
path: "libretro.c"
pattern: '#define\s+PX68K_VERSION\s+"([^"]+)'
display_name: "Sharp - X68000 (PX68k)"
cores:
- px68k
systems:
- sharp-x68000
# PX68K is a Sharp X68000 emulator (originally Keropi) ported to libretro.
# All ROM files are loaded from <system_dir>/keropi/ subdirectory.
#
# ROM loading (libretro.c:958-1003 WinX68k_LoadROMs):
# 1. Base path set to <system_dir>/keropi/ via file_setcd(winx68k_dir) at line 969
# 2. IPL ROM: iterates BIOSFILE[] = {iplrom.dat, iplrom30.dat, iplromco.dat, iplromxv.dat}
# and opens the first file found. Reads 0x20000 bytes (128 KB) into IPL buffer.
# Returns 0 (failure) if none found, and the core does not start.
# 3. SCSI check (WinX68k_SCSICheck): if IPL contains SCSI vectors at offset 0x30600-0x30c00,
# patches a fake SCSI BIOS stub at $fc0000 with "Human68k" signature.
# 4. Byte-swaps IPL in 16-bit pairs (big-endian ROM on little-endian host).
# 5. Font ROM: opens cgrom.dat, falls back to cgrom.tmp if not found.
# Reads 0xc0000 bytes (768 KB) into FONT buffer. Returns 0 if neither exists.
#
# SRAM (x68k/sram.c:50-73):
# sram.dat is 16 KB of battery-backed SRAM, loaded on init and saved on cleanup.
# Not a BIOS but runtime state. Created automatically if missing.
#
# Directory layout expected:
# <system_dir>/keropi/iplrom.dat (or iplrom30.dat, iplromco.dat, iplromxv.dat)
# <system_dir>/keropi/cgrom.dat (or cgrom.tmp)
# <system_dir>/keropi/sram.dat (auto-created)
# <system_dir>/keropi/config (auto-created, core settings)
groups:
ipl:
required: true
font:
required: true
files:
# IPL ROM, the main system BIOS. The core tries four filenames in order and
# uses the first one found. Only one is needed. iplrom.dat is the original X68000,
# iplrom30.dat is X68030, iplromco.dat is X68000 Compact, iplromxv.dat is X68000 XVI.
- name: "iplrom.dat"
installed_on: [recalbox]
path: "keropi/iplrom.dat"
group: ipl
priority: 1
size: 131072
note: >
X68000 IPL ROM (original model). 128 KB, loaded at IPL buffer offset 0x20000.
The core tries iplrom.dat first, then iplrom30.dat, iplromco.dat, iplromxv.dat
in order. At least one must be present or the core fails to start.
source_ref: "source libretro.c:984-1001"
- name: "iplrom30.dat"
path: "keropi/iplrom30.dat"
group: ipl
priority: 2
size: 131072
note: >
X68030 IPL ROM. Alternative to iplrom.dat for X68030 model emulation.
Only used if iplrom.dat is not found.
source_ref: "source libretro.c:985"
- name: "iplromco.dat"
path: "keropi/iplromco.dat"
group: ipl
priority: 3
size: 131072
note: >
X68000 Compact IPL ROM. Alternative to iplrom.dat.
Only used if iplrom.dat and iplrom30.dat are not found.
source_ref: "source libretro.c:985"
- name: "iplromxv.dat"
path: "keropi/iplromxv.dat"
group: ipl
priority: 4
size: 131072
note: >
X68000 XVI IPL ROM. Last fallback in the IPL search order.
Only used if the three other IPL variants are not found.
source_ref: "source libretro.c:985"
# Font ROM, the character generator ROM for text rendering.
- name: "cgrom.dat"
installed_on: [recalbox]
path: "keropi/cgrom.dat"
size: 786432
group: font
priority: 1
note: >
X68000 character generator ROM. 768 KB, provides the font glyphs for text
display. If missing, the core falls back to cgrom.tmp (user-generated font
cache). Core fails to start if neither file exists.
source_ref: "source libretro.c:987, source libretro.c:1022-1032"
- name: "cgrom.tmp"
path: "keropi/cgrom.tmp"
size: 786432
group: font
priority: 2
unsourceable: "generated by WinX68k from the host fonts, no canonical file"
note: >
Alternative font file, used as fallback when cgrom.dat is absent.
Typically a font cache generated by the emulator itself on other platforms.
source_ref: "source libretro.c:988, source libretro.c:1025-1029"
notes:
subdirectory: >
All files must be placed in <system_dir>/keropi/ subdirectory. The core sets
this path at init via sprintf(retro_system_conf, "%s/keropi", system_dir) and
then calls file_setcd() to make it the base for all file_open_c() calls.
ipl_selection: >
The four IPL ROM variants correspond to different X68000 hardware revisions.
The core uses whichever it finds first in order: iplrom.dat (original X68000),
iplrom30.dat (X68030), iplromco.dat (Compact), iplromxv.dat (XVI). Most users
only need iplrom.dat. The IPL also determines SASI vs SCSI disk support based
on vectors found at offsets 0x30600-0x30c00.
sram: >
sram.dat (16 KB) is read/write runtime state, not a BIOS file. The core creates
it automatically on first shutdown. It stores X68000 NVRAM settings (boot count,
boot device preferences, SRAM-resident programs).