Fixed Panel update on a reset

This commit is contained in:
Jeff Parsons 2017-01-26 11:28:59 -08:00 committed by Jeff Parsons
commit 284c2cd76b
5 changed files with 321 additions and 319 deletions

View file

@ -593,17 +593,20 @@ class CPUStatePDP11 extends CPUPDP11 {
if (!this.isRunning()) this.startCPU();
}
else {
if (this.dbg) {
if (this.dbg && this.flags.powered) {
/*
* TODO: Review the decision to always stop the CPU if the Debugger is loaded. Note that
* when stopCPU() stops a running CPU, the Debugger gets notified, so again, no need to notify it here.
* when stopCPU() stops a running CPU, the Debugger gets notified, so no need to notify it again.
*
* TODO: There are more serious problems to deal with if another component is slamming a new PC down
* the CPU's throat (presumably while also dropping some new code into RAM) while the CPU was still running;
* we should probably force a complete reset if the CPU is running, but for now, it's up to the user
* to hit the reset button themselves.
*/
if (!this.stopCPU()) this.dbg.updateStatus();
if (!this.stopCPU()) {
this.dbg.updateStatus();
this.cmp.updateDisplays(-1);
}
}
else if (fStart === false) {
this.stopCPU();