Changed the RESET button to *not* autoStart a machine when a Debugger is present, so that the Debugger can "cleanly" load bootstrap sequences and boot without side-effects (eg, unexpected interrupts)
This commit is contained in:
parent
c9d8413a1d
commit
4be8640af8
8 changed files with 250 additions and 54 deletions
|
|
@ -1410,7 +1410,7 @@ class ComputerPDP11 extends Component {
|
|||
this.fReload = false;
|
||||
} else {
|
||||
this.reset();
|
||||
if (this.cpu) this.cpu.autoStart();
|
||||
if (this.cpu && !this.dbg) this.cpu.autoStart();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -588,11 +588,13 @@ class CPUStatePDP11 extends CPUPDP11 {
|
|||
this.regsGen[0] = bUnit || 0;
|
||||
for (var i = 1; i <= 5; i++) this.regsGen[i] = 0;
|
||||
this.regsGen[6] = addrStack || 0o2000;
|
||||
if (!this.flags.powered) {
|
||||
this.flags.autoStart = true;
|
||||
}
|
||||
else if (!this.flags.running) {
|
||||
this.startCPU();
|
||||
if (!this.dbg) {
|
||||
if (!this.flags.powered) {
|
||||
this.flags.autoStart = true;
|
||||
}
|
||||
else if (!this.flags.running) {
|
||||
this.startCPU();
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
|
|
|
|||
|
|
@ -920,6 +920,11 @@ class DriveController extends Component {
|
|||
drive.sDiskName = sDiskName;
|
||||
drive.sDiskPath = sDiskPath;
|
||||
|
||||
/*
|
||||
* Inform the controller implementation (eg, RX11) of the disk change.
|
||||
*/
|
||||
this.notifyLoad(drive.iDrive);
|
||||
|
||||
/*
|
||||
* Adding local disk image names to the disk list seems like a nice idea, but it's too confusing,
|
||||
* because then it looks like the "Mount" button should be able to (re)load them, and that can NEVER
|
||||
|
|
@ -1123,6 +1128,11 @@ class DriveController extends Component {
|
|||
this.sDiskSource = DriveController.SOURCE.NONE;
|
||||
this.displayDisk(iDrive);
|
||||
}
|
||||
|
||||
/*
|
||||
* Inform the controller implementation (eg, RX11) of the disk removal.
|
||||
*/
|
||||
this.notifyUnload(iDrive);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1223,6 +1233,30 @@ class DriveController extends Component {
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* notifyLoad(iDrive)
|
||||
*
|
||||
* Placeholder for subclasses. Called whenever DriveController has loaded a new disk into the specified drive.
|
||||
*
|
||||
* @this {RX11}
|
||||
* @param {number} iDrive
|
||||
*/
|
||||
notifyLoad(iDrive)
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* notifyUnload(iDrive)
|
||||
*
|
||||
* Placeholder for subclasses. Called whenever DriveController has unloaded a disk from the specified drive.
|
||||
*
|
||||
* @this {RX11}
|
||||
* @param {number} iDrive
|
||||
*/
|
||||
notifyUnload(iDrive)
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* readData(drive, iCylinder, iHead, iSector, nWords, addr, inc, fCheck, done)
|
||||
*
|
||||
|
|
|
|||
|
|
@ -143,6 +143,34 @@ class RX11 extends DriveController {
|
|||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* notifyLoad(iDrive)
|
||||
*
|
||||
* Called whenever DriveController has loaded a new disk into the specified drive.
|
||||
*
|
||||
* We're interested in this so that whenever a disk change occurs for drive 0, we can automatically
|
||||
* refill the sector buffer with the data from sector 1 from track 1.
|
||||
*
|
||||
* @this {RX11}
|
||||
* @param {number} iDrive
|
||||
*/
|
||||
notifyLoad(iDrive)
|
||||
{
|
||||
if (iDrive == 0) this.initController();
|
||||
}
|
||||
|
||||
/**
|
||||
* notifyUnload(iDrive)
|
||||
*
|
||||
* Called whenever DriveController has unloaded a disk from the specified drive.
|
||||
*
|
||||
* @this {RX11}
|
||||
* @param {number} iDrive
|
||||
*/
|
||||
notifyUnload(iDrive)
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* processCommand()
|
||||
*
|
||||
|
|
|
|||
Loading…
Reference in a new issue