Skip to content

Commit

Permalink
tube: tidy up after merge of master.
Browse files Browse the repository at this point in the history
  • Loading branch information
Steve Fosdick committed Sep 20, 2019
1 parent 80a5da8 commit 063f919
Showing 1 changed file with 11 additions and 18 deletions.
29 changes: 11 additions & 18 deletions src/tube.c
Original file line number Diff line number Diff line change
Expand Up @@ -64,36 +64,29 @@ void tube_updateints()

if (((tubeula.r1stat & 2) && (tubeula.pstat[0] & 128)) || ((tubeula.r1stat & 4) && (tubeula.pstat[3] & 128))) {
new_irq |= 1;
if (!(tube_irq & 1))
if (!(tube_irq & 1)) {
log_debug("tube: parasite IRQ asserted");
if (tube_type == TUBEPDP11 && ((m_pdp11->PS >> 5) & 7) < 6)
pdp11_interrupt(0x84, 6);
}
}
else if (tube_irq & 1)
log_debug("tube: parasite IRQ de-asserted");

if (tubeula.r1stat & 8 && (tubeula.ph3pos == 0 || tubeula.hp3pos > (tubeula.r1stat & 16) ? 1 : 0)) {
new_irq |= 2;
if (!(tube_irq & 2))
if (!(tube_irq & 2)) {
log_debug("tube: parasite NMI asserted");
if (tube_type == TUBEPDP11)
pdp11_interrupt(0x80, 7);
}
}
else if (tube_irq & 2)
log_debug("tube: parasite NMI de-asserted");

if (new_irq != tube_irq) {
switch(tube_type) {
case TUBE6809:
tube_6809_int(new_irq);
break;
case TUBEPDP11:
if (new_irq & 1 && !(tube_irq & 1))
if (((m_pdp11->PS >> 5) & 7) < 6)
pdp11_interrupt(0x84, 6);
if (new_irq & 2 && !(tube_irq & 2))
pdp11_interrupt(0x80, 7);
break;
default:
break;
}
}
if (new_irq != tube_irq && tube_type == TUBE6809)
tube_6809_int(new_irq);

tube_irq = new_irq;
}

Expand Down

0 comments on commit 063f919

Please sign in to comment.