summaryrefslogtreecommitdiffstatshomepage
path: root/src/mame/drivers/r2dtank.c
diff options
context:
space:
mode:
author Aaron Giles <aaron@aarongiles.com>2012-09-17 07:43:37 +0000
committer Aaron Giles <aaron@aarongiles.com>2012-09-17 07:43:37 +0000
commitcc16777cce9c5a2cac9d88c595b6b5f4ee70a2ea (patch)
tree496c31635729f6af1e37f3337b50e91b1f9fde97 /src/mame/drivers/r2dtank.c
parente25c13f2532730ebf50d0cffa0147393fd8e0228 (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/mame/drivers/r2dtank.c')
-rw-r--r--src/mame/drivers/r2dtank.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/mame/drivers/r2dtank.c b/src/mame/drivers/r2dtank.c
index 625d2c38569..7883c48e44c 100644
--- a/src/mame/drivers/r2dtank.c
+++ b/src/mame/drivers/r2dtank.c
@@ -175,10 +175,10 @@ READ8_MEMBER(r2dtank_state::AY8910_port_r)
UINT8 ret = 0;
if (m_AY8910_selected & 0x08)
- ret = ay8910_r(machine().device("ay1"), 0);
+ ret = ay8910_r(machine().device("ay1"), space, 0);
if (m_AY8910_selected & 0x10)
- ret = ay8910_r(machine().device("ay2"), 0);
+ ret = ay8910_r(machine().device("ay2"), space, 0);
return ret;
}
@@ -187,10 +187,10 @@ READ8_MEMBER(r2dtank_state::AY8910_port_r)
WRITE8_MEMBER(r2dtank_state::AY8910_port_w)
{
if (m_AY8910_selected & 0x08)
- ay8910_data_address_w(machine().device("ay1"), m_AY8910_selected >> 2, data);
+ ay8910_data_address_w(machine().device("ay1"), space, m_AY8910_selected >> 2, data);
if (m_AY8910_selected & 0x10)
- ay8910_data_address_w(machine().device("ay2"), m_AY8910_selected >> 2, data);
+ ay8910_data_address_w(machine().device("ay2"), space, m_AY8910_selected >> 2, data);
}
@@ -252,7 +252,7 @@ static const ttl74123_interface ttl74123_intf =
1, /* A pin - driven by the CRTC */
1, /* B pin - pulled high */
1, /* Clear pin - pulled high */
- ttl74123_output_changed
+ DEVCB_HANDLER(ttl74123_output_changed)
};
@@ -387,7 +387,8 @@ static MC6845_UPDATE_ROW( update_row )
WRITE_LINE_MEMBER(r2dtank_state::display_enable_changed)
{
- ttl74123_a_w(machine().device("74123"), 0, state);
+ address_space &space = generic_space();
+ ttl74123_a_w(machine().device("74123"), space, 0, state);
}