HLE: Remove the RE0 hack because of reports of it not working which is most likely due to the amount of HLE changes since Rev 3200.

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5365 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
death2droid 2010-04-14 11:27:26 +00:00
parent 26b082d384
commit 1483715567
11 changed files with 18 additions and 90 deletions

View file

@ -29,8 +29,7 @@ SConfig::SConfig()
{
// Make sure we have log manager
LoadSettings();
//Make sure we load settings
LoadSettingsHLE();
//Make sure we load any extra settings
LoadSettingsWii();
}
@ -300,12 +299,4 @@ void SConfig::LoadSettingsWii()
sprintf(SectionName, "Wiimote%i", i + 1);
ini.Get(SectionName, "AutoReconnectRealWiimote", &m_WiiAutoReconnect[i], false);
}
}
// Is this still even needed????
void SConfig::LoadSettingsHLE()
{
IniFile ini;
ini.Load((std::string(File::GetUserPath(D_CONFIG_IDX)) + "DSP.ini").c_str());
ini.Get("Config", "EnableRE0AudioFix", &m_EnableRE0Fix, false); // RE0 Hack
}
}

View file

@ -46,9 +46,6 @@ struct SConfig
bool m_WiiKeyboard;
bool m_WiiAutoReconnect[4];
// DSP HLE Audio fix
bool m_EnableRE0Fix;
// hard coded default plugins ...
std::string m_DefaultGFXPlugin;
std::string m_DefaultDSPPlugin;
@ -101,7 +98,6 @@ struct SConfig
void LoadSettings();
//Special load settings
void LoadSettingsHLE();
void LoadSettingsWii();
// Return the permanent and somewhat globally used instance of this struct

View file

@ -239,14 +239,6 @@ void Jit64::WriteCallInterpreter(UGeckoInstruction inst)
}
Interpreter::_interpreterInstruction instr = GetInterpreterOp(inst);
ABI_CallFunctionC((void*)instr, inst.hex);
if (js.isLastInstruction && SConfig::GetInstance().m_EnableRE0Fix )
{
SConfig::GetInstance().LoadSettingsHLE();//Make sure the settings are up to date
MOV(32, R(EAX), M(&NPC));
WriteRfiExitDestInEAX();
}
}
void Jit64::unknown_instruction(UGeckoInstruction inst)

View file

@ -323,11 +323,6 @@ void CISOProperties::CreateGUIControls(bool IsWad)
arrayStringFor_Hack.Add(_("Bleach Versus Crusade"));
Hack = new wxChoice(m_GameConfig, ID_HACK, wxDefaultPosition, wxDefaultSize, arrayStringFor_Hack, 0, wxDefaultValidator);
//HLE Audio
sbHLEaudioOverrides = new wxStaticBoxSizer(wxVERTICAL, m_GameConfig, _("HLE Audio"));
UseRE0Fix = new wxCheckBox(m_GameConfig, ID_RE0FIX, _("Use RE0 Fix"), wxDefaultPosition, wxDefaultSize, wxCHK_3STATE|wxCHK_ALLOW_3RD_STATE_FOR_USER, wxDefaultValidator);
// Emulation State
sEmuState = new wxBoxSizer(wxHORIZONTAL);
EmuStateText = new wxStaticText(m_GameConfig, ID_EMUSTATE_TEXT, _("Emulation State: "), wxDefaultPosition, wxDefaultSize);
@ -357,11 +352,9 @@ void CISOProperties::CreateGUIControls(bool IsWad)
sbVideoOverrides->Add(BPHack, 0, wxEXPAND|wxLEFT, 5);
sbVideoOverrides->Add(Hacktext, 0, wxEXPAND|wxLEFT, 5);
sbVideoOverrides->Add(Hack, 0, wxEXPAND|wxLEFT, 5);
sbHLEaudioOverrides->Add(UseRE0Fix, 0, wxEXPAND|wxLEFT, 5);
sbGameConfig->Add(sbCoreOverrides, 0, wxEXPAND);
sbGameConfig->Add(sbWiiOverrides, 0, wxEXPAND);
sbGameConfig->Add(sbVideoOverrides, 0, wxEXPAND);
sbGameConfig->Add(sbHLEaudioOverrides, 0, wxEXPAND);
sConfigPage->Add(sbGameConfig, 0, wxEXPAND|wxALL, 5);
sEmuState->Add(EmuStateText, 0, wxALIGN_CENTER_VERTICAL);
sEmuState->Add(EmuState, 0, wxEXPAND);
@ -849,11 +842,6 @@ void CISOProperties::LoadGameConfig()
else
UseXFB->Set3StateValue(wxCHK_UNDETERMINED);
if (GameIni.Get("HLEaudio", "UseRE0Fix", &bTemp))
UseRE0Fix->Set3StateValue((wxCheckBoxState)bTemp);
else
UseRE0Fix->Set3StateValue(wxCHK_UNDETERMINED);
if (GameIni.Get("Video", "FIFOBPHack", &bTemp))
BPHack->Set3StateValue((wxCheckBoxState)bTemp);
else
@ -934,11 +922,6 @@ bool CISOProperties::SaveGameConfig()
else
GameIni.Set("Video", "UseXFB", UseXFB->Get3StateValue());
if (UseRE0Fix->Get3StateValue() == wxCHK_UNDETERMINED)
GameIni.DeleteKey("HLEaudio", "UseRE0Fix");
else
GameIni.Set("HLEaudio", "UseRE0Fix", UseRE0Fix->Get3StateValue());
if (BPHack->Get3StateValue() == wxCHK_UNDETERMINED)
GameIni.DeleteKey("Video", "FIFOBPHack");
else

