Files
libretro/emulators/picodrive.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

250 lines
8.5 KiB
YAML

emulator: PicoDrive
type: libretro
core_classification: official_port
source: "https://github.com/libretro/picodrive"
upstream: "https://github.com/irixxxx/picodrive"
profiled_date: "2026-03-24"
source_commit: "1890c2932234c9d30f4cd3851d02228baae8f09e"
upstream_commit: "5f9e79f2177443939f21ab965b1c294edbef514c"
core_version: "2.05"
version_basis:
kind: file
path: "platform/common/version.h"
pattern: '#define\s+VERSION\s+"([^"]+)"'
display_name: "Sega - MS/GG/MD/CD/32X (PicoDrive)"
cores: [picodrive]
systems:
- sega-megadrive
- sega-genesis
- sega-megacd
- sega-megacd
- sega-32x
- sega-mastersystem
- sega-gamegear
- sega-sg1000
- sega-sc3000
- sega-pico
notes: |
PicoDrive is a fast Mega Drive / Genesis emulator with Mega CD, 32X, Master
System, Game Gear, SG-1000, SC-3000 and Sega Pico support. The libretro port
is part of the PicoDrive source tree (platform/libretro/).
Mega CD / Sega CD games require a region-matching BIOS file. The core searches
the system directory for each name in order, trying .bin then .zip extension,
and uses the first file found. If no BIOS is found, CD games fail to load with
PM_BAD_CD_NO_BIOS. MSU-MD games can run without BIOS.
BIOS filename search order (platform/libretro/libretro.c:1272-1336):
US: us_scd2_9306, SegaCDBIOS9303, us_scd1_9210, bios_CD_U
EU: eu_mcd2_9306, eu_mcd2_9303, eu_mcd1_9210, bios_CD_E
JP: jp_mcd2_921222, jp_mcd1_9112, jp_mcd1_9111, bios_CD_J
32X BIOS files (m68k, master SH2, slave SH2) are fully optional. The engine
has built-in HLE that generates replacement code at startup when the BIOS
pointers are NULL (pico/32x/memory.c:2202 get_bios(), pico/32x/32x.c:172).
No current frontend (libretro or standalone) loads these files, and the standalone
loading code is disabled (#if 0 in platform/common/emu.c:1530).
carthw.cfg is a cartridge hardware database loaded from the system directory.
A built-in version is compiled into the core (pico/carthw_cfg.c). The external
file supplements or overrides game-specific hardware detection (SVP, EEPROM
types, special mappers, copy protection).
Master System, Game Gear, SG-1000, SC-3000: no BIOS file loaded. The core
initializes VDP registers and RAM to simulate post-BIOS state
(pico/sms.c:1080-1097).
groups:
mega-cd-us:
required: true
mega-cd-eu:
required: true
mega-cd-jp:
required: true
files:
# -------------------------------------------------------
# Cartridge hardware database
# -------------------------------------------------------
- name: "carthw.cfg"
required: false
note: "Cartridge hardware database for special mapper and EEPROM detection. Built-in fallback compiled into the core."
source_ref: "source platform/libretro/libretro.c:1627, source pico/cart.c:1020-1022"
# -------------------------------------------------------
# Mega CD / Sega CD - US region
# -------------------------------------------------------
- name: "us_scd2_9306.bin"
system: sega-megacd
selection_slot: "mega-cd-bios"
region: [north-america, latin-america]
group: mega-cd-us
priority: 1
size: 131072 # 128 KB (0x20000)
note: "US Sega CD Model 2 BIOS (September 1993). First in US search order. The US list serves every disc whose security byte is neither 0x64 nor 0xa1 (pico/cd/cd_image.c:190, 247-248)."
source_ref: "source platform/libretro/libretro.c:1273"
- name: "SegaCDBIOS9303.bin"
system: sega-megacd
selection_slot: "mega-cd-bios"
region: [north-america, latin-america]
group: mega-cd-us
priority: 2
size: 131072
note: "US Sega CD BIOS (March 1993). Second in US search order."
source_ref: "source platform/libretro/libretro.c:1273"
- name: "us_scd1_9210.bin"
system: sega-megacd
selection_slot: "mega-cd-bios"
region: [north-america, latin-america]
group: mega-cd-us
priority: 3
size: 131072
note: "US Sega CD Model 1 BIOS (October 1992). Third in US search order."
source_ref: "source platform/libretro/libretro.c:1273"
- name: "bios_CD_U.bin"
system: sega-megacd
selection_slot: "mega-cd-bios"
region: [north-america, latin-america]
group: mega-cd-us
priority: 4
size: 131072
note: "US Sega CD BIOS (generic name). Last in US search order."
source_ref: "source platform/libretro/libretro.c:1273"
# -------------------------------------------------------
# Mega CD / Sega CD - EU region
# -------------------------------------------------------
- name: "eu_mcd2_9306.bin"
system: sega-megacd
selection_slot: "mega-cd-bios"
region: [europe, oceania]
group: mega-cd-eu
priority: 1
size: 131072
note: "EU Mega CD Model 2 BIOS (June 1993). First in EU search order, used when security byte 0x20b is 0x64, the only PAL branch for Australian discs (pico/media.c:243-247, platform/libretro/libretro.c:1306-1308)."
source_ref: "source platform/libretro/libretro.c:1276"
- name: "eu_mcd2_9303.bin"
system: sega-megacd
selection_slot: "mega-cd-bios"
region: [europe, oceania]
group: mega-cd-eu
priority: 2
size: 131072
note: "EU Mega CD Model 2 BIOS (March 1993). Second in EU search order."
source_ref: "source platform/libretro/libretro.c:1276"
- name: "eu_mcd1_9210.bin"
system: sega-megacd
selection_slot: "mega-cd-bios"
region: [europe, oceania]
group: mega-cd-eu
priority: 3
size: 131072
note: "EU Mega CD Model 1 BIOS (October 1992). Third in EU search order."
source_ref: "source platform/libretro/libretro.c:1276"
- name: "bios_CD_E.bin"
system: sega-megacd
selection_slot: "mega-cd-bios"
region: [europe, oceania]
group: mega-cd-eu
priority: 4
size: 131072
note: "EU Mega CD BIOS (generic name). Last in EU search order."
source_ref: "source platform/libretro/libretro.c:1276"
# -------------------------------------------------------
# Mega CD / Sega CD - JP region
# -------------------------------------------------------
- name: "jp_mcd2_921222.bin"
system: sega-megacd
selection_slot: "mega-cd-bios"
region: [japan]
group: mega-cd-jp
priority: 1
size: 131072
note: "JP Mega CD Model 2 BIOS (December 1992). First in JP search order."
source_ref: "source platform/libretro/libretro.c:1279"
- name: "jp_mcd1_9112.bin"
system: sega-megacd
selection_slot: "mega-cd-bios"
region: [japan]
group: mega-cd-jp
priority: 2
size: 131072
note: "JP Mega CD Model 1 BIOS (December 1991). Second in JP search order."
source_ref: "source platform/libretro/libretro.c:1279"
- name: "jp_mcd1_9111.bin"
system: sega-megacd
selection_slot: "mega-cd-bios"
region: [japan]
group: mega-cd-jp
priority: 3
size: 131072
note: "JP Mega CD Model 1 BIOS (November 1991). Third in JP search order."
source_ref: "source platform/libretro/libretro.c:1279"
- name: "bios_CD_J.bin"
system: sega-megacd
selection_slot: "mega-cd-bios"
region: [japan]
group: mega-cd-jp
priority: 4
size: 131072
note: "JP Mega CD BIOS (generic name). Last in JP search order."
source_ref: "source platform/libretro/libretro.c:1279"
# -------------------------------------------------------
# Sega 32X - HLE available, no frontend loads these
# -------------------------------------------------------
- name: "32X_G_BIOS.BIN"
system: sega-32x
required: false
hle_fallback: true
size: 256 # 0x100
note: "32X 68K (Genesis-side) BIOS. HLE replacement generated when NULL."
source_ref: "source pico/32x/memory.c:2208-2245"
- name: "32X_M_BIOS.BIN"
system: sega-32x
required: false
hle_fallback: true
size: 2048 # 0x800
note: "32X Master SH2 BIOS. HLE replacement generated when NULL."
source_ref: "source pico/32x/memory.c:2251-2278"
- name: "32X_S_BIOS.BIN"
system: sega-32x
required: false
hle_fallback: true
size: 1024 # 0x400
note: "32X Slave SH2 BIOS. HLE replacement generated when NULL."
source_ref: "source pico/32x/memory.c:2281-2299"
platform_details:
megacd:
bios_size: 131072 # 128 KB
hle_available: false
region_specific: true
extensions_tried: [".bin", ".zip"]
source_ref: "pico/pico_int.h:559, platform/libretro/libretro.c:1317-1325"
32x:
m68k_bios_size: 256 # 0x100
master_sh2_bios_size: 2048 # 0x800
slave_sh2_bios_size: 1024 # 0x400
hle_available: true
source_ref: "pico/pico.h:54-55, pico/pico_int.h:679-693"
sms:
hle_available: true
note: "No BIOS file loaded. VDP/RAM initialized to post-BIOS state."
source_ref: "pico/sms.c:1080-1097"