add ProcessorInterface::Read16. wii64 uses this (by accident), but real hardware supports it, so why not.

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6384 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
Shawn Hoffman 2010-11-12 04:20:00 +00:00
parent 67f850dd37
commit 7800d68fee
3 changed files with 11 additions and 0 deletions

View File

@ -193,6 +193,7 @@ void InitHWMemFuncs()
hwWrite16[VI_START+i] = VideoInterface::Write16;
hwWrite32[VI_START+i] = VideoInterface::Write32;
hwRead16 [PI_START+i] = ProcessorInterface::Read16;
hwRead32 [PI_START+i] = ProcessorInterface::Read32;
hwWrite32[PI_START+i] = ProcessorInterface::Write32;
@ -259,6 +260,7 @@ void InitHWMemFuncsWii()
hwWrite16[PE_START+i] = CPluginManager::GetInstance().GetVideo()->Video_PixelEngineWrite16;
hwWrite32[PE_START+i] = CPluginManager::GetInstance().GetVideo()->Video_PixelEngineWrite32;
hwRead16 [PI_START+i] = ProcessorInterface::Read16;
hwRead32 [PI_START+i] = ProcessorInterface::Read32;
hwWrite32[PI_START+i] = ProcessorInterface::Write32;

View File

@ -102,6 +102,13 @@ void Init()
toggleResetButton = CoreTiming::RegisterEvent("ToggleResetButton", &ToggleResetButtonCallback);
}
void Read16(u16& _uReturnValue, const u32 _iAddress)
{
u32 word;
Read32(word, _iAddress & ~3);
_uReturnValue = word >> (_iAddress & 3) ? 16 : 0;
}
void Read32(u32& _uReturnValue, const u32 _iAddress)
{
//INFO_LOG(PROCESSORINTERFACE, "(r32) 0x%08x", _iAddress);

View File

@ -57,6 +57,8 @@ extern u32 Fifo_CPUWritePointer;
void Init();
void DoState(PointerWrap &p);
void Read16(u16& _uReturnValue, const u32 _iAddress);
void Read32(u32& _uReturnValue, const u32 _iAddress);
void Write32(const u32 _iValue, const u32 _iAddress);