From 4e41fad9b632d6b4deb901d8f8c412d84a7373e3 Mon Sep 17 00:00:00 2001 From: Abdessamad Derraz <3028866+Abdess@users.noreply.github.com> Date: Wed, 21 Oct 2026 10:04:58 +0200 Subject: [PATCH] fix: give bios_U.sms every export territory sms_cart_region_detect returns REGION_USA for any cartridge outside its CRC list whose header is not Japanese, so Genesis Plus GX and its two forks open bios_U.sms for Australian and Brazilian cartridges as well. Tagged north-america and europe only, --region australia,japan dropped it from the pack. The tag now adds latin-america and oceania. --- emulators/genesis_plus_gx.yml | 4 ++-- emulators/genesis_plus_gx_expanded.yml | 4 ++-- emulators/genesis_plus_gx_wide.yml | 4 ++-- tests/test_region.py | 4 ++++ 4 files changed, 10 insertions(+), 6 deletions(-) diff --git a/emulators/genesis_plus_gx.yml b/emulators/genesis_plus_gx.yml index f7b87bd7..042fc165 100644 --- a/emulators/genesis_plus_gx.yml +++ b/emulators/genesis_plus_gx.yml @@ -63,9 +63,9 @@ files: # ------------------------------------------------------- - name: bios_U.sms system: sega-mastersystem - region: [north-america, europe] + region: [north-america, latin-america, europe, oceania] required: false - note: "Master System (NTSC-U) boot ROM. Snail maze game built in. REGION_USA is the default of sms_cart_region_detect for any export header outside the PAL CRC list, so European cartridges load it too (core/cart_hw/sms_cart.c:831-874)." + note: "Master System (NTSC-U) boot ROM. Snail maze game built in. REGION_USA is the default of sms_cart_region_detect for any export header outside the PAL CRC list, so European, Australian and Brazilian cartridges outside that list load it too (core/cart_hw/sms_cart.c:831-874)." source_ref: "source core/loadrom.c:511" - name: bios_E.sms diff --git a/emulators/genesis_plus_gx_expanded.yml b/emulators/genesis_plus_gx_expanded.yml index 6baed6b5..18e54e52 100644 --- a/emulators/genesis_plus_gx_expanded.yml +++ b/emulators/genesis_plus_gx_expanded.yml @@ -68,9 +68,9 @@ files: - name: bios_U.sms system: sega-mastersystem - region: [north-america, europe] + region: [north-america, latin-america, europe, oceania] required: false - note: "Master System (NTSC-U) boot ROM, loaded for REGION_USA when the bios option is on." + note: "Master System (NTSC-U) boot ROM, loaded for REGION_USA when the bios option is on. REGION_USA is the default of sms_cart_region_detect for any export header outside its CRC list, so European, Australian and Brazilian cartridges outside that list load it too (core/cart_hw/sms_cart.c:865-866)." source_ref: "source core/loadrom.c:510" - name: bios_E.sms diff --git a/emulators/genesis_plus_gx_wide.yml b/emulators/genesis_plus_gx_wide.yml index f97100fd..ae9d229b 100644 --- a/emulators/genesis_plus_gx_wide.yml +++ b/emulators/genesis_plus_gx_wide.yml @@ -49,9 +49,9 @@ files: - name: bios_U.sms system: sega-mastersystem - region: [north-america, europe] + region: [north-america, latin-america, europe, oceania] required: false - note: "REGION_USA is the default of sms_cart_region_detect for any export header outside the PAL CRC list, so European cartridges load it too (core/cart_hw/sms_cart.c:863-864)." + note: "REGION_USA is the default of sms_cart_region_detect for any export header outside the PAL CRC list, so European, Australian and Brazilian cartridges outside that list load it too (core/cart_hw/sms_cart.c:863-864)." source_ref: "source core/loadrom.c:512" - name: bios_E.sms diff --git a/tests/test_region.py b/tests/test_region.py index 0e54c0c9..0068e364 100644 --- a/tests/test_region.py +++ b/tests/test_region.py @@ -919,6 +919,10 @@ class RegionalRequestsKeepWhatTheCodeLoads(unittest.TestCase): ("bizhawk", ["north-america"], "DSi_Nand_USA.bin"), ("bizhawk", ["oceania"], "DSi_Nand_AUS.bin"), ("bizhawk", ["china", "japan"], "DSi_Nand_CHN.bin"), + ("genesis_plus_gx", ["australia", "japan"], "bios_U.sms"), + ("genesis_plus_gx", ["brazil", "japan"], "bios_U.sms"), + ("genesis_plus_gx_wide", ["australia", "japan"], "bios_U.sms"), + ("genesis_plus_gx_expanded", ["brazil", "japan"], "bios_U.sms"), ) def test_each_request_keeps_its_file(self):