Unverified Commit 4b97a356 authored by hizzlekizzle's avatar hizzlekizzle Committed by GitHub
Browse files

Merge pull request #58 from tryal-star/reset

fix reset crashes
parents 7bf14e64 560ef151
......@@ -64,7 +64,7 @@ void CMikie::BlowOut(void)
C6502_REGS regs;
mSystem.GetRegs(regs);
sprintf(addr,"Runtime Error - System Halted\nCMikie::Poke() - Read/Write to counter clocks at PC=$%04x.",regs.PC);
gError->Warning(addr);
if(gError) gError->Warning(addr);
gSystemHalt=TRUE;
}
......@@ -889,7 +889,7 @@ void CMikie::DisplaySetAttributes(ULONG Rotate,ULONG Format,ULONG Pitch,UBYTE* (
}
break;
default:
gError->Warning("CMikie::SetScreenAttributes() - Unrecognised display format");
if(gError) gError->Warning("CMikie::SetScreenAttributes() - Unrecognised display format");
for(Spot.Index=0;Spot.Index<4096;Spot.Index++) mColourMap[Spot.Index]=0;
break;
}
......@@ -1856,7 +1856,7 @@ void CMikie::Poke(ULONG addr,UBYTE data)
C6502_REGS regs;
mSystem.GetRegs(regs);
sprintf(addr,"Runtime Alert - System Halted\nCMikie::Poke(SYSCTL1) - Lynx power down occured at PC=$%04x.\nResetting system.",regs.PC);
gError->Warning(addr);
if(gError) gError->Warning(addr);
mSystem.Reset();
gSystemHalt=TRUE;
}
......@@ -1984,7 +1984,7 @@ void CMikie::Poke(ULONG addr,UBYTE data)
case (Mtest2&0xff):
// Test registers are unimplemented
// lets hope no programs use them.
gError->Warning("CMikie::Poke() - Write to MTEST2");
if(gError) gError->Warning("CMikie::Poke() - Write to MTEST2");
TRACE_MIKIE2("Poke(MTEST2,%02x) at PC=%04x",data,mSystem.mCpu->GetPC());
break;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment