UCodes: nits

This commit is contained in:
Tillmann Karras 2014-03-10 08:32:12 +01:00
parent 3c46c0ede9
commit 3fc9ca0789
2 changed files with 8 additions and 11 deletions

View File

@ -57,10 +57,6 @@ void CUCode_Rom::HandleMail(u32 _uMail)
m_CurrentUCode.m_Length = _uMail & 0xffff; m_CurrentUCode.m_Length = _uMail & 0xffff;
break; break;
case 0x80F3C002:
m_CurrentUCode.m_IMEMAddress = _uMail & 0xffff;
break;
case 0x80F3B002: case 0x80F3B002:
m_CurrentUCode.m_DMEMLength = _uMail & 0xffff; m_CurrentUCode.m_DMEMLength = _uMail & 0xffff;
if (m_CurrentUCode.m_DMEMLength) { if (m_CurrentUCode.m_DMEMLength) {
@ -68,16 +64,17 @@ void CUCode_Rom::HandleMail(u32 _uMail)
} }
break; break;
case 0x80F3C002:
m_CurrentUCode.m_IMEMAddress = _uMail & 0xffff;
break;
case 0x80F3D001: case 0x80F3D001:
{
m_CurrentUCode.m_StartPC = _uMail & 0xffff; m_CurrentUCode.m_StartPC = _uMail & 0xffff;
BootUCode(); BootUCode();
return; // Important! BootUCode indirectly does "delete this;". Must exit immediately. return; // Important! BootUCode indirectly does "delete this;". Must exit immediately.
}
break;
default: default:
break; break;
} }
// THE GODDAMN OVERWRITE WAS HERE. Without the return above, since BootUCode may delete "this", well ... // THE GODDAMN OVERWRITE WAS HERE. Without the return above, since BootUCode may delete "this", well ...

View File

@ -58,7 +58,7 @@ CUCode_Zelda::CUCode_Zelda(DSPHLE *dsp_hle, u32 _CRC)
if (IsLightVersion()) if (IsLightVersion())
{ {
NOTICE_LOG(DSPHLE, "Luigi Stylee!"); DEBUG_LOG(DSPHLE, "Luigi Stylee!");
m_rMailHandler.PushMail(0x88881111); m_rMailHandler.PushMail(0x88881111);
} }
else else
@ -92,9 +92,9 @@ CUCode_Zelda::~CUCode_Zelda()
u8 *CUCode_Zelda::GetARAMPointer(u32 address) u8 *CUCode_Zelda::GetARAMPointer(u32 address)
{ {
if (IsDMAVersion()) if (IsDMAVersion())
return (u8 *)(Memory::GetPointer(m_DMABaseAddr)) + address; return Memory::GetPointer(m_DMABaseAddr) + address;
else else
return (u8 *)(DSP::GetARAMPtr()) + address; return DSP::GetARAMPtr() + address;
} }
void CUCode_Zelda::Update(int cycles) void CUCode_Zelda::Update(int cycles)