summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/bus/msx_cart/arc.cpp
diff options
context:
space:
mode:
author AJR <ajrhacker@users.noreply.github.com>2019-03-09 23:51:04 -0500
committer AJR <ajrhacker@users.noreply.github.com>2019-03-10 13:54:42 -0400
commitafce0258563d56af767f9723517bfe346eaf445c (patch)
tree8c4c80e67aa1f974c65d8fecae9abf36823a4103 /src/devices/bus/msx_cart/arc.cpp
parent15fc7aac93e603e845e828545e7b3a0c28935e85 (diff)
msx, bus/msx_cart, bus/msx_slot: Configuration and bus modernization (nw)
- Eliminate all MCFG_ macros - Add address space finders to replace most instances of machine().device - Use device_post_load instead of explicitly registering callbacks - Simplify read/write handlers in bus devices
Diffstat (limited to 'src/devices/bus/msx_cart/arc.cpp')
-rw-r--r--src/devices/bus/msx_cart/arc.cpp11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/devices/bus/msx_cart/arc.cpp b/src/devices/bus/msx_cart/arc.cpp
index 3504071ec4c..406ec8f4de3 100644
--- a/src/devices/bus/msx_cart/arc.cpp
+++ b/src/devices/bus/msx_cart/arc.cpp
@@ -18,9 +18,8 @@ msx_cart_arc_device::msx_cart_arc_device(const machine_config &mconfig, const ch
void msx_cart_arc_device::device_start()
{
// Install IO read/write handlers
- address_space &space = machine().device<cpu_device>("maincpu")->space(AS_IO);
- space.install_write_handler(0x7f, 0x7f, write8_delegate(FUNC(msx_cart_arc_device::io_7f_w), this));
- space.install_read_handler(0x7f, 0x7f, read8_delegate(FUNC(msx_cart_arc_device::io_7f_r), this));
+ io_space().install_write_handler(0x7f, 0x7f, write8smo_delegate(FUNC(msx_cart_arc_device::io_7f_w), this));
+ io_space().install_read_handler(0x7f, 0x7f, read8smo_delegate(FUNC(msx_cart_arc_device::io_7f_r), this));
}
@@ -39,7 +38,7 @@ void msx_cart_arc_device::initialize_cartridge()
}
-READ8_MEMBER(msx_cart_arc_device::read_cart)
+uint8_t msx_cart_arc_device::read_cart(offs_t offset)
{
if (offset >= 0x4000 && offset < 0xc000)
{
@@ -49,7 +48,7 @@ READ8_MEMBER(msx_cart_arc_device::read_cart)
}
-WRITE8_MEMBER(msx_cart_arc_device::io_7f_w)
+void msx_cart_arc_device::io_7f_w(uint8_t data)
{
if (data == 0x35)
{
@@ -58,7 +57,7 @@ WRITE8_MEMBER(msx_cart_arc_device::io_7f_w)
}
-READ8_MEMBER(msx_cart_arc_device::io_7f_r)
+uint8_t msx_cart_arc_device::io_7f_r()
{
return ((m_7f & 0x03) == 0x03) ? 0xda : 0xff;
}