Just submitting some boring minor cleanup and improved error msgs, to isolate my next change.

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@92 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
hrydgard
2008-07-27 20:51:02 +00:00
parent 9d312559cf
commit 27a141ecca
9 changed files with 92 additions and 44 deletions

View File

@ -94,8 +94,10 @@ Common::Event emuThreadGoing;
// Called from GUI thread
bool Init(const SCoreStartupParameter _CoreParameter)
{
if (g_pThread != NULL)
if (g_pThread != NULL) {
PanicAlert("ERROR: Emu Thread already running. Report this bug.");
return false;
}
LogManager::Init();
Host_SetWaitCursor(true);
@ -330,7 +332,7 @@ THREAD_RETURN EmuThread(void *pArg)
HW::Shutdown();
LOG(MASTER_LOG,"EmuThread exited");
LOG(MASTER_LOG, "EmuThread exited");
//The CPU should return when a game is stopped and cleanup should be done here,
//so we can restart the plugins (or load new ones) for the next game

View File

@ -17,6 +17,7 @@
#include "Common.h"
#include "Boot/Boot.h"
#include "FileUtil.h"
#include "StringUtil.h"
#include "CoreParameter.h"
#include "VolumeCreator.h"
@ -142,6 +143,10 @@ bool SCoreStartupParameter::AutoSetup(EBootBios _BootBios)
m_strMemoryCardA = BaseDataPath + "/MemoryCardA.raw";
m_strMemoryCardB = BaseDataPath + "/MemoryCardB.raw";
m_strSRAM = BaseDataPath + "/SRAM.raw";
if (!File::Exists(m_strBios)) {
LOG(BOOT, "BIOS file %s not found - using HLE.", m_strBios.c_str());
bHLEBios = true;
}
return true;
}

View File

@ -512,8 +512,7 @@ void CInterpreter::mulhwux(UGeckoInstruction _inst)
{
u32 a = m_GPR[_inst.RA];
u32 b = m_GPR[_inst.RB];
u32 d;
d = (u32)(((u64)a * (u64)b) >> 32);
u32 d = (u32)(((u64)a * (u64)b) >> 32);
m_GPR[_inst.RD] = d;
if (_inst.Rc) Helper_UpdateCR0(m_GPR[_inst.RD]);
}
@ -522,8 +521,7 @@ void CInterpreter::mullwx(UGeckoInstruction _inst)
{
u32 a = m_GPR[_inst.RA];
u32 b = m_GPR[_inst.RB];
u32 d;
d = (u32)((s32)a * (s32)b);
u32 d = (u32)((s32)a * (s32)b);
m_GPR[_inst.RD] = d;
if (_inst.OE) PanicAlert("OE: mullwx");

View File

@ -394,15 +394,6 @@ void CInterpreter::lswx(UGeckoInstruction _inst)
bFirst = false;
}
void CInterpreter::lwarx(UGeckoInstruction _inst)
{
m_GPR[_inst.RD] = Memory::Read_U32(Helper_Get_EA_X(_inst));
//static bool bFirst = true;
//if (bFirst)
// MessageBox(NULL, "lwarx", "Instruction unimplemented", MB_OK);
//bFirst = false;
}
void CInterpreter::lwbrx(UGeckoInstruction _inst)
{
m_GPR[_inst.RD] = Common::swap32(Memory::Read_U32(Helper_Get_EA_X(_inst)));
@ -594,12 +585,28 @@ void CInterpreter::stwbrx(UGeckoInstruction _inst)
Memory::Write_U32(Common::swap32(m_GPR[_inst.RS]), uAddress);
}
// The following two instructions are for inter-cpu communications. On a single CPU, they cannot
// fail unless an interrupt happens in between, which usually won't happen with the JIT, so we just pretend
// they are regular loads and stores for now. If this proves to be a problem, we could add a reservation flag.
void CInterpreter::lwarx(UGeckoInstruction _inst)
{
m_GPR[_inst.RD] = Memory::Read_U32(Helper_Get_EA_X(_inst));
//static bool bFirst = true;
//if (bFirst)
// MessageBox(NULL, "lwarx", "Instruction unimplemented", MB_OK);
//bFirst = false;
}
void CInterpreter::stwcxd(UGeckoInstruction _inst)
{
// This instruction, to
static bool bFirst = true;
if (bFirst)
PanicAlert("stwcxd - Instruction unimplemented");
PanicAlert("stwcxd - suspicious instruction");
bFirst = false;
u32 uAddress = Helper_Get_EA_X(_inst);
Memory::Write_U32(m_GPR[_inst.RS], uAddress);
}
void CInterpreter::stwux(UGeckoInstruction _inst)