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:
parent
6dd8e13338
commit
c391e9659a
|
@ -441,14 +441,21 @@ void Init()
|
||||||
|
|
||||||
void Read8(u8& _uReturnValue, const u32 _iAddress)
|
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;
|
u16 val = 0;
|
||||||
|
|
||||||
if (_iAddress % 2 == 0)
|
if (_iAddress % 2 == 0)
|
||||||
|
{
|
||||||
Read16(val, _iAddress);
|
Read16(val, _iAddress);
|
||||||
|
_uReturnValue = (u8)(val >> 8);
|
||||||
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
Read16(val, _iAddress - 1);
|
Read16(val, _iAddress - 1);
|
||||||
|
_uReturnValue = (u8)val;
|
||||||
|
}
|
||||||
|
|
||||||
_uReturnValue = (u8)val;
|
|
||||||
INFO_LOG(VIDEOINTERFACE, "(r 8): 0x%02x, 0x%08x", _uReturnValue, _iAddress);
|
INFO_LOG(VIDEOINTERFACE, "(r 8): 0x%02x, 0x%08x", _uReturnValue, _iAddress);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue