diff options
author | Michaël Banaan Ananas <happppp@users.noreply.github.com> | 2011-09-05 17:35:52 +0000 |
---|---|---|
committer | Michaël Banaan Ananas <happppp@users.noreply.github.com> | 2011-09-05 17:35:52 +0000 |
commit | a96fade85774ea43dda3f6a75e5753929175db58 (patch) | |
tree | 274af96e98ade718c461453b2ab068a918bbda22 | |
parent | f41e5dbe4b1bb2acfac1c2ffac38e51be9f4c824 (diff) |
INT0/1/2 are also auto-cleared
-rw-r--r-- | src/emu/cpu/m37710/m37710.c | 11 | ||||
-rw-r--r-- | src/emu/cpu/m37710/m37710op.h | 4 |
2 files changed, 6 insertions, 9 deletions
diff --git a/src/emu/cpu/m37710/m37710.c b/src/emu/cpu/m37710/m37710.c index 5f76bc39a8a..ffd713a4147 100644 --- a/src/emu/cpu/m37710/m37710.c +++ b/src/emu/cpu/m37710/m37710.c @@ -268,7 +268,7 @@ static TIMER_CALLBACK( m37710_timer_cb ) cpustate->timers[which]->adjust(cpustate->reload[which], param); - m37710_set_irq_line(cpustate, curirq, PULSE_LINE); + m37710_set_irq_line(cpustate, curirq, HOLD_LINE); device_triggerint(cpustate->device); } @@ -701,15 +701,12 @@ void m37710i_update_irqs(m37710i_cpu_struct *cpustate) // make sure we're running to service the interrupt CPU_STOPPED &= ~STOP_LEVEL_WAI; - // auto-clear if it's an internal line - if (wantedIRQ <= 12) - { - m37710_set_irq_line(cpustate, wantedIRQ, CLEAR_LINE); - } + // auto-clear line + m37710_set_irq_line(cpustate, wantedIRQ, CLEAR_LINE); // let's do it... // push PB, then PC, then status - CLK(8); + CLK(13); // mame_printf_debug("taking IRQ %d: PC = %06x, SP = %04x, IPL %d\n", wantedIRQ, REG_PB | REG_PC, REG_S, cpustate->ipl); m37710i_push_8(cpustate, REG_PB>>16); m37710i_push_16(cpustate, REG_PC); diff --git a/src/emu/cpu/m37710/m37710op.h b/src/emu/cpu/m37710/m37710op.h index 8dfd45474e4..f3b894df414 100644 --- a/src/emu/cpu/m37710/m37710op.h +++ b/src/emu/cpu/m37710/m37710op.h @@ -291,7 +291,7 @@ INLINE void m37710i_set_reg_ipl(m37710i_cpu_struct *cpustate, uint value) INLINE void m37710i_interrupt_software(m37710i_cpu_struct *cpustate, uint vector) { - CLK(8); + CLK(13); m37710i_push_8(cpustate, REG_PB>>16); m37710i_push_16(cpustate, REG_PC); m37710i_push_8(cpustate, cpustate->ipl); @@ -892,7 +892,7 @@ INLINE uint EA_SIY(m37710i_cpu_struct *cpustate) {return MAKE_UINT_16(read_16_ /* M37710 Cause a Break interrupt */ #undef OP_BRK #define OP_BRK() \ - REG_PC++; CLK(CLK_OP + CLK_R8 + CLK_IMM + 5); \ + REG_PC++; CLK(CLK_OP + CLK_R8 + CLK_IMM); \ logerror("error M37710: BRK at PC=%06x\n", REG_PB|REG_PC); \ m37710i_interrupt_software(cpustate, 0xfffa) |