View file

@ -59,7 +59,6 @@ class CISOProperties : public wxDialog
wxStaticBoxSizer *sbCoreOverrides;
wxStaticBoxSizer *sbWiiOverrides;
wxStaticBoxSizer *sbVideoOverrides;
wxStaticBoxSizer *sbHLEaudioOverrides;
wxBoxSizer *sEmuState;
wxBoxSizer *sPatches;
wxBoxSizer *sPatchButtons;
@ -91,8 +90,6 @@ class CISOProperties : public wxDialog
wxStaticText *Hacktext;
wxArrayString arrayStringFor_Hack;
wxChoice *Hack;
// HLE Audio
wxCheckBox *UseRE0Fix;
wxButton *EditConfig;
wxStaticText *EmuStateText;
@ -169,7 +166,6 @@ class CISOProperties : public wxDialog
ID_USEXFB,
ID_HACK_TEXT,
ID_HACK,
ID_RE0FIX,
ID_ENABLEPROGRESSIVESCAN,
ID_ENABLEWIDESCREEN,
ID_EDITCONFIG,

View file

@ -35,8 +35,6 @@ void CConfig::Load()
IniFile file;
file.Load((std::string(File::GetUserPath(D_CONFIG_IDX)) + "DSP.ini").c_str());
file.Get("Config", "EnableHLEAudio", &m_EnableHLEAudio, true); // Sound Settings
file.Get("Config", "EnableRE0AudioFix", &m_EnableRE0Fix, false); // RE0 Hack
m_RE0Fix = m_EnableRE0Fix;
ac_Config.Load(file);
}
@ -45,15 +43,7 @@ void CConfig::Save()
IniFile file;
file.Load((std::string(File::GetUserPath(D_CONFIG_IDX)) + "DSP.ini").c_str());
file.Set("Config", "EnableHLEAudio", m_EnableHLEAudio); // Sound Settings
file.Set("Config", "EnableRE0AudioFix", m_EnableRE0Fix); // RE0 Hack
ac_Config.Set(file);
file.Save((std::string(File::GetUserPath(D_CONFIG_IDX)) + "DSP.ini").c_str());
}
void CConfig::LoadGameIni(const char* gameIniPath)
{
IniFile gameIni;
gameIni.Load(gameIniPath);
gameIni.Get("HLEaudio", "UseRE0Fix", &m_RE0Fix, m_EnableRE0Fix);
}
}

View file

