pvr: apply a negative bias to background plane depth

Fixes skybox in Xtreme Sports. Issue #1381
Fixes background clipping in Blue Stinger (JP) intro. Issue #721
Fixes Windows CE yuv FMV black screen (4x4 EVO, Armada, Carsear's
Palace, Giant Killers, PBA bowling, Starlancer, Tomr Raider, Wild Metal,
Who wants to beat up...)

Get rid of ForceWindowsCE option
Force PAL for Super Runabout (EU)
This commit is contained in:
Flyinghead 2024-02-07 16:02:55 +01:00 committed by flyinghead
parent 894a38fb71
commit 443d5a2ba6
9 changed files with 6 additions and 38 deletions

View File

@ -33,7 +33,6 @@ Option<int> Cable("Dreamcast.Cable", 3); // TV Composite
Option<int> Region("Dreamcast.Region", 1); // USA
Option<int> Broadcast("Dreamcast.Broadcast", 0); // NTSC
Option<int> Language("Dreamcast.Language", 1); // English
Option<bool> ForceWindowsCE("Dreamcast.ForceWindowsCE");
Option<bool> AutoLoadState("Dreamcast.AutoLoadState");
Option<bool> AutoSaveState("Dreamcast.AutoSaveState");
Option<int, false> SavestateSlot("Dreamcast.SavestateSlot");

View File

@ -366,7 +366,6 @@ extern Option<int> Cable; // 0 -> VGA, 1 -> VGA, 2 -> RGB, 3 -> TV Composite
extern Option<int> Region; // 0 -> JP, 1 -> USA, 2 -> EU, 3 -> default
extern Option<int> Broadcast; // 0 -> NTSC, 1 -> PAL, 2 -> PAL/M, 3 -> PAL/N, 4 -> default
extern Option<int> Language; // 0 -> JP, 1 -> EN, 2 -> DE, 3 -> FR, 4 -> SP, 5 -> IT, 6 -> default
extern Option<bool> ForceWindowsCE;
extern Option<bool> AutoLoadState;
extern Option<bool> AutoSaveState;
extern Option<int, false> SavestateSlot;

View File

@ -47,7 +47,6 @@
#include <chrono>
settings_t settings;
constexpr float WINCE_DEPTH_SCALE = 0.01f;
static void loadSpecialSettings()
{
@ -56,13 +55,6 @@ static void loadSpecialSettings()
if (settings.platform.isConsole())
{
if (ip_meta.isWindowsCE() || prod_id == "T26702N") // PBA Tour Bowling 2001
{
INFO_LOG(BOOT, "Enabling Extra depth scaling for Windows CE game");
config::ExtraDepthScale.override(WINCE_DEPTH_SCALE);
config::ForceWindowsCE.override(true);
}
// Tony Hawk's Pro Skater 2
if (prod_id == "T13008D 05" || prod_id == "T13006N"
// Tony Hawk's Pro Skater 1
@ -172,9 +164,7 @@ static void loadSpecialSettings()
config::ExtraDepthScale.override(1e26f);
}
// Test Drive V-Rally
else if (prod_id == "T15110N" || prod_id == "T15105D 50"
// Caesars Palace 2000
|| prod_id == "T-12504N" || prod_id == "12502D-50")
else if (prod_id == "T15110N" || prod_id == "T15105D 50")
{
INFO_LOG(BOOT, "Enabling Extra depth scaling for game %s", prod_id.c_str());
config::ExtraDepthScale.override(0.1f);
@ -284,7 +274,8 @@ static void loadSpecialSettings()
config::Broadcast.override(0);
}
else if (prod_id == "T-9709D-50" // San Francisco Rush 2049 (EU)
|| prod_id == "T-8112D-50") // South Park Rally (EU)
|| prod_id == "T-8112D-50" // South Park Rally (EU)
|| prod_id == "T7014D 50") // Super Runabout (EU)
{
NOTICE_LOG(BOOT, "Forcing PAL broadcasting");
config::Broadcast.override(1);
@ -729,8 +720,6 @@ void loadGameSpecificSettings()
// Reload per-game settings
config::Settings::instance().load(true);
if (config::ForceWindowsCE && !config::ExtraDepthScale.isReadOnly())
config::ExtraDepthScale.override(WINCE_DEPTH_SCALE);
if (config::GGPOEnable)
config::Sh4Clock.override(200);
}

View File

@ -1605,8 +1605,9 @@ void FillBGP(TA_context* ctx)
vertex_ptr += strip_vs;
}
f32 bg_depth = ISP_BACKGND_D.f;
reinterpret_cast<u32&>(bg_depth) &= 0xFFFFFFF0; // ISP_BACKGND_D has only 28 bits
// Apply a negative 1e-6 bias since the background plane is clipping too much
// (Fixes Xtreme Sports, Blue Stinger (JP) and many WinCE games using yuv FMV)
float bg_depth = std::max(ISP_BACKGND_D.f - 1e-6f, 1e-11f);
cv[0].z = bg_depth;
cv[1].z = bg_depth;
cv[2].z = bg_depth;

