From c391e9659a6d3786f7f2201c4dd113cffa9f98d2 Mon Sep 17 00:00:00 2001 From: Shawn Hoffman Date: Mon, 1 Jun 2009 20:23:06 +0000 Subject: [PATCH] fix a dumb mistake with VideoInterface::Read8 git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@3309 8ced0084-cf51-0410-be5f-012b33b47a6e --- Source/Core/Core/Src/HW/VideoInterface.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/Source/Core/Core/Src/HW/VideoInterface.cpp b/Source/Core/Core/Src/HW/VideoInterface.cpp index d209a4986d..c4d231ba6d 100644 --- a/Source/Core/Core/Src/HW/VideoInterface.cpp +++ b/Source/Core/Core/Src/HW/VideoInterface.cpp @@ -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); }