@ -23,17 +23,11 @@
struct CConfig
{
bool m_EnableHLEAudio;
//is the RE0 fix enabled in config?
bool m_EnableRE0Fix;
//is the RE0 supposed to be used?
//this value includes game.ini, avoiding overwrite of config
bool m_RE0Fix;
CConfig();
void Load();
void Save();
void LoadGameIni(const char*);
};
extern CConfig g_Config;

View file

@ -24,7 +24,6 @@ BEGIN_EVENT_TABLE(DSPConfigDialogHLE, wxDialog)
EVT_CHECKBOX(ID_ENABLE_HLE_AUDIO, DSPConfigDialogHLE::SettingsChanged)
EVT_CHECKBOX(ID_ENABLE_DTK_MUSIC, DSPConfigDialogHLE::SettingsChanged)
EVT_CHECKBOX(ID_ENABLE_THROTTLE, DSPConfigDialogHLE::SettingsChanged)
EVT_CHECKBOX(ID_ENABLE_RE0_FIX, DSPConfigDialogHLE::SettingsChanged)
EVT_CHOICE(ID_BACKEND, DSPConfigDialogHLE::BackendChanged)
EVT_COMMAND_SCROLL(ID_VOLUME, DSPConfigDialogHLE::VolumeChanged)
END_EVENT_TABLE()
@ -41,7 +40,6 @@ DSPConfigDialogHLE::DSPConfigDialogHLE(wxWindow *parent, wxWindowID id, const wx
m_buttonEnableHLEAudio = new wxCheckBox(this, ID_ENABLE_HLE_AUDIO, wxT("Enable HLE Audio"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator);
m_buttonEnableDTKMusic = new wxCheckBox(this, ID_ENABLE_DTK_MUSIC, wxT("Enable DTK Music"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator);
m_buttonEnableThrottle = new wxCheckBox(this, ID_ENABLE_THROTTLE, wxT("Enable Audio Throttle"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator);
m_buttonEnableRE0Fix = new wxCheckBox(this, ID_ENABLE_RE0_FIX, wxT("Enable RE0 Audio Hack"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator);
wxStaticText *BackendText = new wxStaticText(this, wxID_ANY, wxT("Audio Backend"), wxDefaultPosition, wxDefaultSize, 0);
m_BackendSelection = new wxChoice(this, ID_BACKEND, wxDefaultPosition, wxSize(90, 20), wxArrayBackends, 0, wxDefaultValidator, wxEmptyString);
@ -53,7 +51,6 @@ DSPConfigDialogHLE::DSPConfigDialogHLE(wxWindow *parent, wxWindowID id, const wx
m_buttonEnableHLEAudio->SetValue(g_Config.m_EnableHLEAudio ? true : false);
m_buttonEnableDTKMusic->SetValue(ac_Config.m_EnableDTKMusic ? true : false);
m_buttonEnableThrottle->SetValue(ac_Config.m_EnableThrottle ? true : false);
m_buttonEnableRE0Fix->SetValue(g_Config.m_EnableRE0Fix ? true : false);
// Add tooltips
m_buttonEnableHLEAudio->SetToolTip(wxT("This is usually used to play voice and sound effects."));
@ -62,7 +59,6 @@ DSPConfigDialogHLE::DSPConfigDialogHLE(wxWindow *parent, wxWindowID id, const wx
wxT("Disabling this could cause abnormal game speed, such as too fast.\n")
wxT("But sometimes enabling this could cause constant noise.\n")
wxT("\nKeyboard Shortcut <TAB>: Hold down to instantly disable Throttle."));
m_buttonEnableRE0Fix->SetToolTip(wxT("This fixes audio in Resident Evil Zero and maybe some other games."));
m_BackendSelection->SetToolTip(wxT("Changing this will have no effect while the emulator is running!"));
m_volumeSlider->SetToolTip(wxT("This setting only affects DSound and OpenAL."));
@ -75,7 +71,6 @@ DSPConfigDialogHLE::DSPConfigDialogHLE(wxWindow *parent, wxWindowID id, const wx
sbSettings->Add(m_buttonEnableHLEAudio, 0, wxALL, 5);
sbSettings->Add(m_buttonEnableDTKMusic, 0, wxALL, 5);
sbSettings->Add(m_buttonEnableThrottle, 0, wxALL, 5);
sbSettings->Add(m_buttonEnableRE0Fix, 0, wxALL, 5);
sBackend->Add(BackendText, 0, wxALIGN_CENTER|wxALL, 5);
sBackend->Add(m_BackendSelection, 0, wxALL, 1);
sbSettings->Add(sBackend, 0, wxALL, 2);
@ -131,7 +126,6 @@ void DSPConfigDialogHLE::SettingsChanged(wxCommandEvent& event)
g_Config.m_EnableHLEAudio = m_buttonEnableHLEAudio->GetValue();
ac_Config.m_EnableDTKMusic = m_buttonEnableDTKMusic->GetValue();
ac_Config.m_EnableThrottle = m_buttonEnableThrottle->GetValue();
g_Config.m_EnableRE0Fix = m_buttonEnableRE0Fix->GetValue();
#ifdef __APPLE__
strncpy(ac_Config.sBackend, m_BackendSelection->GetStringSelection().mb_str(), 128);

View file

@ -46,7 +46,6 @@ private:
wxCheckBox *m_buttonEnableHLEAudio;
wxCheckBox *m_buttonEnableDTKMusic;
wxCheckBox *m_buttonEnableThrottle;
wxCheckBox *m_buttonEnableRE0Fix;
wxArrayString wxArrayBackends;
wxChoice *m_BackendSelection;
@ -55,7 +54,6 @@ private:
ID_ENABLE_HLE_AUDIO,
ID_ENABLE_DTK_MUSIC,
ID_ENABLE_THROTTLE,
ID_ENABLE_RE0_FIX,
ID_BACKEND,
ID_VOLUME
};

View file

@ -64,28 +64,23 @@ static void ProcessUpdates(AXPB &PB)
if (numupd > 64) numupd = 64; // prevent crazy values TODO: LOL WHAT
const u32 updaddr = (u32)(PB.updates.data_hi << 16) | PB.updates.data_lo;
int on = 0, off = 0;
for (int j = 0; j < numupd; j++)
const u16 updpar = Memory_Read_U16(updaddr);
const u16 upddata = Memory_Read_U16(updaddr + 2);
// some safety checks, I hope it's enough
if (updaddr > 0x80000000 && updaddr < 0x817fffff
&& updpar < 63 && updpar > 3 && upddata >= 0 // updpar > 3 because we don't want to change
// 0-3, those are important
//&& (upd0 || upd1 || upd2 || upd3 || upd4) // We should use these in some way to I think
// but I don't know how or when
)
{
int k = g_Config.m_RE0Fix ? 0 : j;
const u16 updpar = Memory_Read_U16(updaddr + k);
const u16 upddata = Memory_Read_U16(updaddr + k + 2);
// some safety checks, I hope it's enough
if (updaddr > 0x80000000 && updaddr < 0x817fffff
&& updpar < 63 && updpar > 3 && upddata >= 0 // updpar > 3 because we don't want to change
// 0-3, those are important
//&& (upd0 || upd1 || upd2 || upd3 || upd4) // We should use these in some way to I think
// but I don't know how or when
)
{
((u16*)&PB)[updpar] = upddata; // WTF ABOUNDS!
}
if (updpar == 7 && upddata == 1) on++;
if (updpar == 7 && upddata == 1) off++;
// hack: if we get both an on and an off select on rather than off
if (on > 0 && off > 0) PB.running = 1;
((u16*)&PB)[updpar] = upddata; // WTF ABOUNDS!
}
if (updpar == 7 && upddata == 1) on++;
if (updpar == 7 && upddata == 1) off++;
// hack: if we get both an on and an off select on rather than off
if (on > 0 && off > 0) PB.running = 1;
}
static void VoiceHacks(AXPB &pb)

View file

@ -144,7 +144,6 @@ void SetDllGlobals(PLUGIN_GLOBALS* _pPluginGlobals)
{
globals = _pPluginGlobals;
LogManager::SetInstance((LogManager *)globals->logManager);
g_Config.LoadGameIni(globals->game_ini);
}
void DllConfig(HWND _hParent)