Silly build fix, a slightly improved error message.

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@212 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
hrydgard 2008-08-14 22:01:07 +00:00
parent aae50ada0e
commit 9e15c51f9e
2 changed files with 6 additions and 4 deletions

View File

@ -70,7 +70,12 @@ void BackPatch(u8 *codePtr, int accessType, u32 emAddress)
if (!DisassembleMov(codePtr, info, accessType)) {
BackPatchError("BackPatch - failed to disassemble MOV instruction", codePtr, emAddress);
}
if (info.isMemoryWrite) {
if (!Memory::IsRAMAddress(emAddress, true)) {
PanicAlert("Write to invalid address %08x", emAddress);
return;
}
BackPatchError("BackPatch - determined that MOV is write, not yet supported and should have been caught before",
codePtr, emAddress);
}
@ -86,8 +91,7 @@ void BackPatch(u8 *codePtr, int accessType, u32 emAddress)
if (accessType == OP_ACCESS_WRITE)
PanicAlert("BackPatch : Currently only supporting reads."
"\n\nAttempted to write to %08x.", emAddress);
//if (info.instructionSize < 5)
// PanicAlert("Instruction at %08x Too Small : %i", (u32)codePtr, info.instructionSize);
// OK, let's write a trampoline, and a jump to it.
// Later, let's share trampolines.
@ -109,7 +113,6 @@ void BackPatch(u8 *codePtr, int accessType, u32 emAddress)
// CALL((void *)&Memory::Read_U8);
// break;
case 4:
// THIS FUNCTION CANNOT TOUCH FLOATING POINT REGISTERS.
CALL(ProtectFunction((void *)&Memory::Read_U32, 1));
break;
default:

View File

@ -22,7 +22,6 @@
#include "EmuWindow.h"
#include "Utils.h"
#include "XFB.h"
HINSTANCE g_hInstance = NULL;
SVideoInitialize g_VideoInitialize;