mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-21 05:09:34 -06:00
allow "swapping" of hle'd ucodes
hle the gba ucode git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6046 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
@ -21,6 +21,7 @@ CDSPHandler* CDSPHandler::m_pInstance = NULL;
|
||||
|
||||
CDSPHandler::CDSPHandler()
|
||||
: m_pUCode(NULL),
|
||||
m_lastUCode(NULL),
|
||||
m_bHalt(false),
|
||||
m_bAssertInt(false)
|
||||
{
|
||||
@ -86,3 +87,23 @@ void CDSPHandler::SetUCode(u32 _crc)
|
||||
m_MailHandler.Clear();
|
||||
m_pUCode = UCodeFactory(_crc, m_MailHandler);
|
||||
}
|
||||
|
||||
// TODO do it better?
|
||||
// Assumes that every odd call to this func is by the persistent ucode.
|
||||
// Even callers are deleted.
|
||||
void CDSPHandler::SwapUCode(u32 _crc)
|
||||
{
|
||||
m_MailHandler.Clear();
|
||||
|
||||
if (m_lastUCode == NULL)
|
||||
{
|
||||
m_lastUCode = m_pUCode;
|
||||
m_pUCode = UCodeFactory(_crc, m_MailHandler);
|
||||
}
|
||||
else
|
||||
{
|
||||
delete m_pUCode;
|
||||
m_pUCode = m_lastUCode;
|
||||
m_lastUCode = NULL;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user