diff options
author | 2015-06-09 16:57:51 +0200 | |
---|---|---|
committer | 2015-06-09 17:01:07 +0200 | |
commit | bb8ef78d03e10b0983dcca40fafa1b8607c5a61c (patch) | |
tree | 0f7d1eb6d6efd1e75829634904bad88d375b98d3 /src/emu/cpu/i86/i86.c | |
parent | 7ff62b4b455e08a797709abe9c9444bf9858c64b (diff) |
i86: add very limited lock support (just enough for the apricot
actually)
Diffstat (limited to 'src/emu/cpu/i86/i86.c')
-rw-r--r-- | src/emu/cpu/i86/i86.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/emu/cpu/i86/i86.c b/src/emu/cpu/i86/i86.c index 7a308da61a9..299d85b1f59 100644 --- a/src/emu/cpu/i86/i86.c +++ b/src/emu/cpu/i86/i86.c @@ -282,6 +282,8 @@ i8086_common_cpu_device::i8086_common_cpu_device(const machine_config &mconfig, , m_irq_state(0) , m_test_state(1) , m_pc(0) + , m_lock(false) + , m_lock_handler(*this) { static const BREGS reg_name[8]={ AL, CL, DL, BL, AH, CH, DH, BH }; @@ -391,6 +393,8 @@ void i8086_common_cpu_device::device_start() state_add(STATE_GENFLAGS, "GENFLAGS", m_TF).callimport().callexport().formatstr("%16s").noshow(); m_icountptr = &m_icount; + + m_lock_handler.resolve_safe(); } @@ -438,6 +442,7 @@ void i8086_common_cpu_device::device_reset() m_dst = 0; m_src = 0; m_halt = false; + m_lock = false; } @@ -1910,7 +1915,9 @@ bool i8086_common_cpu_device::common_op(UINT8 op) break; case 0xe4: // i_inal + if (m_lock) m_lock_handler(1); m_regs.b[AL] = read_port_byte( fetch() ); + if (m_lock) { m_lock_handler(0); m_lock = false; } CLK(IN_IMM8); break; @@ -2011,6 +2018,7 @@ bool i8086_common_cpu_device::common_op(UINT8 op) case 0xf0: // i_lock logerror("%s: %06x: Warning - BUSLOCK\n", tag(), pc()); + m_lock = true; m_no_interrupt = 1; CLK(NOP); break; |