summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/cpu/f2mc16/f2mc16.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/devices/cpu/f2mc16/f2mc16.cpp')
-rw-r--r--src/devices/cpu/f2mc16/f2mc16.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/devices/cpu/f2mc16/f2mc16.cpp b/src/devices/cpu/f2mc16/f2mc16.cpp
index e9ff60a04c8..7d85bff282a 100644
--- a/src/devices/cpu/f2mc16/f2mc16.cpp
+++ b/src/devices/cpu/f2mc16/f2mc16.cpp
@@ -231,7 +231,7 @@ void f2mc16_device::execute_run()
{
while (m_icount > 0)
{
- if (m_outstanding_irqs)
+ if (m_outstanding_irqs && !m_prefix_valid)
{
int cpulevel = m_ps >> 13;
@@ -247,9 +247,10 @@ void f2mc16_device::execute_run()
//m_icount--;
+ if (!m_prefix_valid)
+ debugger_instruction_hook((m_pcb<<16) | m_pc);
u8 opcode = read_8((m_pcb<<16) | m_pc);
- debugger_instruction_hook((m_pcb<<16) | m_pc);
switch (opcode)
{
case 0x00: // NOP
@@ -311,7 +312,7 @@ void f2mc16_device::execute_run()
m_usp-=2;
write_16((m_usb << 16) | m_usp, read_rwX(3));
write_rwX(3, m_usp);
- m_ssp -= m_tmp8;
+ m_usp -= m_tmp8;
}
m_pc += 2;
m_icount -= 6;
@@ -3403,7 +3404,7 @@ void f2mc16_device::clear_irq(int vector)
// note: this function must not use m_tmp16 unless you change RETI
void f2mc16_device::take_irq(int vector, int level)
{
- standard_irq_callback(vector);
+ standard_irq_callback(vector, (m_pcb<<16) | m_pc);
// printf("take_irq: vector %d, level %d, old PC = %02x%04x\n", vector, level, m_pcb, m_pc);
push_16_ssp(m_acc>>16);
push_16_ssp(m_acc & 0xffff);