diff --git a/shell/libretro/libretro.cpp b/shell/libretro/libretro.cpp index cfe4e8837..1f63e936a 100644 --- a/shell/libretro/libretro.cpp +++ b/shell/libretro/libretro.cpp @@ -422,6 +422,11 @@ static bool set_variable_visibility(void) environ_cb(RETRO_ENVIRONMENT_SET_CORE_OPTIONS_DISPLAY, &option_display); option_display.key = CORE_OPTION_NAME "_per_content_vmus"; environ_cb(RETRO_ENVIRONMENT_SET_CORE_OPTIONS_DISPLAY, &option_display); + option_display.visible = platformIsDreamcast || settings.platform.isAtomiswave(); + option_display.key = CORE_OPTION_NAME "_emulate_bba"; + environ_cb(RETRO_ENVIRONMENT_SET_CORE_OPTIONS_DISPLAY, &option_display); + option_display.key = CORE_OPTION_NAME "_upnp"; + environ_cb(RETRO_ENVIRONMENT_SET_CORE_OPTIONS_DISPLAY, &option_display); vmuScreenSettingsShown = option_display.visible; for (unsigned i = 0; i < 4; i++) @@ -675,6 +680,7 @@ static void update_variables(bool first_startup) bool wasThreadedRendering = config::ThreadedRendering; bool prevRotateScreen = rotate_screen; bool prevDetectVsyncSwapInterval = libretro_detect_vsync_swap_interval; + bool emulateBba = config::EmulateBBA; config::Settings::instance().setRetroEnvironment(environ_cb); config::Settings::instance().setOptionDefinitions(option_defs_us); config::Settings::instance().load(false); @@ -1044,6 +1050,8 @@ static void update_variables(bool first_startup) setAVInfo(avinfo); environ_cb(RETRO_ENVIRONMENT_SET_SYSTEM_AV_INFO, &avinfo); } + // must *not* be changed once a game is started + config::EmulateBBA.override(emulateBba); } } diff --git a/shell/libretro/libretro_core_options.h b/shell/libretro/libretro_core_options.h index 408c5ce42..644bd148f 100644 --- a/shell/libretro/libretro_core_options.h +++ b/shell/libretro/libretro_core_options.h @@ -140,7 +140,7 @@ struct retro_core_option_v2_definition option_defs_us[] = { }, { CORE_OPTION_NAME "_hle_bios", - "HLE BIOS", + "HLE BIOS (Restart Required)", NULL, "Force use of high-level emulation BIOS.", NULL, @@ -226,6 +226,35 @@ struct retro_core_option_v2_definition option_defs_us[] = { }, "enabled", }, + { + CORE_OPTION_NAME "_emulate_bba", + "Broadband Adapter Emulation", + NULL, + "Emulate the ethernet broadband adapter instead of the modem. (Restart Required)", + NULL, + "system", + { + { "disabled", NULL }, + { "enabled", NULL }, + { NULL, NULL }, + }, + "disabled", + }, + { + CORE_OPTION_NAME "_upnp", + "Enable UPnP", + NULL, + "Use UPnP to automatically configure your Internet router for online games.", + NULL, + "system", + { + { "disabled", NULL }, + { "enabled", NULL }, + { NULL, NULL }, + }, + "enabled", + }, + { CORE_OPTION_NAME "_internal_resolution", "Internal Resolution", diff --git a/shell/libretro/option.cpp b/shell/libretro/option.cpp index 221e8b388..8159eb3c7 100644 --- a/shell/libretro/option.cpp +++ b/shell/libretro/option.cpp @@ -112,8 +112,8 @@ Option ActAsServer("", false); OptionString DNS("", "46.101.91.123"); OptionString NetworkServer("", ""); Option LocalPort("", 0); -Option EmulateBBA("", false); // TODO -Option EnableUPnP("", true); // TODO +Option EmulateBBA(CORE_OPTION_NAME "_emulate_bba", false); +Option EnableUPnP(CORE_OPTION_NAME "_upnp", true); Option GGPOEnable("", false); Option GGPODelay("", 0); Option NetworkStats("", false);