Fixed a hardware interrupt signalling check in MAINDEC Test #15

This commit is contained in:
Jeff 2016-11-13 19:08:00 -08:00 • committed by Jeff Parsons
commit d533ae69aa
10 changed files with 342 additions and 334 deletions

View file

@ -663,7 +663,19 @@ SerialPortPDP11.prototype.writeXCSR = function(data, addr)
{
/*
* If the device is READY, and TIE is being set, then request an interrupt.
*
* Conversely, if TIE is being cleared, remove the request; this satisfies a test in MAINDEC TEST 15,
* which appears to clear, set, and clear the Transmitter Interrupt Enable (TIE) bit in rapid succession,
* with the expectation that NO interrupt will be generated. However, this fix also required a
* complementary change in setTrigger(), to signal an interrupt using INTQ_DELAY rather than INTQ.
*/
if (this.xcsr & PDP11.DL11.XCSR.READY) {
if (data & PDP11.DL11.XCSR.TIE) {
this.cpu.setTrigger(this.triggerTransmitInterrupt);
} else {
this.cpu.removeTrigger(this.triggerTransmitInterrupt);
}
}
if ((this.xcsr & PDP11.DL11.XCSR.READY) && (data & PDP11.DL11.XCSR.TIE)) {
this.cpu.setTrigger(this.triggerTransmitInterrupt);
}