emulator: px68k type: libretro source: "https://github.com/libretro/px68k-libretro" profiled_date: "2026-03-18" core_version: "0.15+" 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 /keropi/ subdirectory. # # ROM loading (libretro.c:848-893 WinX68k_LoadROMs): # 1. Base path set to /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 -- core will 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 -- runtime state. Created automatically if missing. # # Directory layout expected: # /keropi/iplrom.dat (or iplrom30.dat, iplromco.dat, iplromxv.dat) # /keropi/cgrom.dat (or cgrom.tmp) # /keropi/sram.dat (auto-created) # /keropi/config (auto-created, core settings) 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" path: "keropi/iplrom.dat" size: 131072 required: true 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: "libretro.c:850-867" - name: "iplrom30.dat" path: "keropi/iplrom30.dat" size: 131072 required: false note: > X68030 IPL ROM. Alternative to iplrom.dat for X68030 model emulation. Only used if iplrom.dat is not found. source_ref: "libretro.c:851" - name: "iplromco.dat" path: "keropi/iplromco.dat" size: 131072 required: false note: > X68000 Compact IPL ROM. Alternative to iplrom.dat. Only used if iplrom.dat and iplrom30.dat are not found. source_ref: "libretro.c:851" - name: "iplromxv.dat" path: "keropi/iplromxv.dat" size: 131072 required: false 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: "libretro.c:851" # Font ROM -- character generator ROM for text rendering. - name: "cgrom.dat" path: "keropi/cgrom.dat" size: 786432 required: true 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: "libretro.c:853, libretro.c:881-891" - name: "cgrom.tmp" path: "keropi/cgrom.tmp" size: 786432 required: false 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: "libretro.c:854, libretro.c:884-888" notes: subdirectory: > All files must be placed in /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).