mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2024-11-15 05:47:56 -07:00
Map ARAM to MEM2 on Wii the way I think it works. If this breaks stuff or is wrong, please tell me or revert.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@1116 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
parent
6fe351bef9
commit
48bce5a05a
@ -176,6 +176,7 @@ u16 g_AR_MODE = 0x43; // 0x23 -> Zelda standard mode (standard ARAM access ??)
|
||||
|
||||
void DoState(PointerWrap &p)
|
||||
{
|
||||
if (!Core::GetStartupParameter().bWii)
|
||||
p.DoArray(g_ARAM, ARAM_SIZE);
|
||||
p.Do(g_dspState);
|
||||
p.Do(g_audioDMA);
|
||||
@ -199,8 +200,16 @@ void GenerateDSPInterrupt_Wrapper(u64 userdata, int cyclesLate)
|
||||
}
|
||||
|
||||
void Init()
|
||||
{
|
||||
if (Core::GetStartupParameter().bWii)
|
||||
{
|
||||
// On the Wii, ARAM is simply mapped to EXRAM.
|
||||
g_ARAM = Memory::GetPointer(0x10000000);
|
||||
}
|
||||
else
|
||||
{
|
||||
g_ARAM = (u8 *)AllocateMemoryPages(ARAM_SIZE);
|
||||
}
|
||||
g_dspState.DSPControl.Hex = 0;
|
||||
g_dspState.DSPControl.DSPHalt = 1;
|
||||
et_GenerateDSPInterrupt = CoreTiming::RegisterEvent("DSPint", GenerateDSPInterrupt_Wrapper);
|
||||
@ -208,6 +217,7 @@ void Init()
|
||||
|
||||
void Shutdown()
|
||||
{
|
||||
if (!Core::GetStartupParameter().bWii)
|
||||
FreeMemoryPages(g_ARAM, ARAM_SIZE);
|
||||
g_ARAM = NULL;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user