View File

@ -129,7 +129,6 @@ CONFIG_ACCESSORS(Cable);
CONFIG_ACCESSORS(Region);
CONFIG_ACCESSORS(Broadcast);
CONFIG_ACCESSORS(Language);
CONFIG_ACCESSORS(ForceWindowsCE);
CONFIG_ACCESSORS(AutoLoadState);
CONFIG_ACCESSORS(AutoSaveState);
CONFIG_ACCESSORS(SavestateSlot);
@ -505,7 +504,6 @@ static void luaRegister(lua_State *L)
CONFIG_PROPERTY(UseReios, bool)
CONFIG_PROPERTY(FastGDRomLoad, bool)
CONFIG_PROPERTY(OpenGlChecks, bool)
CONFIG_PROPERTY(ForceWindowsCE, bool)
.endNamespace()
.beginNamespace("network")

View File

@ -2575,8 +2575,6 @@ static void gui_display_settings()
header("Other");
{
OptionCheckbox("HLE BIOS", config::UseReios, "Force high-level BIOS emulation");
OptionCheckbox("Force Windows CE", config::ForceWindowsCE,
"Enable full MMU emulation and other Windows CE settings. Do not enable unless necessary");
OptionCheckbox("Multi-threaded emulation", config::ThreadedRendering,
"Run the emulated CPU and GPU on different threads");
#ifndef __ANDROID

View File

@ -189,20 +189,6 @@ struct retro_core_option_v2_definition option_defs_us[] = {
"enabled",
#endif
},
{
CORE_OPTION_NAME "_force_wince",
"Force Windows CE Mode",
NULL,
"Enable full MMU (Memory Management Unit) emulation and other settings for Windows CE games.",
NULL,
"system",
{
{ "disabled", NULL },
{ "enabled", NULL },
{ NULL, NULL },
},
"disabled",
},
{
CORE_OPTION_NAME "_allow_service_buttons",
"Allow Arcade Service Buttons",

View File

@ -32,7 +32,6 @@ Option<int> Cable("", 3); // TV Composite
Option<int> Region(CORE_OPTION_NAME "_region", 1); // USA
Option<int> Broadcast(CORE_OPTION_NAME "_broadcast", 0); // NTSC
Option<int> Language(CORE_OPTION_NAME "_language", 1); // English
Option<bool> ForceWindowsCE(CORE_OPTION_NAME "_force_wince");
Option<bool> AutoLoadState("");
Option<bool> AutoSaveState("");
Option<int, false> SavestateSlot("");

View File

@ -31,7 +31,6 @@ protected:
die("addrspace::reserve failed");
emu.init();
dc_reset(true);
config::ForceWindowsCE = true;
CCN_MMUCR.AT = 1;
MMU_reset();
}