Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix reset crashes #58

Merged
merged 1 commit into from Nov 22, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 4 additions & 4 deletions lynx/mikie.cpp
Expand Up @@ -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;
}

Expand Down Expand Up @@ -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;
}
Expand Down Expand Up @@ -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;
}
Expand Down Expand Up @@ -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;

Expand Down