mirror of
https://github.com/holub/mame
synced 2025-07-05 09:57:47 +03:00
315_5649: Better fix, set all ports to input on reset
This commit is contained in:
parent
e5f9778b07
commit
481e447fad
@ -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
|
||||
|
@ -55,6 +55,7 @@ public:
|
||||
protected:
|
||||
// device-level overrides
|
||||
virtual void device_start() override;
|
||||
virtual void device_reset() override;
|
||||
|
||||
private:
|
||||
// callbacks
|
||||
|
Loading…
Reference in New Issue
Block a user