mirror of
https://github.com/holub/mame
synced 2025-04-26 18:23:08 +03:00
removed lot of legacy code in memory system and removed corresponding macros (nw)
This commit is contained in:
parent
2d55170aef
commit
11986dff32
@ -30,14 +30,6 @@ address_map_entry::address_map_entry(address_map &map, offs_t start, offs_t end)
|
||||
m_sharetag(NULL),
|
||||
m_region(NULL),
|
||||
m_rgnoffs(0),
|
||||
m_rspace8(NULL),
|
||||
m_rspace16(NULL),
|
||||
m_rspace32(NULL),
|
||||
m_rspace64(NULL),
|
||||
m_wspace8(NULL),
|
||||
m_wspace16(NULL),
|
||||
m_wspace32(NULL),
|
||||
m_wspace64(NULL),
|
||||
m_memory(NULL),
|
||||
m_bytestart(0),
|
||||
m_byteend(0),
|
||||
@ -173,37 +165,6 @@ void address_map_entry::set_submap(device_t &device, const char *tag, address_ma
|
||||
// 8-bit read/write handlers
|
||||
//-------------------------------------------------
|
||||
|
||||
void address_map_entry::internal_set_handler(read8_space_func func, const char *string, UINT64 unitmask)
|
||||
{
|
||||
assert(func != NULL);
|
||||
assert(unitmask_is_appropriate(8, unitmask, string));
|
||||
m_read.m_type = AMH_LEGACY_SPACE_HANDLER;
|
||||
m_read.m_bits = 8;
|
||||
m_read.m_mask = unitmask;
|
||||
m_read.m_name = string;
|
||||
m_rspace8 = func;
|
||||
}
|
||||
|
||||
|
||||
void address_map_entry::internal_set_handler(write8_space_func func, const char *string, UINT64 unitmask)
|
||||
{
|
||||
assert(func != NULL);
|
||||
assert(unitmask_is_appropriate(8, unitmask, string));
|
||||
m_write.m_type = AMH_LEGACY_SPACE_HANDLER;
|
||||
m_write.m_bits = 8;
|
||||
m_write.m_mask = unitmask;
|
||||
m_write.m_name = string;
|
||||
m_wspace8 = func;
|
||||
}
|
||||
|
||||
|
||||
void address_map_entry::internal_set_handler(read8_space_func rfunc, const char *rstring, write8_space_func wfunc, const char *wstring, UINT64 unitmask)
|
||||
{
|
||||
internal_set_handler(rfunc, rstring, unitmask);
|
||||
internal_set_handler(wfunc, wstring, unitmask);
|
||||
}
|
||||
|
||||
|
||||
void address_map_entry::internal_set_handler(device_t &device, read8_delegate func, UINT64 unitmask)
|
||||
{
|
||||
assert(!func.isnull());
|
||||
@ -242,37 +203,6 @@ void address_map_entry::internal_set_handler(device_t &device, read8_delegate rf
|
||||
// 16-bit read/write handlers
|
||||
//-------------------------------------------------
|
||||
|
||||
void address_map_entry::internal_set_handler(read16_space_func func, const char *string, UINT64 unitmask)
|
||||
{
|
||||
assert(func != NULL);
|
||||
assert(unitmask_is_appropriate(16, unitmask, string));
|
||||
m_read.m_type = AMH_LEGACY_SPACE_HANDLER;
|
||||
m_read.m_bits = 16;
|
||||
m_read.m_mask = unitmask;
|
||||
m_read.m_name = string;
|
||||
m_rspace16 = func;
|
||||
}
|
||||
|
||||
|
||||
void address_map_entry::internal_set_handler(write16_space_func func, const char *string, UINT64 unitmask)
|
||||
{
|
||||
assert(func != NULL);
|
||||
assert(unitmask_is_appropriate(16, unitmask, string));
|
||||
m_write.m_type = AMH_LEGACY_SPACE_HANDLER;
|
||||
m_write.m_bits = 16;
|
||||
m_write.m_mask = unitmask;
|
||||
m_write.m_name = string;
|
||||
m_wspace16 = func;
|
||||
}
|
||||
|
||||
|
||||
void address_map_entry::internal_set_handler(read16_space_func rfunc, const char *rstring, write16_space_func wfunc, const char *wstring, UINT64 unitmask)
|
||||
{
|
||||
internal_set_handler(rfunc, rstring, unitmask);
|
||||
internal_set_handler(wfunc, wstring, unitmask);
|
||||
}
|
||||
|
||||
|
||||
void address_map_entry::internal_set_handler(device_t &device, read16_delegate func, UINT64 unitmask)
|
||||
{
|
||||
assert(!func.isnull());
|
||||
@ -311,37 +241,6 @@ void address_map_entry::internal_set_handler(device_t &device, read16_delegate r
|
||||
// 32-bit read/write handlers
|
||||
//-------------------------------------------------
|
||||
|
||||
void address_map_entry::internal_set_handler(read32_space_func func, const char *string, UINT64 unitmask)
|
||||
{
|
||||
assert(func != NULL);
|
||||
assert(unitmask_is_appropriate(32, unitmask, string));
|
||||
m_read.m_type = AMH_LEGACY_SPACE_HANDLER;
|
||||
m_read.m_bits = 32;
|
||||
m_read.m_mask = unitmask;
|
||||
m_read.m_name = string;
|
||||
m_rspace32 = func;
|
||||
}
|
||||
|
||||
|
||||
void address_map_entry::internal_set_handler(write32_space_func func, const char *string, UINT64 unitmask)
|
||||
{
|
||||
assert(func != NULL);
|
||||
assert(unitmask_is_appropriate(32, unitmask, string));
|
||||
m_write.m_type = AMH_LEGACY_SPACE_HANDLER;
|
||||
m_write.m_bits = 32;
|
||||
m_write.m_mask = unitmask;
|
||||
m_write.m_name = string;
|
||||
m_wspace32 = func;
|
||||
}
|
||||
|
||||
|
||||
void address_map_entry::internal_set_handler(read32_space_func rfunc, const char *rstring, write32_space_func wfunc, const char *wstring, UINT64 unitmask)
|
||||
{
|
||||
internal_set_handler(rfunc, rstring, unitmask);
|
||||
internal_set_handler(wfunc, wstring, unitmask);
|
||||
}
|
||||
|
||||
|
||||
void address_map_entry::internal_set_handler(device_t &device, read32_delegate func, UINT64 unitmask)
|
||||
{
|
||||
assert(!func.isnull());
|
||||
@ -380,37 +279,6 @@ void address_map_entry::internal_set_handler(device_t &device, read32_delegate r
|
||||
// 64-bit read/write handlers
|
||||
//-------------------------------------------------
|
||||
|
||||
void address_map_entry::internal_set_handler(read64_space_func func, const char *string, UINT64 unitmask)
|
||||
{
|
||||
assert(func != NULL);
|
||||
assert(unitmask_is_appropriate(64, unitmask, string));
|
||||
m_read.m_type = AMH_LEGACY_SPACE_HANDLER;
|
||||
m_read.m_bits = 64;
|
||||
m_read.m_mask = 0;
|
||||
m_read.m_name = string;
|
||||
m_rspace64 = func;
|
||||
}
|
||||
|
||||
|
||||
void address_map_entry::internal_set_handler(write64_space_func func, const char *string, UINT64 unitmask)
|
||||
{
|
||||
assert(func != NULL);
|
||||
assert(unitmask_is_appropriate(64, unitmask, string));
|
||||
m_write.m_type = AMH_LEGACY_SPACE_HANDLER;
|
||||
m_write.m_bits = 64;
|
||||
m_write.m_mask = 0;
|
||||
m_write.m_name = string;
|
||||
m_wspace64 = func;
|
||||
}
|
||||
|
||||
|
||||
void address_map_entry::internal_set_handler(read64_space_func rfunc, const char *rstring, write64_space_func wfunc, const char *wstring, UINT64 unitmask)
|
||||
{
|
||||
internal_set_handler(rfunc, rstring, unitmask);
|
||||
internal_set_handler(wfunc, wstring, unitmask);
|
||||
}
|
||||
|
||||
|
||||
void address_map_entry::internal_set_handler(device_t &device, read64_delegate func, UINT64 unitmask)
|
||||
{
|
||||
assert(!func.isnull());
|
||||
|
@ -32,7 +32,6 @@ enum map_handler_type
|
||||
AMH_NOP,
|
||||
AMH_UNMAP,
|
||||
AMH_DEVICE_DELEGATE,
|
||||
AMH_LEGACY_SPACE_HANDLER,
|
||||
AMH_PORT,
|
||||
AMH_BANK,
|
||||
AMH_DEVICE_SUBMAP
|
||||
@ -127,18 +126,10 @@ public:
|
||||
read16_delegate m_rproto16; // 16-bit read proto-delegate
|
||||
read32_delegate m_rproto32; // 32-bit read proto-delegate
|
||||
read64_delegate m_rproto64; // 64-bit read proto-delegate
|
||||
read8_space_func m_rspace8; // 8-bit legacy address space handler
|
||||
read16_space_func m_rspace16; // 16-bit legacy address space handler
|
||||
read32_space_func m_rspace32; // 32-bit legacy address space handler
|
||||
read64_space_func m_rspace64; // 64-bit legacy address space handler
|
||||
write8_delegate m_wproto8; // 8-bit write proto-delegate
|
||||
write16_delegate m_wproto16; // 16-bit write proto-delegate
|
||||
write32_delegate m_wproto32; // 32-bit write proto-delegate
|
||||
write64_delegate m_wproto64; // 64-bit write proto-delegate
|
||||
write8_space_func m_wspace8; // 8-bit legacy address space handler
|
||||
write16_space_func m_wspace16; // 16-bit legacy address space handler
|
||||
write32_space_func m_wspace32; // 32-bit legacy address space handler
|
||||
write64_space_func m_wspace64; // 64-bit legacy address space handler
|
||||
|
||||
setoffset_delegate m_soproto; // set offset proto-delegate
|
||||
address_map_delegate m_submap_delegate;
|
||||
@ -153,33 +144,21 @@ public:
|
||||
|
||||
protected:
|
||||
// internal handler setters for 8-bit functions
|
||||
void internal_set_handler(read8_space_func func, const char *string, UINT64 mask);
|
||||
void internal_set_handler(write8_space_func func, const char *string, UINT64 mask);
|
||||
void internal_set_handler(read8_space_func rfunc, const char *rstring, write8_space_func wfunc, const char *wstring, UINT64 mask);
|
||||
void internal_set_handler(device_t &device, read8_delegate func, UINT64 mask);
|
||||
void internal_set_handler(device_t &device, write8_delegate func, UINT64 mask);
|
||||
void internal_set_handler(device_t &device, read8_delegate rfunc, write8_delegate wfunc, UINT64 mask);
|
||||
|
||||
// internal handler setters for 16-bit functions
|
||||
void internal_set_handler(read16_space_func func, const char *string, UINT64 mask);
|
||||
void internal_set_handler(write16_space_func func, const char *string, UINT64 mask);
|
||||
void internal_set_handler(read16_space_func rfunc, const char *rstring, write16_space_func wfunc, const char *wstring, UINT64 mask);
|
||||
void internal_set_handler(device_t &device, read16_delegate func, UINT64 mask);
|
||||
void internal_set_handler(device_t &device, write16_delegate func, UINT64 mask);
|
||||
void internal_set_handler(device_t &device, read16_delegate rfunc, write16_delegate wfunc, UINT64 mask);
|
||||
|
||||
// internal handler setters for 32-bit functions
|
||||
void internal_set_handler(read32_space_func func, const char *string, UINT64 mask);
|
||||
void internal_set_handler(write32_space_func func, const char *string, UINT64 mask);
|
||||
void internal_set_handler(read32_space_func rfunc, const char *rstring, write32_space_func wfunc, const char *wstring, UINT64 mask);
|
||||
void internal_set_handler(device_t &device, read32_delegate func, UINT64 mask);
|
||||
void internal_set_handler(device_t &device, write32_delegate func, UINT64 mask);
|
||||
void internal_set_handler(device_t &device, read32_delegate rfunc, write32_delegate wfunc, UINT64 mask);
|
||||
|
||||
// internal handler setters for 64-bit functions
|
||||
void internal_set_handler(read64_space_func func, const char *string, UINT64 mask);
|
||||
void internal_set_handler(write64_space_func func, const char *string, UINT64 mask);
|
||||
void internal_set_handler(read64_space_func rfunc, const char *rstring, write64_space_func wfunc, const char *wstring, UINT64 mask);
|
||||
void internal_set_handler(device_t &device, read64_delegate func, UINT64 mask);
|
||||
void internal_set_handler(device_t &device, write64_delegate func, UINT64 mask);
|
||||
void internal_set_handler(device_t &device, read64_delegate rfunc, write64_delegate wfunc, UINT64 mask);
|
||||
@ -199,9 +178,6 @@ public:
|
||||
address_map_entry8(address_map &map, offs_t start, offs_t end);
|
||||
|
||||
// native-size handlers
|
||||
void set_handler(read8_space_func func, const char *string) { internal_set_handler(func, string, 0); }
|
||||
void set_handler(write8_space_func func, const char *string) { internal_set_handler(func, string, 0); }
|
||||
void set_handler(read8_space_func rfunc, const char *rstring, write8_space_func wfunc, const char *wstring) { internal_set_handler(rfunc, rstring, wfunc, wstring, 0); }
|
||||
void set_handler(device_t &device, read8_delegate func) { internal_set_handler(device, func, 0); }
|
||||
void set_handler(device_t &device, write8_delegate func) { internal_set_handler(device, func, 0); }
|
||||
void set_handler(device_t &device, read8_delegate rfunc, write8_delegate wfunc) { internal_set_handler(device, rfunc, wfunc, 0); }
|
||||
@ -217,17 +193,11 @@ public:
|
||||
address_map_entry16(address_map &map, offs_t start, offs_t end);
|
||||
|
||||
// native-size handlers
|
||||
void set_handler(read16_space_func func, const char *string) { internal_set_handler(func, string, 0); }
|
||||
void set_handler(write16_space_func func, const char *string) { internal_set_handler(func, string, 0); }
|
||||
void set_handler(read16_space_func rfunc, const char *rstring, write16_space_func wfunc, const char *wstring) { internal_set_handler(rfunc, rstring, wfunc, wstring, 0); }
|
||||
void set_handler(device_t &device, read16_delegate func) { internal_set_handler(device, func, 0); }
|
||||
void set_handler(device_t &device, write16_delegate func) { internal_set_handler(device, func, 0); }
|
||||
void set_handler(device_t &device, read16_delegate rfunc, write16_delegate wfunc) { internal_set_handler(device, rfunc, wfunc, 0); }
|
||||
|
||||
// 8-bit handlers
|
||||
void set_handler(read8_space_func func, const char *string, UINT16 mask) { internal_set_handler(func, string, mask); }
|
||||
void set_handler(write8_space_func func, const char *string, UINT16 mask) { internal_set_handler(func, string, mask); }
|
||||
void set_handler(read8_space_func rfunc, const char *rstring, write8_space_func wfunc, const char *wstring, UINT16 mask) { internal_set_handler(rfunc, rstring, wfunc, wstring, mask); }
|
||||
void set_handler(device_t &device, read8_delegate func, UINT16 mask) { internal_set_handler(device, func, mask); }
|
||||
void set_handler(device_t &device, write8_delegate func, UINT16 mask) { internal_set_handler(device, func, mask); }
|
||||
void set_handler(device_t &device, read8_delegate rfunc, write8_delegate wfunc, UINT16 mask) { internal_set_handler(device, rfunc, wfunc, mask); }
|
||||
@ -243,25 +213,16 @@ public:
|
||||
address_map_entry32(address_map &map, offs_t start, offs_t end);
|
||||
|
||||
// native-size handlers
|
||||
void set_handler(read32_space_func func, const char *string) { internal_set_handler(func, string, 0); }
|
||||
void set_handler(write32_space_func func, const char *string) { internal_set_handler(func, string, 0); }
|
||||
void set_handler(read32_space_func rfunc, const char *rstring, write32_space_func wfunc, const char *wstring) { internal_set_handler(rfunc, rstring, wfunc, wstring, 0); }
|
||||
void set_handler(device_t &device, read32_delegate func) { internal_set_handler(device, func, 0); }
|
||||
void set_handler(device_t &device, write32_delegate func) { internal_set_handler(device, func, 0); }
|
||||
void set_handler(device_t &device, read32_delegate rfunc, write32_delegate wfunc) { internal_set_handler(device, rfunc, wfunc, 0); }
|
||||
|
||||
// 16-bit handlers
|
||||
void set_handler(read16_space_func func, const char *string, UINT32 mask) { internal_set_handler(func, string, mask); }
|
||||
void set_handler(write16_space_func func, const char *string, UINT32 mask) { internal_set_handler(func, string, mask); }
|
||||
void set_handler(read16_space_func rfunc, const char *rstring, write16_space_func wfunc, const char *wstring, UINT32 mask) { internal_set_handler(rfunc, rstring, wfunc, wstring, mask); }
|
||||
void set_handler(device_t &device, read16_delegate func, UINT32 mask) { internal_set_handler(device, func, mask); }
|
||||
void set_handler(device_t &device, write16_delegate func, UINT32 mask) { internal_set_handler(device, func, mask); }
|
||||
void set_handler(device_t &device, read16_delegate rfunc, write16_delegate wfunc, UINT32 mask) { internal_set_handler(device, rfunc, wfunc, mask); }
|
||||
|
||||
// 8-bit handlers
|
||||
void set_handler(read8_space_func func, const char *string, UINT32 mask) { internal_set_handler(func, string, mask); }
|
||||
void set_handler(write8_space_func func, const char *string, UINT32 mask) { internal_set_handler(func, string, mask); }
|
||||
void set_handler(read8_space_func rfunc, const char *rstring, write8_space_func wfunc, const char *wstring, UINT32 mask) { internal_set_handler(rfunc, rstring, wfunc, wstring, mask); }
|
||||
void set_handler(device_t &device, read8_delegate func, UINT32 mask) { internal_set_handler(device, func, mask); }
|
||||
void set_handler(device_t &device, write8_delegate func, UINT32 mask) { internal_set_handler(device, func, mask); }
|
||||
void set_handler(device_t &device, read8_delegate rfunc, write8_delegate wfunc, UINT32 mask) { internal_set_handler(device, rfunc, wfunc, mask); }
|
||||
@ -277,33 +238,21 @@ public:
|
||||
address_map_entry64(address_map &map, offs_t start, offs_t end);
|
||||
|
||||
// native-size handlers
|
||||
void set_handler(read64_space_func func, const char *string) { internal_set_handler(func, string, 0); }
|
||||
void set_handler(write64_space_func func, const char *string) { internal_set_handler(func, string, 0); }
|
||||
void set_handler(read64_space_func rfunc, const char *rstring, write64_space_func wfunc, const char *wstring) { internal_set_handler(rfunc, rstring, wfunc, wstring, 0); }
|
||||
void set_handler(device_t &device, read64_delegate func) { internal_set_handler(device, func, 0); }
|
||||
void set_handler(device_t &device, write64_delegate func) { internal_set_handler(device, func, 0); }
|
||||
void set_handler(device_t &device, read64_delegate rfunc, write64_delegate wfunc) { internal_set_handler(device, rfunc, wfunc, 0); }
|
||||
|
||||
// 32-bit handlers
|
||||
void set_handler(read32_space_func func, const char *string, UINT64 mask) { internal_set_handler(func, string, mask); }
|
||||
void set_handler(write32_space_func func, const char *string, UINT64 mask) { internal_set_handler(func, string, mask); }
|
||||
void set_handler(read32_space_func rfunc, const char *rstring, write32_space_func wfunc, const char *wstring, UINT64 mask) { internal_set_handler(rfunc, rstring, wfunc, wstring, mask); }
|
||||
void set_handler(device_t &device, read32_delegate func, UINT64 mask) { internal_set_handler(device, func, mask); }
|
||||
void set_handler(device_t &device, write32_delegate func, UINT64 mask) { internal_set_handler(device, func, mask); }
|
||||
void set_handler(device_t &device, read32_delegate rfunc, write32_delegate wfunc, UINT64 mask) { internal_set_handler(device, rfunc, wfunc, mask); }
|
||||
|
||||
// 16-bit handlers
|
||||
void set_handler(read16_space_func func, const char *string, UINT64 mask) { internal_set_handler(func, string, mask); }
|
||||
void set_handler(write16_space_func func, const char *string, UINT64 mask) { internal_set_handler(func, string, mask); }
|
||||
void set_handler(read16_space_func rfunc, const char *rstring, write16_space_func wfunc, const char *wstring, UINT64 mask) { internal_set_handler(rfunc, rstring, wfunc, wstring, mask); }
|
||||
void set_handler(device_t &device, read16_delegate func, UINT64 mask) { internal_set_handler(device, func, mask); }
|
||||
void set_handler(device_t &device, write16_delegate func, UINT64 mask) { internal_set_handler(device, func, mask); }
|
||||
void set_handler(device_t &device, read16_delegate rfunc, write16_delegate wfunc, UINT64 mask) { internal_set_handler(device, rfunc, wfunc, mask); }
|
||||
|
||||
// 8-bit handlers
|
||||
void set_handler(read8_space_func func, const char *string, UINT64 mask) { internal_set_handler(func, string, mask); }
|
||||
void set_handler(write8_space_func func, const char *string, UINT64 mask) { internal_set_handler(func, string, mask); }
|
||||
void set_handler(read8_space_func rfunc, const char *rstring, write8_space_func wfunc, const char *wstring, UINT64 mask) { internal_set_handler(rfunc, rstring, wfunc, wstring, mask); }
|
||||
void set_handler(device_t &device, read8_delegate func, UINT64 mask) { internal_set_handler(device, func, mask); }
|
||||
void set_handler(device_t &device, write8_delegate func, UINT64 mask) { internal_set_handler(device, func, mask); }
|
||||
void set_handler(device_t &device, read8_delegate rfunc, write8_delegate wfunc, UINT64 mask) { internal_set_handler(device, rfunc, wfunc, mask); }
|
||||
@ -410,26 +359,6 @@ void _class :: _name(::address_map &map, device_t &device) \
|
||||
#define AM_MIRROR(_mirror) \
|
||||
curentry->set_mirror(_mirror);
|
||||
|
||||
// legacy space writes
|
||||
#define AM_WRITE_LEGACY(_handler) \
|
||||
curentry->set_handler(_handler, #_handler);
|
||||
|
||||
// legacy space reads/writes
|
||||
#define AM_READWRITE_LEGACY(_rhandler, _whandler) \
|
||||
curentry->set_handler(_rhandler, #_rhandler, _whandler, #_whandler);
|
||||
|
||||
// legacy device reads
|
||||
#define AM_DEVREAD_LEGACY(_tag, _handler) \
|
||||
curentry->set_handler(device, read_delegate(&_handler, #_handler, _tag, (device_t *)0));
|
||||
|
||||
// legacy device writes
|
||||
#define AM_DEVWRITE_LEGACY(_tag, _handler) \
|
||||
curentry->set_handler(device, write_delegate(&_handler, #_handler, _tag, (device_t *)0));
|
||||
|
||||
// legacy device reads/writes
|
||||
#define AM_DEVREADWRITE_LEGACY(_tag, _rhandler, _whandler) \
|
||||
curentry->set_handler(device, read_delegate(&_rhandler, #_rhandler, _tag, (device_t *)0), write_delegate(&_whandler, #_whandler, _tag, (device_t *)0));
|
||||
|
||||
// driver data reads
|
||||
#define AM_READ(_handler) \
|
||||
curentry->set_handler(device, read_delegate(&drivdata_class::_handler, "driver_data::" #_handler, DEVICE_SELF, (drivdata_class *)0));
|
||||
|
@ -189,6 +189,22 @@ void devcb_stub64(device_t *device, address_space &space, offs_t offset, UINT64
|
||||
// TYPE DEFINITIONS
|
||||
//**************************************************************************
|
||||
|
||||
// read/write types for I/O lines (similar to read/write handlers but no offset)
|
||||
typedef int (*read_line_device_func)(device_t *device);
|
||||
typedef void (*write_line_device_func)(device_t *device, int state);
|
||||
|
||||
// legacy device read/write handlers
|
||||
typedef UINT8 (*read8_device_func) (ATTR_UNUSED device_t *device, ATTR_UNUSED address_space &space, ATTR_UNUSED offs_t offset, ATTR_UNUSED UINT8 mem_mask);
|
||||
typedef void (*write8_device_func) (ATTR_UNUSED device_t *device, ATTR_UNUSED address_space &space, ATTR_UNUSED offs_t offset, ATTR_UNUSED UINT8 data, ATTR_UNUSED UINT8 mem_mask);
|
||||
typedef UINT16 (*read16_device_func) (ATTR_UNUSED device_t *device, ATTR_UNUSED address_space &space, ATTR_UNUSED offs_t offset, ATTR_UNUSED UINT16 mem_mask);
|
||||
typedef void (*write16_device_func)(ATTR_UNUSED device_t *device, ATTR_UNUSED address_space &space, ATTR_UNUSED offs_t offset, ATTR_UNUSED UINT16 data, ATTR_UNUSED UINT16 mem_mask);
|
||||
typedef UINT32 (*read32_device_func) (ATTR_UNUSED device_t *device, ATTR_UNUSED address_space &space, ATTR_UNUSED offs_t offset, ATTR_UNUSED UINT32 mem_mask);
|
||||
typedef void (*write32_device_func)(ATTR_UNUSED device_t *device, ATTR_UNUSED address_space &space, ATTR_UNUSED offs_t offset, ATTR_UNUSED UINT32 data, ATTR_UNUSED UINT32 mem_mask);
|
||||
typedef UINT64 (*read64_device_func) (ATTR_UNUSED device_t *device, ATTR_UNUSED address_space &space, ATTR_UNUSED offs_t offset, ATTR_UNUSED UINT64 mem_mask);
|
||||
typedef void (*write64_device_func)(ATTR_UNUSED device_t *device, ATTR_UNUSED address_space &space, ATTR_UNUSED offs_t offset, ATTR_UNUSED UINT64 data, ATTR_UNUSED UINT64 mem_mask);
|
||||
|
||||
|
||||
|
||||
// ======================> devcb_resolved_objects
|
||||
|
||||
// resolving a devcb may produce one of the following object types
|
||||
|
@ -40,10 +40,6 @@
|
||||
#define MCFG_DEVICE_INPUT_DEFAULTS(_config) \
|
||||
device_t::static_set_input_default(*device, DEVICE_INPUT_DEFAULTS_NAME(_config));
|
||||
|
||||
// macros for defining read_line/write_line functions
|
||||
#define READ_LINE_DEVICE_HANDLER(name) int name(ATTR_UNUSED device_t *device)
|
||||
#define WRITE_LINE_DEVICE_HANDLER(name) void name(ATTR_UNUSED device_t *device, ATTR_UNUSED int state)
|
||||
|
||||
#define DECLARE_READ_LINE_MEMBER(name) int name()
|
||||
#define READ_LINE_MEMBER(name) int name()
|
||||
#define DECLARE_WRITE_LINE_MEMBER(name) void name(ATTR_UNUSED int state)
|
||||
@ -90,12 +86,6 @@ device_t *device_creator(const machine_config &mconfig, const char *tag, device_
|
||||
// timer IDs for devices
|
||||
typedef UINT32 device_timer_id;
|
||||
|
||||
|
||||
// read/write types for I/O lines (similar to read/write handlers but no offset)
|
||||
typedef int (*read_line_device_func)(device_t *device);
|
||||
typedef void (*write_line_device_func)(device_t *device, int state);
|
||||
|
||||
|
||||
// ======================> device_t
|
||||
|
||||
// device_t represents a device
|
||||
|
517
src/emu/memory.c
517
src/emu/memory.c
@ -324,24 +324,6 @@ protected:
|
||||
class handler_entry_read : public handler_entry
|
||||
{
|
||||
public:
|
||||
// combination of unions to hold legacy objects and callbacks
|
||||
struct legacy_info
|
||||
{
|
||||
union
|
||||
{
|
||||
address_space * space;
|
||||
device_t * device;
|
||||
} object;
|
||||
|
||||
union
|
||||
{
|
||||
read8_space_func space8;
|
||||
read16_space_func space16;
|
||||
read32_space_func space32;
|
||||
read64_space_func space64;
|
||||
} handler;
|
||||
};
|
||||
|
||||
struct access_handler
|
||||
{
|
||||
// Constructors mean you can't union them
|
||||
@ -355,7 +337,6 @@ public:
|
||||
handler_entry_read(UINT8 width, endianness_t endianness, UINT8 **rambaseptr)
|
||||
: handler_entry(width, endianness, rambaseptr)
|
||||
{
|
||||
memset(&m_legacy_info, 0, sizeof(m_legacy_info));
|
||||
}
|
||||
|
||||
virtual void copy(handler_entry *entry);
|
||||
@ -365,16 +346,10 @@ public:
|
||||
virtual const char *subunit_name(int entry) const;
|
||||
|
||||
// configure delegate callbacks
|
||||
void set_delegate(read8_delegate delegate, UINT64 mask = 0, const legacy_info *info = 0);
|
||||
void set_delegate(read16_delegate delegate, UINT64 mask = 0, const legacy_info *info = 0);
|
||||
void set_delegate(read32_delegate delegate, UINT64 mask = 0, const legacy_info *info = 0);
|
||||
void set_delegate(read64_delegate delegate, UINT64 mask = 0, const legacy_info *info = 0);
|
||||
|
||||
// configure legacy address space functions
|
||||
void set_legacy_func(address_space &space, read8_space_func func, const char *name, UINT64 mask = 0);
|
||||
void set_legacy_func(address_space &space, read16_space_func func, const char *name, UINT64 mask = 0);
|
||||
void set_legacy_func(address_space &space, read32_space_func func, const char *name, UINT64 mask = 0);
|
||||
void set_legacy_func(address_space &space, read64_space_func func, const char *name, UINT64 mask = 0);
|
||||
void set_delegate(read8_delegate delegate, UINT64 mask = 0);
|
||||
void set_delegate(read16_delegate delegate, UINT64 mask = 0);
|
||||
void set_delegate(read32_delegate delegate, UINT64 mask = 0);
|
||||
void set_delegate(read64_delegate delegate, UINT64 mask = 0);
|
||||
|
||||
// configure I/O port access
|
||||
void set_ioport(ioport_port &ioport);
|
||||
@ -391,12 +366,6 @@ private:
|
||||
UINT32 read_stub_32(address_space &space, offs_t offset, UINT32 mask);
|
||||
UINT64 read_stub_64(address_space &space, offs_t offset, UINT64 mask);
|
||||
|
||||
// stubs for calling legacy read handlers
|
||||
UINT8 read_stub_legacy(address_space &space, offs_t offset, UINT8 mask);
|
||||
UINT16 read_stub_legacy(address_space &space, offs_t offset, UINT16 mask);
|
||||
UINT32 read_stub_legacy(address_space &space, offs_t offset, UINT32 mask);
|
||||
UINT64 read_stub_legacy(address_space &space, offs_t offset, UINT64 mask);
|
||||
|
||||
// stubs for reading I/O ports
|
||||
template<typename _UintType>
|
||||
_UintType read_stub_ioport(address_space &space, offs_t offset, _UintType mask) { return m_ioport->read(); }
|
||||
@ -408,10 +377,6 @@ private:
|
||||
access_handler m_read;
|
||||
access_handler m_subread[8];
|
||||
ioport_port * m_ioport;
|
||||
|
||||
bool m_sub_is_legacy[8];
|
||||
legacy_info m_legacy_info;
|
||||
legacy_info m_sublegacy_info[8];
|
||||
};
|
||||
|
||||
|
||||
@ -421,24 +386,6 @@ private:
|
||||
class handler_entry_write : public handler_entry
|
||||
{
|
||||
public:
|
||||
// combination of unions to hold legacy objects and callbacks
|
||||
struct legacy_info
|
||||
{
|
||||
union
|
||||
{
|
||||
address_space * space;
|
||||
device_t * device;
|
||||
} object;
|
||||
|
||||
union
|
||||
{
|
||||
write8_space_func space8;
|
||||
write16_space_func space16;
|
||||
write32_space_func space32;
|
||||
write64_space_func space64;
|
||||
} handler;
|
||||
};
|
||||
|
||||
struct access_handler
|
||||
{
|
||||
// Constructors mean you can't union them
|
||||
@ -452,7 +399,6 @@ public:
|
||||
handler_entry_write(UINT8 width, endianness_t endianness, UINT8 **rambaseptr)
|
||||
: handler_entry(width, endianness, rambaseptr)
|
||||
{
|
||||
memset(&m_legacy_info, 0, sizeof(m_legacy_info));
|
||||
}
|
||||
|
||||
virtual void copy(handler_entry *entry);
|
||||
@ -462,16 +408,10 @@ public:
|
||||
virtual const char *subunit_name(int entry) const;
|
||||
|
||||
// configure delegate callbacks
|
||||
void set_delegate(write8_delegate delegate, UINT64 mask = 0, const legacy_info *info = 0);
|
||||
void set_delegate(write16_delegate delegate, UINT64 mask = 0, const legacy_info *info = 0);
|
||||
void set_delegate(write32_delegate delegate, UINT64 mask = 0, const legacy_info *info = 0);
|
||||
void set_delegate(write64_delegate delegate, UINT64 mask = 0, const legacy_info *info = 0);
|
||||
|
||||
// configure legacy address space functions
|
||||
void set_legacy_func(address_space &space, write8_space_func func, const char *name, UINT64 mask = 0);
|
||||
void set_legacy_func(address_space &space, write16_space_func func, const char *name, UINT64 mask = 0);
|
||||
void set_legacy_func(address_space &space, write32_space_func func, const char *name, UINT64 mask = 0);
|
||||
void set_legacy_func(address_space &space, write64_space_func func, const char *name, UINT64 mask = 0);
|
||||
void set_delegate(write8_delegate delegate, UINT64 mask = 0);
|
||||
void set_delegate(write16_delegate delegate, UINT64 mask = 0);
|
||||
void set_delegate(write32_delegate delegate, UINT64 mask = 0);
|
||||
void set_delegate(write64_delegate delegate, UINT64 mask = 0);
|
||||
|
||||
// configure I/O port access
|
||||
void set_ioport(ioport_port &ioport);
|
||||
@ -488,12 +428,6 @@ private:
|
||||
void write_stub_32(address_space &space, offs_t offset, UINT32 data, UINT32 mask);
|
||||
void write_stub_64(address_space &space, offs_t offset, UINT64 data, UINT64 mask);
|
||||
|
||||
// stubs for calling legacy write handlers
|
||||
void write_stub_legacy(address_space &space, offs_t offset, UINT8 data, UINT8 mask);
|
||||
void write_stub_legacy(address_space &space, offs_t offset, UINT16 data, UINT16 mask);
|
||||
void write_stub_legacy(address_space &space, offs_t offset, UINT32 data, UINT32 mask);
|
||||
void write_stub_legacy(address_space &space, offs_t offset, UINT64 data, UINT64 mask);
|
||||
|
||||
// stubs for writing I/O ports
|
||||
template<typename _UintType>
|
||||
void write_stub_ioport(address_space &space, offs_t offset, _UintType data, _UintType mask) { m_ioport->write(data, mask); }
|
||||
@ -505,10 +439,6 @@ private:
|
||||
access_handler m_write;
|
||||
access_handler m_subwrite[8];
|
||||
ioport_port * m_ioport;
|
||||
|
||||
bool m_sub_is_legacy[8];
|
||||
legacy_info m_legacy_info;
|
||||
legacy_info m_sublegacy_info[8];
|
||||
};
|
||||
|
||||
// ======================> handler_entry_setoffset
|
||||
@ -556,12 +486,6 @@ public:
|
||||
(*i)->set_delegate(delegate, mask);
|
||||
}
|
||||
|
||||
// forward legacy address space functions configuration
|
||||
template<typename _func> void set_legacy_func(address_space &space, _func func, const char *name) const {
|
||||
for (typename std::list<_HandlerEntry *>::const_iterator i = handlers.begin(); i != handlers.end(); i++)
|
||||
(*i)->set_legacy_func(space, func, name, mask);
|
||||
}
|
||||
|
||||
// forward I/O port access configuration
|
||||
void set_ioport(ioport_port &ioport) const {
|
||||
for (typename std::list<_HandlerEntry *>::const_iterator i = handlers.begin(); i != handlers.end(); i++)
|
||||
@ -2053,25 +1977,6 @@ void address_space::populate_map_entry(const address_map_entry &entry, read_or_w
|
||||
}
|
||||
break;
|
||||
|
||||
case AMH_LEGACY_SPACE_HANDLER:
|
||||
if (readorwrite == ROW_READ)
|
||||
switch (data.m_bits)
|
||||
{
|
||||
case 8: install_legacy_read_handler(entry.m_addrstart, entry.m_addrend, entry.m_addrmask, entry.m_addrmirror, entry.m_rspace8, data.m_name, data.m_mask); break;
|
||||
case 16: install_legacy_read_handler(entry.m_addrstart, entry.m_addrend, entry.m_addrmask, entry.m_addrmirror, entry.m_rspace16, data.m_name, data.m_mask); break;
|
||||
case 32: install_legacy_read_handler(entry.m_addrstart, entry.m_addrend, entry.m_addrmask, entry.m_addrmirror, entry.m_rspace32, data.m_name, data.m_mask); break;
|
||||
case 64: install_legacy_read_handler(entry.m_addrstart, entry.m_addrend, entry.m_addrmask, entry.m_addrmirror, entry.m_rspace64, data.m_name, data.m_mask); break;
|
||||
}
|
||||
else
|
||||
switch (data.m_bits)
|
||||
{
|
||||
case 8: install_legacy_write_handler(entry.m_addrstart, entry.m_addrend, entry.m_addrmask, entry.m_addrmirror, entry.m_wspace8, data.m_name, data.m_mask); break;
|
||||
case 16: install_legacy_write_handler(entry.m_addrstart, entry.m_addrend, entry.m_addrmask, entry.m_addrmirror, entry.m_wspace16, data.m_name, data.m_mask); break;
|
||||
case 32: install_legacy_write_handler(entry.m_addrstart, entry.m_addrend, entry.m_addrmask, entry.m_addrmirror, entry.m_wspace32, data.m_name, data.m_mask); break;
|
||||
case 64: install_legacy_write_handler(entry.m_addrstart, entry.m_addrend, entry.m_addrmask, entry.m_addrmirror, entry.m_wspace64, data.m_name, data.m_mask); break;
|
||||
}
|
||||
break;
|
||||
|
||||
case AMH_PORT:
|
||||
install_readwrite_port(entry.m_addrstart, entry.m_addrend, entry.m_addrmask, entry.m_addrmirror,
|
||||
(readorwrite == ROW_READ) ? data.m_tag : NULL,
|
||||
@ -2559,43 +2464,6 @@ UINT8 *address_space::install_readwrite_handler(offs_t addrstart, offs_t addrend
|
||||
}
|
||||
|
||||
|
||||
//-------------------------------------------------
|
||||
// install_legacy_handler - install 8-bit read/
|
||||
// write legacy address space handlers for the
|
||||
// space
|
||||
//-------------------------------------------------
|
||||
|
||||
UINT8 *address_space::install_legacy_read_handler(offs_t addrstart, offs_t addrend, offs_t addrmask, offs_t addrmirror, read8_space_func rhandler, const char *rname, UINT64 unitmask)
|
||||
{
|
||||
VPRINTF(("address_space::install_legacy_read_handler(%s-%s mask=%s mirror=%s, %s, %s) [read8]\n",
|
||||
core_i64_hex_format(addrstart, m_addrchars), core_i64_hex_format(addrend, m_addrchars),
|
||||
core_i64_hex_format(addrmask, m_addrchars), core_i64_hex_format(addrmirror, m_addrchars),
|
||||
rname, core_i64_hex_format(unitmask, data_width() / 4)));
|
||||
|
||||
read().handler_map_range(addrstart, addrend, addrmask, addrmirror, unitmask).set_legacy_func(*this, rhandler, rname);
|
||||
generate_memdump(machine());
|
||||
return reinterpret_cast<UINT8 *>(find_backing_memory(addrstart, addrend));
|
||||
}
|
||||
|
||||
UINT8 *address_space::install_legacy_write_handler(offs_t addrstart, offs_t addrend, offs_t addrmask, offs_t addrmirror, write8_space_func whandler, const char *wname, UINT64 unitmask)
|
||||
{
|
||||
VPRINTF(("address_space::install_legacy_write_handler(%s-%s mask=%s mirror=%s, %s, %s) [write8]\n",
|
||||
core_i64_hex_format(addrstart, m_addrchars), core_i64_hex_format(addrend, m_addrchars),
|
||||
core_i64_hex_format(addrmask, m_addrchars), core_i64_hex_format(addrmirror, m_addrchars),
|
||||
wname, core_i64_hex_format(unitmask, data_width() / 4)));
|
||||
|
||||
write().handler_map_range(addrstart, addrend, addrmask, addrmirror, unitmask).set_legacy_func(*this, whandler, wname);
|
||||
generate_memdump(machine());
|
||||
return reinterpret_cast<UINT8 *>(find_backing_memory(addrstart, addrend));
|
||||
}
|
||||
|
||||
UINT8 *address_space::install_legacy_readwrite_handler(offs_t addrstart, offs_t addrend, offs_t addrmask, offs_t addrmirror, read8_space_func rhandler, const char *rname, write8_space_func whandler, const char *wname, UINT64 unitmask)
|
||||
{
|
||||
install_legacy_read_handler(addrstart, addrend, addrmask, addrmirror, rhandler, rname, unitmask);
|
||||
return install_legacy_write_handler(addrstart, addrend, addrmask, addrmirror, whandler, wname, unitmask);
|
||||
}
|
||||
|
||||
|
||||
//-------------------------------------------------
|
||||
// install_handler - install 16-bit read/write
|
||||
// delegate handlers for the space
|
||||
@ -2622,33 +2490,6 @@ UINT16 *address_space::install_readwrite_handler(offs_t addrstart, offs_t addren
|
||||
}
|
||||
|
||||
|
||||
//-------------------------------------------------
|
||||
// install_legacy_handler - install 16-bit read/
|
||||
// write legacy address space handlers for the
|
||||
// space
|
||||
//-------------------------------------------------
|
||||
|
||||
UINT16 *address_space::install_legacy_read_handler(offs_t addrstart, offs_t addrend, offs_t addrmask, offs_t addrmirror, read16_space_func rhandler, const char *rname, UINT64 unitmask)
|
||||
{
|
||||
read().handler_map_range(addrstart, addrend, addrmask, addrmirror, unitmask).set_legacy_func(*this, rhandler, rname);
|
||||
generate_memdump(machine());
|
||||
return reinterpret_cast<UINT16 *>(find_backing_memory(addrstart, addrend));
|
||||
}
|
||||
|
||||
UINT16 *address_space::install_legacy_write_handler(offs_t addrstart, offs_t addrend, offs_t addrmask, offs_t addrmirror, write16_space_func whandler, const char *wname, UINT64 unitmask)
|
||||
{
|
||||
write().handler_map_range(addrstart, addrend, addrmask, addrmirror, unitmask).set_legacy_func(*this, whandler, wname);
|
||||
generate_memdump(machine());
|
||||
return reinterpret_cast<UINT16 *>(find_backing_memory(addrstart, addrend));
|
||||
}
|
||||
|
||||
UINT16 *address_space::install_legacy_readwrite_handler(offs_t addrstart, offs_t addrend, offs_t addrmask, offs_t addrmirror, read16_space_func rhandler, const char *rname, write16_space_func whandler, const char *wname, UINT64 unitmask)
|
||||
{
|
||||
install_legacy_read_handler(addrstart, addrend, addrmask, addrmirror, rhandler, rname, unitmask);
|
||||
return install_legacy_write_handler(addrstart, addrend, addrmask, addrmirror, whandler, wname, unitmask);
|
||||
}
|
||||
|
||||
|
||||
//-------------------------------------------------
|
||||
// install_handler - install 32-bit read/write
|
||||
// delegate handlers for the space
|
||||
@ -2675,33 +2516,6 @@ UINT32 *address_space::install_readwrite_handler(offs_t addrstart, offs_t addren
|
||||
}
|
||||
|
||||
|
||||
//-------------------------------------------------
|
||||
// install_legacy_handler - install 32-bit read/
|
||||
// write legacy address space handlers for the
|
||||
// space
|
||||
//-------------------------------------------------
|
||||
|
||||
UINT32 *address_space::install_legacy_read_handler(offs_t addrstart, offs_t addrend, offs_t addrmask, offs_t addrmirror, read32_space_func rhandler, const char *rname, UINT64 unitmask)
|
||||
{
|
||||
read().handler_map_range(addrstart, addrend, addrmask, addrmirror, unitmask).set_legacy_func(*this, rhandler, rname);
|
||||
generate_memdump(machine());
|
||||
return reinterpret_cast<UINT32 *>(find_backing_memory(addrstart, addrend));
|
||||
}
|
||||
|
||||
UINT32 *address_space::install_legacy_write_handler(offs_t addrstart, offs_t addrend, offs_t addrmask, offs_t addrmirror, write32_space_func whandler, const char *wname, UINT64 unitmask)
|
||||
{
|
||||
write().handler_map_range(addrstart, addrend, addrmask, addrmirror, unitmask).set_legacy_func(*this, whandler, wname);
|
||||
generate_memdump(machine());
|
||||
return reinterpret_cast<UINT32 *>(find_backing_memory(addrstart, addrend));
|
||||
}
|
||||
|
||||
UINT32 *address_space::install_legacy_readwrite_handler(offs_t addrstart, offs_t addrend, offs_t addrmask, offs_t addrmirror, read32_space_func rhandler, const char *rname, write32_space_func whandler, const char *wname, UINT64 unitmask)
|
||||
{
|
||||
install_legacy_read_handler(addrstart, addrend, addrmask, addrmirror, rhandler, rname, unitmask);
|
||||
return install_legacy_write_handler(addrstart, addrend, addrmask, addrmirror, whandler, wname, unitmask);
|
||||
}
|
||||
|
||||
|
||||
//-------------------------------------------------
|
||||
// install_handler64 - install 64-bit read/write
|
||||
// delegate handlers for the space
|
||||
@ -2728,33 +2542,6 @@ UINT64 *address_space::install_readwrite_handler(offs_t addrstart, offs_t addren
|
||||
}
|
||||
|
||||
|
||||
//-------------------------------------------------
|
||||
// install_legacy_handler - install 64-bit read/
|
||||
// write legacy address space handlers for the
|
||||
// space
|
||||
//-------------------------------------------------
|
||||
|
||||
UINT64 *address_space::install_legacy_read_handler(offs_t addrstart, offs_t addrend, offs_t addrmask, offs_t addrmirror, read64_space_func rhandler, const char *rname, UINT64 unitmask)
|
||||
{
|
||||
read().handler_map_range(addrstart, addrend, addrmask, addrmirror, unitmask).set_legacy_func(*this, rhandler, rname);
|
||||
generate_memdump(machine());
|
||||
return reinterpret_cast<UINT64 *>(find_backing_memory(addrstart, addrend));
|
||||
}
|
||||
|
||||
UINT64 *address_space::install_legacy_write_handler(offs_t addrstart, offs_t addrend, offs_t addrmask, offs_t addrmirror, write64_space_func whandler, const char *wname, UINT64 unitmask)
|
||||
{
|
||||
write().handler_map_range(addrstart, addrend, addrmask, addrmirror, unitmask).set_legacy_func(*this, whandler, wname);
|
||||
generate_memdump(machine());
|
||||
return reinterpret_cast<UINT64 *>(find_backing_memory(addrstart, addrend));
|
||||
}
|
||||
|
||||
UINT64 *address_space::install_legacy_readwrite_handler(offs_t addrstart, offs_t addrend, offs_t addrmask, offs_t addrmirror, read64_space_func rhandler, const char *rname, write64_space_func whandler, const char *wname, UINT64 unitmask)
|
||||
{
|
||||
install_legacy_read_handler(addrstart, addrend, addrmask, addrmirror, rhandler, rname, unitmask);
|
||||
return install_legacy_write_handler(addrstart, addrend, addrmask, addrmirror, whandler, wname, unitmask);
|
||||
}
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
// install_setoffset_handler - install set_offset delegate handlers for the space
|
||||
//-----------------------------------------------------------------------
|
||||
@ -4623,8 +4410,6 @@ void handler_entry_read::copy(handler_entry *entry)
|
||||
break;
|
||||
}
|
||||
}
|
||||
memcpy(m_sub_is_legacy, rentry->m_sub_is_legacy, m_subunits*sizeof(bool));
|
||||
memcpy(m_sublegacy_info, rentry->m_sublegacy_info, m_subunits*sizeof(legacy_info));
|
||||
}
|
||||
|
||||
//-------------------------------------------------
|
||||
@ -4672,8 +4457,6 @@ void handler_entry_read::remove_subunit(int entry)
|
||||
if (moving)
|
||||
{
|
||||
memmove(m_subread+entry, m_subread+entry+1, moving*sizeof(m_subread[0]));
|
||||
memmove(m_sub_is_legacy+entry, m_sub_is_legacy+entry+1, moving*sizeof(m_sub_is_legacy[0]));
|
||||
memmove(m_sublegacy_info+entry, m_sublegacy_info+entry+1, moving*sizeof(m_sublegacy_info[0]));
|
||||
}
|
||||
m_subunits--;
|
||||
}
|
||||
@ -4684,7 +4467,7 @@ void handler_entry_read::remove_subunit(int entry)
|
||||
// configure a stub if necessary
|
||||
//-------------------------------------------------
|
||||
|
||||
void handler_entry_read::set_delegate(read8_delegate delegate, UINT64 mask, const legacy_info *info)
|
||||
void handler_entry_read::set_delegate(read8_delegate delegate, UINT64 mask)
|
||||
{
|
||||
// error if no object
|
||||
if (!delegate.has_object())
|
||||
@ -4698,17 +4481,9 @@ void handler_entry_read::set_delegate(read8_delegate delegate, UINT64 mask, cons
|
||||
{
|
||||
int start_slot, end_slot;
|
||||
configure_subunits(mask, 8, start_slot, end_slot);
|
||||
if (info)
|
||||
for (int i=start_slot; i != end_slot; i++)
|
||||
{
|
||||
m_sublegacy_info[i] = *info;
|
||||
m_sub_is_legacy[i] = true;
|
||||
}
|
||||
else
|
||||
for (int i=start_slot; i != end_slot; i++)
|
||||
{
|
||||
m_subread[i].r8 = delegate;
|
||||
m_sub_is_legacy[i] = false;
|
||||
}
|
||||
if (m_datawidth == 16)
|
||||
set_delegate(read16_delegate(&handler_entry_read::read_stub_16, delegate.name(), this));
|
||||
@ -4720,8 +4495,6 @@ void handler_entry_read::set_delegate(read8_delegate delegate, UINT64 mask, cons
|
||||
else
|
||||
{
|
||||
m_read.r8 = delegate;
|
||||
if (info)
|
||||
m_legacy_info = *info;
|
||||
}
|
||||
}
|
||||
|
||||
@ -4731,7 +4504,7 @@ void handler_entry_read::set_delegate(read8_delegate delegate, UINT64 mask, cons
|
||||
// configure a stub if necessary
|
||||
//-------------------------------------------------
|
||||
|
||||
void handler_entry_read::set_delegate(read16_delegate delegate, UINT64 mask, const legacy_info *info)
|
||||
void handler_entry_read::set_delegate(read16_delegate delegate, UINT64 mask)
|
||||
{
|
||||
// error if no object
|
||||
if (!delegate.has_object())
|
||||
@ -4745,17 +4518,9 @@ void handler_entry_read::set_delegate(read16_delegate delegate, UINT64 mask, con
|
||||
{
|
||||
int start_slot, end_slot;
|
||||
configure_subunits(mask, 16, start_slot, end_slot);
|
||||
if (info)
|
||||
for (int i=start_slot; i != end_slot; i++)
|
||||
{
|
||||
m_sublegacy_info[i] = *info;
|
||||
m_sub_is_legacy[i] = true;
|
||||
}
|
||||
else
|
||||
for (int i=start_slot; i != end_slot; i++)
|
||||
{
|
||||
m_subread[i].r16 = delegate;
|
||||
m_sub_is_legacy[i] = false;
|
||||
}
|
||||
if (m_datawidth == 32)
|
||||
set_delegate(read32_delegate(&handler_entry_read::read_stub_32, delegate.name(), this));
|
||||
@ -4765,8 +4530,6 @@ void handler_entry_read::set_delegate(read16_delegate delegate, UINT64 mask, con
|
||||
else
|
||||
{
|
||||
m_read.r16 = delegate;
|
||||
if (info)
|
||||
m_legacy_info = *info;
|
||||
}
|
||||
}
|
||||
|
||||
@ -4776,7 +4539,7 @@ void handler_entry_read::set_delegate(read16_delegate delegate, UINT64 mask, con
|
||||
// configure a stub if necessary
|
||||
//-------------------------------------------------
|
||||
|
||||
void handler_entry_read::set_delegate(read32_delegate delegate, UINT64 mask, const legacy_info *info)
|
||||
void handler_entry_read::set_delegate(read32_delegate delegate, UINT64 mask)
|
||||
{
|
||||
// error if no object
|
||||
if (!delegate.has_object())
|
||||
@ -4790,17 +4553,9 @@ void handler_entry_read::set_delegate(read32_delegate delegate, UINT64 mask, con
|
||||
{
|
||||
int start_slot, end_slot;
|
||||
configure_subunits(mask, 32, start_slot, end_slot);
|
||||
if (info)
|
||||
for (int i=start_slot; i != end_slot; i++)
|
||||
{
|
||||
m_sublegacy_info[i] = *info;
|
||||
m_sub_is_legacy[i] = true;
|
||||
}
|
||||
else
|
||||
for (int i=start_slot; i != end_slot; i++)
|
||||
{
|
||||
m_subread[i].r32 = delegate;
|
||||
m_sub_is_legacy[i] = false;
|
||||
}
|
||||
if (m_datawidth == 64)
|
||||
set_delegate(read64_delegate(&handler_entry_read::read_stub_64, delegate.name(), this));
|
||||
@ -4808,8 +4563,6 @@ void handler_entry_read::set_delegate(read32_delegate delegate, UINT64 mask, con
|
||||
else
|
||||
{
|
||||
m_read.r32 = delegate;
|
||||
if (info)
|
||||
m_legacy_info = *info;
|
||||
}
|
||||
}
|
||||
|
||||
@ -4818,7 +4571,7 @@ void handler_entry_read::set_delegate(read32_delegate delegate, UINT64 mask, con
|
||||
// set_delegate - set a 64-bit delegate
|
||||
//-------------------------------------------------
|
||||
|
||||
void handler_entry_read::set_delegate(read64_delegate delegate, UINT64 mask, const legacy_info *info)
|
||||
void handler_entry_read::set_delegate(read64_delegate delegate, UINT64 mask)
|
||||
{
|
||||
// error if no object
|
||||
if (!delegate.has_object())
|
||||
@ -4827,46 +4580,6 @@ void handler_entry_read::set_delegate(read64_delegate delegate, UINT64 mask, con
|
||||
// make sure this is a valid size
|
||||
assert(m_datawidth >= 64);
|
||||
m_read.r64 = delegate;
|
||||
if (info)
|
||||
m_legacy_info = *info;
|
||||
}
|
||||
|
||||
|
||||
//-------------------------------------------------
|
||||
// set_legacy_func - configure a legacy address
|
||||
// space stub of the appropriate size
|
||||
//-------------------------------------------------
|
||||
|
||||
void handler_entry_read::set_legacy_func(address_space &space, read8_space_func func, const char *name, UINT64 mask)
|
||||
{
|
||||
legacy_info info;
|
||||
info.handler.space8 = func;
|
||||
info.object.space = &space;
|
||||
set_delegate(read8_delegate(&handler_entry_read::read_stub_legacy, name, this), mask, &info);
|
||||
}
|
||||
|
||||
void handler_entry_read::set_legacy_func(address_space &space, read16_space_func func, const char *name, UINT64 mask)
|
||||
{
|
||||
legacy_info info;
|
||||
info.handler.space16 = func;
|
||||
info.object.space = &space;
|
||||
set_delegate(read16_delegate(&handler_entry_read::read_stub_legacy, name, this), mask, &info);
|
||||
}
|
||||
|
||||
void handler_entry_read::set_legacy_func(address_space &space, read32_space_func func, const char *name, UINT64 mask)
|
||||
{
|
||||
legacy_info info;
|
||||
info.handler.space32 = func;
|
||||
info.object.space = &space;
|
||||
set_delegate(read32_delegate(&handler_entry_read::read_stub_legacy, name, this), mask, &info);
|
||||
}
|
||||
|
||||
void handler_entry_read::set_legacy_func(address_space &space, read64_space_func func, const char *name, UINT64 mask)
|
||||
{
|
||||
legacy_info info;
|
||||
info.handler.space64 = func;
|
||||
info.object.space = &space;
|
||||
set_delegate(read64_delegate(&handler_entry_read::read_stub_legacy, name, this), mask, &info);
|
||||
}
|
||||
|
||||
|
||||
@ -4905,9 +4618,6 @@ UINT16 handler_entry_read::read_stub_16(address_space &space, offs_t offset, UIN
|
||||
{
|
||||
offs_t aoffset = offset * si.m_multiplier + si.m_offset;
|
||||
UINT8 val;
|
||||
if (m_sub_is_legacy[index])
|
||||
val = m_sublegacy_info[index].handler.space8(*m_sublegacy_info[index].object.space, aoffset, submask);
|
||||
else
|
||||
val = m_subread[index].r8(space, aoffset, submask);
|
||||
result |= val << si.m_shift;
|
||||
}
|
||||
@ -4932,20 +4642,6 @@ UINT32 handler_entry_read::read_stub_32(address_space &space, offs_t offset, UIN
|
||||
{
|
||||
offs_t aoffset = offset * si.m_multiplier + si.m_offset;
|
||||
UINT16 val = 0;
|
||||
if (m_sub_is_legacy[index])
|
||||
{
|
||||
switch (si.m_size)
|
||||
{
|
||||
case 8:
|
||||
val = m_sublegacy_info[index].handler.space8(*m_sublegacy_info[index].object.space, aoffset, submask);
|
||||
break;
|
||||
case 16:
|
||||
val = m_sublegacy_info[index].handler.space16(*m_sublegacy_info[index].object.space, aoffset, submask);
|
||||
break;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
switch (si.m_size)
|
||||
{
|
||||
case 8:
|
||||
@ -4955,7 +4651,6 @@ UINT32 handler_entry_read::read_stub_32(address_space &space, offs_t offset, UIN
|
||||
val = m_subread[index].r16(space, aoffset, submask);
|
||||
break;
|
||||
}
|
||||
}
|
||||
result |= val << si.m_shift;
|
||||
}
|
||||
}
|
||||
@ -4979,23 +4674,6 @@ UINT64 handler_entry_read::read_stub_64(address_space &space, offs_t offset, UIN
|
||||
{
|
||||
offs_t aoffset = offset * si.m_multiplier + si.m_offset;
|
||||
UINT32 val = 0;
|
||||
if (m_sub_is_legacy[index])
|
||||
{
|
||||
switch (si.m_size)
|
||||
{
|
||||
case 8:
|
||||
val = m_sublegacy_info[index].handler.space8(*m_sublegacy_info[index].object.space, aoffset, submask);
|
||||
break;
|
||||
case 16:
|
||||
val = m_sublegacy_info[index].handler.space16(*m_sublegacy_info[index].object.space, aoffset, submask);
|
||||
break;
|
||||
case 32:
|
||||
val = m_sublegacy_info[index].handler.space32(*m_sublegacy_info[index].object.space, aoffset, submask);
|
||||
break;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
switch (si.m_size)
|
||||
{
|
||||
case 8:
|
||||
@ -5008,7 +4686,6 @@ UINT64 handler_entry_read::read_stub_64(address_space &space, offs_t offset, UIN
|
||||
val = m_subread[index].r32(space, aoffset, submask);
|
||||
break;
|
||||
}
|
||||
}
|
||||
result |= UINT64(val) << si.m_shift;
|
||||
}
|
||||
}
|
||||
@ -5016,33 +4693,6 @@ UINT64 handler_entry_read::read_stub_64(address_space &space, offs_t offset, UIN
|
||||
}
|
||||
|
||||
|
||||
//-------------------------------------------------
|
||||
// read_stub_legacy - perform a read using legacy
|
||||
// handler callbacks
|
||||
//-------------------------------------------------
|
||||
|
||||
UINT8 handler_entry_read::read_stub_legacy(address_space &space, offs_t offset, UINT8 mask)
|
||||
{
|
||||
return m_legacy_info.handler.space8(*m_legacy_info.object.space, offset, mask);
|
||||
}
|
||||
|
||||
UINT16 handler_entry_read::read_stub_legacy(address_space &space, offs_t offset, UINT16 mask)
|
||||
{
|
||||
return m_legacy_info.handler.space16(*m_legacy_info.object.space, offset, mask);
|
||||
}
|
||||
|
||||
UINT32 handler_entry_read::read_stub_legacy(address_space &space, offs_t offset, UINT32 mask)
|
||||
{
|
||||
return m_legacy_info.handler.space32(*m_legacy_info.object.space, offset, mask);
|
||||
}
|
||||
|
||||
UINT64 handler_entry_read::read_stub_legacy(address_space &space, offs_t offset, UINT64 mask)
|
||||
{
|
||||
return m_legacy_info.handler.space64(*m_legacy_info.object.space, offset, mask);
|
||||
}
|
||||
|
||||
|
||||
|
||||
//**************************************************************************
|
||||
// HANDLER ENTRY WRITE
|
||||
//**************************************************************************
|
||||
@ -5073,8 +4723,6 @@ void handler_entry_write::copy(handler_entry *entry)
|
||||
break;
|
||||
}
|
||||
}
|
||||
memcpy(m_sub_is_legacy, wentry->m_sub_is_legacy, m_subunits*sizeof(bool));
|
||||
memcpy(m_sublegacy_info, wentry->m_sublegacy_info, m_subunits*sizeof(legacy_info));
|
||||
}
|
||||
|
||||
//-------------------------------------------------
|
||||
@ -5123,8 +4771,6 @@ void handler_entry_write::remove_subunit(int entry)
|
||||
if (moving)
|
||||
{
|
||||
memmove(m_subwrite+entry, m_subwrite+entry+1, moving*sizeof(m_subwrite[0]));
|
||||
memmove(m_sub_is_legacy+entry, m_sub_is_legacy+entry+1, moving*sizeof(m_sub_is_legacy[0]));
|
||||
memmove(m_sublegacy_info+entry, m_sublegacy_info+entry+1, moving*sizeof(m_sublegacy_info[0]));
|
||||
}
|
||||
m_subunits--;
|
||||
}
|
||||
@ -5135,7 +4781,7 @@ void handler_entry_write::remove_subunit(int entry)
|
||||
// configure a stub if necessary
|
||||
//-------------------------------------------------
|
||||
|
||||
void handler_entry_write::set_delegate(write8_delegate delegate, UINT64 mask, const legacy_info *info)
|
||||
void handler_entry_write::set_delegate(write8_delegate delegate, UINT64 mask)
|
||||
{
|
||||
assert(m_datawidth >= 8);
|
||||
|
||||
@ -5144,17 +4790,9 @@ void handler_entry_write::set_delegate(write8_delegate delegate, UINT64 mask, co
|
||||
{
|
||||
int start_slot, end_slot;
|
||||
configure_subunits(mask, 8, start_slot, end_slot);
|
||||
if (info)
|
||||
for (int i=start_slot; i != end_slot; i++)
|
||||
{
|
||||
m_sublegacy_info[i] = *info;
|
||||
m_sub_is_legacy[i] = true;
|
||||
}
|
||||
else
|
||||
for (int i=start_slot; i != end_slot; i++)
|
||||
{
|
||||
m_subwrite[i].w8 = delegate;
|
||||
m_sub_is_legacy[i] = false;
|
||||
}
|
||||
if (m_datawidth == 16)
|
||||
set_delegate(write16_delegate(&handler_entry_write::write_stub_16, delegate.name(), this));
|
||||
@ -5166,8 +4804,6 @@ void handler_entry_write::set_delegate(write8_delegate delegate, UINT64 mask, co
|
||||
else
|
||||
{
|
||||
m_write.w8 = delegate;
|
||||
if (info)
|
||||
m_legacy_info = *info;
|
||||
}
|
||||
}
|
||||
|
||||
@ -5177,7 +4813,7 @@ void handler_entry_write::set_delegate(write8_delegate delegate, UINT64 mask, co
|
||||
// configure a stub if necessary
|
||||
//-------------------------------------------------
|
||||
|
||||
void handler_entry_write::set_delegate(write16_delegate delegate, UINT64 mask, const legacy_info *info)
|
||||
void handler_entry_write::set_delegate(write16_delegate delegate, UINT64 mask)
|
||||
{
|
||||
assert(m_datawidth >= 16);
|
||||
|
||||
@ -5186,17 +4822,9 @@ void handler_entry_write::set_delegate(write16_delegate delegate, UINT64 mask, c
|
||||
{
|
||||
int start_slot, end_slot;
|
||||
configure_subunits(mask, 16, start_slot, end_slot);
|
||||
if (info)
|
||||
for (int i=start_slot; i != end_slot; i++)
|
||||
{
|
||||
m_sublegacy_info[i] = *info;
|
||||
m_sub_is_legacy[i] = true;
|
||||
}
|
||||
else
|
||||
for (int i=start_slot; i != end_slot; i++)
|
||||
{
|
||||
m_subwrite[i].w16 = delegate;
|
||||
m_sub_is_legacy[i] = false;
|
||||
}
|
||||
if (m_datawidth == 32)
|
||||
set_delegate(write32_delegate(&handler_entry_write::write_stub_32, delegate.name(), this));
|
||||
@ -5206,8 +4834,6 @@ void handler_entry_write::set_delegate(write16_delegate delegate, UINT64 mask, c
|
||||
else
|
||||
{
|
||||
m_write.w16 = delegate;
|
||||
if (info)
|
||||
m_legacy_info = *info;
|
||||
}
|
||||
}
|
||||
|
||||
@ -5217,7 +4843,7 @@ void handler_entry_write::set_delegate(write16_delegate delegate, UINT64 mask, c
|
||||
// configure a stub if necessary
|
||||
//-------------------------------------------------
|
||||
|
||||
void handler_entry_write::set_delegate(write32_delegate delegate, UINT64 mask, const legacy_info *info)
|
||||
void handler_entry_write::set_delegate(write32_delegate delegate, UINT64 mask)
|
||||
{
|
||||
assert(m_datawidth >= 32);
|
||||
|
||||
@ -5226,17 +4852,9 @@ void handler_entry_write::set_delegate(write32_delegate delegate, UINT64 mask, c
|
||||
{
|
||||
int start_slot, end_slot;
|
||||
configure_subunits(mask, 32, start_slot, end_slot);
|
||||
if (info)
|
||||
for (int i=start_slot; i != end_slot; i++)
|
||||
{
|
||||
m_sublegacy_info[i] = *info;
|
||||
m_sub_is_legacy[i] = true;
|
||||
}
|
||||
else
|
||||
for (int i=start_slot; i != end_slot; i++)
|
||||
{
|
||||
m_subwrite[i].w32 = delegate;
|
||||
m_sub_is_legacy[i] = false;
|
||||
}
|
||||
if (m_datawidth == 64)
|
||||
set_delegate(write64_delegate(&handler_entry_write::write_stub_64, delegate.name(), this));
|
||||
@ -5244,8 +4862,6 @@ void handler_entry_write::set_delegate(write32_delegate delegate, UINT64 mask, c
|
||||
else
|
||||
{
|
||||
m_write.w32 = delegate;
|
||||
if (info)
|
||||
m_legacy_info = *info;
|
||||
}
|
||||
}
|
||||
|
||||
@ -5254,50 +4870,10 @@ void handler_entry_write::set_delegate(write32_delegate delegate, UINT64 mask, c
|
||||
// set_delegate - set a 64-bit delegate
|
||||
//-------------------------------------------------
|
||||
|
||||
void handler_entry_write::set_delegate(write64_delegate delegate, UINT64 mask, const legacy_info *info)
|
||||
void handler_entry_write::set_delegate(write64_delegate delegate, UINT64 mask)
|
||||
{
|
||||
assert(m_datawidth >= 64);
|
||||
m_write.w64 = delegate;
|
||||
if (info)
|
||||
m_legacy_info = *info;
|
||||
}
|
||||
|
||||
|
||||
//-------------------------------------------------
|
||||
// set_legacy_func - configure a legacy address
|
||||
// space stub of the appropriate size
|
||||
//-------------------------------------------------
|
||||
|
||||
void handler_entry_write::set_legacy_func(address_space &space, write8_space_func func, const char *name, UINT64 mask)
|
||||
{
|
||||
legacy_info info;
|
||||
info.handler.space8 = func;
|
||||
info.object.space = &space;
|
||||
set_delegate(write8_delegate(&handler_entry_write::write_stub_legacy, name, this), mask, &info);
|
||||
}
|
||||
|
||||
void handler_entry_write::set_legacy_func(address_space &space, write16_space_func func, const char *name, UINT64 mask)
|
||||
{
|
||||
legacy_info info;
|
||||
info.handler.space16 = func;
|
||||
info.object.space = &space;
|
||||
set_delegate(write16_delegate(&handler_entry_write::write_stub_legacy, name, this), mask, &info);
|
||||
}
|
||||
|
||||
void handler_entry_write::set_legacy_func(address_space &space, write32_space_func func, const char *name, UINT64 mask)
|
||||
{
|
||||
legacy_info info;
|
||||
info.handler.space32 = func;
|
||||
info.object.space = &space;
|
||||
set_delegate(write32_delegate(&handler_entry_write::write_stub_legacy, name, this), mask, &info);
|
||||
}
|
||||
|
||||
void handler_entry_write::set_legacy_func(address_space &space, write64_space_func func, const char *name, UINT64 mask)
|
||||
{
|
||||
legacy_info info;
|
||||
info.handler.space64 = func;
|
||||
info.object.space = &space;
|
||||
set_delegate(write64_delegate(&handler_entry_write::write_stub_legacy, name, this), mask, &info);
|
||||
}
|
||||
|
||||
|
||||
@ -5335,9 +4911,6 @@ void handler_entry_write::write_stub_16(address_space &space, offs_t offset, UIN
|
||||
{
|
||||
offs_t aoffset = offset * si.m_multiplier + si.m_offset;
|
||||
UINT8 adata = data >> si.m_shift;
|
||||
if (m_sub_is_legacy[index])
|
||||
m_sublegacy_info[index].handler.space8(*m_sublegacy_info[index].object.space, aoffset, adata, submask);
|
||||
else
|
||||
m_subwrite[index].w8(space, aoffset, adata, submask);
|
||||
}
|
||||
}
|
||||
@ -5359,20 +4932,6 @@ void handler_entry_write::write_stub_32(address_space &space, offs_t offset, UIN
|
||||
{
|
||||
offs_t aoffset = offset * si.m_multiplier + si.m_offset;
|
||||
UINT16 adata = data >> si.m_shift;
|
||||
if (m_sub_is_legacy[index])
|
||||
{
|
||||
switch (si.m_size)
|
||||
{
|
||||
case 8:
|
||||
m_sublegacy_info[index].handler.space8(*m_sublegacy_info[index].object.space, aoffset, adata, submask);
|
||||
break;
|
||||
case 16:
|
||||
m_sublegacy_info[index].handler.space16(*m_sublegacy_info[index].object.space, aoffset, adata, submask);
|
||||
break;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
switch (si.m_size)
|
||||
{
|
||||
case 8:
|
||||
@ -5385,7 +4944,6 @@ void handler_entry_write::write_stub_32(address_space &space, offs_t offset, UIN
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//-------------------------------------------------
|
||||
@ -5403,23 +4961,6 @@ void handler_entry_write::write_stub_64(address_space &space, offs_t offset, UIN
|
||||
{
|
||||
offs_t aoffset = offset * si.m_multiplier + si.m_offset;
|
||||
UINT32 adata = data >> si.m_shift;
|
||||
if (m_sub_is_legacy[index])
|
||||
{
|
||||
switch (si.m_size)
|
||||
{
|
||||
case 8:
|
||||
m_sublegacy_info[index].handler.space8(*m_sublegacy_info[index].object.space, aoffset, adata, submask);
|
||||
break;
|
||||
case 16:
|
||||
m_sublegacy_info[index].handler.space16(*m_sublegacy_info[index].object.space, aoffset, adata, submask);
|
||||
break;
|
||||
case 32:
|
||||
m_sublegacy_info[index].handler.space32(*m_sublegacy_info[index].object.space, aoffset, adata, submask);
|
||||
break;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
switch (si.m_size)
|
||||
{
|
||||
case 8:
|
||||
@ -5435,30 +4976,4 @@ void handler_entry_write::write_stub_64(address_space &space, offs_t offset, UIN
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//-------------------------------------------------
|
||||
// write_stub_legacy - perform a write using
|
||||
// legacy handler callbacks
|
||||
//-------------------------------------------------
|
||||
|
||||
void handler_entry_write::write_stub_legacy(address_space &space, offs_t offset, UINT8 data, UINT8 mask)
|
||||
{
|
||||
m_legacy_info.handler.space8(*m_legacy_info.object.space, offset, data, mask);
|
||||
}
|
||||
|
||||
void handler_entry_write::write_stub_legacy(address_space &space, offs_t offset, UINT16 data, UINT16 mask)
|
||||
{
|
||||
m_legacy_info.handler.space16(*m_legacy_info.object.space, offset, data, mask);
|
||||
}
|
||||
|
||||
void handler_entry_write::write_stub_legacy(address_space &space, offs_t offset, UINT32 data, UINT32 mask)
|
||||
{
|
||||
m_legacy_info.handler.space32(*m_legacy_info.object.space, offset, data, mask);
|
||||
}
|
||||
|
||||
void handler_entry_write::write_stub_legacy(address_space &space, offs_t offset, UINT64 data, UINT64 mask)
|
||||
{
|
||||
m_legacy_info.handler.space64(*m_legacy_info.object.space, offset, data, mask);
|
||||
}
|
||||
|
117
src/emu/memory.h
117
src/emu/memory.h
@ -84,28 +84,6 @@ typedef void (*address_map_constructor)(address_map &map, device_t &devconfig);
|
||||
// submap retriever delegate
|
||||
typedef delegate<void (address_map &, device_t &)> address_map_delegate;
|
||||
|
||||
|
||||
// legacy space read/write handlers
|
||||
typedef UINT8 (*read8_space_func) (ATTR_UNUSED address_space &space, ATTR_UNUSED offs_t offset, ATTR_UNUSED UINT8 mem_mask);
|
||||
typedef void (*write8_space_func) (ATTR_UNUSED address_space &space, ATTR_UNUSED offs_t offset, ATTR_UNUSED UINT8 data, ATTR_UNUSED UINT8 mem_mask);
|
||||
typedef UINT16 (*read16_space_func) (ATTR_UNUSED address_space &space, ATTR_UNUSED offs_t offset, ATTR_UNUSED UINT16 mem_mask);
|
||||
typedef void (*write16_space_func)(ATTR_UNUSED address_space &space, ATTR_UNUSED offs_t offset, ATTR_UNUSED UINT16 data, ATTR_UNUSED UINT16 mem_mask);
|
||||
typedef UINT32 (*read32_space_func) (ATTR_UNUSED address_space &space, ATTR_UNUSED offs_t offset, ATTR_UNUSED UINT32 mem_mask);
|
||||
typedef void (*write32_space_func)(ATTR_UNUSED address_space &space, ATTR_UNUSED offs_t offset, ATTR_UNUSED UINT32 data, ATTR_UNUSED UINT32 mem_mask);
|
||||
typedef UINT64 (*read64_space_func) (ATTR_UNUSED address_space &space, ATTR_UNUSED offs_t offset, ATTR_UNUSED UINT64 mem_mask);
|
||||
typedef void (*write64_space_func)(ATTR_UNUSED address_space &space, ATTR_UNUSED offs_t offset, ATTR_UNUSED UINT64 data, ATTR_UNUSED UINT64 mem_mask);
|
||||
|
||||
// legacy device read/write handlers
|
||||
typedef UINT8 (*read8_device_func) (ATTR_UNUSED device_t *device, ATTR_UNUSED address_space &space, ATTR_UNUSED offs_t offset, ATTR_UNUSED UINT8 mem_mask);
|
||||
typedef void (*write8_device_func) (ATTR_UNUSED device_t *device, ATTR_UNUSED address_space &space, ATTR_UNUSED offs_t offset, ATTR_UNUSED UINT8 data, ATTR_UNUSED UINT8 mem_mask);
|
||||
typedef UINT16 (*read16_device_func) (ATTR_UNUSED device_t *device, ATTR_UNUSED address_space &space, ATTR_UNUSED offs_t offset, ATTR_UNUSED UINT16 mem_mask);
|
||||
typedef void (*write16_device_func)(ATTR_UNUSED device_t *device, ATTR_UNUSED address_space &space, ATTR_UNUSED offs_t offset, ATTR_UNUSED UINT16 data, ATTR_UNUSED UINT16 mem_mask);
|
||||
typedef UINT32 (*read32_device_func) (ATTR_UNUSED device_t *device, ATTR_UNUSED address_space &space, ATTR_UNUSED offs_t offset, ATTR_UNUSED UINT32 mem_mask);
|
||||
typedef void (*write32_device_func)(ATTR_UNUSED device_t *device, ATTR_UNUSED address_space &space, ATTR_UNUSED offs_t offset, ATTR_UNUSED UINT32 data, ATTR_UNUSED UINT32 mem_mask);
|
||||
typedef UINT64 (*read64_device_func) (ATTR_UNUSED device_t *device, ATTR_UNUSED address_space &space, ATTR_UNUSED offs_t offset, ATTR_UNUSED UINT64 mem_mask);
|
||||
typedef void (*write64_device_func)(ATTR_UNUSED device_t *device, ATTR_UNUSED address_space &space, ATTR_UNUSED offs_t offset, ATTR_UNUSED UINT64 data, ATTR_UNUSED UINT64 mem_mask);
|
||||
|
||||
|
||||
// struct with function pointers for accessors; use is generally discouraged unless necessary
|
||||
struct data_accessors
|
||||
{
|
||||
@ -462,62 +440,6 @@ public:
|
||||
UINT64 *install_write_handler(offs_t addrstart, offs_t addrend, offs_t addrmask, offs_t addrmirror, write64_delegate whandler, UINT64 unitmask = 0);
|
||||
UINT64 *install_readwrite_handler(offs_t addrstart, offs_t addrend, offs_t addrmask, offs_t addrmirror, read64_delegate rhandler, write64_delegate whandler, UINT64 unitmask = 0);
|
||||
|
||||
// install legacy address space handlers (short form)
|
||||
UINT8 *install_legacy_read_handler(offs_t addrstart, offs_t addrend, read8_space_func rhandler, const char *rname, UINT64 unitmask = 0) { return install_legacy_read_handler(addrstart, addrend, 0, 0, rhandler, rname, unitmask); }
|
||||
UINT8 *install_legacy_write_handler(offs_t addrstart, offs_t addrend, write8_space_func whandler, const char *wname, UINT64 unitmask = 0) { return install_legacy_write_handler(addrstart, addrend, 0, 0, whandler, wname, unitmask); }
|
||||
UINT8 *install_legacy_readwrite_handler(offs_t addrstart, offs_t addrend, read8_space_func rhandler, const char *rname, write8_space_func whandler, const char *wname, UINT64 unitmask = 0) { return install_legacy_readwrite_handler(addrstart, addrend, 0, 0, rhandler, rname, whandler, wname, unitmask); }
|
||||
UINT16 *install_legacy_read_handler(offs_t addrstart, offs_t addrend, read16_space_func rhandler, const char *rname, UINT64 unitmask = 0) { return install_legacy_read_handler(addrstart, addrend, 0, 0, rhandler, rname, unitmask); }
|
||||
UINT16 *install_legacy_write_handler(offs_t addrstart, offs_t addrend, write16_space_func whandler, const char *wname, UINT64 unitmask = 0) { return install_legacy_write_handler(addrstart, addrend, 0, 0, whandler, wname, unitmask); }
|
||||
UINT16 *install_legacy_readwrite_handler(offs_t addrstart, offs_t addrend, read16_space_func rhandler, const char *rname, write16_space_func whandler, const char *wname, UINT64 unitmask = 0) { return install_legacy_readwrite_handler(addrstart, addrend, 0, 0, rhandler, rname, whandler, wname, unitmask); }
|
||||
UINT32 *install_legacy_read_handler(offs_t addrstart, offs_t addrend, read32_space_func rhandler, const char *rname, UINT64 unitmask = 0) { return install_legacy_read_handler(addrstart, addrend, 0, 0, rhandler, rname, unitmask); }
|
||||
UINT32 *install_legacy_write_handler(offs_t addrstart, offs_t addrend, write32_space_func whandler, const char *wname, UINT64 unitmask = 0) { return install_legacy_write_handler(addrstart, addrend, 0, 0, whandler, wname, unitmask); }
|
||||
UINT32 *install_legacy_readwrite_handler(offs_t addrstart, offs_t addrend, read32_space_func rhandler, const char *rname, write32_space_func whandler, const char *wname, UINT64 unitmask = 0) { return install_legacy_readwrite_handler(addrstart, addrend, 0, 0, rhandler, rname, whandler, wname, unitmask); }
|
||||
UINT64 *install_legacy_read_handler(offs_t addrstart, offs_t addrend, read64_space_func rhandler, const char *rname, UINT64 unitmask = 0) { return install_legacy_read_handler(addrstart, addrend, 0, 0, rhandler, rname, unitmask); }
|
||||
UINT64 *install_legacy_write_handler(offs_t addrstart, offs_t addrend, write64_space_func whandler, const char *wname, UINT64 unitmask = 0) { return install_legacy_write_handler(addrstart, addrend, 0, 0, whandler, wname, unitmask); }
|
||||
UINT64 *install_legacy_readwrite_handler(offs_t addrstart, offs_t addrend, read64_space_func rhandler, const char *rname, write64_space_func whandler, const char *wname, UINT64 unitmask = 0) { return install_legacy_readwrite_handler(addrstart, addrend, 0, 0, rhandler, rname, whandler, wname, unitmask); }
|
||||
|
||||
// install legacy address space handlers (with mirror/mask)
|
||||
UINT8 *install_legacy_read_handler(offs_t addrstart, offs_t addrend, offs_t addrmask, offs_t addrmirror, read8_space_func rhandler, const char *rname, UINT64 unitmask = 0);
|
||||
UINT8 *install_legacy_write_handler(offs_t addrstart, offs_t addrend, offs_t addrmask, offs_t addrmirror, write8_space_func whandler, const char *wname, UINT64 unitmask = 0);
|
||||
UINT8 *install_legacy_readwrite_handler(offs_t addrstart, offs_t addrend, offs_t addrmask, offs_t addrmirror, read8_space_func rhandler, const char *rname, write8_space_func whandler, const char *wname, UINT64 unitmask = 0);
|
||||
UINT16 *install_legacy_read_handler(offs_t addrstart, offs_t addrend, offs_t addrmask, offs_t addrmirror, read16_space_func rhandler, const char *rname, UINT64 unitmask = 0);
|
||||
UINT16 *install_legacy_write_handler(offs_t addrstart, offs_t addrend, offs_t addrmask, offs_t addrmirror, write16_space_func whandler, const char *wname, UINT64 unitmask = 0);
|
||||
UINT16 *install_legacy_readwrite_handler(offs_t addrstart, offs_t addrend, offs_t addrmask, offs_t addrmirror, read16_space_func rhandler, const char *rname, write16_space_func whandler, const char *wname, UINT64 unitmask = 0);
|
||||
UINT32 *install_legacy_read_handler(offs_t addrstart, offs_t addrend, offs_t addrmask, offs_t addrmirror, read32_space_func rhandler, const char *rname, UINT64 unitmask = 0);
|
||||
UINT32 *install_legacy_write_handler(offs_t addrstart, offs_t addrend, offs_t addrmask, offs_t addrmirror, write32_space_func whandler, const char *wname, UINT64 unitmask = 0);
|
||||
UINT32 *install_legacy_readwrite_handler(offs_t addrstart, offs_t addrend, offs_t addrmask, offs_t addrmirror, read32_space_func rhandler, const char *rname, write32_space_func whandler, const char *wname, UINT64 unitmask = 0);
|
||||
UINT64 *install_legacy_read_handler(offs_t addrstart, offs_t addrend, offs_t addrmask, offs_t addrmirror, read64_space_func rhandler, const char *rname, UINT64 unitmask = 0);
|
||||
UINT64 *install_legacy_write_handler(offs_t addrstart, offs_t addrend, offs_t addrmask, offs_t addrmirror, write64_space_func whandler, const char *wname, UINT64 unitmask = 0);
|
||||
UINT64 *install_legacy_readwrite_handler(offs_t addrstart, offs_t addrend, offs_t addrmask, offs_t addrmirror, read64_space_func rhandler, const char *rname, write64_space_func whandler, const char *wname, UINT64 unitmask = 0);
|
||||
|
||||
// install legacy device handlers (short form)
|
||||
UINT8 *install_legacy_read_handler(device_t &device, offs_t addrstart, offs_t addrend, read8_device_func rhandler, const char *rname, UINT64 unitmask = 0) { return install_legacy_read_handler(device, addrstart, addrend, 0, 0, rhandler, rname, unitmask); }
|
||||
UINT8 *install_legacy_write_handler(device_t &device, offs_t addrstart, offs_t addrend, write8_device_func whandler, const char *wname, UINT64 unitmask = 0) { return install_legacy_write_handler(device, addrstart, addrend, 0, 0, whandler, wname, unitmask); }
|
||||
UINT8 *install_legacy_readwrite_handler(device_t &device, offs_t addrstart, offs_t addrend, read8_device_func rhandler, const char *rname, write8_device_func whandler, const char *wname, UINT64 unitmask = 0) { return install_legacy_readwrite_handler(device, addrstart, addrend, 0, 0, rhandler, rname, whandler, wname, unitmask); }
|
||||
UINT16 *install_legacy_read_handler(device_t &device, offs_t addrstart, offs_t addrend, read16_device_func rhandler, const char *rname, UINT64 unitmask = 0) { return install_legacy_read_handler(device, addrstart, addrend, 0, 0, rhandler, rname, unitmask); }
|
||||
UINT16 *install_legacy_write_handler(device_t &device, offs_t addrstart, offs_t addrend, write16_device_func whandler, const char *wname, UINT64 unitmask = 0) { return install_legacy_write_handler(device, addrstart, addrend, 0, 0, whandler, wname, unitmask); }
|
||||
UINT16 *install_legacy_readwrite_handler(device_t &device, offs_t addrstart, offs_t addrend, read16_device_func rhandler, const char *rname, write16_device_func whandler, const char *wname, UINT64 unitmask = 0) { return install_legacy_readwrite_handler(device, addrstart, addrend, 0, 0, rhandler, rname, whandler, wname, unitmask); }
|
||||
UINT32 *install_legacy_read_handler(device_t &device, offs_t addrstart, offs_t addrend, read32_device_func rhandler, const char *rname, UINT64 unitmask = 0) { return install_legacy_read_handler(device, addrstart, addrend, 0, 0, rhandler, rname, unitmask); }
|
||||
UINT32 *install_legacy_write_handler(device_t &device, offs_t addrstart, offs_t addrend, write32_device_func whandler, const char *wname, UINT64 unitmask = 0) { return install_legacy_write_handler(device, addrstart, addrend, 0, 0, whandler, wname, unitmask); }
|
||||
UINT32 *install_legacy_readwrite_handler(device_t &device, offs_t addrstart, offs_t addrend, read32_device_func rhandler, const char *rname, write32_device_func whandler, const char *wname, UINT64 unitmask = 0) { return install_legacy_readwrite_handler(device, addrstart, addrend, 0, 0, rhandler, rname, whandler, wname, unitmask); }
|
||||
UINT64 *install_legacy_read_handler(device_t &device, offs_t addrstart, offs_t addrend, read64_device_func rhandler, const char *rname, UINT64 unitmask = 0) { return install_legacy_read_handler(device, addrstart, addrend, 0, 0, rhandler, rname, unitmask); }
|
||||
UINT64 *install_legacy_write_handler(device_t &device, offs_t addrstart, offs_t addrend, write64_device_func whandler, const char *wname, UINT64 unitmask = 0) { return install_legacy_write_handler(device, addrstart, addrend, 0, 0, whandler, wname, unitmask); }
|
||||
UINT64 *install_legacy_readwrite_handler(device_t &device, offs_t addrstart, offs_t addrend, read64_device_func rhandler, const char *rname, write64_device_func whandler, const char *wname, UINT64 unitmask = 0) { return install_legacy_readwrite_handler(device, addrstart, addrend, 0, 0, rhandler, rname, whandler, wname, unitmask); }
|
||||
|
||||
// install legacy device handlers (with mirror/mask)
|
||||
UINT8 *install_legacy_read_handler(device_t &device, offs_t addrstart, offs_t addrend, offs_t addrmask, offs_t addrmirror, read8_device_func rhandler, const char *rname, UINT64 unitmask = 0) { return install_read_handler(addrstart, addrend, addrmask, addrmirror, read8_delegate(rhandler, rname, &device), unitmask); }
|
||||
UINT8 *install_legacy_write_handler(device_t &device, offs_t addrstart, offs_t addrend, offs_t addrmask, offs_t addrmirror, write8_device_func whandler, const char *wname, UINT64 unitmask = 0) { return install_write_handler(addrstart, addrend, addrmask, addrmirror, write8_delegate(whandler, wname, &device), unitmask); }
|
||||
UINT8 *install_legacy_readwrite_handler(device_t &device, offs_t addrstart, offs_t addrend, offs_t addrmask, offs_t addrmirror, read8_device_func rhandler, const char *rname, write8_device_func whandler, const char *wname, UINT64 unitmask = 0) { return install_readwrite_handler(addrstart, addrend, addrmask, addrmirror, read8_delegate(rhandler, rname, &device), write8_delegate(whandler, wname, &device), unitmask); }
|
||||
UINT16 *install_legacy_read_handler(device_t &device, offs_t addrstart, offs_t addrend, offs_t addrmask, offs_t addrmirror, read16_device_func rhandler, const char *rname, UINT64 unitmask = 0) { return install_read_handler(addrstart, addrend, addrmask, addrmirror, read16_delegate(rhandler, rname, &device), unitmask); }
|
||||
UINT16 *install_legacy_write_handler(device_t &device, offs_t addrstart, offs_t addrend, offs_t addrmask, offs_t addrmirror, write16_device_func whandler, const char *wname, UINT64 unitmask = 0) { return install_write_handler(addrstart, addrend, addrmask, addrmirror, write16_delegate(whandler, wname, &device), unitmask); }
|
||||
UINT16 *install_legacy_readwrite_handler(device_t &device, offs_t addrstart, offs_t addrend, offs_t addrmask, offs_t addrmirror, read16_device_func rhandler, const char *rname, write16_device_func whandler, const char *wname, UINT64 unitmask = 0) { return install_readwrite_handler(addrstart, addrend, addrmask, addrmirror, read16_delegate(rhandler, rname, &device), write16_delegate(whandler, wname, &device), unitmask); }
|
||||
UINT32 *install_legacy_read_handler(device_t &device, offs_t addrstart, offs_t addrend, offs_t addrmask, offs_t addrmirror, read32_device_func rhandler, const char *rname, UINT64 unitmask = 0) { return install_read_handler(addrstart, addrend, addrmask, addrmirror, read32_delegate(rhandler, rname, &device), unitmask); }
|
||||
UINT32 *install_legacy_write_handler(device_t &device, offs_t addrstart, offs_t addrend, offs_t addrmask, offs_t addrmirror, write32_device_func whandler, const char *wname, UINT64 unitmask = 0) { return install_write_handler(addrstart, addrend, addrmask, addrmirror, write32_delegate(whandler, wname, &device), unitmask); }
|
||||
UINT32 *install_legacy_readwrite_handler(device_t &device, offs_t addrstart, offs_t addrend, offs_t addrmask, offs_t addrmirror, read32_device_func rhandler, const char *rname, write32_device_func whandler, const char *wname, UINT64 unitmask = 0) { return install_readwrite_handler(addrstart, addrend, addrmask, addrmirror, read32_delegate(rhandler, rname, &device), write32_delegate(whandler, wname, &device), unitmask); }
|
||||
UINT64 *install_legacy_read_handler(device_t &device, offs_t addrstart, offs_t addrend, offs_t addrmask, offs_t addrmirror, read64_device_func rhandler, const char *rname, UINT64 unitmask = 0) { return install_read_handler(addrstart, addrend, addrmask, addrmirror, read64_delegate(rhandler, rname, &device), unitmask); }
|
||||
UINT64 *install_legacy_write_handler(device_t &device, offs_t addrstart, offs_t addrend, offs_t addrmask, offs_t addrmirror, write64_device_func whandler, const char *wname, UINT64 unitmask = 0) { return install_write_handler(addrstart, addrend, addrmask, addrmirror, write64_delegate(whandler, wname, &device), unitmask); }
|
||||
UINT64 *install_legacy_readwrite_handler(device_t &device, offs_t addrstart, offs_t addrend, offs_t addrmask, offs_t addrmirror, read64_device_func rhandler, const char *rname, write64_device_func whandler, const char *wname, UINT64 unitmask = 0) { return install_readwrite_handler(addrstart, addrend, addrmask, addrmirror, read64_delegate(rhandler, rname, &device), write64_delegate(whandler, wname, &device), unitmask); }
|
||||
|
||||
// setup
|
||||
void prepare_map();
|
||||
void populate_from_map(address_map *map = NULL);
|
||||
@ -870,45 +792,6 @@ private:
|
||||
#define DECLARE_DIRECT_UPDATE_MEMBER(name) offs_t name(ATTR_UNUSED direct_read_data &direct, ATTR_UNUSED offs_t address)
|
||||
|
||||
|
||||
// space read/write handler function macros
|
||||
#define READ8_HANDLER(name) UINT8 name(ATTR_UNUSED address_space &space, ATTR_UNUSED offs_t offset, ATTR_UNUSED UINT8 mem_mask)
|
||||
#define WRITE8_HANDLER(name) void name(ATTR_UNUSED address_space &space, ATTR_UNUSED offs_t offset, ATTR_UNUSED UINT8 data, ATTR_UNUSED UINT8 mem_mask)
|
||||
#define READ16_HANDLER(name) UINT16 name(ATTR_UNUSED address_space &space, ATTR_UNUSED offs_t offset, ATTR_UNUSED UINT16 mem_mask)
|
||||
#define WRITE16_HANDLER(name) void name(ATTR_UNUSED address_space &space, ATTR_UNUSED offs_t offset, ATTR_UNUSED UINT16 data, ATTR_UNUSED UINT16 mem_mask)
|
||||
#define READ32_HANDLER(name) UINT32 name(ATTR_UNUSED address_space &space, ATTR_UNUSED offs_t offset, ATTR_UNUSED UINT32 mem_mask)
|
||||
#define WRITE32_HANDLER(name) void name(ATTR_UNUSED address_space &space, ATTR_UNUSED offs_t offset, ATTR_UNUSED UINT32 data, ATTR_UNUSED UINT32 mem_mask)
|
||||
#define READ64_HANDLER(name) UINT64 name(ATTR_UNUSED address_space &space, ATTR_UNUSED offs_t offset, ATTR_UNUSED UINT64 mem_mask)
|
||||
#define WRITE64_HANDLER(name) void name(ATTR_UNUSED address_space &space, ATTR_UNUSED offs_t offset, ATTR_UNUSED UINT64 data, ATTR_UNUSED UINT64 mem_mask)
|
||||
|
||||
#define DECLARE_READ8_HANDLER(name) UINT8 name(ATTR_UNUSED address_space &space, ATTR_UNUSED offs_t offset, ATTR_UNUSED UINT8 mem_mask = 0xff)
|
||||
#define DECLARE_WRITE8_HANDLER(name) void name(ATTR_UNUSED address_space &space, ATTR_UNUSED offs_t offset, ATTR_UNUSED UINT8 data, ATTR_UNUSED UINT8 mem_mask = 0xff)
|
||||
#define DECLARE_READ16_HANDLER(name) UINT16 name(ATTR_UNUSED address_space &space, ATTR_UNUSED offs_t offset, ATTR_UNUSED UINT16 mem_mask = 0xffff)
|
||||
#define DECLARE_WRITE16_HANDLER(name) void name(ATTR_UNUSED address_space &space, ATTR_UNUSED offs_t offset, ATTR_UNUSED UINT16 data, ATTR_UNUSED UINT16 mem_mask = 0xffff)
|
||||
#define DECLARE_READ32_HANDLER(name) UINT32 name(ATTR_UNUSED address_space &space, ATTR_UNUSED offs_t offset, ATTR_UNUSED UINT32 mem_mask = 0xffffffff)
|
||||
#define DECLARE_WRITE32_HANDLER(name) void name(ATTR_UNUSED address_space &space, ATTR_UNUSED offs_t offset, ATTR_UNUSED UINT32 data, ATTR_UNUSED UINT32 mem_mask = 0xffffffff)
|
||||
#define DECLARE_READ64_HANDLER(name) UINT64 name(ATTR_UNUSED address_space &space, ATTR_UNUSED offs_t offset, ATTR_UNUSED UINT64 mem_mask = U64(0xffffffffffffffff))
|
||||
#define DECLARE_WRITE64_HANDLER(name) void name(ATTR_UNUSED address_space &space, ATTR_UNUSED offs_t offset, ATTR_UNUSED UINT64 data, ATTR_UNUSED UINT64 mem_mask = U64(0xffffffffffffffff))
|
||||
|
||||
|
||||
// device read/write handler function macros
|
||||
#define READ8_DEVICE_HANDLER(name) UINT8 name(ATTR_UNUSED device_t *device, ATTR_UNUSED address_space &space, ATTR_UNUSED offs_t offset, ATTR_UNUSED UINT8 mem_mask)
|
||||
#define WRITE8_DEVICE_HANDLER(name) void name(ATTR_UNUSED device_t *device, ATTR_UNUSED address_space &space, ATTR_UNUSED offs_t offset, ATTR_UNUSED UINT8 data, ATTR_UNUSED UINT8 mem_mask)
|
||||
#define READ16_DEVICE_HANDLER(name) UINT16 name(ATTR_UNUSED device_t *device, ATTR_UNUSED address_space &space, ATTR_UNUSED offs_t offset, ATTR_UNUSED UINT16 mem_mask)
|
||||
#define WRITE16_DEVICE_HANDLER(name) void name(ATTR_UNUSED device_t *device, ATTR_UNUSED address_space &space, ATTR_UNUSED offs_t offset, ATTR_UNUSED UINT16 data, ATTR_UNUSED UINT16 mem_mask)
|
||||
#define READ32_DEVICE_HANDLER(name) UINT32 name(ATTR_UNUSED device_t *device, ATTR_UNUSED address_space &space, ATTR_UNUSED offs_t offset, ATTR_UNUSED UINT32 mem_mask)
|
||||
#define WRITE32_DEVICE_HANDLER(name) void name(ATTR_UNUSED device_t *device, ATTR_UNUSED address_space &space, ATTR_UNUSED offs_t offset, ATTR_UNUSED UINT32 data, ATTR_UNUSED UINT32 mem_mask)
|
||||
#define READ64_DEVICE_HANDLER(name) UINT64 name(ATTR_UNUSED device_t *device, ATTR_UNUSED address_space &space, ATTR_UNUSED offs_t offset, ATTR_UNUSED UINT64 mem_mask)
|
||||
#define WRITE64_DEVICE_HANDLER(name) void name(ATTR_UNUSED device_t *device, ATTR_UNUSED address_space &space, ATTR_UNUSED offs_t offset, ATTR_UNUSED UINT64 data, ATTR_UNUSED UINT64 mem_mask)
|
||||
|
||||
#define DECLARE_READ8_DEVICE_HANDLER(name) UINT8 name(ATTR_UNUSED device_t *device, ATTR_UNUSED address_space &space, ATTR_UNUSED offs_t offset, ATTR_UNUSED UINT8 mem_mask = 0xff)
|
||||
#define DECLARE_WRITE8_DEVICE_HANDLER(name) void name(ATTR_UNUSED device_t *device, ATTR_UNUSED address_space &space, ATTR_UNUSED offs_t offset, ATTR_UNUSED UINT8 data, ATTR_UNUSED UINT8 mem_mask = 0xff)
|
||||
#define DECLARE_READ16_DEVICE_HANDLER(name) UINT16 name(ATTR_UNUSED device_t *device, ATTR_UNUSED address_space &space, ATTR_UNUSED offs_t offset, ATTR_UNUSED UINT16 mem_mask = 0xffff)
|
||||
#define DECLARE_WRITE16_DEVICE_HANDLER(name) void name(ATTR_UNUSED device_t *device, ATTR_UNUSED address_space &space, ATTR_UNUSED offs_t offset, ATTR_UNUSED UINT16 data, ATTR_UNUSED UINT16 mem_mask = 0xffff)
|
||||
#define DECLARE_READ32_DEVICE_HANDLER(name) UINT32 name(ATTR_UNUSED device_t *device, ATTR_UNUSED address_space &space, ATTR_UNUSED offs_t offset, ATTR_UNUSED UINT32 mem_mask = 0xffffffff)
|
||||
#define DECLARE_WRITE32_DEVICE_HANDLER(name) void name(ATTR_UNUSED device_t *device, ATTR_UNUSED address_space &space, ATTR_UNUSED offs_t offset, ATTR_UNUSED UINT32 data, ATTR_UNUSED UINT32 mem_mask = 0xffffffff)
|
||||
#define DECLARE_READ64_DEVICE_HANDLER(name) UINT64 name(ATTR_UNUSED device_t *device, ATTR_UNUSED address_space &space, ATTR_UNUSED offs_t offset, ATTR_UNUSED UINT64 mem_mask = U64(0xffffffffffffffff))
|
||||
#define DECLARE_WRITE64_DEVICE_HANDLER(name) void name(ATTR_UNUSED device_t *device, ATTR_UNUSED address_space &space, ATTR_UNUSED offs_t offset, ATTR_UNUSED UINT64 data, ATTR_UNUSED UINT64 mem_mask = U64(0xffffffffffffffff))
|
||||
|
||||
|
||||
// space read/write handler function macros
|
||||
#define READ8_MEMBER(name) UINT8 name(ATTR_UNUSED address_space &space, ATTR_UNUSED offs_t offset, ATTR_UNUSED UINT8 mem_mask)
|
||||
|
Loading…
Reference in New Issue
Block a user