mirror of
https://github.com/holub/mame
synced 2025-05-01 04:06:58 +03:00
lordgun: Coverity 315424
This commit is contained in:
parent
fbfbed1a22
commit
5ce403ec4c
@ -172,7 +172,7 @@ void lordgun_state::lordgun_eeprom_w(uint8_t data)
|
|||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
if (data & ~0xfd)
|
if (data & 2)
|
||||||
{
|
{
|
||||||
// popmessage("EE: %02x", data);
|
// popmessage("EE: %02x", data);
|
||||||
logerror("%s: Unknown EEPROM bit written %02X\n",machine().describe_context(),data);
|
logerror("%s: Unknown EEPROM bit written %02X\n",machine().describe_context(),data);
|
||||||
@ -186,7 +186,7 @@ void lordgun_state::lordgun_eeprom_w(uint8_t data)
|
|||||||
lordgun_update_gun(i);
|
lordgun_update_gun(i);
|
||||||
|
|
||||||
// latch the bit
|
// latch the bit
|
||||||
m_eeprom->di_write((data & 0x40) >> 6);
|
m_eeprom->di_write(BIT(data, 6));
|
||||||
|
|
||||||
// reset line asserted: reset.
|
// reset line asserted: reset.
|
||||||
m_eeprom->cs_write((data & 0x10) ? ASSERT_LINE : CLEAR_LINE );
|
m_eeprom->cs_write((data & 0x10) ? ASSERT_LINE : CLEAR_LINE );
|
||||||
@ -201,7 +201,7 @@ void lordgun_state::lordgun_eeprom_w(uint8_t data)
|
|||||||
|
|
||||||
void lordgun_state::aliencha_eeprom_w(uint8_t data)
|
void lordgun_state::aliencha_eeprom_w(uint8_t data)
|
||||||
{
|
{
|
||||||
if (~data & ~0xf8)
|
if (~data & 7)
|
||||||
{
|
{
|
||||||
// popmessage("EE: %02x", data);
|
// popmessage("EE: %02x", data);
|
||||||
logerror("%s: Unknown EEPROM bit written %02X\n",machine().describe_context(),data);
|
logerror("%s: Unknown EEPROM bit written %02X\n",machine().describe_context(),data);
|
||||||
@ -214,7 +214,7 @@ void lordgun_state::aliencha_eeprom_w(uint8_t data)
|
|||||||
machine().bookkeeping().coin_counter_w(1, data & 0x10);
|
machine().bookkeeping().coin_counter_w(1, data & 0x10);
|
||||||
|
|
||||||
// latch the bit
|
// latch the bit
|
||||||
m_eeprom->di_write((data & 0x80) >> 7);
|
m_eeprom->di_write(BIT(data, 7));
|
||||||
|
|
||||||
// reset line asserted: reset.
|
// reset line asserted: reset.
|
||||||
m_eeprom->cs_write((data & 0x20) ? ASSERT_LINE : CLEAR_LINE );
|
m_eeprom->cs_write((data & 0x20) ? ASSERT_LINE : CLEAR_LINE );
|
||||||
|
Loading…
Reference in New Issue
Block a user