mirror of
https://github.com/holub/mame
synced 2025-04-25 09:50:04 +03:00
different implementation of prev bugfix
This commit is contained in:
parent
18d3086feb
commit
99516900ae
@ -208,7 +208,6 @@ void amis2000_device::device_reset()
|
||||
{
|
||||
m_pc = 0;
|
||||
m_op = 0;
|
||||
m_prev_op = m_op;
|
||||
m_skip = false;
|
||||
|
||||
// clear i/o
|
||||
@ -231,6 +230,9 @@ void amis2000_device::execute_run()
|
||||
{
|
||||
m_icount--;
|
||||
|
||||
// remember previous opcode
|
||||
m_prev_op = m_op;
|
||||
|
||||
debugger_instruction_hook(this, m_pc);
|
||||
m_op = m_program->read_byte(m_pc);
|
||||
m_pc = (m_pc + 1) & 0x1fff;
|
||||
@ -239,7 +241,7 @@ void amis2000_device::execute_run()
|
||||
{
|
||||
// always skip over PP prefix
|
||||
m_skip = ((m_op & 0xf0) == 0x60);
|
||||
continue;
|
||||
m_op = 0; // nop
|
||||
}
|
||||
|
||||
switch (m_op & 0xf0)
|
||||
@ -314,8 +316,5 @@ void amis2000_device::execute_run()
|
||||
break; // 0xff
|
||||
|
||||
} // big switch
|
||||
|
||||
// remember previous opcode
|
||||
m_prev_op = m_op;
|
||||
}
|
||||
}
|
||||
|
@ -190,7 +190,6 @@ void ucom4_cpu_device::device_reset()
|
||||
m_inte_f = 1;
|
||||
m_pc = 0;
|
||||
m_op = 0;
|
||||
m_prev_op = m_op;
|
||||
m_skip = false;
|
||||
|
||||
// clear i/o
|
||||
@ -204,13 +203,13 @@ void ucom4_cpu_device::device_reset()
|
||||
// execute
|
||||
//-------------------------------------------------
|
||||
|
||||
void ucom4_cpu_device::increment_pc()
|
||||
inline void ucom4_cpu_device::increment_pc()
|
||||
{
|
||||
// upper bits (field register) don't auto-increment
|
||||
m_pc = (m_pc & ~0xff) | ((m_pc + 1) & 0xff);
|
||||
}
|
||||
|
||||
void ucom4_cpu_device::fetch_arg()
|
||||
inline void ucom4_cpu_device::fetch_arg()
|
||||
{
|
||||
// 2-byte opcodes: STM/LDI/CLI/CI, JMP/CAL, OCD
|
||||
if ((m_op & 0xfc) == 0x14 || (m_op & 0xf0) == 0xa0 || m_op == 0x1e)
|
||||
@ -227,6 +226,9 @@ void ucom4_cpu_device::execute_run()
|
||||
{
|
||||
m_icount--;
|
||||
|
||||
// remember previous opcode
|
||||
m_prev_op = m_op;
|
||||
|
||||
debugger_instruction_hook(this, m_pc);
|
||||
m_op = m_program->read_byte(m_pc);
|
||||
m_bitmask = 1 << (m_op & 0x03);
|
||||
@ -236,7 +238,7 @@ void ucom4_cpu_device::execute_run()
|
||||
if (m_skip)
|
||||
{
|
||||
m_skip = false;
|
||||
continue;
|
||||
m_op = 0; // nop
|
||||
}
|
||||
|
||||
switch (m_op & 0xf0)
|
||||
@ -337,8 +339,5 @@ void ucom4_cpu_device::execute_run()
|
||||
break; // 0xff
|
||||
|
||||
} // big switch
|
||||
|
||||
// remember previous opcode
|
||||
m_prev_op = m_op;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user