diff options
author | 2012-09-17 07:43:37 +0000 | |
---|---|---|
committer | 2012-09-17 07:43:37 +0000 | |
commit | cc16777cce9c5a2cac9d88c595b6b5f4ee70a2ea (patch) | |
tree | 496c31635729f6af1e37f3337b50e91b1f9fde97 /src/emu/sound/8950intf.h | |
parent | e25c13f2532730ebf50d0cffa0147393fd8e0228 (diff) |
Memory handler normalization, part 1.
READ/WRITE_DEVICE*_HANDLERs are now passed an
address_space &, and the 8-bit variants get a mem_mask
as well. This means they are now directly compatible
with the member function delegates. Added a generic
address space to the driver_device that can be used
when no specific address space is available. Also
added DECLARE_READ/WRITE_DEVICE*_HANDLER macros to
declare device callbacks with default mem_mask
parameters. [Aaron Giles]
Diffstat (limited to 'src/emu/sound/8950intf.h')
-rw-r--r-- | src/emu/sound/8950intf.h | 29 |
1 files changed, 17 insertions, 12 deletions
diff --git a/src/emu/sound/8950intf.h b/src/emu/sound/8950intf.h index e8de9ca087c..803cc33c782 100644 --- a/src/emu/sound/8950intf.h +++ b/src/emu/sound/8950intf.h @@ -7,21 +7,20 @@ struct y8950_interface { - void (*handler)(device_t *device, int linestate); - - read8_device_func keyboardread; - write8_device_func keyboardwrite; - read8_device_func portread; - write8_device_func portwrite; + devcb_write_line handler_cb; + devcb_read8 keyboardread_cb; + devcb_write8 keyboardwrite_cb; + devcb_read8 portread_cb; + devcb_write8 portwrite_cb; }; -READ8_DEVICE_HANDLER( y8950_r ); -WRITE8_DEVICE_HANDLER( y8950_w ); +DECLARE_READ8_DEVICE_HANDLER( y8950_r ); +DECLARE_WRITE8_DEVICE_HANDLER( y8950_w ); -READ8_DEVICE_HANDLER( y8950_status_port_r ); -READ8_DEVICE_HANDLER( y8950_read_port_r ); -WRITE8_DEVICE_HANDLER( y8950_control_port_w ); -WRITE8_DEVICE_HANDLER( y8950_write_port_w ); +DECLARE_READ8_DEVICE_HANDLER( y8950_status_port_r ); +DECLARE_READ8_DEVICE_HANDLER( y8950_read_port_r ); +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 @@ -44,6 +43,12 @@ protected: private: // internal state void *m_token; +public: + devcb_resolved_write_line m_handler; + devcb_resolved_read8 m_keyboardread; + devcb_resolved_write8 m_keyboardwrite; + devcb_resolved_read8 m_portread; + devcb_resolved_write8 m_portwrite; }; extern const device_type Y8950; |