Added resume support for saving/restoring all active timers and IRQs, along with the run/stop state of the CPU

This commit is contained in:
Jeff Parsons 2017-01-25 20:31:05 -08:00 committed by Jeff Parsons
commit bb24ccaca6
12 changed files with 844 additions and 671 deletions

View file

@ -853,7 +853,10 @@ class ComputerPDP11 extends Component {
* after they're no longer ready.
*/
if (this.cpu && this.cpu.powerDown) {
if (fShutdown) this.cpu.stopCPU();
if (fShutdown) {
if (fSave) this.cpu.flags.autoStart = this.cpu.flags.running;
this.cpu.stopCPU();
}
data = this.cpu.powerDown(fSave, fShutdown);
if (typeof data === "object") stateComputer.set(this.cpu.id, data);
if (fShutdown) {