1
0
mirror of https://github.com/sehugg/8bitworkshop.git synced 2024-11-22 14:33:51 +00:00

logInterrupt() calls added

This commit is contained in:
Steven Hugg 2019-08-27 21:17:54 -04:00
parent 4a49df6f3e
commit 7a75e971c5
7 changed files with 15 additions and 7 deletions

View File

@ -351,7 +351,6 @@ export abstract class BasicMachine implements HasCPU, Bus, SampledAudioSource, A
connectCPUIOBus(iobus:Bus) : void {
this.cpu['connectIOBus'](this.probeIOBus(iobus));
}
// TODO: probe interrupts
}
export abstract class BasicScanlineMachine extends BasicMachine implements RasterFrameBased {

View File

@ -200,6 +200,7 @@ const _BallyAstrocade = function(arcade:boolean) {
// interrupt
if (sl == inlin && (inmod & 0x8)) {
cpu.retryInterrupts = !(inmod & 0x4);
this.probe.logInterrupt(infbk);
cpu.interrupt(infbk);
}
// refresh this line in frame buffer?

View File

@ -413,9 +413,8 @@ export class Atari7800 extends BasicMachine implements RasterFrameBased {
}
// do interrupt? (if visible or before 1st scanline)
if ((visible || sl == linesPerFrame-1) && this.maria.doInterrupt()) {
this.probe.logInterrupt(1); // TODO?
this.probe.logInterrupt(0);
this.cpu.NMI();
//console.log("NMI", hex(this.cpu.getPC()), hex(this.maria.dll));
}
// post-DMA clocks
while (mc < colorClocksPerLine) {

View File

@ -56,7 +56,10 @@ export class ColecoVision extends BaseZ80VDPBasedMachine {
getKeyboardMap() { return COLECOVISION_KEYCODE_MAP; }
vdpInterrupt() { this.cpu.NMI(); }
vdpInterrupt() {
this.probe.logInterrupt(0);
this.cpu.NMI();
}
read = newAddressDecoder([
[0x0000, 0x1fff, 0x1fff, (a) => { return this.bios ? this.bios[a] : 0; }],

View File

@ -180,6 +180,7 @@ export class MSX1 extends BaseZ80VDPBasedMachine {
}
vdpInterrupt() {
this.probe.logInterrupt(0xff);
this.cpu.interrupt(0xff); // RST 0x38
}

View File

@ -113,9 +113,14 @@ export class Midway8080 extends BasicScanlineMachine {
drawScanline() {
// at end of scanline
if (this.scanline == 95)
this.cpu.interrupt(0xcf); // RST $8
this.interrupt(0xcf); // RST $8
else if (this.scanline == 223)
this.cpu.interrupt(0xd7); // RST $10
this.interrupt(0xd7); // RST $10
}
interrupt(data:number) {
this.probe.logInterrupt(data);
this.cpu.interrupt(data);
}
advanceFrame(maxCycles, trap) : number {

View File

@ -44,8 +44,8 @@ export class SG1000 extends BaseZ80VDPBasedMachine {
getKeyboardMap() { return SG1000_KEYCODE_MAP; }
vdpInterrupt() {
this.probe.logInterrupt(0xff);
return this.cpu.interrupt(0xff); // RST 0x38
//return this.cpu.NMI();
}
read = newAddressDecoder([