diff --git a/MarathonRecomp/patches/audio_patches.cpp b/MarathonRecomp/patches/audio_patches.cpp index 538eda159..167211d24 100644 --- a/MarathonRecomp/patches/audio_patches.cpp +++ b/MarathonRecomp/patches/audio_patches.cpp @@ -88,3 +88,21 @@ void PowerUpJingleDurationFix(PPCRegister& duration) duration.f64 = 20.0; } + +void XmvPlayerLang(PPCRegister& r11) +{ + r11.u32 = 1; + + if (Config::VoiceLanguage == EVoiceLanguage::Japanese) + r11.u32++; +} + +void CsbSbkLang(PPCRegister& r8) +{ + r8.u32 = Config::VoiceLanguage == EVoiceLanguage::Japanese ? 0 : 1; +} + +void MovieVoiceLang(PPCRegister& r19) +{ + r19.u32 = Config::VoiceLanguage == EVoiceLanguage::Japanese ? 0x80000000 : 0x40000000; +} diff --git a/MarathonRecompLib/config/Marathon.toml b/MarathonRecompLib/config/Marathon.toml index 1093ad279..24dcb55a9 100644 --- a/MarathonRecompLib/config/Marathon.toml +++ b/MarathonRecompLib/config/Marathon.toml @@ -219,3 +219,28 @@ registers = ["f13"] name = "PowerUpJingleDurationFix" address = 0x8216CC28 registers = ["f31"] + +[[midasm_hook]] +name = "XmvPlayerLang" +address = 0x8264D844 +registers = ["r11"] + +[[midasm_hook]] +name = "CsbSbkLang" +address = 0x826124B0 +registers = ["r8"] + +[[midasm_hook]] +name = "CsbSbkLang" +address = 0x826121BC +registers = ["r8"] + +[[midasm_hook]] +name = "CsbSbkLang" +address = 0x821784F8 +registers = ["r8"] + +[[midasm_hook]] +name = "MovieVoiceLang" +address = 0x8264B4E4 +registers = ["r19"]