fix a dumb mistake with VideoInterface::Read8

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@3309 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
Shawn Hoffman 2009-06-01 20:23:06 +00:00
parent 6dd8e13338
commit c391e9659a
1 changed files with 8 additions and 1 deletions

View File

@ -441,14 +441,21 @@ void Init()
void Read8(u8& _uReturnValue, const u32 _iAddress)
{
// Just like 32bit VI transfers, this is technically not allowed,
// but the hardware accepts it. Action Replay uses this.
u16 val = 0;
if (_iAddress % 2 == 0)
{
Read16(val, _iAddress);
_uReturnValue = (u8)(val >> 8);
}
else
{
Read16(val, _iAddress - 1);
_uReturnValue = (u8)val;
}
_uReturnValue = (u8)val;
INFO_LOG(VIDEOINTERFACE, "(r 8): 0x%02x, 0x%08x", _uReturnValue, _iAddress);
}