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

@ -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)