mirror of
https://github.com/holub/mame
synced 2025-06-28 15:14:21 +03:00
fix k/i input handling
This commit is contained in:
parent
925035f8f7
commit
6b6019207b
@ -156,8 +156,7 @@ void amis2000_device::device_start()
|
|||||||
m_bu = 0;
|
m_bu = 0;
|
||||||
m_acc = 0;
|
m_acc = 0;
|
||||||
m_e = 0;
|
m_e = 0;
|
||||||
m_i = 0;
|
m_ki_mask = 0;
|
||||||
m_k = 0;
|
|
||||||
m_d = 0;
|
m_d = 0;
|
||||||
m_d_active = false;
|
m_d_active = false;
|
||||||
m_d_polarity = 0;
|
m_d_polarity = 0;
|
||||||
@ -177,8 +176,7 @@ void amis2000_device::device_start()
|
|||||||
save_item(NAME(m_bu));
|
save_item(NAME(m_bu));
|
||||||
save_item(NAME(m_acc));
|
save_item(NAME(m_acc));
|
||||||
save_item(NAME(m_e));
|
save_item(NAME(m_e));
|
||||||
save_item(NAME(m_i));
|
save_item(NAME(m_ki_mask));
|
||||||
save_item(NAME(m_k));
|
|
||||||
save_item(NAME(m_d));
|
save_item(NAME(m_d));
|
||||||
save_item(NAME(m_d_active));
|
save_item(NAME(m_d_active));
|
||||||
save_item(NAME(m_d_polarity));
|
save_item(NAME(m_d_polarity));
|
||||||
@ -214,8 +212,7 @@ void amis2000_device::device_reset()
|
|||||||
m_d_polarity = 0;
|
m_d_polarity = 0;
|
||||||
m_d = 0; d_latch_out(false);
|
m_d = 0; d_latch_out(false);
|
||||||
m_a = 0; m_write_a(0, 0, 0xffff);
|
m_a = 0; m_write_a(0, 0, 0xffff);
|
||||||
m_i = 0xf;
|
m_ki_mask = 0xf;
|
||||||
m_k = 0xf;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -91,8 +91,7 @@ protected:
|
|||||||
UINT8 m_bu; // 2/3-bit ram index y
|
UINT8 m_bu; // 2/3-bit ram index y
|
||||||
UINT8 m_acc; // 4-bit accumulator
|
UINT8 m_acc; // 4-bit accumulator
|
||||||
UINT8 m_e; // 4-bit generic register
|
UINT8 m_e; // 4-bit generic register
|
||||||
UINT8 m_i; // 4-bit i-pins latch
|
UINT8 m_ki_mask; // 4-bit k/i-pins select latch
|
||||||
UINT8 m_k; // 4-bit k-pins latch
|
|
||||||
UINT8 m_d; // 8-bit d-pins latch
|
UINT8 m_d; // 8-bit d-pins latch
|
||||||
bool m_d_active; // d-pins available for direct i/o(floating), or outputting d-latch
|
bool m_d_active; // d-pins available for direct i/o(floating), or outputting d-latch
|
||||||
UINT8 m_d_polarity; // invert d-latch output
|
UINT8 m_d_polarity; // invert d-latch output
|
||||||
|
@ -45,8 +45,7 @@ void amis2000_device::op_lai()
|
|||||||
{
|
{
|
||||||
UINT8 param = m_op & 0x0f;
|
UINT8 param = m_op & 0x0f;
|
||||||
m_acc = param;
|
m_acc = param;
|
||||||
m_i = m_read_i(0, 0xff) & param;
|
m_ki_mask = param;
|
||||||
m_k = m_read_k(0, 0xff) & param;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -371,14 +370,16 @@ void amis2000_device::op_szm()
|
|||||||
|
|
||||||
void amis2000_device::op_szi()
|
void amis2000_device::op_szi()
|
||||||
{
|
{
|
||||||
// SZI: skip next on zero I pin(s)
|
// SZI: skip next on I pin(s)
|
||||||
m_skip = !m_i;
|
// note: AMI's manual is ambiguous here
|
||||||
|
m_skip = ((m_read_i(0, 0xff) & m_ki_mask) != 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
void amis2000_device::op_szk()
|
void amis2000_device::op_szk()
|
||||||
{
|
{
|
||||||
// SZK: skip next on zero K pin(s)
|
// SZK: skip next on K pin(s)
|
||||||
m_skip = !m_k;
|
// note: AMI's manual is ambiguous here
|
||||||
|
m_skip = ((m_read_k(0, 0xff) & m_ki_mask) != 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
void amis2000_device::op_sbe()
|
void amis2000_device::op_sbe()
|
||||||
|
Loading…
Reference in New Issue
Block a user