mirror of
https://github.com/holub/mame
synced 2025-04-23 08:49:55 +03:00
Fix for ginganin regression (no whatsnew)
This commit is contained in:
parent
9d9ffac2cd
commit
e3992c070e
@ -190,6 +190,20 @@ y8950_device::y8950_device(const machine_config &mconfig, const char *tag, devic
|
||||
|
||||
void y8950_device::device_config_complete()
|
||||
{
|
||||
// inherit a copy of the static data
|
||||
const y8950_interface *intf = reinterpret_cast<const y8950_interface *>(static_config());
|
||||
if (intf != NULL)
|
||||
*static_cast<y8950_interface *>(this) = *intf;
|
||||
|
||||
// or initialize to defaults if none provided
|
||||
else
|
||||
{
|
||||
memset(&m_handler_cb, 0, sizeof(m_handler_cb));
|
||||
memset(&m_keyboardread_cb, 0, sizeof(m_keyboardread_cb));
|
||||
memset(&m_keyboardwrite_cb, 0, sizeof(m_keyboardwrite_cb));
|
||||
memset(&m_portread_cb, 0, sizeof(m_portread_cb));
|
||||
memset(&m_portwrite_cb, 0, sizeof(m_portwrite_cb));
|
||||
}
|
||||
}
|
||||
|
||||
//-------------------------------------------------
|
||||
@ -198,15 +212,11 @@ void y8950_device::device_config_complete()
|
||||
|
||||
void y8950_device::device_start()
|
||||
{
|
||||
const y8950_interface *intf = (const y8950_interface *)static_config();
|
||||
if (intf != NULL)
|
||||
{
|
||||
m_handler.resolve(intf->handler_cb, *this);
|
||||
m_keyboardread.resolve(intf->keyboardread_cb, *this);
|
||||
m_keyboardwrite.resolve(intf->keyboardwrite_cb, *this);
|
||||
m_portread.resolve(intf->portread_cb, *this);
|
||||
m_portwrite.resolve(intf->portwrite_cb, *this);
|
||||
}
|
||||
m_handler.resolve(m_handler_cb, *this);
|
||||
m_keyboardread.resolve(m_keyboardread_cb, *this);
|
||||
m_keyboardwrite.resolve(m_keyboardwrite_cb, *this);
|
||||
m_portread.resolve(m_portread_cb, *this);
|
||||
m_portwrite.resolve(m_portwrite_cb, *this);
|
||||
|
||||
DEVICE_START_NAME( y8950 )(this);
|
||||
}
|
||||
|
@ -7,11 +7,11 @@
|
||||
|
||||
struct y8950_interface
|
||||
{
|
||||
devcb_write_line handler_cb;
|
||||
devcb_read8 keyboardread_cb;
|
||||
devcb_write8 keyboardwrite_cb;
|
||||
devcb_read8 portread_cb;
|
||||
devcb_write8 portwrite_cb;
|
||||
devcb_write_line m_handler_cb;
|
||||
devcb_read8 m_keyboardread_cb;
|
||||
devcb_write8 m_keyboardwrite_cb;
|
||||
devcb_read8 m_portread_cb;
|
||||
devcb_write8 m_portwrite_cb;
|
||||
};
|
||||
|
||||
DECLARE_READ8_DEVICE_HANDLER( y8950_r );
|
||||
@ -23,7 +23,8 @@ DECLARE_WRITE8_DEVICE_HANDLER( y8950_control_port_w );
|
||||
DECLARE_WRITE8_DEVICE_HANDLER( y8950_write_port_w );
|
||||
|
||||
class y8950_device : public device_t,
|
||||
public device_sound_interface
|
||||
public device_sound_interface,
|
||||
public y8950_interface
|
||||
{
|
||||
public:
|
||||
y8950_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
|
||||
|
Loading…
Reference in New Issue
Block a user