Previous 199869 Revisions Next

r18014 Wednesday 19th September, 2012 at 11:06:59 UTC by Miodrag Milanović
Fix for ginganin regression (no whatsnew)
[src/emu/sound]8950intf.c 8950intf.h

trunk/src/emu/sound/8950intf.c
r18013r18014
190190
191191void y8950_device::device_config_complete()
192192{
193   // inherit a copy of the static data
194   const y8950_interface *intf = reinterpret_cast<const y8950_interface *>(static_config());
195   if (intf != NULL)
196      *static_cast<y8950_interface *>(this) = *intf;
197
198   // or initialize to defaults if none provided
199   else
200   {
201      memset(&m_handler_cb, 0, sizeof(m_handler_cb));
202      memset(&m_keyboardread_cb, 0, sizeof(m_keyboardread_cb));
203      memset(&m_keyboardwrite_cb, 0, sizeof(m_keyboardwrite_cb));
204      memset(&m_portread_cb, 0, sizeof(m_portread_cb));
205      memset(&m_portwrite_cb, 0, sizeof(m_portwrite_cb));
206   }
193207}
194208
195209//-------------------------------------------------
r18013r18014
198212
199213void y8950_device::device_start()
200214{
201   const y8950_interface *intf = (const y8950_interface *)static_config();
202   if (intf != NULL)
203   {
204      m_handler.resolve(intf->handler_cb, *this);
205      m_keyboardread.resolve(intf->keyboardread_cb, *this);
206      m_keyboardwrite.resolve(intf->keyboardwrite_cb, *this);
207      m_portread.resolve(intf->portread_cb, *this);
208      m_portwrite.resolve(intf->portwrite_cb, *this);
209   }
215   m_handler.resolve(m_handler_cb, *this);
216   m_keyboardread.resolve(m_keyboardread_cb, *this);
217   m_keyboardwrite.resolve(m_keyboardwrite_cb, *this);
218   m_portread.resolve(m_portread_cb, *this);
219   m_portwrite.resolve(m_portwrite_cb, *this);
210220
211221   DEVICE_START_NAME( y8950 )(this);
212222}
trunk/src/emu/sound/8950intf.h
r18013r18014
77
88struct y8950_interface
99{
10   devcb_write_line handler_cb;
11   devcb_read8 keyboardread_cb;
12   devcb_write8 keyboardwrite_cb;
13   devcb_read8 portread_cb;
14   devcb_write8 portwrite_cb;
10   devcb_write_line m_handler_cb;
11   devcb_read8 m_keyboardread_cb;
12   devcb_write8 m_keyboardwrite_cb;
13   devcb_read8 m_portread_cb;
14   devcb_write8 m_portwrite_cb;
1515};
1616
1717DECLARE_READ8_DEVICE_HANDLER( y8950_r );
r18013r18014
2323DECLARE_WRITE8_DEVICE_HANDLER( y8950_write_port_w );
2424
2525class y8950_device : public device_t,
26                                  public device_sound_interface
26                     public device_sound_interface,
27                public y8950_interface
2728{
2829public:
2930   y8950_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);

Previous 199869 Revisions Next


© 1997-2024 The MAME Team