summaryrefslogtreecommitdiffstatshomepage
path: root/src/mame/machine/dc.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/machine/dc.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/machine/dc.c')
-rw-r--r--src/mame/machine/dc.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/mame/machine/dc.c b/src/mame/machine/dc.c
index ce9ed093000..77247d311d3 100644
--- a/src/mame/machine/dc.c
+++ b/src/mame/machine/dc.c
@@ -843,7 +843,7 @@ READ64_DEVICE_HANDLER( dc_aica_reg_r )
// mame_printf_verbose("AICA REG: [%08x] read %" I64FMT "x, mask %" I64FMT "x\n", 0x700000+reg*4, (UINT64)offset, mem_mask);
- return (UINT64) aica_r(device, offset*2, 0xffff)<<shift;
+ return (UINT64) aica_r(device, space, offset*2, 0xffff)<<shift;
}
WRITE64_DEVICE_HANDLER( dc_aica_reg_w )
@@ -870,18 +870,18 @@ WRITE64_DEVICE_HANDLER( dc_aica_reg_w )
}
}
- aica_w(device, offset*2, dat, shift ? ((mem_mask>>32)&0xffff) : (mem_mask & 0xffff));
+ aica_w(device, space, offset*2, dat, shift ? ((mem_mask>>32)&0xffff) : (mem_mask & 0xffff));
// mame_printf_verbose("AICA REG: [%08x=%x] write %" I64FMT "x to %x, mask %" I64FMT "x\n", 0x700000+reg*4, dat, data, offset, mem_mask);
}
READ32_DEVICE_HANDLER( dc_arm_aica_r )
{
- return aica_r(device, offset*2, 0xffff) & 0xffff;
+ return aica_r(device, space, offset*2, 0xffff) & 0xffff;
}
WRITE32_DEVICE_HANDLER( dc_arm_aica_w )
{
- aica_w(device, offset*2, data, mem_mask&0xffff);
+ aica_w(device, space, offset*2, data, mem_mask&0xffff);
}