mirror of
https://github.com/Abdess/retroarch_system.git
synced 2026-10-27 14:17:25 -05:00
feat: extract the remaining retrobat generators
The launcher layer now reads the Saturn emulators whose option replaces the default path, DeSmuME's pair and firmware, the melonDS DSi files and NAND region, jzIntv arguments, BlastEm's SetBiosPath, Dolphin, Raine, GSplus, the DOSBox and capsimg copies, Tsugaru's folder chain, RPCS3, EKA2L1, BizHawk's GB switches and the folders that MAME, FBNeo, Snes9x, Flycast, ScummVM, XRoar, XM6 Pro, ArcadeDuck, Demul and B-Syndrome get. Every line of these generators that names the bios folder must be read by a record or a stated exception, or the scrape stops.
This commit is contained in:
1 parent
8bad9ca1e7
commit
bd6ab38fe1
3 files changed
+3112
-1
No files matched your search
@@ -3190,6 +3190,42 @@ launchers:
|
||||
fails_when_missing: warning, kickstart_ext_rom_file not written
|
||||
source_ref: "emulatorLauncher/Generators/Amiberry.Generator.cs:147-154, 553-557,\
|
||||
\ 686-711"
|
||||
- emulator: arcadeduck
|
||||
build: standalone
|
||||
kind: names_searched
|
||||
names:
|
||||
- <bios archive of the game's system in resources/arcadedb.yaml>
|
||||
case_insensitive: false
|
||||
search_dir: <rom directory>, then bios
|
||||
passes_to: "settings.ini [BIOS] SearchDirectory = <folder found>"
|
||||
fails_when_missing: "ApplicationException 'Missing BIOS '<biosArchive>' : place\
|
||||
\ it next to the game or in the RetroBat bios folder.'"
|
||||
source_ref: "emulatorLauncher/Generators/ArcadeDuck.Generator.cs:52, 102-122, 219,\
|
||||
\ emulatorLauncher/Generators/ArcadeDuck.Database.cs:62, 221-222"
|
||||
- emulator: arcadeduck
|
||||
build: standalone
|
||||
kind: names_searched
|
||||
names:
|
||||
- konamigv.zip
|
||||
slot: konami_gv
|
||||
case_insensitive: false
|
||||
search_dir: <rom directory>, then bios
|
||||
passes_to: "settings.ini [BIOS] SearchDirectory = <folder found>"
|
||||
fails_when_missing: "ApplicationException 'Missing BIOS '<biosArchive>' : place\
|
||||
\ it next to the game or in the RetroBat bios folder.'"
|
||||
depends_on_option: resources/arcadedb.yaml names no archive for konami_gv
|
||||
source_ref: "emulatorLauncher/Generators/ArcadeDuck.Generator.cs:52, 102-122, 219,\
|
||||
\ emulatorLauncher/Generators/ArcadeDuck.Database.cs:62, 221-222"
|
||||
- emulator: arcadeduck
|
||||
build: standalone
|
||||
kind: passes_path
|
||||
names: []
|
||||
search_dir: bios
|
||||
passes_to: "settings.ini [BIOS] SearchDirectory = bios"
|
||||
fails_when_missing: false
|
||||
depends_on_option: no bios archive known for the game's system
|
||||
source_ref: "emulatorLauncher/Generators/ArcadeDuck.Generator.cs:52, 102-122, 219,\
|
||||
\ emulatorLauncher/Generators/ArcadeDuck.Database.cs:62, 221-222"
|
||||
- emulator: ares
|
||||
build: standalone
|
||||
kind: names_searched
|
||||
@@ -3213,6 +3249,265 @@ launchers:
|
||||
passes_to: "settings.bml LaserActiveSEGAPAC/Firmware/BIOS.US (first found)"
|
||||
fails_when_missing: false
|
||||
source_ref: "emulatorLauncher/Generators/Ares.Generator.cs:524-531"
|
||||
- emulator: bizhawk
|
||||
build: standalone
|
||||
kind: fixed_name
|
||||
names:
|
||||
- gb_bios.bin
|
||||
slot: other systems
|
||||
case_insensitive: true
|
||||
search_dir: bios
|
||||
passes_to: config.ini BizHawk.Emulation.Cores.Nintendo.Sameboy.Sameboy EnableBIOS
|
||||
= true, only if the file exists, the path itself is not written
|
||||
fails_when_missing: EnableBIOS = false
|
||||
depends_on_option: core == "SameBoy", bizhawk_gb_bios on, system != "gbc"
|
||||
source_ref: "emulatorLauncher/Generators/Bizhawk.CoreOptions.cs:517-518, 524-531"
|
||||
- emulator: bizhawk
|
||||
build: standalone
|
||||
kind: fixed_name
|
||||
names:
|
||||
- gbc_bios.bin
|
||||
slot: gbc
|
||||
case_insensitive: true
|
||||
search_dir: bios
|
||||
passes_to: config.ini BizHawk.Emulation.Cores.Nintendo.Sameboy.Sameboy EnableBIOS
|
||||
= true, only if the file exists, the path itself is not written
|
||||
fails_when_missing: EnableBIOS = false
|
||||
depends_on_option: core == "SameBoy", bizhawk_gb_bios on, system == "gbc"
|
||||
source_ref: "emulatorLauncher/Generators/Bizhawk.CoreOptions.cs:517-518, 524-531"
|
||||
- emulator: bizhawk
|
||||
build: standalone
|
||||
kind: fixed_name
|
||||
names:
|
||||
- gb_bios.bin
|
||||
slot: other systems
|
||||
case_insensitive: true
|
||||
search_dir: bios
|
||||
passes_to: config.ini BizHawk.Emulation.Cores.Nintendo.Gameboy.Gameboy EnableBIOS
|
||||
= true, only if the file exists, the path itself is not written
|
||||
fails_when_missing: EnableBIOS = false
|
||||
depends_on_option: core == "Gambatte", bizhawk_gb_bios on, system != "gbc" && system
|
||||
!= "gba"
|
||||
source_ref: "emulatorLauncher/Generators/Bizhawk.CoreOptions.cs:536-537, 543-552"
|
||||
- emulator: bizhawk
|
||||
build: standalone
|
||||
kind: fixed_name
|
||||
names:
|
||||
- gbc_bios.bin
|
||||
slot: gbc
|
||||
case_insensitive: true
|
||||
search_dir: bios
|
||||
passes_to: config.ini BizHawk.Emulation.Cores.Nintendo.Gameboy.Gameboy EnableBIOS
|
||||
= true, only if the file exists, the path itself is not written
|
||||
fails_when_missing: EnableBIOS = false
|
||||
depends_on_option: core == "Gambatte", bizhawk_gb_bios on, system == "gbc"
|
||||
source_ref: "emulatorLauncher/Generators/Bizhawk.CoreOptions.cs:536-537, 543-552"
|
||||
- emulator: bizhawk
|
||||
build: standalone
|
||||
kind: fixed_name
|
||||
names:
|
||||
- gba_bios.bin
|
||||
slot: gba
|
||||
case_insensitive: true
|
||||
search_dir: bios
|
||||
passes_to: config.ini BizHawk.Emulation.Cores.Nintendo.Gameboy.Gameboy EnableBIOS
|
||||
= true, only if the file exists, the path itself is not written
|
||||
fails_when_missing: EnableBIOS = false
|
||||
depends_on_option: core == "Gambatte", bizhawk_gb_bios on, system == "gba"
|
||||
source_ref: "emulatorLauncher/Generators/Bizhawk.CoreOptions.cs:536-537, 543-552"
|
||||
- emulator: blastem
|
||||
build: standalone
|
||||
kind: fixed_name
|
||||
names:
|
||||
- bios_CD_U.bin
|
||||
case_insensitive: true
|
||||
search_dir: bios
|
||||
passes_to: blastem.cfg system.scd_bios_us, only if the file exists
|
||||
fails_when_missing: info log, scd_bios_us left as it is
|
||||
source_ref: "emulatorLauncher/Generators/Blastem.Generator.cs:258, 262, 272-279"
|
||||
- emulator: blastem
|
||||
build: standalone
|
||||
kind: fixed_name
|
||||
names:
|
||||
- bios_CD_E.bin
|
||||
case_insensitive: true
|
||||
search_dir: bios
|
||||
passes_to: blastem.cfg system.scd_bios_eu, only if the file exists
|
||||
fails_when_missing: info log, scd_bios_eu left as it is
|
||||
source_ref: "emulatorLauncher/Generators/Blastem.Generator.cs:258, 263, 272-279"
|
||||
- emulator: blastem
|
||||
build: standalone
|
||||
kind: fixed_name
|
||||
names:
|
||||
- bios_CD_J.bin
|
||||
case_insensitive: true
|
||||
search_dir: bios
|
||||
passes_to: blastem.cfg system.scd_bios_jp, only if the file exists
|
||||
fails_when_missing: info log, scd_bios_jp left as it is
|
||||
source_ref: "emulatorLauncher/Generators/Blastem.Generator.cs:258, 264, 272-279"
|
||||
- emulator: blastem
|
||||
build: standalone
|
||||
kind: fixed_name
|
||||
names:
|
||||
- colecovision.rom
|
||||
case_insensitive: true
|
||||
search_dir: bios
|
||||
passes_to: blastem.cfg system.coleco_bios_path, only if the file exists
|
||||
fails_when_missing: info log, coleco_bios_path left as it is
|
||||
source_ref: "emulatorLauncher/Generators/Blastem.Generator.cs:258, 265, 272-279"
|
||||
- emulator: blastem
|
||||
build: standalone
|
||||
kind: fixed_name
|
||||
names:
|
||||
- 32X_M_BIOS.BIN
|
||||
case_insensitive: true
|
||||
search_dir: bios
|
||||
passes_to: blastem.cfg system.s32x_main_bios, only if the file exists
|
||||
fails_when_missing: info log, s32x_main_bios left as it is
|
||||
source_ref: "emulatorLauncher/Generators/Blastem.Generator.cs:258, 267, 272-279"
|
||||
- emulator: blastem
|
||||
build: standalone
|
||||
kind: fixed_name
|
||||
names:
|
||||
- 32X_S_BIOS.BIN
|
||||
case_insensitive: true
|
||||
search_dir: bios
|
||||
passes_to: blastem.cfg system.s32x_sub_bios, only if the file exists
|
||||
fails_when_missing: info log, s32x_sub_bios left as it is
|
||||
source_ref: "emulatorLauncher/Generators/Blastem.Generator.cs:258, 268, 272-279"
|
||||
- emulator: blastem
|
||||
build: standalone
|
||||
kind: fixed_name
|
||||
names:
|
||||
- 32X_G_BIOS.BIN
|
||||
case_insensitive: true
|
||||
search_dir: bios
|
||||
passes_to: blastem.cfg system.s32x_68k_bios, only if the file exists
|
||||
fails_when_missing: info log, s32x_68k_bios left as it is
|
||||
source_ref: "emulatorLauncher/Generators/Blastem.Generator.cs:258, 269, 272-279"
|
||||
- emulator: bsyndrome
|
||||
build: standalone
|
||||
kind: passes_path
|
||||
names: []
|
||||
search_dir: bios/bsyndrome/MUSIC
|
||||
passes_to: command line --musicpath=bios/bsyndrome/MUSIC
|
||||
fails_when_missing: false
|
||||
depends_on_option: _emulator == "bsyndrome"
|
||||
source_ref: "emulatorLauncher/Generators/PortsLauncher.Configuration.cs:133-134,\
|
||||
\ 153, 157-158"
|
||||
- emulator: amiberry, hatari, hatarib, puae
|
||||
build: libretro
|
||||
kind: copies
|
||||
names:
|
||||
- capsimg.dll
|
||||
case_insensitive: true
|
||||
search_dir: bios
|
||||
passes_to: copied to <retroarch>/<name>, only when the target does not exist
|
||||
fails_when_missing: false
|
||||
depends_on_option: core in capsimgCore, rom extension ".ipf"
|
||||
source_ref: "emulatorLauncher/Generators/LibRetro.Generator.cs:1008-1017, 2659"
|
||||
- emulator: demul
|
||||
build: standalone
|
||||
kind: passes_path
|
||||
names: []
|
||||
search_dir: bios/dc
|
||||
passes_to: "Demul.ini [files] roms0 = bios/dc"
|
||||
fails_when_missing: false
|
||||
source_ref: "emulatorLauncher/Generators/Demul.Generator.cs:106, 109-114, 123-124"
|
||||
- emulator: demul
|
||||
build: standalone
|
||||
kind: passes_path
|
||||
names: []
|
||||
search_dir: bios
|
||||
passes_to: "Demul.ini [files] roms1 = bios"
|
||||
fails_when_missing: false
|
||||
source_ref: "emulatorLauncher/Generators/Demul.Generator.cs:106, 109-114, 123-124"
|
||||
- emulator: desmume
|
||||
build: standalone
|
||||
kind: fixed_name
|
||||
names:
|
||||
- bios7.bin
|
||||
- bios9.bin
|
||||
case_insensitive: true
|
||||
search_dir: bios
|
||||
passes_to: "desmume.ini [BIOS] ARM7BIOSFile, ARM9BIOSFile, only if every listed\
|
||||
\ file exists"
|
||||
fails_when_missing: UseExtBIOS left at 0
|
||||
depends_on_option: desmume_UseExtBIOS on
|
||||
source_ref: "emulatorLauncher/Generators/Desmume.Generator.cs:97-105"
|
||||
- emulator: desmume
|
||||
build: standalone
|
||||
kind: fixed_name
|
||||
names:
|
||||
- firmware.bin
|
||||
case_insensitive: true
|
||||
search_dir: bios
|
||||
passes_to: "desmume.ini [Firmware] FirmwareFile, only if the file exists"
|
||||
fails_when_missing: UseExtFirmware left at 0
|
||||
depends_on_option: desmume_UseExtFirmware on, desmume_firmwareFile unset or not
|
||||
an existing file
|
||||
source_ref: "emulatorLauncher/Generators/Desmume.Generator.cs:111-123"
|
||||
- emulator: dolphin
|
||||
build: standalone
|
||||
kind: fixed_name
|
||||
names:
|
||||
- gba_bios.bin
|
||||
case_insensitive: true
|
||||
search_dir: bios
|
||||
passes_to: "User/Config/Dolphin.ini [GBA] BIOS, written without an existence check"
|
||||
fails_when_missing: path written without an existence check
|
||||
source_ref: "emulatorLauncher/Generators/Dolphin.Generator.cs:742-743"
|
||||
- emulator: dolphin
|
||||
build: standalone
|
||||
kind: copies
|
||||
names:
|
||||
- triforce/segaboot.gcm
|
||||
- segaboot.gcm
|
||||
case_insensitive: true
|
||||
search_dir: bios
|
||||
passes_to: first found copied to <emulator>/User/Triforce/segaboot.gcm, skipped
|
||||
when the target is as large and not older
|
||||
fails_when_missing: "warning '[WARNING] Triforce: segaboot.gcm not found in bios\\\
|
||||
triforce, test menu will not be available.' when the target is absent too"
|
||||
depends_on_option: _triforce, !_crediar
|
||||
source_ref: "emulatorLauncher/Generators/Dolphin.Generator.cs:782-783, 1048-1083"
|
||||
- emulator: dosbox-pure
|
||||
build: standalone
|
||||
kind: copies
|
||||
names:
|
||||
- MT32_CONTROL.ROM
|
||||
- MT32_PCM.ROM
|
||||
- Roland_SC-55.sf2
|
||||
- Roland_SC-88.sf2
|
||||
case_insensitive: true
|
||||
search_dir: bios/scummvm/extra
|
||||
passes_to: copied to <emulator>/system/<name>, only when the target does not exist
|
||||
fails_when_missing: false
|
||||
source_ref: "emulatorLauncher/Generators/DosBoxPure.Generator.cs:132, 137-155"
|
||||
- emulator: dosbox-staging
|
||||
build: standalone
|
||||
kind: copies
|
||||
names:
|
||||
- MT32_CONTROL.ROM
|
||||
- MT32_PCM.ROM
|
||||
case_insensitive: true
|
||||
search_dir: bios/scummvm/extra
|
||||
passes_to: copied to <emulator>/mt32-roms/<name>, only when the target does not
|
||||
exist
|
||||
fails_when_missing: false
|
||||
source_ref: "emulatorLauncher/Generators/DosBoxStaging.Generator.cs:328, 333-341"
|
||||
- emulator: dosbox-staging
|
||||
build: standalone
|
||||
kind: copies
|
||||
names:
|
||||
- Roland_SC-55.sf2
|
||||
- Roland_SC-88.sf2
|
||||
case_insensitive: true
|
||||
search_dir: bios/scummvm/extra
|
||||
passes_to: copied to <emulator>/soundfonts/<name>, only when the target does not
|
||||
exist
|
||||
fails_when_missing: false
|
||||
source_ref: "emulatorLauncher/Generators/DosBoxStaging.Generator.cs:325, 343-351"
|
||||
- emulator: duckstation
|
||||
build: standalone
|
||||
kind: passes_path
|
||||
@@ -3238,6 +3533,62 @@ launchers:
|
||||
fails_when_missing: not checked by the launcher
|
||||
depends_on_option: duck_bios
|
||||
source_ref: "emulatorLauncher/Generators/Duckstation.Generator.cs:204-209, .emulationstation/es_features.cfg:11638-11646"
|
||||
- emulator: eka2l1
|
||||
build: standalone
|
||||
kind: passes_path
|
||||
names: []
|
||||
search_dir: bios/eka2l1/data
|
||||
passes_to: config.yml data-storage = bios/eka2l1/data
|
||||
fails_when_missing: false
|
||||
source_ref: "emulatorLauncher/Generators/Eka2l1.Generator.cs:153, 156"
|
||||
- emulator: fbneo
|
||||
build: standalone
|
||||
kind: passes_path
|
||||
names: []
|
||||
search_dir: bios
|
||||
passes_to: "config/fbneo64.ini szAppRomPaths[1] = bios"
|
||||
fails_when_missing: false
|
||||
depends_on_option: "File.Exists(iniFile)"
|
||||
source_ref: "emulatorLauncher/Generators/Fbneo.Generator.cs:111"
|
||||
- emulator: fbneo
|
||||
build: standalone
|
||||
kind: passes_path
|
||||
names: []
|
||||
search_dir: bios/fbneo
|
||||
passes_to: "config/fbneo64.ini szAppRomPaths[2] = bios/fbneo"
|
||||
fails_when_missing: false
|
||||
depends_on_option: "File.Exists(iniFile)"
|
||||
source_ref: "emulatorLauncher/Generators/Fbneo.Generator.cs:113, 116"
|
||||
- emulator: fbneo
|
||||
build: standalone
|
||||
kind: passes_path
|
||||
names: []
|
||||
search_dir: bios/fbneo/cheats
|
||||
passes_to: config/fbneo64.ini szAppCheatsPath = bios/fbneo/cheats
|
||||
fails_when_missing: false
|
||||
depends_on_option: "File.Exists(iniFile)"
|
||||
source_ref: "emulatorLauncher/Generators/Fbneo.Generator.cs:113, 118, 121"
|
||||
- emulator: fbneo
|
||||
build: standalone
|
||||
kind: passes_path
|
||||
names: []
|
||||
search_dir: bios/fbneo/samples
|
||||
passes_to: config/fbneo64.ini szAppSamplesPath = bios/fbneo/samples
|
||||
fails_when_missing: false
|
||||
depends_on_option: "File.Exists(iniFile)"
|
||||
source_ref: "emulatorLauncher/Generators/Fbneo.Generator.cs:123, 126"
|
||||
- emulator: gsplus
|
||||
build: standalone
|
||||
kind: fixed_name
|
||||
names:
|
||||
- APPLE2GS.ROM
|
||||
case_insensitive: true
|
||||
search_dir: bios
|
||||
passes_to: config.txt g_cfg_rom_path, written without an existence check
|
||||
fails_when_missing: path written without an existence check
|
||||
depends_on_option: "!string.IsNullOrEmpty(AppConfig[\"bios\"]) && Directory.Exists(AppConfig[\"\
|
||||
bios\"])"
|
||||
source_ref: "emulatorLauncher/Generators/GsPlus.Generator.cs:66-67"
|
||||
- emulator: jgenesis
|
||||
build: standalone
|
||||
kind: fixed_name
|
||||
@@ -3559,6 +3910,189 @@ launchers:
|
||||
fails_when_missing: option not written when the file is absent
|
||||
depends_on_option: hatarib_tos
|
||||
source_ref: "emulatorLauncher/Generators/LibRetro.CoreOptions.cs:3184-3187, .emulationstation/es_features.cfg:6667-6676"
|
||||
- emulator: jzintv
|
||||
build: standalone
|
||||
kind: fixed_name
|
||||
names:
|
||||
- exec.bin
|
||||
- grom.bin
|
||||
case_insensitive: true
|
||||
search_dir: bios
|
||||
passes_to: command line -e <bios>/exec.bin -g <bios>/grom.bin
|
||||
fails_when_missing: ApplicationException 'grom.bin or exec.bin not found in bios
|
||||
folder!'
|
||||
source_ref: "emulatorLauncher/Generators/Jzintv.Generator.cs:35-44"
|
||||
- emulator: jzintv
|
||||
build: standalone
|
||||
kind: fixed_name
|
||||
names:
|
||||
- ecs.bin
|
||||
case_insensitive: true
|
||||
search_dir: bios
|
||||
passes_to: command line -E <bios>/ecs.bin, only if the file exists
|
||||
fails_when_missing: "warning '[WARN] ECS option enabled but ecs.bin not found in\
|
||||
\ bios folder!', -s0 passed"
|
||||
depends_on_option: jzintv_useECS on, no <rom>.commands and no roms/intellivision/default.commands
|
||||
source_ref: "emulatorLauncher/Generators/Jzintv.Generator.cs:47-52, 65-79"
|
||||
- emulator: mame64
|
||||
build: standalone
|
||||
kind: passes_path
|
||||
names: []
|
||||
search_dir: bios;<rom directory>
|
||||
passes_to: command line -rp bios;<rom directory>
|
||||
fails_when_missing: false
|
||||
depends_on_option: "messMode == null || messMode.Name == \"mame\" || messMode.Name\
|
||||
\ == \"hbmame\", !string.IsNullOrEmpty(AppConfig[\"bios\"]) && Directory.Exists(AppConfig[\"\
|
||||
bios\"])"
|
||||
source_ref: "emulatorLauncher/Generators/Mame64.Generator.cs:90-93"
|
||||
- emulator: mame64
|
||||
build: standalone
|
||||
kind: passes_path
|
||||
names: []
|
||||
search_dir: bios/hbmame/samples when hbmame, else bios/mame/samples
|
||||
passes_to: command line -sp bios/hbmame/samples when hbmame, else bios/mame/samples
|
||||
fails_when_missing: false
|
||||
depends_on_option: "messMode == null || messMode.Name == \"mame\" || messMode.Name\
|
||||
\ == \"hbmame\", !string.IsNullOrEmpty(samplePath) && Directory.Exists(samplePath)"
|
||||
source_ref: "emulatorLauncher/Generators/Mame64.Generator.cs:98, 103-104"
|
||||
- emulator: mame64
|
||||
build: standalone
|
||||
kind: passes_path
|
||||
names: []
|
||||
search_dir: bios/mame/artwork
|
||||
passes_to: command line -artpath bios/mame/artwork
|
||||
fails_when_missing: false
|
||||
depends_on_option: "messMode == null || messMode.Name == \"mame\" || messMode.Name\
|
||||
\ == \"hbmame\", !string.IsNullOrEmpty(artPath) && Directory.Exists(artPath),\
|
||||
\ disable_artwork on"
|
||||
source_ref: "emulatorLauncher/Generators/Mame64.Generator.cs:108, 115-117"
|
||||
- emulator: mame64
|
||||
build: standalone
|
||||
kind: passes_path
|
||||
names: []
|
||||
search_dir: bios/mame/artwork;<emulator>/artwork;<saves>/hbmame/artwork when hbmame,
|
||||
else <saves>/mame/artwork
|
||||
passes_to: command line -artpath bios/mame/artwork;<emulator>/artwork;<saves>/hbmame/artwork
|
||||
when hbmame, else <saves>/mame/artwork
|
||||
fails_when_missing: false
|
||||
depends_on_option: "messMode == null || messMode.Name == \"mame\" || messMode.Name\
|
||||
\ == \"hbmame\", !string.IsNullOrEmpty(artPath) && Directory.Exists(artPath),\
|
||||
\ not (disable_artwork on)"
|
||||
source_ref: "emulatorLauncher/Generators/Mame64.Generator.cs:108-109, 115, 118-119"
|
||||
- emulator: mame64
|
||||
build: standalone
|
||||
kind: passes_path
|
||||
names: []
|
||||
search_dir: bios/hbmame/ini when hbmame, else bios/mame/ini, or bios/groovymame/ini
|
||||
when _groovy
|
||||
passes_to: command line -inipath bios/hbmame/ini when hbmame, else bios/mame/ini,
|
||||
or bios/groovymame/ini when _groovy
|
||||
fails_when_missing: false
|
||||
depends_on_option: "messMode == null || messMode.Name == \"mame\" || messMode.Name\
|
||||
\ == \"hbmame\", !string.IsNullOrEmpty(iniPath) && Directory.Exists(iniPath)"
|
||||
source_ref: "emulatorLauncher/Generators/Mame64.Generator.cs:71-73, 164-165"
|
||||
- emulator: mame64
|
||||
build: standalone
|
||||
kind: passes_path
|
||||
names: []
|
||||
search_dir: bios/hbmame/hash when hbmame, else bios/mame/hash
|
||||
passes_to: command line -hash bios/hbmame/hash when hbmame, else bios/mame/hash
|
||||
fails_when_missing: false
|
||||
depends_on_option: "messMode == null || messMode.Name == \"mame\" || messMode.Name\
|
||||
\ == \"hbmame\", !string.IsNullOrEmpty(hashPath) && Directory.Exists(hashPath)"
|
||||
source_ref: "emulatorLauncher/Generators/Mame64.Generator.cs:169, 174-175"
|
||||
- emulator: mame64
|
||||
build: standalone
|
||||
kind: passes_path
|
||||
names: []
|
||||
search_dir: bios/mess;bios;<rom directory>
|
||||
passes_to: command line -rp bios/mess;bios;<rom directory>
|
||||
fails_when_missing: false
|
||||
depends_on_option: "!string.IsNullOrEmpty(AppConfig[\"bios\"]) && Directory.Exists(AppConfig.GetFullPath(\"\
|
||||
bios\")), Directory.Exists(Path.Combine(bios, \"mess\"))"
|
||||
source_ref: "emulatorLauncher/Generators/MessSystem.cs:612, 660, 663-664"
|
||||
- emulator: mame
|
||||
build: libretro
|
||||
kind: passes_path
|
||||
names: []
|
||||
search_dir: bios/mess;bios;<rom directory>
|
||||
passes_to: command line -rp bios/mess;bios;<rom directory>
|
||||
fails_when_missing: false
|
||||
depends_on_option: "!string.IsNullOrEmpty(AppConfig[\"bios\"]) && Directory.Exists(AppConfig.GetFullPath(\"\
|
||||
bios\")), Directory.Exists(Path.Combine(bios, \"mess\"))"
|
||||
source_ref: "emulatorLauncher/Generators/MessSystem.cs:612, 660, 663-664"
|
||||
- emulator: mame64
|
||||
build: standalone
|
||||
kind: passes_path
|
||||
names: []
|
||||
search_dir: bios;<rom directory>
|
||||
passes_to: command line -rp bios;<rom directory>
|
||||
fails_when_missing: false
|
||||
depends_on_option: "!string.IsNullOrEmpty(AppConfig[\"bios\"]) && Directory.Exists(AppConfig.GetFullPath(\"\
|
||||
bios\")), !Directory.Exists(Path.Combine(bios, \"mess\"))"
|
||||
source_ref: "emulatorLauncher/Generators/MessSystem.cs:612, 660, 665-666"
|
||||
- emulator: mame
|
||||
build: libretro
|
||||
kind: passes_path
|
||||
names: []
|
||||
search_dir: bios;<rom directory>
|
||||
passes_to: command line -rp bios;<rom directory>
|
||||
fails_when_missing: false
|
||||
depends_on_option: "!string.IsNullOrEmpty(AppConfig[\"bios\"]) && Directory.Exists(AppConfig.GetFullPath(\"\
|
||||
bios\")), !Directory.Exists(Path.Combine(bios, \"mess\"))"
|
||||
source_ref: "emulatorLauncher/Generators/MessSystem.cs:612, 660, 665-666"
|
||||
- emulator: mame64
|
||||
build: standalone
|
||||
kind: passes_path
|
||||
names: []
|
||||
search_dir: bios/mame/ini
|
||||
passes_to: command line -inipath bios/mame/ini
|
||||
fails_when_missing: false
|
||||
source_ref: "emulatorLauncher/Generators/MessSystem.cs:612, 702-703"
|
||||
- emulator: mame64
|
||||
build: standalone
|
||||
kind: passes_path
|
||||
names: []
|
||||
search_dir: bios/mame/hash
|
||||
passes_to: command line -hash bios/mame/hash
|
||||
fails_when_missing: false
|
||||
source_ref: "emulatorLauncher/Generators/MessSystem.cs:612, 705-706"
|
||||
- emulator: melonds
|
||||
build: standalone
|
||||
kind: fixed_name
|
||||
names:
|
||||
- dsi_firmware.bin
|
||||
- dsi_bios7.bin
|
||||
- dsi_bios9.bin
|
||||
- dsi_nand.bin
|
||||
case_insensitive: true
|
||||
search_dir: bios
|
||||
passes_to: "melonDS.toml [DSi] FirmwarePath, BIOS7Path, BIOS9Path, NANDPath"
|
||||
fails_when_missing: ApplicationException 'Cannot run dsi system, dsi bios files
|
||||
are missing'
|
||||
depends_on_option: melonds_console == "dsi" || rom extension ".bin"
|
||||
source_ref: "emulatorLauncher/Generators/MelonDS.Generator.cs:34, 134-137, 187-191,\
|
||||
\ 221-227"
|
||||
- emulator: melonds
|
||||
build: standalone
|
||||
kind: scans_dir
|
||||
names:
|
||||
- "dsi_nand*{region}*.bin"
|
||||
expands:
|
||||
region:
|
||||
- USA
|
||||
- EUR
|
||||
- JPN
|
||||
- KOR
|
||||
- AUS
|
||||
- CHN
|
||||
case_insensitive: true
|
||||
search_dir: bios
|
||||
passes_to: "melonDS.toml [DSi] NANDPath, first file whose name holds the region"
|
||||
fails_when_missing: falls back to dsi_nand.bin
|
||||
depends_on_option: melonds_console == "dsi", melonds_nandregion set, rom extension
|
||||
not ".bin"
|
||||
source_ref: "emulatorLauncher/Generators/MelonDS.Generator.cs:193-202, .emulationstation/es_features.cfg:15797-15804"
|
||||
- emulator: mesen
|
||||
build: standalone
|
||||
kind: copies
|
||||
@@ -3722,6 +4256,101 @@ launchers:
|
||||
fails_when_missing: ApplicationException '<machine> machine has missing BIOS file
|
||||
'<c>' in 'bios\openmsx\share\systemroms' folder.'
|
||||
source_ref: "emulatorLauncher/Generators/OpenMSX.Generator.cs:156-159, 467"
|
||||
- emulator: kronos
|
||||
build: standalone
|
||||
kind: fixed_name
|
||||
names:
|
||||
- saturn_bios.bin
|
||||
case_insensitive: true
|
||||
search_dir: bios
|
||||
passes_to: "kronos.ini [1.0] General\\Bios, only if the file exists"
|
||||
fails_when_missing: General\Bios not written
|
||||
depends_on_option: kronos_force_bios unset
|
||||
source_ref: "emulatorLauncher/Generators/Kronos.Generator.cs:161, 169-170"
|
||||
- emulator: kronos
|
||||
build: standalone
|
||||
kind: core_option
|
||||
names:
|
||||
- saturn_bios.bin
|
||||
- sega_101.bin
|
||||
- mpr-17933.bin
|
||||
case_insensitive: true
|
||||
search_dir: bios
|
||||
passes_to: "kronos.ini [1.0] General\\Bios = <bios>/<value>, only if the file exists"
|
||||
fails_when_missing: General\Bios not written
|
||||
depends_on_option: kronos_force_bios
|
||||
source_ref: "emulatorLauncher/Generators/Kronos.Generator.cs:162-170, .emulationstation/es_features.cfg:13529-13534"
|
||||
- emulator: ssf
|
||||
build: standalone
|
||||
kind: core_option
|
||||
names:
|
||||
- saturn_bios.bin
|
||||
- sega_101.bin
|
||||
- mpr-17933.bin
|
||||
case_insensitive: true
|
||||
search_dir: bios
|
||||
passes_to: "SSF.ini [Peripheral] SaturnBIOS = <bios>/<value>, only if the file exists"
|
||||
fails_when_missing: SaturnBIOS not written
|
||||
depends_on_option: use_external_bios
|
||||
source_ref: "emulatorLauncher/Generators/SSF.Generator.cs:76-83, .emulationstation/es_features.cfg:19240-19245"
|
||||
- emulator: yabasanshiro
|
||||
build: standalone
|
||||
kind: fixed_name
|
||||
names:
|
||||
- saturn_bios.bin
|
||||
case_insensitive: true
|
||||
search_dir: bios
|
||||
passes_to: "yabause.ini [0.9.11] General\\Bios, only if the file exists"
|
||||
fails_when_missing: General\Bios not written
|
||||
depends_on_option: yabasanshiro_force_bios unset
|
||||
source_ref: "emulatorLauncher/Generators/Yabasanshiro.Generator.cs:122, 130-131"
|
||||
- emulator: yabasanshiro
|
||||
build: standalone
|
||||
kind: core_option
|
||||
names:
|
||||
- saturn_bios.bin
|
||||
- sega_101.bin
|
||||
- mpr-17933.bin
|
||||
case_insensitive: true
|
||||
search_dir: bios
|
||||
passes_to: "yabause.ini [0.9.11] General\\Bios = <bios>/<value>, only if the file\
|
||||
\ exists"
|
||||
fails_when_missing: General\Bios not written
|
||||
depends_on_option: yabasanshiro_force_bios
|
||||
source_ref: "emulatorLauncher/Generators/Yabasanshiro.Generator.cs:123-131, .emulationstation/es_features.cfg:21111-21116"
|
||||
- emulator: ymir
|
||||
build: standalone
|
||||
kind: fixed_name
|
||||
names:
|
||||
- saturn_bios.bin
|
||||
case_insensitive: true
|
||||
search_dir: bios
|
||||
passes_to: "Ymir.toml [System.IPL] Path, written without an existence check"
|
||||
fails_when_missing: path written without an existence check
|
||||
depends_on_option: ymir_force_bios unset
|
||||
source_ref: "emulatorLauncher/Generators/Ymir.Generator.cs:118, 125"
|
||||
- emulator: ymir
|
||||
build: standalone
|
||||
kind: core_option
|
||||
names:
|
||||
- saturn_bios.bin
|
||||
- sega_101.bin
|
||||
- mpr-17933.bin
|
||||
case_insensitive: true
|
||||
search_dir: bios
|
||||
passes_to: "Ymir.toml [System.IPL] Path = <bios>/<value>, written without an existence\
|
||||
\ check"
|
||||
fails_when_missing: path written without an existence check
|
||||
depends_on_option: ymir_force_bios
|
||||
source_ref: "emulatorLauncher/Generators/Ymir.Generator.cs:120-125, .emulationstation/es_features.cfg:21170-21174"
|
||||
- emulator: ymir
|
||||
build: standalone
|
||||
kind: passes_path
|
||||
names: []
|
||||
search_dir: bios
|
||||
passes_to: "Ymir.toml [General.PathOverrides] IPLROMImages = bios"
|
||||
fails_when_missing: false
|
||||
source_ref: "emulatorLauncher/Generators/Ymir.Generator.cs:143, 150"
|
||||
- emulator: pcsx2
|
||||
build: standalone
|
||||
kind: names_searched
|
||||
@@ -3888,6 +4517,95 @@ launchers:
|
||||
passes_to: swanstation_BIOS_PathNTSCJ, swanstation_BIOS_PathNTSCU, swanstation_BIOS_PathPAL
|
||||
fails_when_missing: names written without an existence check
|
||||
source_ref: "emulatorLauncher/Generators/LibRetro.CoreOptions.cs:5982-6009"
|
||||
- emulator: psxmame
|
||||
build: standalone
|
||||
kind: passes_path
|
||||
names: []
|
||||
search_dir: bios/psxmame/bios;<rom directory>
|
||||
passes_to: command line -rompath bios/psxmame/bios;<rom directory>
|
||||
fails_when_missing: false
|
||||
source_ref: "emulatorLauncher/Generators/PSXMame.Generator.cs:38, 42, 47-48"
|
||||
- emulator: raine
|
||||
build: standalone
|
||||
kind: passes_path
|
||||
names: []
|
||||
search_dir: bios
|
||||
passes_to: "config/raine32_sdl.cfg [Directories] rom_dir_1 = bios"
|
||||
fails_when_missing: false
|
||||
depends_on_option: "!string.IsNullOrEmpty(biosPath)"
|
||||
source_ref: "emulatorLauncher/Generators/Raine.Generator.cs:87, 92"
|
||||
- emulator: raine
|
||||
build: standalone
|
||||
kind: fixed_name
|
||||
names:
|
||||
- neocdz.zip
|
||||
case_insensitive: true
|
||||
search_dir: bios
|
||||
passes_to: "config/raine32_sdl.cfg [neocd] neocd_bios, written without an existence\
|
||||
\ check"
|
||||
fails_when_missing: path written without an existence check
|
||||
depends_on_option: "!string.IsNullOrEmpty(biosPath)"
|
||||
source_ref: "emulatorLauncher/Generators/Raine.Generator.cs:87, 93"
|
||||
- emulator: rpcs3
|
||||
build: standalone
|
||||
kind: fixed_name
|
||||
names:
|
||||
- PS3UPDAT.PUP
|
||||
case_insensitive: true
|
||||
search_dir: bios
|
||||
passes_to: command line --installfw <bios>/PS3UPDAT.PUP, launched instead of the
|
||||
game
|
||||
fails_when_missing: ApplicationException 'PS3 firmware is not installed in rpcs3
|
||||
emulator, either place it in \bios folder, or launch the emulator and install
|
||||
the firware.'
|
||||
depends_on_option: <emulator>/dev_flash/vsh/etc/version.txt absent
|
||||
source_ref: "emulatorLauncher/Generators/Rpcs3.Generator.cs:195-218"
|
||||
- emulator: snes9x
|
||||
build: standalone
|
||||
kind: passes_path
|
||||
names: []
|
||||
search_dir: bios
|
||||
passes_to: "snes9x.conf [Settings\\Win\\Files] Dir:Bios = bios"
|
||||
fails_when_missing: false
|
||||
source_ref: "emulatorLauncher/Generators/Snes9x.Generator.cs:126-134"
|
||||
- emulator: tsugaru
|
||||
build: standalone
|
||||
kind: passes_path
|
||||
names:
|
||||
- FMT_SYS.ROM
|
||||
case_insensitive: true
|
||||
search_dir: bios/fmtowns, then bios/fmtownsux, then <emulator>/roms, then <emulator>/fmtownsux
|
||||
passes_to: "command line: first argument <folder found>, -CMOS <folder found>/CMOS.DAT"
|
||||
fails_when_missing: "info '[TsugaruGenerator] Bios path not found', no launch"
|
||||
depends_on_option: "bios/fmtowns is a directory (biosPath stays null otherwise when\
|
||||
\ FMT_SYS.ROM is checked)"
|
||||
source_ref: "emulatorLauncher/Generators/Tsugaru.Generator.cs:37-56"
|
||||
- emulator: flycast
|
||||
build: standalone
|
||||
kind: passes_path
|
||||
names: []
|
||||
search_dir: bios/dc
|
||||
passes_to: "emu.cfg [config] Dreamcast.BiosPath = bios/dc"
|
||||
fails_when_missing: false
|
||||
source_ref: "emulatorLauncher/Generators/Flycast.Generator.cs:149, 167"
|
||||
- emulator: scummvm
|
||||
build: standalone
|
||||
kind: passes_path
|
||||
names: []
|
||||
search_dir: bios/scummvm/theme
|
||||
passes_to: "<exe>.ini [scummvm] themepath = bios/scummvm/theme"
|
||||
fails_when_missing: false
|
||||
depends_on_option: "Directory.Exists(themePath)"
|
||||
source_ref: "emulatorLauncher/Generators/ScummVm.Generator.cs:265-266, 271"
|
||||
- emulator: scummvm
|
||||
build: standalone
|
||||
kind: passes_path
|
||||
names: []
|
||||
search_dir: bios/scummvm/extra
|
||||
passes_to: "<exe>.ini [scummvm] extrapath = bios/scummvm/extra"
|
||||
fails_when_missing: false
|
||||
depends_on_option: "Directory.Exists(extraPath)"
|
||||
source_ref: "emulatorLauncher/Generators/ScummVm.Generator.cs:265-267, 275"
|
||||
- emulator: winuae
|
||||
build: standalone
|
||||
kind: names_searched
|
||||
@@ -4094,3 +4812,34 @@ launchers:
|
||||
fails_when_missing: "warning '[Generator] Chihiro media board flash missing next\
|
||||
\ to the BIOS.'"
|
||||
source_ref: "emulatorLauncher/Generators/Xemu.Generator.cs:438-441"
|
||||
- emulator: xm6pro
|
||||
build: standalone
|
||||
kind: copies
|
||||
names:
|
||||
- IPLROM.DAT
|
||||
- CGROM.DAT
|
||||
- IPLROMXV.DAT
|
||||
- IPLROMCO.DAT
|
||||
- IPLROM30.DAT
|
||||
case_insensitive: true
|
||||
search_dir: bios/keropi
|
||||
passes_to: copied to <emulator>/<name>, only when the target does not exist
|
||||
fails_when_missing: false
|
||||
depends_on_option: "!string.IsNullOrEmpty(biosRoot), Directory.Exists(biosPath)"
|
||||
source_ref: "emulatorLauncher/Generators/Xm6pro.Generator.cs:118-141"
|
||||
- emulator: xroar
|
||||
build: standalone
|
||||
kind: passes_path
|
||||
names: []
|
||||
search_dir: bios/dragon, or bios/coco when system == "coco"
|
||||
passes_to: command line -rompath bios/dragon, or bios/coco when system == "coco"
|
||||
fails_when_missing: false
|
||||
source_ref: "emulatorLauncher/Generators/Xroar.Generator.cs:76-80"
|
||||
- emulator: xroar
|
||||
build: standalone
|
||||
kind: passes_path
|
||||
names: []
|
||||
search_dir: bios/dragon
|
||||
passes_to: xroar.conf rompath ".\\..\\..\\bios\\dragon"
|
||||
fails_when_missing: false
|
||||
source_ref: "emulatorLauncher/Generators/Xroar.Generator.cs:176, 191"
|
||||
File diff suppressed because it is too large.
Load diff
@@ -464,6 +464,678 @@ class GuardedConfigWrites(unittest.TestCase):
|
||||
self.assertEqual(rl.GUARDED_WRITES[f"{G}/KegaFusion.Generator.cs"], "kega-fusion")
|
||||
|
||||
|
||||
SATURN_FEATURES = """
|
||||
<features>
|
||||
<emulator name="kronos">
|
||||
<feature name="FORCE BIOS" value="kronos_force_bios" order="103">
|
||||
<choice name="Multi-region" value="saturn_bios.bin"/>
|
||||
<choice name="JAP" value="sega_101.bin"/>
|
||||
<choice name="HLE" value="hle"/>
|
||||
</feature>
|
||||
</emulator>
|
||||
<emulator name="ymir">
|
||||
<feature name="FORCE BIOS" value="ymir_force_bios" order="100">
|
||||
<choice name="Multi-region" value="saturn_bios.bin"/>
|
||||
<choice name="EUR/US" value="mpr-17933.bin"/>
|
||||
</feature>
|
||||
</emulator>
|
||||
<emulator name="ssf">
|
||||
<feature name="FORCE BIOS" value="use_external_bios" order="100">
|
||||
<choice name="JAP" value="sega_101.bin"/>
|
||||
<choice name="HLE" value="hle"/>
|
||||
</feature>
|
||||
</emulator>
|
||||
</features>
|
||||
"""
|
||||
|
||||
KRONOS = """
|
||||
private void SetupConfig(string path)
|
||||
{
|
||||
string iniFile = Path.Combine(path, "kronos.ini");
|
||||
using (var ini = new IniFile(iniFile, IniOptions.KeepEmptyValues))
|
||||
{
|
||||
string bios = Path.Combine(AppConfig.GetFullPath("bios"), "saturn_bios.bin");
|
||||
if (SystemConfig.isOptSet("kronos_force_bios") && !string.IsNullOrEmpty(SystemConfig["kronos_force_bios"]))
|
||||
{
|
||||
if (SystemConfig["kronos_force_bios"] != "hle")
|
||||
bios = Path.Combine(AppConfig.GetFullPath("bios"), SystemConfig["kronos_force_bios"]);
|
||||
else
|
||||
hleBios = true;
|
||||
}
|
||||
if (File.Exists(bios))
|
||||
ini.WriteValue("1.0", "General\\\\Bios", bios.Replace("\\\\", "/"));
|
||||
}
|
||||
}
|
||||
"""
|
||||
|
||||
YMIR = """
|
||||
private void SetupConfiguration(string path)
|
||||
{
|
||||
string iniFile = Path.Combine(path, "Ymir.toml");
|
||||
using (var ini = new IniFile(iniFile))
|
||||
{
|
||||
string saturnBiosPath = Path.Combine(AppConfig.GetFullPath("bios"), "saturn_bios.bin");
|
||||
|
||||
if (SystemConfig.isOptSet("ymir_force_bios") && !string.IsNullOrEmpty(SystemConfig["ymir_force_bios"]))
|
||||
{
|
||||
saturnBiosPath = Path.Combine(AppConfig.GetFullPath("bios"), SystemConfig["ymir_force_bios"]);
|
||||
}
|
||||
|
||||
ini.WriteValue("System.IPL", "Path", "'" + saturnBiosPath + "'");
|
||||
string iplPath = AppConfig.GetFullPath("bios");
|
||||
ini.WriteValue("General.PathOverrides", "IPLROMImages", "'" + iplPath + "'");
|
||||
}
|
||||
}
|
||||
"""
|
||||
|
||||
SSF = """
|
||||
private void SetupConfiguration(string path)
|
||||
{
|
||||
string iniFile = Path.Combine(path, "SSF.ini");
|
||||
using (var ini = IniFile.FromFile(iniFile, IniOptions.KeepEmptyValues))
|
||||
{
|
||||
if (SystemConfig.isOptSet("use_external_bios") && !string.IsNullOrEmpty(SystemConfig["use_external_bios"]))
|
||||
{
|
||||
string saturnBios = Path.Combine(AppConfig.GetFullPath("bios"), SystemConfig["use_external_bios"]);
|
||||
if (File.Exists(saturnBios) && SystemConfig["use_external_bios"] != "hle")
|
||||
ini.WriteValue("Peripheral", "SaturnBIOS", "\\"" + saturnBios + "\\"");
|
||||
else
|
||||
ini.WriteValue("Peripheral", "SaturnBIOS", "\\"" + "" + "\\"");
|
||||
}
|
||||
}
|
||||
}
|
||||
"""
|
||||
|
||||
DESMUME = """
|
||||
private void SetupConfiguration(string path, string rom)
|
||||
{
|
||||
string settingsFile = Path.Combine(path, "desmume.ini");
|
||||
using (IniFile ini = IniFile.FromFile(settingsFile, IniOptions.KeepEmptyValues))
|
||||
{
|
||||
ini.WriteValue("BIOS", "UseExtBIOS", "0");
|
||||
if (SystemConfig.isOptSet("desmume_UseExtBIOS") && SystemConfig.getOptBoolean("desmume_UseExtBIOS"))
|
||||
{
|
||||
string bios7 = Path.Combine(AppConfig.GetFullPath("bios"), "bios7.bin");
|
||||
string bios9 = Path.Combine(AppConfig.GetFullPath("bios"), "bios9.bin");
|
||||
|
||||
if (File.Exists(bios7) && File.Exists(bios9))
|
||||
{
|
||||
ini.WriteValue("BIOS", "ARM9BIOSFile", bios9);
|
||||
ini.WriteValue("BIOS", "ARM7BIOSFile", bios7);
|
||||
ini.WriteValue("BIOS", "UseExtBIOS", "1");
|
||||
}
|
||||
}
|
||||
|
||||
if (SystemConfig.isOptSet("desmume_UseExtFirmware") && SystemConfig.getOptBoolean("desmume_UseExtFirmware"))
|
||||
{
|
||||
string firmware = Path.Combine(AppConfig.GetFullPath("bios"), "firmware.bin");
|
||||
|
||||
if (SystemConfig.isOptSet("desmume_firmwareFile") && !string.IsNullOrEmpty(SystemConfig["desmume_firmwareFile"]))
|
||||
{
|
||||
string newFirmware = SystemConfig["desmume_firmwareFile"];
|
||||
if (File.Exists(newFirmware))
|
||||
firmware = newFirmware;
|
||||
}
|
||||
|
||||
if (File.Exists(firmware))
|
||||
{
|
||||
ini.WriteValue("Firmware", "FirmwareFile", firmware);
|
||||
ini.WriteValue("Firmware", "UseExtFirmware", "1");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
"""
|
||||
|
||||
MELONDS_DSI = """
|
||||
bool bootToDSINand = Path.GetExtension(rom).ToLowerInvariant() == ".bin";
|
||||
|
||||
private void SetupConfiguration(string path, string rom, bool bootToDSINand = false)
|
||||
{
|
||||
string settingsFile = Path.Combine(path, "melonDS.toml");
|
||||
using (IniTomlFile ini = IniTomlFile.FromFile(settingsFile, IniTomlOptions.UseSpaces))
|
||||
{
|
||||
bool dsi = SystemConfig.isOptSet("melonds_console") && SystemConfig["melonds_console"] == "dsi";
|
||||
|
||||
if (bootToDSINand)
|
||||
dsi = true;
|
||||
|
||||
if (dsi)
|
||||
{
|
||||
string biosPath = AppConfig.GetFullPath("bios");
|
||||
string dsibios9 = Path.Combine(biosPath, "dsi_bios9.bin");
|
||||
string dsinand = Path.Combine(biosPath, "dsi_nand.bin");
|
||||
|
||||
if (SystemConfig.isOptSet("melonds_nandregion") && !string.IsNullOrEmpty(SystemConfig["melonds_nandregion"]))
|
||||
{
|
||||
string region = SystemConfig["melonds_nandregion"];
|
||||
string match = Directory.GetFiles(biosPath, "dsi_nand*.bin")
|
||||
.FirstOrDefault(f => Path.GetFileNameWithoutExtension(f)
|
||||
.IndexOf(region, StringComparison.OrdinalIgnoreCase) >= 0);
|
||||
|
||||
if (match != null)
|
||||
dsinand = match;
|
||||
}
|
||||
|
||||
if (!File.Exists(dsibios9) || !File.Exists(dsinand))
|
||||
throw new ApplicationException("Cannot run dsi system, dsi bios files are missing");
|
||||
|
||||
ini.WriteValue("DSi", "BIOS9Path", "\\"" + dsibios9.Replace("\\\\", "/") + "\\"");
|
||||
ini.WriteValue("DSi", "NANDPath", "\\"" + dsinand.Replace("\\\\", "/") + "\\"");
|
||||
}
|
||||
}
|
||||
}
|
||||
"""
|
||||
|
||||
MELONDS_FEATURES = """
|
||||
<emulator name="melonds">
|
||||
<feature name="DSI NAND REGION" value="melonds_nandregion" order="103">
|
||||
<choice name="USA" value="USA"/>
|
||||
<choice name="Japan" value="JPN"/>
|
||||
</feature>
|
||||
</emulator>
|
||||
"""
|
||||
|
||||
JZINTV = """
|
||||
public override ProcessStartInfo Generate(string system, string rom)
|
||||
{
|
||||
string gromPath = Path.Combine(AppConfig.GetFullPath("bios"), "grom.bin");
|
||||
string execPath = Path.Combine(AppConfig.GetFullPath("bios"), "exec.bin");
|
||||
|
||||
if (!File.Exists(gromPath) || !File.Exists(execPath))
|
||||
throw new ApplicationException("grom.bin or exec.bin not found in bios folder!");
|
||||
|
||||
commandArray.Add("-e");
|
||||
commandArray.Add("\\"" + execPath + "\\"");
|
||||
commandArray.Add("-g");
|
||||
commandArray.Add("\\"" + gromPath + "\\"");
|
||||
|
||||
string commandFile = rom.Replace(Path.GetExtension(rom), ".commands");
|
||||
|
||||
if (!File.Exists(commandFile))
|
||||
commandFile = Path.Combine(AppConfig.GetFullPath("roms"),"intellivision", "default.commands");
|
||||
|
||||
if (File.Exists(commandFile))
|
||||
{
|
||||
}
|
||||
else
|
||||
{
|
||||
if (SystemConfig.getOptBoolean("jzintv_useECS"))
|
||||
{
|
||||
string ecsPath = Path.Combine(AppConfig.GetFullPath("bios"), "ecs.bin");
|
||||
|
||||
if (File.Exists(ecsPath))
|
||||
{
|
||||
commandArray.Add("-E");
|
||||
commandArray.Add("\\"" + ecsPath + "\\"");
|
||||
}
|
||||
else
|
||||
{
|
||||
SimpleLogger.Instance.Warning("[WARN] ecs.bin not found in bios folder!");
|
||||
commandArray.Add("-s0");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
"""
|
||||
|
||||
BLASTEM = """
|
||||
private void SetupConfiguration(string path)
|
||||
{
|
||||
string targetCfg = Path.Combine(path, "blastem.cfg");
|
||||
var sys = cfg.GetOrCreateSection("system");
|
||||
}
|
||||
|
||||
private void SetupSystem(BlastemConfigNode sys, string path)
|
||||
{
|
||||
string bios = AppConfig.GetFullPath("bios");
|
||||
SetBiosPath(sys, "scd_bios_us", bios, "bios_CD_U.bin");
|
||||
SetBiosPath(sys, "coleco_bios_path", bios, "colecovision.rom");
|
||||
}
|
||||
|
||||
private static void SetBiosPath(BlastemConfigNode sys, string key, string biosPath, string fileName)
|
||||
{
|
||||
string file = Path.Combine(biosPath, fileName);
|
||||
if (File.Exists(file))
|
||||
sys[key] = file;
|
||||
else
|
||||
SimpleLogger.Instance.Info("[Generator] BIOS not found, leaving " + key + " alone : " + file);
|
||||
}
|
||||
"""
|
||||
|
||||
DOLPHIN = """
|
||||
private void SetupGeneralConfig(string path)
|
||||
{
|
||||
string iniFile = Path.Combine(path, "User", "Config", "Dolphin.ini");
|
||||
using (var ini = new IniFile(iniFile, IniOptions.UseSpaces))
|
||||
{
|
||||
string gbaBiosPath = Path.Combine(AppConfig.GetFullPath("bios"), "gba_bios.bin");
|
||||
ini.WriteValue("GBA", "BIOS", gbaBiosPath);
|
||||
|
||||
if (_triforce)
|
||||
{
|
||||
if (!_crediar)
|
||||
CopySegaBoot(path);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void CopySegaBoot(string path)
|
||||
{
|
||||
string target = Path.Combine(path, "User", "Triforce", "segaboot.gcm");
|
||||
|
||||
string[] candidates = new string[]
|
||||
{
|
||||
Path.Combine(AppConfig.GetFullPath("bios"), "triforce", "segaboot.gcm"),
|
||||
Path.Combine(AppConfig.GetFullPath("bios"), "segaboot.gcm")
|
||||
};
|
||||
|
||||
string source = candidates.FirstOrDefault(f => File.Exists(f));
|
||||
if (source == null)
|
||||
{
|
||||
if (!File.Exists(target))
|
||||
SimpleLogger.Instance.Warning("[WARNING] segaboot.gcm not found");
|
||||
return;
|
||||
}
|
||||
|
||||
if (dst.Exists && dst.Length == src.Length && dst.LastWriteTimeUtc >= src.LastWriteTimeUtc)
|
||||
return;
|
||||
}
|
||||
|
||||
private static bool GetRvzHash(string rvzPath)
|
||||
{
|
||||
string dolphinTool = Path.Combine(Program.AppConfig.GetFullPath("bios"), "dolphin-emu", "DolphinTool.exe");
|
||||
}
|
||||
"""
|
||||
|
||||
DOSBOX = """
|
||||
private void SearchAndCopySoundFiles(string path)
|
||||
{
|
||||
string targetPathFluidSynth = Path.Combine(path, "soundfonts");
|
||||
string targetPathmt32 = Path.Combine(path, "mt32-roms");
|
||||
|
||||
try
|
||||
{
|
||||
string mtcontrolsource = Path.Combine(AppConfig.GetFullPath("bios"), "scummvm", "extra", "MT32_CONTROL.ROM");
|
||||
string mtcontroltarget = Path.Combine(targetPathmt32, "MT32_CONTROL.ROM");
|
||||
if (!File.Exists(mtcontroltarget) && File.Exists(mtcontrolsource))
|
||||
try { File.Copy(mtcontrolsource, mtcontroltarget); } catch { }
|
||||
|
||||
string roland55source = Path.Combine(AppConfig.GetFullPath("bios"), "scummvm", "extra", "Roland_SC-55.sf2");
|
||||
string roland55target = Path.Combine(targetPathFluidSynth, "Roland_SC-55.sf2");
|
||||
if (!File.Exists(roland55target) && File.Exists(roland55source))
|
||||
try { File.Copy(roland55source, roland55target); } catch { }
|
||||
}
|
||||
catch
|
||||
{
|
||||
}
|
||||
}
|
||||
"""
|
||||
|
||||
TSUGARU = """
|
||||
public override ProcessStartInfo Generate(string system, string rom)
|
||||
{
|
||||
string biosPath = null;
|
||||
|
||||
if (Directory.Exists(Path.Combine(AppConfig.GetFullPath("bios"), "fmtowns")))
|
||||
biosPath = Path.Combine(AppConfig.GetFullPath("bios"), "fmtowns");
|
||||
if (!File.Exists(Path.Combine(biosPath, "FMT_SYS.ROM")))
|
||||
biosPath = Path.Combine(AppConfig.GetFullPath("bios"), "fmtownsux");
|
||||
if (!File.Exists(Path.Combine(biosPath, "FMT_SYS.ROM")))
|
||||
biosPath = Path.Combine(path, "roms");
|
||||
if (!File.Exists(Path.Combine(biosPath, "FMT_SYS.ROM")))
|
||||
{
|
||||
SimpleLogger.Instance.Info("[TsugaruGenerator] Bios path not found");
|
||||
return null;
|
||||
}
|
||||
|
||||
commandArray.Add(biosPath);
|
||||
commandArray.Add("-CMOS");
|
||||
commandArray.Add(Path.Combine(biosPath, "CMOS.DAT"));
|
||||
}
|
||||
"""
|
||||
|
||||
EKA2L1 = """
|
||||
public override ProcessStartInfo Generate(string system, string rom)
|
||||
{
|
||||
/*if (rom != null)
|
||||
{
|
||||
string bios = Path.Combine(AppConfig.GetFullPath("bios"), "N-Gage Installer.sis");
|
||||
}*/
|
||||
}
|
||||
|
||||
private void SetupConfiguration(string path)
|
||||
{
|
||||
var yml = YmlFile.Load(Path.Combine(path, "config.yml"));
|
||||
string dataFolder = Path.Combine(AppConfig.GetFullPath("bios"), "eka2l1", "data").Replace("\\\\", "/");
|
||||
yml["data-storage"] = dataFolder;
|
||||
}
|
||||
"""
|
||||
|
||||
BIZHAWK_GB = """
|
||||
private void ConfigureGambatte(DynamicJson coreSyncSettings, string core, string system)
|
||||
{
|
||||
if (core != "Gambatte")
|
||||
return;
|
||||
|
||||
var gambatteSync = coreSyncSettings.GetOrCreateContainer("BizHawk.Emulation.Cores.Nintendo.Gameboy.Gameboy");
|
||||
|
||||
string gbBios = Path.Combine(AppConfig.GetFullPath("bios"), "gb_bios.bin");
|
||||
if (system == "gbc")
|
||||
gbBios = Path.Combine(AppConfig.GetFullPath("bios"), "gbc_bios.bin");
|
||||
else if (system == "gba")
|
||||
gbBios = Path.Combine(AppConfig.GetFullPath("bios"), "gba_bios.bin");
|
||||
|
||||
if (File.Exists(gbBios) && SystemConfig.getOptBoolean("bizhawk_gb_bios"))
|
||||
gambatteSync["EnableBIOS"] = "true";
|
||||
else
|
||||
gambatteSync["EnableBIOS"] = "false";
|
||||
}
|
||||
"""
|
||||
|
||||
BIZHAWK_CONFIG = """
|
||||
string configFile = Path.Combine(path, "config.ini");
|
||||
"""
|
||||
|
||||
MESS = """
|
||||
public List<string> GetMameCommandLineArguments(string system, string rom, bool standalone = false)
|
||||
{
|
||||
string bios = AppConfig.GetFullPath("bios");
|
||||
|
||||
commandArray.Add("-rp");
|
||||
if (!string.IsNullOrEmpty(AppConfig["bios"]) && Directory.Exists(AppConfig.GetFullPath("bios")))
|
||||
{
|
||||
if (Directory.Exists(Path.Combine(bios, "mess")))
|
||||
commandArray.Add(Path.Combine(bios, "mess") + ";" + bios + ";" + Path.GetDirectoryName(rom));
|
||||
else
|
||||
commandArray.Add(bios + ";" + Path.GetDirectoryName(rom));
|
||||
}
|
||||
|
||||
if (standalone)
|
||||
{
|
||||
commandArray.Add("-hash");
|
||||
commandArray.Add(EnsureDirectoryExists(Path.Combine(bios, "mame", "hash")));
|
||||
}
|
||||
}
|
||||
"""
|
||||
|
||||
MAME64 = """
|
||||
public override ProcessStartInfo Generate(string system, string rom)
|
||||
{
|
||||
if (messMode == null)
|
||||
{
|
||||
List<string> commandArray = new List<string>
|
||||
{
|
||||
"-skip_gameinfo",
|
||||
"-rp"
|
||||
};
|
||||
if (!string.IsNullOrEmpty(AppConfig["bios"]) && Directory.Exists(AppConfig["bios"]))
|
||||
commandArray.Add(AppConfig.GetFullPath("bios") + ";" + Path.GetDirectoryName(rom));
|
||||
|
||||
string samplePath = hbmame? Path.Combine(AppConfig.GetFullPath("bios"), "hbmame", "samples") : Path.Combine(AppConfig.GetFullPath("bios"), "mame", "samples");
|
||||
commandArray.Add("-sp");
|
||||
commandArray.Add(samplePath);
|
||||
}
|
||||
}
|
||||
"""
|
||||
|
||||
XROAR = """
|
||||
public override ProcessStartInfo Generate(string system, string rom)
|
||||
{
|
||||
commandArray.Add("-rompath");
|
||||
string romPath = Path.Combine(AppConfig.GetFullPath("bios"), "dragon");
|
||||
if (system == "coco")
|
||||
romPath = Path.Combine(AppConfig.GetFullPath("bios"), "coco");
|
||||
commandArray.Add("\\"" + romPath + "\\"");
|
||||
string setupPath = Path.Combine(path, "xroar.conf");
|
||||
}
|
||||
|
||||
private void SetupConfiguration(string setupPath)
|
||||
{
|
||||
string rompath = "rompath \\".\\\\\\\\..\\\\\\\\..\\\\\\\\bios\\\\\\\\dragon\\"";
|
||||
for (int i = 0; i < lines.Count; i++)
|
||||
{
|
||||
if (lines[i].StartsWith("rompath "))
|
||||
lines[i] = rompath;
|
||||
}
|
||||
}
|
||||
"""
|
||||
|
||||
|
||||
def _feature_sources(path: str, text: str, features: str) -> dict[str, rl.Source]:
|
||||
return _sources(**{path: text, rl.FEATURES: features})
|
||||
|
||||
|
||||
class OptionReplacesThePath(unittest.TestCase):
|
||||
def test_kronos_default_then_option_without_hle(self):
|
||||
path = f"{G}/Kronos.Generator.cs"
|
||||
sources = _feature_sources(path, KRONOS, SATURN_FEATURES)
|
||||
fixed, option = rl._option_path_in(sources[path], sources[rl.FEATURES], "kronos")
|
||||
self.assertEqual(fixed["names"], ["saturn_bios.bin"])
|
||||
self.assertEqual(fixed["depends_on_option"], "kronos_force_bios unset")
|
||||
self.assertEqual(
|
||||
fixed["passes_to"], "kronos.ini [1.0] General\\Bios, only if the file exists"
|
||||
)
|
||||
self.assertEqual(fixed["source_ref"], f"{path}:6, 14-15")
|
||||
self.assertEqual(option["kind"], "core_option")
|
||||
self.assertEqual(option["names"], ["saturn_bios.bin", "sega_101.bin"])
|
||||
self.assertEqual(option["source_ref"], f"{path}:7-15, {rl.FEATURES}:3-7")
|
||||
|
||||
def test_ymir_writes_without_a_check_and_passes_the_folder(self):
|
||||
path = f"{G}/Ymir.Generator.cs"
|
||||
sources = _feature_sources(path, YMIR, SATURN_FEATURES)
|
||||
fixed, option, folder = rl._option_path_in(sources[path], sources[rl.FEATURES], "ymir")
|
||||
self.assertEqual(
|
||||
fixed["passes_to"], "Ymir.toml [System.IPL] Path, written without an existence check"
|
||||
)
|
||||
self.assertEqual(option["names"], ["saturn_bios.bin", "mpr-17933.bin"])
|
||||
self.assertEqual(folder["kind"], "passes_path")
|
||||
self.assertEqual(
|
||||
folder["passes_to"], "Ymir.toml [General.PathOverrides] IPLROMImages = bios"
|
||||
)
|
||||
|
||||
def test_ssf_has_no_default_name(self):
|
||||
path = f"{G}/SSF.Generator.cs"
|
||||
sources = _feature_sources(path, SSF, SATURN_FEATURES)
|
||||
[option] = rl._option_path_in(sources[path], sources[rl.FEATURES], "ssf")
|
||||
self.assertEqual(option["names"], ["sega_101.bin"])
|
||||
self.assertEqual(
|
||||
option["passes_to"],
|
||||
"SSF.ini [Peripheral] SaturnBIOS = <bios>/<value>, only if the file exists",
|
||||
)
|
||||
|
||||
|
||||
class FilesNeededTogether(unittest.TestCase):
|
||||
def test_desmume_pair_and_firmware_override(self):
|
||||
pair, firmware = rl.desmume(_sources(**{f"{G}/Desmume.Generator.cs": DESMUME}))
|
||||
self.assertEqual(pair["names"], ["bios7.bin", "bios9.bin"])
|
||||
self.assertEqual(
|
||||
pair["passes_to"],
|
||||
"desmume.ini [BIOS] ARM7BIOSFile, ARM9BIOSFile, only if every listed file exists",
|
||||
)
|
||||
self.assertEqual(pair["fails_when_missing"], "UseExtBIOS left at 0")
|
||||
self.assertEqual(pair["depends_on_option"], "desmume_UseExtBIOS on")
|
||||
self.assertEqual(firmware["names"], ["firmware.bin"])
|
||||
self.assertEqual(
|
||||
firmware["depends_on_option"],
|
||||
"desmume_UseExtFirmware on, desmume_firmwareFile unset or not an existing file",
|
||||
)
|
||||
|
||||
def test_melonds_dsi_files_and_nand_region(self):
|
||||
fixed, region = rl.melonds_dsi(
|
||||
_sources(**{f"{G}/MelonDS.Generator.cs": MELONDS_DSI, rl.FEATURES: MELONDS_FEATURES})
|
||||
)
|
||||
self.assertEqual(fixed["names"], ["dsi_bios9.bin", "dsi_nand.bin"])
|
||||
self.assertEqual(fixed["passes_to"], "melonDS.toml [DSi] BIOS9Path, NANDPath")
|
||||
self.assertEqual(
|
||||
fixed["fails_when_missing"],
|
||||
"ApplicationException 'Cannot run dsi system, dsi bios files are missing'",
|
||||
)
|
||||
self.assertEqual(
|
||||
fixed["depends_on_option"], 'melonds_console == "dsi" || rom extension ".bin"'
|
||||
)
|
||||
self.assertEqual(region["kind"], "scans_dir")
|
||||
self.assertEqual(region["names"], ["dsi_nand*{region}*.bin"])
|
||||
self.assertEqual(region["expands"], {"region": ["USA", "JPN"]})
|
||||
self.assertEqual(region["fails_when_missing"], "falls back to dsi_nand.bin")
|
||||
|
||||
def test_jzintv_flags_in_command_line_order(self):
|
||||
both, ecs = rl.jzintv(_sources(**{f"{G}/Jzintv.Generator.cs": JZINTV}))
|
||||
self.assertEqual(both["names"], ["exec.bin", "grom.bin"])
|
||||
self.assertEqual(both["passes_to"], "command line -e <bios>/exec.bin -g <bios>/grom.bin")
|
||||
self.assertEqual(ecs["names"], ["ecs.bin"])
|
||||
self.assertEqual(
|
||||
ecs["depends_on_option"],
|
||||
"jzintv_useECS on, no <rom>.commands and no roms/intellivision/default.commands",
|
||||
)
|
||||
self.assertEqual(
|
||||
ecs["fails_when_missing"],
|
||||
"warning '[WARN] ecs.bin not found in bios folder!', -s0 passed",
|
||||
)
|
||||
|
||||
|
||||
class HelpersAndCopies(unittest.TestCase):
|
||||
def test_blastem_one_record_per_helper_call(self):
|
||||
records = rl.blastem(_sources(**{f"{G}/Blastem.Generator.cs": BLASTEM}))
|
||||
self.assertEqual(
|
||||
[(r["names"], r["passes_to"]) for r in records],
|
||||
[
|
||||
(["bios_CD_U.bin"], "blastem.cfg system.scd_bios_us, only if the file exists"),
|
||||
(
|
||||
["colecovision.rom"],
|
||||
"blastem.cfg system.coleco_bios_path, only if the file exists",
|
||||
),
|
||||
],
|
||||
)
|
||||
self.assertEqual(records[0]["source_ref"], f"{G}/Blastem.Generator.cs:9-10, 14-21")
|
||||
|
||||
def test_dolphin_unchecked_write_and_segaboot_candidates(self):
|
||||
gba, segaboot = rl.dolphin(_sources(**{f"{G}/Dolphin.Generator.cs": DOLPHIN}))
|
||||
self.assertEqual(gba["names"], ["gba_bios.bin"])
|
||||
self.assertEqual(
|
||||
gba["passes_to"],
|
||||
"User/Config/Dolphin.ini [GBA] BIOS, written without an existence check",
|
||||
)
|
||||
self.assertEqual(segaboot["kind"], "copies")
|
||||
self.assertEqual(segaboot["names"], ["triforce/segaboot.gcm", "segaboot.gcm"])
|
||||
self.assertEqual(segaboot["depends_on_option"], "_triforce, !_crediar")
|
||||
|
||||
def test_dosbox_copies_grouped_by_target_folder(self):
|
||||
sources = _sources(
|
||||
**{f"{G}/DosBoxPure.Generator.cs": DOSBOX, f"{G}/DosBoxStaging.Generator.cs": DOSBOX}
|
||||
)
|
||||
records = rl.dosbox_copies(sources)
|
||||
self.assertEqual(
|
||||
[(r["emulator"], r["names"], r["passes_to"]) for r in records[:2]],
|
||||
[
|
||||
(
|
||||
"dosbox-pure",
|
||||
["MT32_CONTROL.ROM"],
|
||||
"copied to <emulator>/mt32-roms/<name>, only when the target does not exist",
|
||||
),
|
||||
(
|
||||
"dosbox-pure",
|
||||
["Roland_SC-55.sf2"],
|
||||
"copied to <emulator>/soundfonts/<name>, only when the target does not exist",
|
||||
),
|
||||
],
|
||||
)
|
||||
self.assertEqual(records[0]["search_dir"], "bios/scummvm/extra")
|
||||
|
||||
def test_tsugaru_folder_chain(self):
|
||||
[record] = rl.tsugaru(_sources(**{f"{G}/Tsugaru.Generator.cs": TSUGARU}))
|
||||
self.assertEqual(record["names"], ["FMT_SYS.ROM"])
|
||||
self.assertEqual(
|
||||
record["search_dir"], "bios/fmtowns, then bios/fmtownsux, then <emulator>/roms"
|
||||
)
|
||||
self.assertEqual(
|
||||
record["fails_when_missing"], "info '[TsugaruGenerator] Bios path not found', no launch"
|
||||
)
|
||||
|
||||
def test_commented_code_is_not_read(self):
|
||||
[record] = rl.eka2l1(_sources(**{f"{G}/Eka2l1.Generator.cs": EKA2L1}))
|
||||
self.assertEqual(record["passes_to"], "config.yml data-storage = bios/eka2l1/data")
|
||||
|
||||
def test_bizhawk_gb_one_slot_per_system(self):
|
||||
records = rl.bizhawk_gb(
|
||||
_sources(
|
||||
**{
|
||||
f"{G}/Bizhawk.CoreOptions.cs": BIZHAWK_GB,
|
||||
f"{G}/Bizhawk.Generator.cs": BIZHAWK_CONFIG,
|
||||
}
|
||||
)
|
||||
)
|
||||
self.assertEqual(
|
||||
[(r["slot"], r["names"]) for r in records],
|
||||
[
|
||||
("other systems", ["gb_bios.bin"]),
|
||||
("gbc", ["gbc_bios.bin"]),
|
||||
("gba", ["gba_bios.bin"]),
|
||||
],
|
||||
)
|
||||
self.assertEqual(
|
||||
records[0]["depends_on_option"],
|
||||
'core == "Gambatte", bizhawk_gb_bios on, system != "gbc" && system != "gba"',
|
||||
)
|
||||
self.assertEqual(records[0]["fails_when_missing"], "EnableBIOS = false")
|
||||
|
||||
|
||||
class FolderArguments(unittest.TestCase):
|
||||
def test_mess_folders_shared_with_the_libretro_core(self):
|
||||
sources = _sources(**{f"{G}/MessSystem.cs": MESS, f"{G}/Mame64.Generator.cs": MAME64})
|
||||
records = rl.mame(sources)
|
||||
mess = [r for r in records if r["source_ref"].startswith(f"{G}/MessSystem.cs")]
|
||||
self.assertEqual(
|
||||
[(r["emulator"], r["passes_to"]) for r in mess],
|
||||
[
|
||||
("mame64", "command line -rp bios/mess;bios;<rom directory>"),
|
||||
("mame", "command line -rp bios/mess;bios;<rom directory>"),
|
||||
("mame64", "command line -rp bios;<rom directory>"),
|
||||
("mame", "command line -rp bios;<rom directory>"),
|
||||
("mame64", "command line -hash bios/mame/hash"),
|
||||
],
|
||||
)
|
||||
self.assertTrue(
|
||||
mess[2]["depends_on_option"].endswith('!Directory.Exists(Path.Combine(bios, "mess"))')
|
||||
)
|
||||
self.assertNotIn("depends_on_option", mess[4])
|
||||
|
||||
def test_mame64_ternary_folder(self):
|
||||
sources = _sources(**{f"{G}/MessSystem.cs": MESS, f"{G}/Mame64.Generator.cs": MAME64})
|
||||
own = [r for r in rl.mame(sources) if r["source_ref"].startswith(f"{G}/Mame64")]
|
||||
self.assertEqual(own[0]["passes_to"], "command line -rp bios;<rom directory>")
|
||||
self.assertEqual(
|
||||
own[1]["search_dir"], "bios/hbmame/samples when hbmame, else bios/mame/samples"
|
||||
)
|
||||
|
||||
def test_xroar_reassigned_folder_and_config_line(self):
|
||||
argument, config = rl.xroar(_sources(**{f"{G}/Xroar.Generator.cs": XROAR}))
|
||||
self.assertEqual(argument["search_dir"], 'bios/dragon, or bios/coco when system == "coco"')
|
||||
self.assertEqual(config["search_dir"], "bios/dragon")
|
||||
self.assertEqual(
|
||||
config["passes_to"], 'xroar.conf rompath ".\\\\..\\\\..\\\\bios\\\\dragon"'
|
||||
)
|
||||
|
||||
|
||||
class EveryBiosReferenceIsRead(unittest.TestCase):
|
||||
def test_unread_reference_stops_the_scrape(self):
|
||||
extra = EKA2L1 + (
|
||||
"\n private void Other()\n {\n"
|
||||
' string other = Path.Combine(AppConfig.GetFullPath("bios"), "other.bin");\n'
|
||||
" }\n"
|
||||
)
|
||||
with self.assertRaises(rl.LauncherPatternMissing) as caught:
|
||||
rl.eka2l1(_sources(**{f"{G}/Eka2l1.Generator.cs": extra}))
|
||||
self.assertIn("bios reference at line", str(caught.exception))
|
||||
|
||||
def test_semicolon_inside_a_string_does_not_end_the_value(self):
|
||||
src = rl.Source(
|
||||
"x.cs",
|
||||
'void f(string rom)\n{\n string p = AppConfig.GetFullPath("bios") + ";" + Path.GetDirectoryName(rom);\n}\n',
|
||||
)
|
||||
self.assertEqual(rl._render(src, "p", 0, len(src.text))[0], "bios;<rom directory>")
|
||||
|
||||
|
||||
class AbsentConstructStopsTheScrape(unittest.TestCase):
|
||||
def test_each_extractor_raises_on_an_empty_source(self):
|
||||
empty = {path: rl.Source(path, "") for path in rl.SOURCE_FILES}
|
||||
|
||||
Reference in new issue
Block a user