mirror of
https://github.com/sehugg/8bitworkshop.git
synced 2024-11-26 10:49:17 +00:00
logInterrupt() calls added
This commit is contained in:
parent
4a49df6f3e
commit
7a75e971c5
@ -351,7 +351,6 @@ export abstract class BasicMachine implements HasCPU, Bus, SampledAudioSource, A
|
|||||||
connectCPUIOBus(iobus:Bus) : void {
|
connectCPUIOBus(iobus:Bus) : void {
|
||||||
this.cpu['connectIOBus'](this.probeIOBus(iobus));
|
this.cpu['connectIOBus'](this.probeIOBus(iobus));
|
||||||
}
|
}
|
||||||
// TODO: probe interrupts
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export abstract class BasicScanlineMachine extends BasicMachine implements RasterFrameBased {
|
export abstract class BasicScanlineMachine extends BasicMachine implements RasterFrameBased {
|
||||||
|
@ -200,6 +200,7 @@ const _BallyAstrocade = function(arcade:boolean) {
|
|||||||
// interrupt
|
// interrupt
|
||||||
if (sl == inlin && (inmod & 0x8)) {
|
if (sl == inlin && (inmod & 0x8)) {
|
||||||
cpu.retryInterrupts = !(inmod & 0x4);
|
cpu.retryInterrupts = !(inmod & 0x4);
|
||||||
|
this.probe.logInterrupt(infbk);
|
||||||
cpu.interrupt(infbk);
|
cpu.interrupt(infbk);
|
||||||
}
|
}
|
||||||
// refresh this line in frame buffer?
|
// refresh this line in frame buffer?
|
||||||
|
@ -413,9 +413,8 @@ export class Atari7800 extends BasicMachine implements RasterFrameBased {
|
|||||||
}
|
}
|
||||||
// do interrupt? (if visible or before 1st scanline)
|
// do interrupt? (if visible or before 1st scanline)
|
||||||
if ((visible || sl == linesPerFrame-1) && this.maria.doInterrupt()) {
|
if ((visible || sl == linesPerFrame-1) && this.maria.doInterrupt()) {
|
||||||
this.probe.logInterrupt(1); // TODO?
|
this.probe.logInterrupt(0);
|
||||||
this.cpu.NMI();
|
this.cpu.NMI();
|
||||||
//console.log("NMI", hex(this.cpu.getPC()), hex(this.maria.dll));
|
|
||||||
}
|
}
|
||||||
// post-DMA clocks
|
// post-DMA clocks
|
||||||
while (mc < colorClocksPerLine) {
|
while (mc < colorClocksPerLine) {
|
||||||
|
@ -56,7 +56,10 @@ export class ColecoVision extends BaseZ80VDPBasedMachine {
|
|||||||
|
|
||||||
getKeyboardMap() { return COLECOVISION_KEYCODE_MAP; }
|
getKeyboardMap() { return COLECOVISION_KEYCODE_MAP; }
|
||||||
|
|
||||||
vdpInterrupt() { this.cpu.NMI(); }
|
vdpInterrupt() {
|
||||||
|
this.probe.logInterrupt(0);
|
||||||
|
this.cpu.NMI();
|
||||||
|
}
|
||||||
|
|
||||||
read = newAddressDecoder([
|
read = newAddressDecoder([
|
||||||
[0x0000, 0x1fff, 0x1fff, (a) => { return this.bios ? this.bios[a] : 0; }],
|
[0x0000, 0x1fff, 0x1fff, (a) => { return this.bios ? this.bios[a] : 0; }],
|
||||||
|
@ -180,6 +180,7 @@ export class MSX1 extends BaseZ80VDPBasedMachine {
|
|||||||
}
|
}
|
||||||
|
|
||||||
vdpInterrupt() {
|
vdpInterrupt() {
|
||||||
|
this.probe.logInterrupt(0xff);
|
||||||
this.cpu.interrupt(0xff); // RST 0x38
|
this.cpu.interrupt(0xff); // RST 0x38
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -113,9 +113,14 @@ export class Midway8080 extends BasicScanlineMachine {
|
|||||||
drawScanline() {
|
drawScanline() {
|
||||||
// at end of scanline
|
// at end of scanline
|
||||||
if (this.scanline == 95)
|
if (this.scanline == 95)
|
||||||
this.cpu.interrupt(0xcf); // RST $8
|
this.interrupt(0xcf); // RST $8
|
||||||
else if (this.scanline == 223)
|
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 {
|
advanceFrame(maxCycles, trap) : number {
|
||||||
|
@ -44,8 +44,8 @@ export class SG1000 extends BaseZ80VDPBasedMachine {
|
|||||||
getKeyboardMap() { return SG1000_KEYCODE_MAP; }
|
getKeyboardMap() { return SG1000_KEYCODE_MAP; }
|
||||||
|
|
||||||
vdpInterrupt() {
|
vdpInterrupt() {
|
||||||
|
this.probe.logInterrupt(0xff);
|
||||||
return this.cpu.interrupt(0xff); // RST 0x38
|
return this.cpu.interrupt(0xff); // RST 0x38
|
||||||
//return this.cpu.NMI();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
read = newAddressDecoder([
|
read = newAddressDecoder([
|
||||||
|
Loading…
Reference in New Issue
Block a user