315_5649: Better fix, set all ports to input on reset

This commit is contained in:
Dirk Best 2019-05-17 20:50:26 +02:00
parent e5f9778b07
commit 481e447fad
2 changed files with 11 additions and 7 deletions

View File

@ -70,6 +70,16 @@ void sega_315_5649_device::device_start()
save_item(NAME(m_analog_channel));
}
//-------------------------------------------------
// device_reset - device-specific reset
//-------------------------------------------------
void sega_315_5649_device::device_reset()
{
// set all ports to input on reset
m_port_config = 0xff;
}
//**************************************************************************
// INTERFACE
@ -89,17 +99,10 @@ READ8_MEMBER( sega_315_5649_device::read )
case 0x04:
case 0x05:
case 0x06:
// ignore port config for now. games seem to read and write without
// setting it first?
data = m_in_port_cb[offset](0);
#if 0
if (BIT(m_port_config, offset))
data = m_in_port_cb[offset](0);
else
data = m_port_value[offset];
#endif
break;
// serial channel 1/2 input

View File

@ -55,6 +55,7 @@ public:
protected:
// device-level overrides
virtual void device_start() override;
virtual void device_reset() override;
private:
// callbacks