# HG changeset patch # User Michael Pavone # Date 1740282770 28800 # Node ID 07faf0f5466f5e18f3b191602bf89b4f3df2d46b # Parent adff015dc94fbb2a380069b3b4dd89a7cf3b0a10 Add option to force use of the default region diff -r adff015dc94f -r 07faf0f5466f default.cfg --- a/default.cfg Sat Feb 22 19:29:18 2025 -0800 +++ b/default.cfg Sat Feb 22 19:52:50 2025 -0800 @@ -418,7 +418,11 @@ sync_source audio #set this to random to debug initialization bugs ram_init zero + #Default region to use when the ROM has no region info or there are multiple options + #U = USA/North America, E = Europe, J = Japan default_region U + #Whether to always force the region selected in default_region + force_region off #controls whether MegaWiFi support is enabled or not #MegaWiFi allows ROMs to make connections to the internet #so it should only be enabled for ROMs you trust diff -r adff015dc94f -r 07faf0f5466f genesis.c --- a/genesis.c Sat Feb 22 19:29:18 2025 -0800 +++ b/genesis.c Sat Feb 22 19:52:50 2025 -0800 @@ -1920,7 +1920,9 @@ { if (!region) { char * def_region = tern_find_path_default(config, "system\0default_region\0", (tern_val){.ptrval = "U"}, TVAL_PTR).ptrval; - if (!info->regions || (info->regions & translate_region_char(toupper(*def_region)))) { + char * force_region = tern_find_path_default(config, "system\0force_region\0", (tern_val){.ptrval = "off"}, TVAL_PTR).ptrval; + + if (!info->regions || (info->regions & translate_region_char(toupper(*def_region))) || !strcmp(force_region, "on")) { region = translate_region_char(toupper(*def_region)); } else { region = info->regions; diff -r adff015dc94f -r 07faf0f5466f nuklear_ui/blastem_nuklear.c --- a/nuklear_ui/blastem_nuklear.c Sat Feb 22 19:29:18 2025 -0800 +++ b/nuklear_ui/blastem_nuklear.c Sat Feb 22 19:52:50 2025 -0800 @@ -2458,6 +2458,7 @@ config = tern_insert_path(config, config_path1, (tern_val){.ptrval = strdup(io_opts_1[selected_io_1])}, TVAL_PTR); } selected_region = settings_dropdown_ex(context, "Default Region", region_codes, regions, num_regions, selected_region, "system\0default_region\0"); + settings_toggle(context, "Force Selected Region", "system\0force_region\0", 0); selected_sync = settings_dropdown(context, "Sync Source", sync_opts, num_sync_opts, selected_sync, "system\0sync_source\0"); if (!show_sms) { settings_int_property(context, "68000 Clock Divider", "", "clocks\0m68k_divider\0", 7, 1, 53);