This commit is contained in:
EM 2026-03-30 04:54:25 +03:00 committed by GitHub
commit 5ec94bda48
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 61 additions and 0 deletions

View file

@ -69,6 +69,37 @@ bool MotionBlurMidAsmHook()
return Config::MotionBlur != EMotionBlur::Off;
}
// Xenia patch 0x82BAD958
void DisableShadowMapsMidAsmHook(PPCRegister& r11)
{
if (Config::DisableShadowMaps)
r11.u64 = 0;
}
bool DisableShadowMapsEarlyMidAsmHook()
{
return Config::DisableShadowMaps;
}
// Xenia patch 0x82BB20F8
void DisableDepthOfFieldInitMidAsmHook(PPCRegister& r11)
{
if (Config::DisableDepthOfField)
r11.u64 = 0;
}
// Xenia patch 0x82BB21A4
bool DisableDepthOfFieldStoreMidAsmHook()
{
return Config::DisableDepthOfField;
}
// Xenia patch 0x82FC1F28
bool DisableRadialBlurMidAsmHook()
{
return Config::DisableRadialBlur;
}
// Hedgehog::MirageDebug::PrepareRenderPrimitive2D
PPC_FUNC_IMPL(__imp__sub_830D25D8);
PPC_FUNC(sub_830D25D8)

View file

@ -78,10 +78,13 @@ CONFIG_DEFINE_ENUM_LOCALISED("Video", EUIAlignmentMode, UIAlignmentMode, EUIAlig
CONFIG_DEFINE_HIDDEN("Codes", bool, AllowCancellingUnleash, false);
CONFIG_DEFINE_HIDDEN("Codes", bool, DisableAutoSaveWarning, false);
CONFIG_DEFINE_HIDDEN("Codes", bool, DisableBoostFilter, false);
CONFIG_DEFINE_HIDDEN("Codes", bool, DisableDepthOfField, false);
CONFIG_DEFINE_HIDDEN("Codes", bool, DisableDLCIcon, false);
CONFIG_DEFINE_HIDDEN("Codes", bool, DisableDPadMovement, false);
CONFIG_DEFINE_HIDDEN("Codes", bool, DisableDWMRoundedCorners, false);
CONFIG_DEFINE_HIDDEN("Codes", bool, DisableLowResolutionFontOnCustomUI, false);
CONFIG_DEFINE_HIDDEN("Codes", bool, DisableRadialBlur, false);
CONFIG_DEFINE_HIDDEN("Codes", bool, DisableShadowMaps, false);
CONFIG_DEFINE_HIDDEN("Codes", bool, EnableEventCollisionDebugView, false);
CONFIG_DEFINE_HIDDEN("Codes", bool, EnableGIMipLevelDebugView, false);
CONFIG_DEFINE_HIDDEN("Codes", bool, EnableObjectCollisionDebugView, false);

View file

@ -91,6 +91,17 @@ name = "SetShadowResolutionMidAsmHook"
address = 0x82BAD87C
registers = ["r11"]
[[midasm_hook]]
name = "DisableShadowMapsEarlyMidAsmHook"
address = 0x82BAD954
jump_address_on_true = 0x82BADBE8
[[midasm_hook]]
name = "DisableShadowMapsMidAsmHook"
address = 0x82BAD958
registers = ["r11"]
after_instruction = true
[[midasm_hook]]
name = "CameraAspectRatioMidAsmHook"
address = 0x82468E78
@ -471,6 +482,17 @@ name = "PostProcessResolutionFix"
address = 0x82BA4064
registers = ["r4", "f1", "f2"]
[[midasm_hook]]
name = "DisableDepthOfFieldInitMidAsmHook"
address = 0x82BB20F8
registers = ["r11"]
after_instruction = true
[[midasm_hook]]
name = "DisableDepthOfFieldStoreMidAsmHook"
address = 0x82BB21A4
jump_address_on_true = 0x82BB21A8
# Light shaft resolution fix
[[midasm_hook]]
name = "PostProcessResolutionFix"
@ -1080,6 +1102,11 @@ name = "SparkleLocusMidAsmHook"
address = 0x82E96804
jump_address_on_true = 0x82E96808
[[midasm_hook]]
name = "DisableRadialBlurMidAsmHook"
address = 0x82FC1F28
jump_address_on_true = 0x82FC1F2C
# Rooftop Run barrel fix (works at up to ~400 FPS)
[[midasm_hook]]
name = "HighFrameRateDeltaTimeFixVectorMidAsmHook"