Delegates 2.0 implementation. Resdesigned how delegates work to make

them more flexible and simpler to use. Got rid of the proto_delegates
altogether in favor of supporting delegates that are bound to NULL
objects. Added a front-end template that supports "natural" syntax
favored by libraries like boost. Added support for static functions
that take reference parameters instead of pointer parameters for the
object type. Updated all delegate users in the system to the new
syntax. [Aaron Giles]

Changed the DIRECT_UPDATE_HANDLER to take a machine reference like 
everything else in the system. Updated all users. [Aaron Giles]

Changed the FUNC() macro to automatically put an & in front of the
item passed. In general this works transparently, however it does have
the nice side-effect of catching situations where a variable is passed
instead of a function name. Fixed those cases to push the naming
upstream so that the name is now provided properly. Also added a
FUNC_NULL macro since FUNC(NULL) no longer works. [Aaron Giles]
This commit is contained in:
Aaron Giles 2011-04-16 23:02:16 +00:00
parent a14c67a8fe
commit 55866daab8
50 changed files with 933 additions and 1489 deletions

View File

@ -271,7 +271,7 @@ void address_map_entry::internal_set_handler(const device_config &devconfig, con
}
void address_map_entry::internal_set_handler(const device_config &devconfig, const char *tag, read8_proto_delegate func, UINT64 unitmask)
void address_map_entry::internal_set_handler(const device_config &devconfig, const char *tag, read8_delegate func, UINT64 unitmask)
{
assert(!func.isnull());
assert(unitmask_is_appropriate(8, unitmask, func.name()));
@ -284,7 +284,7 @@ void address_map_entry::internal_set_handler(const device_config &devconfig, con
}
void address_map_entry::internal_set_handler(const device_config &devconfig, const char *tag, write8_proto_delegate func, UINT64 unitmask)
void address_map_entry::internal_set_handler(const device_config &devconfig, const char *tag, write8_delegate func, UINT64 unitmask)
{
assert(!func.isnull());
assert(unitmask_is_appropriate(8, unitmask, func.name()));
@ -297,7 +297,7 @@ void address_map_entry::internal_set_handler(const device_config &devconfig, con
}
void address_map_entry::internal_set_handler(const device_config &devconfig, const char *tag, read8_proto_delegate rfunc, write8_proto_delegate wfunc, UINT64 unitmask)
void address_map_entry::internal_set_handler(const device_config &devconfig, const char *tag, read8_delegate rfunc, write8_delegate wfunc, UINT64 unitmask)
{
internal_set_handler(devconfig, tag, rfunc, unitmask);
internal_set_handler(devconfig, tag, wfunc, unitmask);
@ -373,7 +373,7 @@ void address_map_entry::internal_set_handler(const device_config &devconfig, con
}
void address_map_entry::internal_set_handler(const device_config &devconfig, const char *tag, read16_proto_delegate func, UINT64 unitmask)
void address_map_entry::internal_set_handler(const device_config &devconfig, const char *tag, read16_delegate func, UINT64 unitmask)
{
assert(!func.isnull());
assert(unitmask_is_appropriate(16, unitmask, func.name()));
@ -386,7 +386,7 @@ void address_map_entry::internal_set_handler(const device_config &devconfig, con
}
void address_map_entry::internal_set_handler(const device_config &devconfig, const char *tag, write16_proto_delegate func, UINT64 unitmask)
void address_map_entry::internal_set_handler(const device_config &devconfig, const char *tag, write16_delegate func, UINT64 unitmask)
{
assert(!func.isnull());
assert(unitmask_is_appropriate(16, unitmask, func.name()));
@ -399,7 +399,7 @@ void address_map_entry::internal_set_handler(const device_config &devconfig, con
}
void address_map_entry::internal_set_handler(const device_config &devconfig, const char *tag, read16_proto_delegate rfunc, write16_proto_delegate wfunc, UINT64 unitmask)
void address_map_entry::internal_set_handler(const device_config &devconfig, const char *tag, read16_delegate rfunc, write16_delegate wfunc, UINT64 unitmask)
{
internal_set_handler(devconfig, tag, rfunc, unitmask);
internal_set_handler(devconfig, tag, wfunc, unitmask);
@ -475,7 +475,7 @@ void address_map_entry::internal_set_handler(const device_config &devconfig, con
}
void address_map_entry::internal_set_handler(const device_config &devconfig, const char *tag, read32_proto_delegate func, UINT64 unitmask)
void address_map_entry::internal_set_handler(const device_config &devconfig, const char *tag, read32_delegate func, UINT64 unitmask)
{
assert(!func.isnull());
assert(unitmask_is_appropriate(32, unitmask, func.name()));
@ -488,7 +488,7 @@ void address_map_entry::internal_set_handler(const device_config &devconfig, con
}
void address_map_entry::internal_set_handler(const device_config &devconfig, const char *tag, write32_proto_delegate func, UINT64 unitmask)
void address_map_entry::internal_set_handler(const device_config &devconfig, const char *tag, write32_delegate func, UINT64 unitmask)
{
assert(!func.isnull());
assert(unitmask_is_appropriate(32, unitmask, func.name()));
@ -501,7 +501,7 @@ void address_map_entry::internal_set_handler(const device_config &devconfig, con
}
void address_map_entry::internal_set_handler(const device_config &devconfig, const char *tag, read32_proto_delegate rfunc, write32_proto_delegate wfunc, UINT64 unitmask)
void address_map_entry::internal_set_handler(const device_config &devconfig, const char *tag, read32_delegate rfunc, write32_delegate wfunc, UINT64 unitmask)
{
internal_set_handler(devconfig, tag, rfunc, unitmask);
internal_set_handler(devconfig, tag, wfunc, unitmask);
@ -577,7 +577,7 @@ void address_map_entry::internal_set_handler(const device_config &devconfig, con
}
void address_map_entry::internal_set_handler(const device_config &devconfig, const char *tag, read64_proto_delegate func, UINT64 unitmask)
void address_map_entry::internal_set_handler(const device_config &devconfig, const char *tag, read64_delegate func, UINT64 unitmask)
{
assert(!func.isnull());
assert(unitmask_is_appropriate(64, unitmask, func.name()));
@ -590,7 +590,7 @@ void address_map_entry::internal_set_handler(const device_config &devconfig, con
}
void address_map_entry::internal_set_handler(const device_config &devconfig, const char *tag, write64_proto_delegate func, UINT64 unitmask)
void address_map_entry::internal_set_handler(const device_config &devconfig, const char *tag, write64_delegate func, UINT64 unitmask)
{
assert(!func.isnull());
assert(unitmask_is_appropriate(64, unitmask, func.name()));
@ -603,7 +603,7 @@ void address_map_entry::internal_set_handler(const device_config &devconfig, con
}
void address_map_entry::internal_set_handler(const device_config &devconfig, const char *tag, read64_proto_delegate rfunc, write64_proto_delegate wfunc, UINT64 unitmask)
void address_map_entry::internal_set_handler(const device_config &devconfig, const char *tag, read64_delegate rfunc, write64_delegate wfunc, UINT64 unitmask)
{
internal_set_handler(devconfig, tag, rfunc, unitmask);
internal_set_handler(devconfig, tag, wfunc, unitmask);

View File

@ -157,10 +157,10 @@ public:
offs_t m_rgnoffs; // offset within the region
// handlers
read8_proto_delegate m_rproto8; // 8-bit read proto-delegate
read16_proto_delegate m_rproto16; // 16-bit read proto-delegate
read32_proto_delegate m_rproto32; // 32-bit read proto-delegate
read64_proto_delegate m_rproto64; // 64-bit read proto-delegate
read8_delegate m_rproto8; // 8-bit read proto-delegate
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
@ -169,10 +169,10 @@ public:
read16_device_func m_rdevice16; // 16-bit legacy device handler
read32_device_func m_rdevice32; // 32-bit legacy device handler
read64_device_func m_rdevice64; // 64-bit legacy device handler
write8_proto_delegate m_wproto8; // 8-bit write proto-delegate
write16_proto_delegate m_wproto16; // 16-bit write proto-delegate
write32_proto_delegate m_wproto32; // 32-bit write proto-delegate
write64_proto_delegate m_wproto64; // 64-bit write proto-delegate
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
@ -200,9 +200,9 @@ protected:
void internal_set_handler(const device_config &devconfig, const char *tag, read8_device_func func, const char *string, UINT64 mask);
void internal_set_handler(const device_config &devconfig, const char *tag, write8_device_func func, const char *string, UINT64 mask);
void internal_set_handler(const device_config &devconfig, const char *tag, read8_device_func rfunc, const char *rstring, write8_device_func wfunc, const char *wstring, UINT64 mask);
void internal_set_handler(const device_config &devconfig, const char *tag, read8_proto_delegate func, UINT64 mask);
void internal_set_handler(const device_config &devconfig, const char *tag, write8_proto_delegate func, UINT64 mask);
void internal_set_handler(const device_config &devconfig, const char *tag, read8_proto_delegate rfunc, write8_proto_delegate wfunc, UINT64 mask);
void internal_set_handler(const device_config &devconfig, const char *tag, read8_delegate func, UINT64 mask);
void internal_set_handler(const device_config &devconfig, const char *tag, write8_delegate func, UINT64 mask);
void internal_set_handler(const device_config &devconfig, const char *tag, 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);
@ -211,9 +211,9 @@ protected:
void internal_set_handler(const device_config &devconfig, const char *tag, read16_device_func func, const char *string, UINT64 mask);
void internal_set_handler(const device_config &devconfig, const char *tag, write16_device_func func, const char *string, UINT64 mask);
void internal_set_handler(const device_config &devconfig, const char *tag, read16_device_func rfunc, const char *rstring, write16_device_func wfunc, const char *wstring, UINT64 mask);
void internal_set_handler(const device_config &devconfig, const char *tag, read16_proto_delegate func, UINT64 mask);
void internal_set_handler(const device_config &devconfig, const char *tag, write16_proto_delegate func, UINT64 mask);
void internal_set_handler(const device_config &devconfig, const char *tag, read16_proto_delegate rfunc, write16_proto_delegate wfunc, UINT64 mask);
void internal_set_handler(const device_config &devconfig, const char *tag, read16_delegate func, UINT64 mask);
void internal_set_handler(const device_config &devconfig, const char *tag, write16_delegate func, UINT64 mask);
void internal_set_handler(const device_config &devconfig, const char *tag, 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);
@ -222,9 +222,9 @@ protected:
void internal_set_handler(const device_config &devconfig, const char *tag, read32_device_func func, const char *string, UINT64 mask);
void internal_set_handler(const device_config &devconfig, const char *tag, write32_device_func func, const char *string, UINT64 mask);
void internal_set_handler(const device_config &devconfig, const char *tag, read32_device_func rfunc, const char *rstring, write32_device_func wfunc, const char *wstring, UINT64 mask);
void internal_set_handler(const device_config &devconfig, const char *tag, read32_proto_delegate func, UINT64 mask);
void internal_set_handler(const device_config &devconfig, const char *tag, write32_proto_delegate func, UINT64 mask);
void internal_set_handler(const device_config &devconfig, const char *tag, read32_proto_delegate rfunc, write32_proto_delegate wfunc, UINT64 mask);
void internal_set_handler(const device_config &devconfig, const char *tag, read32_delegate func, UINT64 mask);
void internal_set_handler(const device_config &devconfig, const char *tag, write32_delegate func, UINT64 mask);
void internal_set_handler(const device_config &devconfig, const char *tag, 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);
@ -233,9 +233,9 @@ protected:
void internal_set_handler(const device_config &devconfig, const char *tag, read64_device_func func, const char *string, UINT64 mask);
void internal_set_handler(const device_config &devconfig, const char *tag, write64_device_func func, const char *string, UINT64 mask);
void internal_set_handler(const device_config &devconfig, const char *tag, read64_device_func rfunc, const char *rstring, write64_device_func wfunc, const char *wstring, UINT64 mask);
void internal_set_handler(const device_config &devconfig, const char *tag, read64_proto_delegate func, UINT64 mask);
void internal_set_handler(const device_config &devconfig, const char *tag, write64_proto_delegate func, UINT64 mask);
void internal_set_handler(const device_config &devconfig, const char *tag, read64_proto_delegate rfunc, write64_proto_delegate wfunc, UINT64 mask);
void internal_set_handler(const device_config &devconfig, const char *tag, read64_delegate func, UINT64 mask);
void internal_set_handler(const device_config &devconfig, const char *tag, write64_delegate func, UINT64 mask);
void internal_set_handler(const device_config &devconfig, const char *tag, read64_delegate rfunc, write64_delegate wfunc, UINT64 mask);
private:
// helper functions
@ -260,9 +260,9 @@ public:
void set_handler(const device_config &devconfig, const char *tag, read8_device_func func, const char *string) { internal_set_handler(devconfig, tag, func, string, 0); }
void set_handler(const device_config &devconfig, const char *tag, write8_device_func func, const char *string) { internal_set_handler(devconfig, tag, func, string, 0); }
void set_handler(const device_config &devconfig, const char *tag, read8_device_func rfunc, const char *rstring, write8_device_func wfunc, const char *wstring) { internal_set_handler(devconfig, tag, rfunc, rstring, wfunc, wstring, 0); }
void set_handler(const device_config &devconfig, const char *tag, read8_proto_delegate func) { internal_set_handler(devconfig, tag, func, 0); }
void set_handler(const device_config &devconfig, const char *tag, write8_proto_delegate func) { internal_set_handler(devconfig, tag, func, 0); }
void set_handler(const device_config &devconfig, const char *tag, read8_proto_delegate rfunc, write8_proto_delegate wfunc) { internal_set_handler(devconfig, tag, rfunc, wfunc, 0); }
void set_handler(const device_config &devconfig, const char *tag, read8_delegate func) { internal_set_handler(devconfig, tag, func, 0); }
void set_handler(const device_config &devconfig, const char *tag, write8_delegate func) { internal_set_handler(devconfig, tag, func, 0); }
void set_handler(const device_config &devconfig, const char *tag, read8_delegate rfunc, write8_delegate wfunc) { internal_set_handler(devconfig, tag, rfunc, wfunc, 0); }
};
@ -283,9 +283,9 @@ public:
void set_handler(const device_config &devconfig, const char *tag, read16_device_func func, const char *string) { internal_set_handler(devconfig, tag, func, string, 0); }
void set_handler(const device_config &devconfig, const char *tag, write16_device_func func, const char *string) { internal_set_handler(devconfig, tag, func, string, 0); }
void set_handler(const device_config &devconfig, const char *tag, read16_device_func rfunc, const char *rstring, write16_device_func wfunc, const char *wstring) { internal_set_handler(devconfig, tag, rfunc, rstring, wfunc, wstring, 0); }
void set_handler(const device_config &devconfig, const char *tag, read16_proto_delegate func) { internal_set_handler(devconfig, tag, func, 0); }
void set_handler(const device_config &devconfig, const char *tag, write16_proto_delegate func) { internal_set_handler(devconfig, tag, func, 0); }
void set_handler(const device_config &devconfig, const char *tag, read16_proto_delegate rfunc, write16_proto_delegate wfunc) { internal_set_handler(devconfig, tag, rfunc, wfunc, 0); }
void set_handler(const device_config &devconfig, const char *tag, read16_delegate func) { internal_set_handler(devconfig, tag, func, 0); }
void set_handler(const device_config &devconfig, const char *tag, write16_delegate func) { internal_set_handler(devconfig, tag, func, 0); }
void set_handler(const device_config &devconfig, const char *tag, read16_delegate rfunc, write16_delegate wfunc) { internal_set_handler(devconfig, tag, rfunc, wfunc, 0); }
// 8-bit handlers
void set_handler(read8_space_func func, const char *string, UINT16 mask) { internal_set_handler(func, string, mask); }
@ -294,9 +294,9 @@ public:
void set_handler(const device_config &devconfig, const char *tag, read8_device_func func, const char *string, UINT16 mask) { internal_set_handler(devconfig, tag, func, string, mask); }
void set_handler(const device_config &devconfig, const char *tag, write8_device_func func, const char *string, UINT16 mask) { internal_set_handler(devconfig, tag, func, string, mask); }
void set_handler(const device_config &devconfig, const char *tag, read8_device_func rfunc, const char *rstring, write8_device_func wfunc, const char *wstring, UINT16 mask) { internal_set_handler(devconfig, tag, rfunc, rstring, wfunc, wstring, mask); }
void set_handler(const device_config &devconfig, const char *tag, read8_proto_delegate func, UINT16 mask) { internal_set_handler(devconfig, tag, func, mask); }
void set_handler(const device_config &devconfig, const char *tag, write8_proto_delegate func, UINT16 mask) { internal_set_handler(devconfig, tag, func, mask); }
void set_handler(const device_config &devconfig, const char *tag, read8_proto_delegate rfunc, write8_proto_delegate wfunc, UINT16 mask) { internal_set_handler(devconfig, tag, rfunc, wfunc, mask); }
void set_handler(const device_config &devconfig, const char *tag, read8_delegate func, UINT16 mask) { internal_set_handler(devconfig, tag, func, mask); }
void set_handler(const device_config &devconfig, const char *tag, write8_delegate func, UINT16 mask) { internal_set_handler(devconfig, tag, func, mask); }
void set_handler(const device_config &devconfig, const char *tag, read8_delegate rfunc, write8_delegate wfunc, UINT16 mask) { internal_set_handler(devconfig, tag, rfunc, wfunc, mask); }
};
@ -317,9 +317,9 @@ public:
void set_handler(const device_config &devconfig, const char *tag, read32_device_func func, const char *string) { internal_set_handler(devconfig, tag, func, string, 0); }
void set_handler(const device_config &devconfig, const char *tag, write32_device_func func, const char *string) { internal_set_handler(devconfig, tag, func, string, 0); }
void set_handler(const device_config &devconfig, const char *tag, read32_device_func rfunc, const char *rstring, write32_device_func wfunc, const char *wstring) { internal_set_handler(devconfig, tag, rfunc, rstring, wfunc, wstring, 0); }
void set_handler(const device_config &devconfig, const char *tag, read32_proto_delegate func) { internal_set_handler(devconfig, tag, func, 0); }
void set_handler(const device_config &devconfig, const char *tag, write32_proto_delegate func) { internal_set_handler(devconfig, tag, func, 0); }
void set_handler(const device_config &devconfig, const char *tag, read32_proto_delegate rfunc, write32_proto_delegate wfunc) { internal_set_handler(devconfig, tag, rfunc, wfunc, 0); }
void set_handler(const device_config &devconfig, const char *tag, read32_delegate func) { internal_set_handler(devconfig, tag, func, 0); }
void set_handler(const device_config &devconfig, const char *tag, write32_delegate func) { internal_set_handler(devconfig, tag, func, 0); }
void set_handler(const device_config &devconfig, const char *tag, read32_delegate rfunc, write32_delegate wfunc) { internal_set_handler(devconfig, tag, rfunc, wfunc, 0); }
// 16-bit handlers
void set_handler(read16_space_func func, const char *string, UINT32 mask) { internal_set_handler(func, string, mask); }
@ -328,9 +328,9 @@ public:
void set_handler(const device_config &devconfig, const char *tag, read16_device_func func, const char *string, UINT32 mask) { internal_set_handler(devconfig, tag, func, string, mask); }
void set_handler(const device_config &devconfig, const char *tag, write16_device_func func, const char *string, UINT32 mask) { internal_set_handler(devconfig, tag, func, string, mask); }
void set_handler(const device_config &devconfig, const char *tag, read16_device_func rfunc, const char *rstring, write16_device_func wfunc, const char *wstring, UINT32 mask) { internal_set_handler(devconfig, tag, rfunc, rstring, wfunc, wstring, mask); }
void set_handler(const device_config &devconfig, const char *tag, read16_proto_delegate func, UINT32 mask) { internal_set_handler(devconfig, tag, func, mask); }
void set_handler(const device_config &devconfig, const char *tag, write16_proto_delegate func, UINT32 mask) { internal_set_handler(devconfig, tag, func, mask); }
void set_handler(const device_config &devconfig, const char *tag, read16_proto_delegate rfunc, write16_proto_delegate wfunc, UINT32 mask) { internal_set_handler(devconfig, tag, rfunc, wfunc, mask); }
void set_handler(const device_config &devconfig, const char *tag, read16_delegate func, UINT32 mask) { internal_set_handler(devconfig, tag, func, mask); }
void set_handler(const device_config &devconfig, const char *tag, write16_delegate func, UINT32 mask) { internal_set_handler(devconfig, tag, func, mask); }
void set_handler(const device_config &devconfig, const char *tag, read16_delegate rfunc, write16_delegate wfunc, UINT32 mask) { internal_set_handler(devconfig, tag, rfunc, wfunc, mask); }
// 8-bit handlers
void set_handler(read8_space_func func, const char *string, UINT32 mask) { internal_set_handler(func, string, mask); }
@ -339,9 +339,9 @@ public:
void set_handler(const device_config &devconfig, const char *tag, read8_device_func func, const char *string, UINT32 mask) { internal_set_handler(devconfig, tag, func, string, mask); }
void set_handler(const device_config &devconfig, const char *tag, write8_device_func func, const char *string, UINT32 mask) { internal_set_handler(devconfig, tag, func, string, mask); }
void set_handler(const device_config &devconfig, const char *tag, read8_device_func rfunc, const char *rstring, write8_device_func wfunc, const char *wstring, UINT32 mask) { internal_set_handler(devconfig, tag, rfunc, rstring, wfunc, wstring, mask); }
void set_handler(const device_config &devconfig, const char *tag, read8_proto_delegate func, UINT32 mask) { internal_set_handler(devconfig, tag, func, mask); }
void set_handler(const device_config &devconfig, const char *tag, write8_proto_delegate func, UINT32 mask) { internal_set_handler(devconfig, tag, func, mask); }
void set_handler(const device_config &devconfig, const char *tag, read8_proto_delegate rfunc, write8_proto_delegate wfunc, UINT32 mask) { internal_set_handler(devconfig, tag, rfunc, wfunc, mask); }
void set_handler(const device_config &devconfig, const char *tag, read8_delegate func, UINT32 mask) { internal_set_handler(devconfig, tag, func, mask); }
void set_handler(const device_config &devconfig, const char *tag, write8_delegate func, UINT32 mask) { internal_set_handler(devconfig, tag, func, mask); }
void set_handler(const device_config &devconfig, const char *tag, read8_delegate rfunc, write8_delegate wfunc, UINT32 mask) { internal_set_handler(devconfig, tag, rfunc, wfunc, mask); }
};
@ -362,9 +362,9 @@ public:
void set_handler(const device_config &devconfig, const char *tag, read64_device_func func, const char *string) { internal_set_handler(devconfig, tag, func, string, 0); }
void set_handler(const device_config &devconfig, const char *tag, write64_device_func func, const char *string) { internal_set_handler(devconfig, tag, func, string, 0); }
void set_handler(const device_config &devconfig, const char *tag, read64_device_func rfunc, const char *rstring, write64_device_func wfunc, const char *wstring) { internal_set_handler(devconfig, tag, rfunc, rstring, wfunc, wstring, 0); }
void set_handler(const device_config &devconfig, const char *tag, read64_proto_delegate func) { internal_set_handler(devconfig, tag, func, 0); }
void set_handler(const device_config &devconfig, const char *tag, write64_proto_delegate func) { internal_set_handler(devconfig, tag, func, 0); }
void set_handler(const device_config &devconfig, const char *tag, read64_proto_delegate rfunc, write64_proto_delegate wfunc) { internal_set_handler(devconfig, tag, rfunc, wfunc, 0); }
void set_handler(const device_config &devconfig, const char *tag, read64_delegate func) { internal_set_handler(devconfig, tag, func, 0); }
void set_handler(const device_config &devconfig, const char *tag, write64_delegate func) { internal_set_handler(devconfig, tag, func, 0); }
void set_handler(const device_config &devconfig, const char *tag, read64_delegate rfunc, write64_delegate wfunc) { internal_set_handler(devconfig, tag, rfunc, wfunc, 0); }
// 32-bit handlers
void set_handler(read32_space_func func, const char *string, UINT64 mask) { internal_set_handler(func, string, mask); }
@ -373,9 +373,9 @@ public:
void set_handler(const device_config &devconfig, const char *tag, read32_device_func func, const char *string, UINT64 mask) { internal_set_handler(devconfig, tag, func, string, mask); }
void set_handler(const device_config &devconfig, const char *tag, write32_device_func func, const char *string, UINT64 mask) { internal_set_handler(devconfig, tag, func, string, mask); }
void set_handler(const device_config &devconfig, const char *tag, read32_device_func rfunc, const char *rstring, write32_device_func wfunc, const char *wstring, UINT64 mask) { internal_set_handler(devconfig, tag, rfunc, rstring, wfunc, wstring, mask); }
void set_handler(const device_config &devconfig, const char *tag, read32_proto_delegate func, UINT64 mask) { internal_set_handler(devconfig, tag, func, mask); }
void set_handler(const device_config &devconfig, const char *tag, write32_proto_delegate func, UINT64 mask) { internal_set_handler(devconfig, tag, func, mask); }
void set_handler(const device_config &devconfig, const char *tag, read32_proto_delegate rfunc, write32_proto_delegate wfunc, UINT64 mask) { internal_set_handler(devconfig, tag, rfunc, wfunc, mask); }
void set_handler(const device_config &devconfig, const char *tag, read32_delegate func, UINT64 mask) { internal_set_handler(devconfig, tag, func, mask); }
void set_handler(const device_config &devconfig, const char *tag, write32_delegate func, UINT64 mask) { internal_set_handler(devconfig, tag, func, mask); }
void set_handler(const device_config &devconfig, const char *tag, read32_delegate rfunc, write32_delegate wfunc, UINT64 mask) { internal_set_handler(devconfig, tag, rfunc, wfunc, mask); }
// 16-bit handlers
void set_handler(read16_space_func func, const char *string, UINT64 mask) { internal_set_handler(func, string, mask); }
@ -384,9 +384,9 @@ public:
void set_handler(const device_config &devconfig, const char *tag, read16_device_func func, const char *string, UINT64 mask) { internal_set_handler(devconfig, tag, func, string, mask); }
void set_handler(const device_config &devconfig, const char *tag, write16_device_func func, const char *string, UINT64 mask) { internal_set_handler(devconfig, tag, func, string, mask); }
void set_handler(const device_config &devconfig, const char *tag, read16_device_func rfunc, const char *rstring, write16_device_func wfunc, const char *wstring, UINT64 mask) { internal_set_handler(devconfig, tag, rfunc, rstring, wfunc, wstring, mask); }
void set_handler(const device_config &devconfig, const char *tag, read16_proto_delegate func, UINT64 mask) { internal_set_handler(devconfig, tag, func, mask); }
void set_handler(const device_config &devconfig, const char *tag, write16_proto_delegate func, UINT64 mask) { internal_set_handler(devconfig, tag, func, mask); }
void set_handler(const device_config &devconfig, const char *tag, read16_proto_delegate rfunc, write16_proto_delegate wfunc, UINT64 mask) { internal_set_handler(devconfig, tag, rfunc, wfunc, mask); }
void set_handler(const device_config &devconfig, const char *tag, read16_delegate func, UINT64 mask) { internal_set_handler(devconfig, tag, func, mask); }
void set_handler(const device_config &devconfig, const char *tag, write16_delegate func, UINT64 mask) { internal_set_handler(devconfig, tag, func, mask); }
void set_handler(const device_config &devconfig, const char *tag, read16_delegate rfunc, write16_delegate wfunc, UINT64 mask) { internal_set_handler(devconfig, tag, rfunc, wfunc, mask); }
// 8-bit handlers
void set_handler(read8_space_func func, const char *string, UINT64 mask) { internal_set_handler(func, string, mask); }
@ -395,9 +395,9 @@ public:
void set_handler(const device_config &devconfig, const char *tag, read8_device_func func, const char *string, UINT64 mask) { internal_set_handler(devconfig, tag, func, string, mask); }
void set_handler(const device_config &devconfig, const char *tag, write8_device_func func, const char *string, UINT64 mask) { internal_set_handler(devconfig, tag, func, string, mask); }
void set_handler(const device_config &devconfig, const char *tag, read8_device_func rfunc, const char *rstring, write8_device_func wfunc, const char *wstring, UINT64 mask) { internal_set_handler(devconfig, tag, rfunc, rstring, wfunc, wstring, mask); }
void set_handler(const device_config &devconfig, const char *tag, read8_proto_delegate func, UINT64 mask) { internal_set_handler(devconfig, tag, func, mask); }
void set_handler(const device_config &devconfig, const char *tag, write8_proto_delegate func, UINT64 mask) { internal_set_handler(devconfig, tag, func, mask); }
void set_handler(const device_config &devconfig, const char *tag, read8_proto_delegate rfunc, write8_proto_delegate wfunc, UINT64 mask) { internal_set_handler(devconfig, tag, rfunc, wfunc, mask); }
void set_handler(const device_config &devconfig, const char *tag, read8_delegate func, UINT64 mask) { internal_set_handler(devconfig, tag, func, mask); }
void set_handler(const device_config &devconfig, const char *tag, write8_delegate func, UINT64 mask) { internal_set_handler(devconfig, tag, func, mask); }
void set_handler(const device_config &devconfig, const char *tag, read8_delegate rfunc, write8_delegate wfunc, UINT64 mask) { internal_set_handler(devconfig, tag, rfunc, wfunc, mask); }
};
@ -461,8 +461,8 @@ public:
#define ADDRESS_MAP_START(_name, _space, _bits) \
void ADDRESS_MAP_NAME(_name)(address_map &map, const device_config &devconfig) \
{ \
typedef read##_bits##_proto_delegate read_proto_delegate; \
typedef write##_bits##_proto_delegate write_proto_delegate; \
typedef read##_bits##_delegate read_delegate; \
typedef write##_bits##_delegate write_delegate; \
address_map_entry##_bits *curentry = NULL; \
(void)curentry; \
map.configure(_space, _bits); \
@ -588,44 +588,44 @@ void ADDRESS_MAP_NAME(_name)(address_map &map, const device_config &devconfig) \
// device reads
#define AM_DEVREAD_MODERN(_tag, _class, _handler) \
curentry->set_handler(devconfig, _tag, read_proto_delegate::_create_member<_class, &_class::_handler>(#_class "::" #_handler)); \
curentry->set_handler(devconfig, _tag, read_delegate(&_class::_handler, #_class "::" #_handler, (_class *)0)); \
#define AM_DEVREAD8_MODERN(_tag, _class, _handler, _unitmask) \
curentry->set_handler(devconfig, _tag, read8_proto_delegate::_create_member<_class, &_class::_handler>(#_class "::" #_handler), _unitmask); \
curentry->set_handler(devconfig, _tag, read8_delegate(&_class::_handler, #_class "::" #_handler, (_class *)0), _unitmask); \
#define AM_DEVREAD16_MODERN(_tag, _class, _handler, _unitmask) \
curentry->set_handler(devconfig, _tag, read16_proto_delegate::_create_member<_class, &_class::_handler>(#_class "::" #_handler), _unitmask); \
curentry->set_handler(devconfig, _tag, read16_delegate(&_class::_handler, #_class "::" #_handler, (_class *)0), _unitmask); \
#define AM_DEVREAD32_MODERN(_tag, _class, _handler, _unitmask) \
curentry->set_handler(devconfig, _tag, read32_proto_delegate::_create_member<_class, &_class::_handler>(#_class "::" #_handler), _unitmask); \
curentry->set_handler(devconfig, _tag, read32_delegate(&_class::_handler, #_class "::" #_handler, (_class *)0), _unitmask); \
// device writes
#define AM_DEVWRITE_MODERN(_tag, _class, _handler) \
curentry->set_handler(devconfig, _tag, write_proto_delegate::_create_member<_class, &_class::_handler>(#_class "::" #_handler)); \
curentry->set_handler(devconfig, _tag, write_delegate(&_class::_handler, #_class "::" #_handler, (_class *)0)); \
#define AM_DEVWRITE8_MODERN(_tag, _class, _handler, _unitmask) \
curentry->set_handler(devconfig, _tag, write8_proto_delegate::_create_member<_class, &_class::_handler>(#_class "::" #_handler), _unitmask); \
curentry->set_handler(devconfig, _tag, write8_delegate(&_class::_handler, #_class "::" #_handler, (_class *)0), _unitmask); \
#define AM_DEVWRITE16_MODERN(_tag, _class, _handler, _unitmask) \
curentry->set_handler(devconfig, _tag, write16_proto_delegate::_create_member<_class, &_class::_handler>(#_class "::" #_handler), _unitmask); \
curentry->set_handler(devconfig, _tag, write16_delegate(&_class::_handler, #_class "::" #_handler, (_class *)0), _unitmask); \
#define AM_DEVWRITE32_MODERN(_tag, _class, _handler, _unitmask) \
curentry->set_handler(devconfig, _tag, write32_proto_delegate::_create_member<_class, &_class::_handler>(#_class "::" #_handler), _unitmask); \
curentry->set_handler(devconfig, _tag, write32_delegate(&_class::_handler, #_class "::" #_handler, (_class *)0), _unitmask); \
// device reads/writes
#define AM_DEVREADWRITE_MODERN(_tag, _class, _rhandler, _whandler) \
curentry->set_handler(devconfig, _tag, read_proto_delegate::_create_member<_class, &_class::_rhandler>(#_class "::" #_rhandler), write_proto_delegate::_create_member<_class, &_class::_whandler>(#_class "::" #_whandler)); \
curentry->set_handler(devconfig, _tag, read_delegate(&_class::_rhandler, #_class "::" #_rhandler, (_class *)0), write_delegate(&_class::_whandler, #_class "::" #_whandler, (_class *)0)); \
#define AM_DEVREADWRITE8_MODERN(_tag, _class, _rhandler, _whandler, _unitmask) \
curentry->set_handler(devconfig, _tag, read8_proto_delegate::_create_member<_class, &_class::_rhandler>(#_class "::" #_rhandler), write8_proto_delegate::_create_member<_class, &_class::_whandler>(#_class "::" #_whandler), _unitmask); \
curentry->set_handler(devconfig, _tag, read8_delegate(&_class::_rhandler, #_class "::" #_rhandler, (_class *)0), write8_delegate(&_class::_whandler, #_class "::" #_whandler, (_class *)0), _unitmask); \
#define AM_DEVREADWRITE16_MODERN(_tag, _class, _rhandler, _whandler, _unitmask) \
curentry->set_handler(devconfig, _tag, read16_proto_delegate::_create_member<_class, &_class::_rhandler>(#_class "::" #_rhandler), write16_proto_delegate::_create_member<_class, &_class::_whandler>(#_class "::" #_whandler), _unitmask); \
curentry->set_handler(devconfig, _tag, read16_delegate(&_class::_rhandler, #_class "::" #_rhandler, (_class *)0), write16_delegate(&_class::_whandler, #_class "::" #_whandler, (_class *)0), _unitmask); \
#define AM_DEVREADWRITE32_MODERN(_tag, _class, _rhandler, _whandler, _unitmask) \
curentry->set_handler(devconfig, _tag, read32_proto_delegate::_create_member<_class, &_class::_rhandler>(#_class "::" #_rhandler), write32_proto_delegate::_create_member<_class, &_class::_whandler>(#_class "::" #_whandler), _unitmask); \
curentry->set_handler(devconfig, _tag, read32_delegate(&_class::_rhandler, #_class "::" #_rhandler, (_class *)0), write32_delegate(&_class::_whandler, #_class "::" #_whandler, (_class *)0), _unitmask); \
// special-case accesses
@ -730,8 +730,8 @@ void ADDRESS_MAP_NAME(_name)(address_map &map, const device_config &devconfig) \
#define ADDRESS_MAP_START(_name, _space, _bits, _class) \
void ADDRESS_MAP_NAME(_name)(address_map &map, const device_config &devconfig) \
{ \
typedef read##_bits##_proto_delegate read_proto_delegate; \
typedef write##_bits##_proto_delegate write_proto_delegate; \
typedef read##_bits##_delegate read_delegate; \
typedef write##_bits##_delegate write_delegate; \
address_map_entry##_bits *curentry = NULL; \
(void)curentry; \
map.configure(_space, _bits); \
@ -858,128 +858,128 @@ void ADDRESS_MAP_NAME(_name)(address_map &map, const device_config &devconfig) \
// driver data base reads
#define AM_READ_BASE(_class, _handler) \
curentry->set_handler(devconfig, NULL, read_proto_delegate::_create_member<_class, &_class::_handler>("driver_data::" #_handler)); \
curentry->set_handler(devconfig, NULL, read_delegate(&_class::_handler, "driver_data::" #_handler, (_class *)0)); \
#define AM_READ8_BASE(_class, _handler, _unitmask) \
curentry->set_handler(devconfig, NULL, read8_proto_delegate::_create_member<_class, &_class::_handler>("driver_data::" #_handler), _unitmask); \
curentry->set_handler(devconfig, NULL, read8_delegate(&_class::_handler, "driver_data::" #_handler, (_class *)0), _unitmask); \
#define AM_READ16_BASE(_class, _handler, _unitmask) \
curentry->set_handler(devconfig, NULL, read16_proto_delegate::_create_member<_class, &_class::_handler>("driver_data::" #_handler), _unitmask); \
curentry->set_handler(devconfig, NULL, read16_delegate(&_class::_handler, "driver_data::" #_handler, (_class *)0), _unitmask); \
#define AM_READ32_BASE(_class, _handler, _unitmask) \
curentry->set_handler(devconfig, NULL, read32_proto_delegate::_create_member<_class, &_class::_handler>("driver_data::" #_handler), _unitmask); \
curentry->set_handler(devconfig, NULL, read32_delegate(&_class::_handler, "driver_data::" #_handler, (_class *)0), _unitmask); \
// driver data base writes
#define AM_WRITE_BASE(_class, _handler) \
curentry->set_handler(devconfig, NULL, write_proto_delegate::_create_member<_class, &_class::_handler>("driver_data::" #_handler)); \
curentry->set_handler(devconfig, NULL, write_delegate(&_class::_handler, "driver_data::" #_handler, (_class *)0)); \
#define AM_WRITE8_BASE(_class, _handler, _unitmask) \
curentry->set_handler(devconfig, NULL, write8_proto_delegate::_create_member<_class, &_class::_handler>("driver_data::" #_handler), _unitmask); \
curentry->set_handler(devconfig, NULL, write8_delegate(&_class::_handler, "driver_data::" #_handler, (_class *)0), _unitmask); \
#define AM_WRITE16_BASE(_class, _handler, _unitmask) \
curentry->set_handler(devconfig, NULL, write16_proto_delegate::_create_member<_class, &_class::_handler>("driver_data::" #_handler), _unitmask); \
curentry->set_handler(devconfig, NULL, write16_delegate(&_class::_handler, "driver_data::" #_handler, (_class *)0), _unitmask); \
#define AM_WRITE32_BASE(_class, _handler, _unitmask) \
curentry->set_handler(devconfig, NULL, write32_proto_delegate::_create_member<_class, &_class::_handler>("driver_data::" #_handler), _unitmask); \
curentry->set_handler(devconfig, NULL, write32_delegate(&_class::_handler, "driver_data::" #_handler, (_class *)0), _unitmask); \
// driver data base reads/writes
#define AM_READWRITE_BASE(_class, _rhandler, _whandler) \
curentry->set_handler(devconfig, NULL, read_proto_delegate::_create_member<_class, &_class::_rhandler>("driver_data::" #_rhandler), write_proto_delegate::_create_member<_class, &_class::_whandler>("driver_data::" #_whandler)); \
curentry->set_handler(devconfig, NULL, read_delegate(&_class::_rhandler, "driver_data::" #_rhandler, (_class *)0), write_delegate(&_class::_whandler, "driver_data::" #_whandler, (_class *)0)); \
#define AM_READWRITE8_BASE(_class, _rhandler, _whandler, _unitmask) \
curentry->set_handler(devconfig, NULL, read8_proto_delegate::_create_member<_class, &_class::_rhandler>("driver_data::" #_rhandler), write8_proto_delegate::_create_member<_class, &_class::_whandler>("driver_data::" #_whandler), _unitmask); \
curentry->set_handler(devconfig, NULL, read8_delegate(&_class::_rhandler, "driver_data::" #_rhandler, (_class *)0), write8_delegate(&_class::_whandler, "driver_data::" #_whandler, (_class *)0), _unitmask); \
#define AM_READWRITE16_BASE(_class, _rhandler, _whandler, _unitmask) \
curentry->set_handler(devconfig, NULL, read16_proto_delegate::_create_member<_class, &_class::_rhandler>("driver_data::" #_rhandler), write16_proto_delegate::_create_member<_class, &_class::_whandler>("driver_data::" #_whandler), _unitmask); \
curentry->set_handler(devconfig, NULL, read16_delegate(&_class::_rhandler, "driver_data::" #_rhandler, (_class *)0), write16_delegate(&_class::_whandler, "driver_data::" #_whandler, (_class *)0), _unitmask); \
#define AM_READWRITE32_BASE(_class, _rhandler, _whandler, _unitmask) \
curentry->set_handler(devconfig, NULL, read32_proto_delegate::_create_member<_class, &_class::_rhandler>("driver_data::" #_rhandler), write32_proto_delegate::_create_member<_class, &_class::_whandler>("driver_data::" #_whandler), _unitmask); \
curentry->set_handler(devconfig, NULL, read32_delegate(&_class::_rhandler, "driver_data::" #_rhandler, (_class *)0), write32_delegate(&_class::_whandler, "driver_data::" #_whandler, (_class *)0), _unitmask); \
// driver data reads
#define AM_READ(_handler) \
curentry->set_handler(devconfig, NULL, read_proto_delegate::_create_member<drivdata_class, &drivdata_class::_handler>("driver_data::" #_handler)); \
curentry->set_handler(devconfig, NULL, read_delegate(&drivdata_class::_handler, "driver_data::" #_handler, (drivdata_class *)0)); \
#define AM_READ8(_handler, _unitmask) \
curentry->set_handler(devconfig, NULL, read8_proto_delegate::_create_member<drivdata_class, &drivdata_class::_handler>("driver_data::" #_handler), _unitmask); \
curentry->set_handler(devconfig, NULL, read8_delegate(&drivdata_class::_handler, "driver_data::" #_handler, (drivdata_class *)0), _unitmask); \
#define AM_READ16(_handler, _unitmask) \
curentry->set_handler(devconfig, NULL, read16_proto_delegate::_create_member<drivdata_class, &drivdata_class::_handler>("driver_data::" #_handler), _unitmask); \
curentry->set_handler(devconfig, NULL, read16_delegate(&drivdata_class::_handler, "driver_data::" #_handler, (drivdata_class *)0), _unitmask); \
#define AM_READ32(_handler, _unitmask) \
curentry->set_handler(devconfig, NULL, read32_proto_delegate::_create_member<drivdata_class, &drivdata_class::_handler>("driver_data::" #_handler), _unitmask); \
curentry->set_handler(devconfig, NULL, read32_delegate(&drivdata_class::_handler, "driver_data::" #_handler, (drivdata_class *)0), _unitmask); \
// driver data writes
#define AM_WRITE(_handler) \
curentry->set_handler(devconfig, NULL, write_proto_delegate::_create_member<drivdata_class, &drivdata_class::_handler>("driver_data::" #_handler)); \
curentry->set_handler(devconfig, NULL, write_delegate(&drivdata_class::_handler, "driver_data::" #_handler, (drivdata_class *)0)); \
#define AM_WRITE8(_handler, _unitmask) \
curentry->set_handler(devconfig, NULL, write8_proto_delegate::_create_member<drivdata_class, &drivdata_class::_handler>("driver_data::" #_handler), _unitmask); \
curentry->set_handler(devconfig, NULL, write8_delegate(&drivdata_class::_handler, "driver_data::" #_handler, (drivdata_class *)0), _unitmask); \
#define AM_WRITE16(_handler, _unitmask) \
curentry->set_handler(devconfig, NULL, write16_proto_delegate::_create_member<drivdata_class, &drivdata_class::_handler>("driver_data::" #_handler), _unitmask); \
curentry->set_handler(devconfig, NULL, write16_delegate(&drivdata_class::_handler, "driver_data::" #_handler, (drivdata_class *)0), _unitmask); \
#define AM_WRITE32(_handler, _unitmask) \
curentry->set_handler(devconfig, NULL, write32_proto_delegate::_create_member<drivdata_class, &drivdata_class::_handler>("driver_data::" #_handler), _unitmask); \
curentry->set_handler(devconfig, NULL, write32_delegate(&drivdata_class::_handler, "driver_data::" #_handler, (drivdata_class *)0), _unitmask); \
// driver data reads/writes
#define AM_READWRITE(_rhandler, _whandler) \
curentry->set_handler(devconfig, NULL, read_proto_delegate::_create_member<drivdata_class, &drivdata_class::_rhandler>("driver_data::" #_rhandler), write_proto_delegate::_create_member<drivdata_class, &drivdata_class::_whandler>("driver_data::" #_whandler)); \
curentry->set_handler(devconfig, NULL, read_delegate(&drivdata_class::_rhandler, "driver_data::" #_rhandler, (drivdata_class *)0), write_delegate(&drivdata_class::_whandler, "driver_data::" #_whandler, (drivdata_class *)0)); \
#define AM_READWRITE8(_rhandler, _whandler, _unitmask) \
curentry->set_handler(devconfig, NULL, read8_proto_delegate::_create_member<drivdata_class, &drivdata_class::_rhandler>("driver_data::" #_rhandler), write8_proto_delegate::_create_member<drivdata_class, &drivdata_class::_whandler>("driver_data::" #_whandler), _unitmask); \
curentry->set_handler(devconfig, NULL, read8_delegate(&drivdata_class::_rhandler, "driver_data::" #_rhandler, (drivdata_class *)0), write8_delegate(&drivdata_class::_whandler, "driver_data::" #_whandler, (drivdata_class *)0), _unitmask); \
#define AM_READWRITE16(_rhandler, _whandler, _unitmask) \
curentry->set_handler(devconfig, NULL, read16_proto_delegate::_create_member<drivdata_class, &drivdata_class::_rhandler>("driver_data::" #_rhandler), write16_proto_delegate::_create_member<drivdata_class, &drivdata_class::_whandler>("driver_data::" #_whandler), _unitmask); \
curentry->set_handler(devconfig, NULL, read16_delegate(&drivdata_class::_rhandler, "driver_data::" #_rhandler, (drivdata_class *)0), write16_delegate(&drivdata_class::_whandler, "driver_data::" #_whandler, (drivdata_class *)0), _unitmask); \
#define AM_READWRITE32(_rhandler, _whandler, _unitmask) \
curentry->set_handler(devconfig, NULL, read32_proto_delegate::_create_member<drivdata_class, &drivdata_class::_rhandler>("driver_data::" #_rhandler), write32_proto_delegate::_create_member<drivdata_class, &drivdata_class::_whandler>("driver_data::" #_whandler), _unitmask); \
curentry->set_handler(devconfig, NULL, read32_delegate(&drivdata_class::_rhandler, "driver_data::" #_rhandler, (drivdata_class *)0), write32_delegate(&drivdata_class::_whandler, "driver_data::" #_whandler, (drivdata_class *)0), _unitmask); \
// device reads
#define AM_DEVREAD(_tag, _class, _handler) \
curentry->set_handler(devconfig, _tag, read_proto_delegate::_create_member<_class, &_class::_handler>(#_class "::" #_handler)); \
curentry->set_handler(devconfig, _tag, read_delegate(&_class::_handler, #_class "::" #_handler, (_class *)0)); \
#define AM_DEVREAD8(_tag, _class, _handler, _unitmask) \
curentry->set_handler(devconfig, _tag, read8_proto_delegate::_create_member<_class, &_class::_handler>(#_class "::" #_handler), _unitmask); \
curentry->set_handler(devconfig, _tag, read8_delegate(&_class::_handler, #_class "::" #_handler, (_class *)0), _unitmask); \
#define AM_DEVREAD16(_tag, _class, _handler, _unitmask) \
curentry->set_handler(devconfig, _tag, read16_proto_delegate::_create_member<_class, &_class::_handler>(#_class "::" #_handler), _unitmask); \
curentry->set_handler(devconfig, _tag, read16_delegate(&_class::_handler, #_class "::" #_handler, (_class *)0), _unitmask); \
#define AM_DEVREAD32(_tag, _class, _handler, _unitmask) \
curentry->set_handler(devconfig, _tag, read32_proto_delegate::_create_member<_class, &_class::_handler>(#_class "::" #_handler), _unitmask); \
curentry->set_handler(devconfig, _tag, read32_delegate(&_class::_handler, #_class "::" #_handler, (_class *)0), _unitmask); \
// device writes
#define AM_DEVWRITE(_tag, _class, _handler) \
curentry->set_handler(devconfig, _tag, write_proto_delegate::_create_member<_class, &_class::_handler>(#_class "::" #_handler)); \
curentry->set_handler(devconfig, _tag, write_delegate(&_class::_handler, #_class "::" #_handler, (_class *)0)); \
#define AM_DEVWRITE8(_tag, _class, _handler, _unitmask) \
curentry->set_handler(devconfig, _tag, write8_proto_delegate::_create_member<_class, &_class::_handler>(#_class "::" #_handler), _unitmask); \
curentry->set_handler(devconfig, _tag, write8_delegate(&_class::_handler, #_class "::" #_handler, (_class *)0), _unitmask); \
#define AM_DEVWRITE16(_tag, _class, _handler, _unitmask) \
curentry->set_handler(devconfig, _tag, write16_proto_delegate::_create_member<_class, &_class::_handler>(#_class "::" #_handler), _unitmask); \
curentry->set_handler(devconfig, _tag, write16_delegate(&_class::_handler, #_class "::" #_handler, (_class *)0), _unitmask); \
#define AM_DEVWRITE32(_tag, _class, _handler, _unitmask) \
curentry->set_handler(devconfig, _tag, write32_proto_delegate::_create_member<_class, &_class::_handler>(#_class "::" #_handler), _unitmask); \
curentry->set_handler(devconfig, _tag, write32_delegate(&_class::_handler, #_class "::" #_handler, (_class *)0), _unitmask); \
// device reads/writes
#define AM_DEVREADWRITE(_tag, _class, _rhandler, _whandler) \
curentry->set_handler(devconfig, _tag, read_proto_delegate::_create_member<_class, &_class::_rhandler>(#_class "::" #_rhandler), write_proto_delegate::_create_member<_class, &_class::_whandler>(#_class "::" #_whandler)); \
curentry->set_handler(devconfig, _tag, read_delegate(&_class::_rhandler, #_class "::" #_rhandler, (_class *)0), write_delegate(&_class::_whandler, #_class "::" #_whandler, (_class *)0)); \
#define AM_DEVREADWRITE8(_tag, _class, _rhandler, _whandler, _unitmask) \
curentry->set_handler(devconfig, _tag, read8_proto_delegate::_create_member<_class, &_class::_rhandler>(#_class "::" #_rhandler), write8_proto_delegate::_create_member<_class, &_class::_whandler>(#_class "::" #_whandler), _unitmask); \
curentry->set_handler(devconfig, _tag, read8_delegate(&_class::_rhandler, #_class "::" #_rhandler, (_class *)0), write8_delegate(&_class::_whandler, #_class "::" #_whandler, (_class *)0), _unitmask); \
#define AM_DEVREADWRITE16(_tag, _class, _rhandler, _whandler, _unitmask) \
curentry->set_handler(devconfig, _tag, read16_proto_delegate::_create_member<_class, &_class::_rhandler>(#_class "::" #_rhandler), write16_proto_delegate::_create_member<_class, &_class::_whandler>(#_class "::" #_whandler), _unitmask); \
curentry->set_handler(devconfig, _tag, read16_delegate(&_class::_rhandler, #_class "::" #_rhandler, (_class *)0), write16_delegate(&_class::_whandler, #_class "::" #_whandler, (_class *)0), _unitmask); \
#define AM_DEVREADWRITE32(_tag, _class, _rhandler, _whandler, _unitmask) \
curentry->set_handler(devconfig, _tag, read32_proto_delegate::_create_member<_class, &_class::_rhandler>(#_class "::" #_rhandler), write32_proto_delegate::_create_member<_class, &_class::_whandler>(#_class "::" #_whandler), _unitmask); \
curentry->set_handler(devconfig, _tag, read32_delegate(&_class::_rhandler, #_class "::" #_rhandler, (_class *)0), write32_delegate(&_class::_whandler, #_class "::" #_whandler, (_class *)0), _unitmask); \
// special-case accesses

View File

@ -238,7 +238,7 @@ static CPU_INIT( dsp56k )
/* Setup the direct memory handler for this CPU */
/* NOTE: Be sure to grab this guy and call him if you ever install another direct_update_hander in a driver! */
const_cast<address_space *>(cpustate->program)->set_direct_update_handler(direct_update_delegate_create_static(dsp56k_direct_handler, device->machine()));
cpustate->program->set_direct_update_handler(direct_update_delegate(FUNC(dsp56k_direct_handler), &device->machine()));
}

View File

@ -1084,13 +1084,13 @@ void m68k_memory_interface::init8(address_space &space)
m_cpustate = get_safe_token(&space.device());
opcode_xor = 0;
readimm16 = m68k_readimm16_delegate(m68k_readimm16_proto_delegate::create_member(m68k_memory_interface, m68008_read_immediate_16), *this);
read8 = m68k_read8_delegate(m68k_read8_proto_delegate::create_member(address_space, read_byte), space);
read16 = m68k_read16_delegate(m68k_read16_proto_delegate::create_member(address_space, read_word), space);
read32 = m68k_read32_delegate(m68k_read32_proto_delegate::create_member(address_space, read_dword), space);
write8 = m68k_write8_delegate(m68k_write8_proto_delegate::create_member(address_space, write_byte), space);
write16 = m68k_write16_delegate(m68k_write16_proto_delegate::create_member(address_space, write_word), space);
write32 = m68k_write32_delegate(m68k_write32_proto_delegate::create_member(address_space, write_dword), space);
readimm16 = m68k_readimm16_delegate(FUNC(m68k_memory_interface::m68008_read_immediate_16), this);
read8 = m68k_read8_delegate(FUNC(address_space::read_byte), &space);
read16 = m68k_read16_delegate(FUNC(address_space::read_word), &space);
read32 = m68k_read32_delegate(FUNC(address_space::read_dword), &space);
write8 = m68k_write8_delegate(FUNC(address_space::write_byte), &space);
write16 = m68k_write16_delegate(FUNC(address_space::write_word), &space);
write32 = m68k_write32_delegate(FUNC(address_space::write_dword), &space);
}
/****************************************************************************
@ -1114,13 +1114,13 @@ void m68k_memory_interface::init16(address_space &space)
m_cpustate = get_safe_token(&space.device());
opcode_xor = 0;
readimm16 = m68k_readimm16_delegate(m68k_readimm16_proto_delegate::create_member(m68k_memory_interface, simple_read_immediate_16), *this);
read8 = m68k_read8_delegate(m68k_read8_proto_delegate::create_member(address_space, read_byte), space);
read16 = m68k_read16_delegate(m68k_read16_proto_delegate::create_member(address_space, read_word), space);
read32 = m68k_read32_delegate(m68k_read32_proto_delegate::create_member(address_space, read_dword), space);
write8 = m68k_write8_delegate(m68k_write8_proto_delegate::create_member(address_space, write_byte), space);
write16 = m68k_write16_delegate(m68k_write16_proto_delegate::create_member(address_space, write_word), space);
write32 = m68k_write32_delegate(m68k_write32_proto_delegate::create_member(address_space, write_dword), space);
readimm16 = m68k_readimm16_delegate(FUNC(m68k_memory_interface::simple_read_immediate_16), this);
read8 = m68k_read8_delegate(FUNC(address_space::read_byte), &space);
read16 = m68k_read16_delegate(FUNC(address_space::read_word), &space);
read32 = m68k_read32_delegate(FUNC(address_space::read_dword), &space);
write8 = m68k_write8_delegate(FUNC(address_space::write_byte), &space);
write16 = m68k_write16_delegate(FUNC(address_space::write_word), &space);
write32 = m68k_write32_delegate(FUNC(address_space::write_dword), &space);
}
/****************************************************************************
@ -1135,13 +1135,13 @@ void m68k_memory_interface::init32(address_space &space)
m_cpustate = get_safe_token(&space.device());
opcode_xor = WORD_XOR_BE(0);
readimm16 = m68k_readimm16_delegate(m68k_readimm16_proto_delegate::create_member(m68k_memory_interface, read_immediate_16), *this);
read8 = m68k_read8_delegate(m68k_read8_proto_delegate::create_member(address_space, read_byte), space);
read16 = m68k_read16_delegate(m68k_read16_proto_delegate::create_member(address_space, read_word_unaligned), space);
read32 = m68k_read32_delegate(m68k_read32_proto_delegate::create_member(address_space, read_dword_unaligned), space);
write8 = m68k_write8_delegate(m68k_write8_proto_delegate::create_member(address_space, write_byte), space);
write16 = m68k_write16_delegate(m68k_write16_proto_delegate::create_member(address_space, write_word_unaligned), space);
write32 = m68k_write32_delegate(m68k_write32_proto_delegate::create_member(address_space, write_dword_unaligned), space);
readimm16 = m68k_readimm16_delegate(FUNC(m68k_memory_interface::read_immediate_16), this);
read8 = m68k_read8_delegate(FUNC(address_space::read_byte), &space);
read16 = m68k_read16_delegate(FUNC(address_space::read_word_unaligned), &space);
read32 = m68k_read32_delegate(FUNC(address_space::read_dword_unaligned), &space);
write8 = m68k_write8_delegate(FUNC(address_space::write_byte), &space);
write16 = m68k_write16_delegate(FUNC(address_space::write_word_unaligned), &space);
write32 = m68k_write32_delegate(FUNC(address_space::write_dword_unaligned), &space);
}
/* interface for 32-bit data bus with PMMU (68EC020, 68020) */
@ -1353,13 +1353,13 @@ void m68k_memory_interface::init32mmu(address_space &space)
m_cpustate = get_safe_token(&space.device());
opcode_xor = WORD_XOR_BE(0);
readimm16 = m68k_readimm16_delegate(m68k_readimm16_proto_delegate::create_member(m68k_memory_interface, read_immediate_16_mmu), *this);
read8 = m68k_read8_delegate(m68k_read8_proto_delegate::create_member(m68k_memory_interface, read_byte_32_mmu), *this);
read16 = m68k_read16_delegate(m68k_read16_proto_delegate::create_member(m68k_memory_interface, readword_d32_mmu), *this);
read32 = m68k_read32_delegate(m68k_read32_proto_delegate::create_member(m68k_memory_interface, readlong_d32_mmu), *this);
write8 = m68k_write8_delegate(m68k_write8_proto_delegate::create_member(m68k_memory_interface, write_byte_32_mmu), *this);
write16 = m68k_write16_delegate(m68k_write16_proto_delegate::create_member(m68k_memory_interface, writeword_d32_mmu), *this);
write32 = m68k_write32_delegate(m68k_write32_proto_delegate::create_member(m68k_memory_interface, writelong_d32_mmu), *this);
readimm16 = m68k_readimm16_delegate(FUNC(m68k_memory_interface::read_immediate_16_mmu), this);
read8 = m68k_read8_delegate(FUNC(m68k_memory_interface::read_byte_32_mmu), this);
read16 = m68k_read16_delegate(FUNC(m68k_memory_interface::readword_d32_mmu), this);
read32 = m68k_read32_delegate(FUNC(m68k_memory_interface::readlong_d32_mmu), this);
write8 = m68k_write8_delegate(FUNC(m68k_memory_interface::write_byte_32_mmu), this);
write16 = m68k_write16_delegate(FUNC(m68k_memory_interface::writeword_d32_mmu), this);
write32 = m68k_write32_delegate(FUNC(m68k_memory_interface::writelong_d32_mmu), this);
}
@ -1480,13 +1480,13 @@ void m68k_memory_interface::init32hmmu(address_space &space)
m_cpustate = get_safe_token(&space.device());
opcode_xor = WORD_XOR_BE(0);
readimm16 = m68k_readimm16_delegate(m68k_readimm16_proto_delegate::create_member(m68k_memory_interface, read_immediate_16_hmmu), *this);
read8 = m68k_read8_delegate(m68k_read8_proto_delegate::create_member(m68k_memory_interface, read_byte_32_hmmu), *this);
read16 = m68k_read16_delegate(m68k_read16_proto_delegate::create_member(m68k_memory_interface, readword_d32_hmmu), *this);
read32 = m68k_read32_delegate(m68k_read32_proto_delegate::create_member(m68k_memory_interface, readlong_d32_hmmu), *this);
write8 = m68k_write8_delegate(m68k_write8_proto_delegate::create_member(m68k_memory_interface, write_byte_32_hmmu), *this);
write16 = m68k_write16_delegate(m68k_write16_proto_delegate::create_member(m68k_memory_interface, writeword_d32_hmmu), *this);
write32 = m68k_write32_delegate(m68k_write32_proto_delegate::create_member(m68k_memory_interface, writelong_d32_hmmu), *this);
readimm16 = m68k_readimm16_delegate(FUNC(m68k_memory_interface::read_immediate_16_hmmu), this);
read8 = m68k_read8_delegate(FUNC(m68k_memory_interface::read_byte_32_hmmu), this);
read16 = m68k_read16_delegate(FUNC(m68k_memory_interface::readword_d32_hmmu), this);
read32 = m68k_read32_delegate(FUNC(m68k_memory_interface::readlong_d32_hmmu), this);
write8 = m68k_write8_delegate(FUNC(m68k_memory_interface::write_byte_32_hmmu), this);
write16 = m68k_write16_delegate(FUNC(m68k_memory_interface::writeword_d32_hmmu), this);
write32 = m68k_write32_delegate(FUNC(m68k_memory_interface::writelong_d32_hmmu), this);
}
void m68k_set_reset_callback(device_t *device, m68k_reset_func callback)

View File

@ -546,21 +546,13 @@ union _fp_reg
/* Redirect memory calls */
typedef proto_delegate_1param<UINT8, offs_t> m68k_read8_proto_delegate;
typedef proto_delegate_1param<UINT16, offs_t> m68k_readimm16_proto_delegate;
typedef proto_delegate_1param<UINT16, offs_t> m68k_read16_proto_delegate;
typedef proto_delegate_1param<UINT32, offs_t> m68k_read32_proto_delegate;
typedef proto_delegate_2param<void, offs_t, UINT8> m68k_write8_proto_delegate;
typedef proto_delegate_2param<void, offs_t, UINT16> m68k_write16_proto_delegate;
typedef proto_delegate_2param<void, offs_t, UINT32> m68k_write32_proto_delegate;
typedef delegate_1param<UINT8, offs_t> m68k_read8_delegate;
typedef delegate_1param<UINT16, offs_t> m68k_readimm16_delegate;
typedef delegate_1param<UINT16, offs_t> m68k_read16_delegate;
typedef delegate_1param<UINT32, offs_t> m68k_read32_delegate;
typedef delegate_2param<void, offs_t, UINT8> m68k_write8_delegate;
typedef delegate_2param<void, offs_t, UINT16> m68k_write16_delegate;
typedef delegate_2param<void, offs_t, UINT32> m68k_write32_delegate;
typedef delegate<UINT8 (offs_t)> m68k_read8_delegate;
typedef delegate<UINT16 (offs_t)> m68k_readimm16_delegate;
typedef delegate<UINT16 (offs_t)> m68k_read16_delegate;
typedef delegate<UINT32 (offs_t)> m68k_read32_delegate;
typedef delegate<void (offs_t, UINT8)> m68k_write8_delegate;
typedef delegate<void (offs_t, UINT16)> m68k_write16_delegate;
typedef delegate<void (offs_t, UINT32)> m68k_write32_delegate;
class m68k_memory_interface : public bindable_object
{

View File

@ -70,28 +70,24 @@ bindable_object::~bindable_object()
#if (USE_DELEGATE_TYPE == DELEGATE_TYPE_INTERNAL)
// NULL structure used in dummy constructor
delegate_gcc_mfp_internal delegate_gcc_mfp_null;
//-------------------------------------------------
// delegate_convert_raw - given an object and
// an raw function, adjust the object base and
// return the actual final code pointer
//-------------------------------------------------
delegate_generic_function delegate_convert_raw(delegate_generic_class *&object, delegate_gcc_mfp_internal &mfp)
delegate_generic_function delegate_internal_mfp::convert_to_generic(delegate_generic_class *&object) const
{
// apply the "this" delta to the object first
object = reinterpret_cast<delegate_generic_class *>(reinterpret_cast<UINT8 *>(object) + mfp.this_delta);
object = reinterpret_cast<delegate_generic_class *>(reinterpret_cast<UINT8 *>(object) + m_this_delta);
// if the low bit of the vtable index is clear, then it is just a raw function pointer
if (!(mfp.u.vtable_index & 1))
return mfp.u.funcptr;
if (!(m_function & 1))
return reinterpret_cast<delegate_generic_function>(m_function);
// otherwise, it is the byte index into the vtable where the actual function lives
UINT8 *vtable_base = *reinterpret_cast<UINT8 **>(object);
return *reinterpret_cast<delegate_generic_function *>(vtable_base + mfp.u.vtable_index - 1);
return *reinterpret_cast<delegate_generic_function *>(vtable_base + m_function - 1);
}
#endif

File diff suppressed because it is too large Load Diff

View File

@ -202,7 +202,8 @@ inline void operator--(_Type &value, int) { value = (_Type)((int)value - 1); }
#define NAME(x) x, #x
// this macro wraps a function 'x' and can be used to pass a function followed by its name
#define FUNC(x) x, #x
#define FUNC(x) &x, #x
#define FUNC_NULL NULL, "(null)"
// this macro wraps a member function 'x' from class 'c'
#define MFUNC(c,x) &c::x, #c "::" #x

View File

@ -1851,7 +1851,7 @@ static DEVICE_START( ide_controller )
}
/* create a timer for timing status */
ide->last_status_timer = device->machine().scheduler().timer_alloc(FUNC(NULL));
ide->last_status_timer = device->machine().scheduler().timer_alloc(FUNC_NULL);
ide->reset_timer = device->machine().scheduler().timer_alloc(FUNC(reset_callback), (void *)device);
/* register ide states */

View File

@ -104,7 +104,7 @@ void nvram_device_config::static_set_default_value(device_config *device, defaul
// helper to set a custom callback
//-------------------------------------------------
void nvram_device_config::static_set_custom_handler(device_config *device, nvram_init_proto_delegate handler)
void nvram_device_config::static_set_custom_handler(device_config *device, nvram_init_delegate handler)
{
nvram_device_config *nvram = downcast<nvram_device_config *>(device);
nvram->m_default_value = DEFAULT_CUSTOM;
@ -139,7 +139,7 @@ void nvram_device::device_start()
{
// bind our handler
if (!m_config.m_custom_handler.isnull())
m_custom_handler = nvram_init_delegate(m_config.m_custom_handler, *m_owner);
m_custom_handler = nvram_init_delegate(m_config.m_custom_handler, m_owner);
}

View File

@ -66,7 +66,7 @@
#define MCFG_NVRAM_ADD_CUSTOM(_tag, _class, _method) \
MCFG_DEVICE_ADD(_tag, NVRAM, 0) \
nvram_device_config::static_set_custom_handler(device, nvram_init_proto_delegate::_create_member<_class, &_class::_method>(#_class "::" #_method)); \
nvram_device_config::static_set_custom_handler(device, nvram_init_delegate(&_class::_method, #_class "::" #_method, (_class *)0)); \
#define MCFG_NVRAM_REPLACE_0FILL(_tag) \
@ -83,7 +83,7 @@
#define MCFG_NVRAM_REPLACE_CUSTOM(_tag, _class, _method) \
MCFG_DEVICE_REPLACE(_tag, NVRAM, 0) \
nvram_device_config::static_set_custom_handler(device, nvram_init_proto_delegate::_create_member<_class, &_class::_method>(#_class "::" #_method)); \
nvram_device_config::static_set_custom_handler(device, nvram_init_delegate(&_class::_method, #_class "::" #_method, (_class *)0)); \
@ -95,8 +95,7 @@ class nvram_device;
// custom initialization for default state
typedef proto_delegate_3param<void, nvram_device &, void *, size_t> nvram_init_proto_delegate;
typedef delegate_3param<void, nvram_device &, void *, size_t> nvram_init_delegate;
typedef delegate<void (nvram_device &, void *, size_t)> nvram_init_delegate;
// ======================> nvram_device_config
@ -126,12 +125,12 @@ public:
// inline configuration helpers
static void static_set_default_value(device_config *device, default_value value);
static void static_set_custom_handler(device_config *device, nvram_init_proto_delegate callback);
static void static_set_custom_handler(device_config *device, nvram_init_delegate callback);
protected:
// internal state
default_value m_default_value;
nvram_init_proto_delegate m_custom_handler;
nvram_init_delegate m_custom_handler;
};

View File

@ -2082,18 +2082,18 @@ void address_space::populate_map_entry(const address_map_entry &entry, read_or_w
if (readorwrite == ROW_READ)
switch (data.m_bits)
{
case 8: install_read_handler(entry.m_addrstart, entry.m_addrend, entry.m_addrmask, entry.m_addrmirror, read8_delegate(entry.m_rproto8, *object), data.m_mask); break;
case 16: install_read_handler(entry.m_addrstart, entry.m_addrend, entry.m_addrmask, entry.m_addrmirror, read16_delegate(entry.m_rproto16, *object), data.m_mask); break;
case 32: install_read_handler(entry.m_addrstart, entry.m_addrend, entry.m_addrmask, entry.m_addrmirror, read32_delegate(entry.m_rproto32, *object), data.m_mask); break;
case 64: install_read_handler(entry.m_addrstart, entry.m_addrend, entry.m_addrmask, entry.m_addrmirror, read64_delegate(entry.m_rproto64, *object), data.m_mask); break;
case 8: install_read_handler(entry.m_addrstart, entry.m_addrend, entry.m_addrmask, entry.m_addrmirror, read8_delegate(entry.m_rproto8, object), data.m_mask); break;
case 16: install_read_handler(entry.m_addrstart, entry.m_addrend, entry.m_addrmask, entry.m_addrmirror, read16_delegate(entry.m_rproto16, object), data.m_mask); break;
case 32: install_read_handler(entry.m_addrstart, entry.m_addrend, entry.m_addrmask, entry.m_addrmirror, read32_delegate(entry.m_rproto32, object), data.m_mask); break;
case 64: install_read_handler(entry.m_addrstart, entry.m_addrend, entry.m_addrmask, entry.m_addrmirror, read64_delegate(entry.m_rproto64, object), data.m_mask); break;
}
else
switch (data.m_bits)
{
case 8: install_write_handler(entry.m_addrstart, entry.m_addrend, entry.m_addrmask, entry.m_addrmirror, write8_delegate(entry.m_wproto8, *object), data.m_mask); break;
case 16: install_write_handler(entry.m_addrstart, entry.m_addrend, entry.m_addrmask, entry.m_addrmirror, write16_delegate(entry.m_wproto16, *object), data.m_mask); break;
case 32: install_write_handler(entry.m_addrstart, entry.m_addrend, entry.m_addrmask, entry.m_addrmirror, write32_delegate(entry.m_wproto32, *object), data.m_mask); break;
case 64: install_write_handler(entry.m_addrstart, entry.m_addrend, entry.m_addrmask, entry.m_addrmirror, write64_delegate(entry.m_wproto64, *object), data.m_mask); break;
case 8: install_write_handler(entry.m_addrstart, entry.m_addrend, entry.m_addrmask, entry.m_addrmirror, write8_delegate(entry.m_wproto8, object), data.m_mask); break;
case 16: install_write_handler(entry.m_addrstart, entry.m_addrend, entry.m_addrmask, entry.m_addrmirror, write16_delegate(entry.m_wproto16, object), data.m_mask); break;
case 32: install_write_handler(entry.m_addrstart, entry.m_addrend, entry.m_addrmask, entry.m_addrmirror, write32_delegate(entry.m_wproto32, object), data.m_mask); break;
case 64: install_write_handler(entry.m_addrstart, entry.m_addrend, entry.m_addrmask, entry.m_addrmirror, write64_delegate(entry.m_wproto64, object), data.m_mask); break;
}
break;
@ -3743,30 +3743,30 @@ address_table_read::address_table_read(address_space &space, bool large)
{
// 8-bit case
case 8:
m_handlers[STATIC_UNMAP]->set_delegate(read8_delegate_create(address_table_read, unmap_r<UINT8>, *this));
m_handlers[STATIC_NOP]->set_delegate(read8_delegate_create(address_table_read, nop_r<UINT8>, *this));
m_handlers[STATIC_WATCHPOINT]->set_delegate(read8_delegate_create(address_table_read, watchpoint_r<UINT8>, *this));
m_handlers[STATIC_UNMAP]->set_delegate(read8_delegate(FUNC(address_table_read::unmap_r<UINT8>), this));
m_handlers[STATIC_NOP]->set_delegate(read8_delegate(FUNC(address_table_read::nop_r<UINT8>), this));
m_handlers[STATIC_WATCHPOINT]->set_delegate(read8_delegate(FUNC(address_table_read::watchpoint_r<UINT8>), this));
break;
// 16-bit case
case 16:
m_handlers[STATIC_UNMAP]->set_delegate(read16_delegate_create(address_table_read, unmap_r<UINT16>, *this));
m_handlers[STATIC_NOP]->set_delegate(read16_delegate_create(address_table_read, nop_r<UINT16>, *this));
m_handlers[STATIC_WATCHPOINT]->set_delegate(read16_delegate_create(address_table_read, watchpoint_r<UINT16>, *this));
m_handlers[STATIC_UNMAP]->set_delegate(read16_delegate(FUNC(address_table_read::unmap_r<UINT16>), this));
m_handlers[STATIC_NOP]->set_delegate(read16_delegate(FUNC(address_table_read::nop_r<UINT16>), this));
m_handlers[STATIC_WATCHPOINT]->set_delegate(read16_delegate(FUNC(address_table_read::watchpoint_r<UINT16>), this));
break;
// 32-bit case
case 32:
m_handlers[STATIC_UNMAP]->set_delegate(read32_delegate_create(address_table_read, unmap_r<UINT32>, *this));
m_handlers[STATIC_NOP]->set_delegate(read32_delegate_create(address_table_read, nop_r<UINT32>, *this));
m_handlers[STATIC_WATCHPOINT]->set_delegate(read32_delegate_create(address_table_read, watchpoint_r<UINT32>, *this));
m_handlers[STATIC_UNMAP]->set_delegate(read32_delegate(FUNC(address_table_read::unmap_r<UINT32>), this));
m_handlers[STATIC_NOP]->set_delegate(read32_delegate(FUNC(address_table_read::nop_r<UINT32>), this));
m_handlers[STATIC_WATCHPOINT]->set_delegate(read32_delegate(FUNC(address_table_read::watchpoint_r<UINT32>), this));
break;
// 64-bit case
case 64:
m_handlers[STATIC_UNMAP]->set_delegate(read64_delegate_create(address_table_read, unmap_r<UINT64>, *this));
m_handlers[STATIC_NOP]->set_delegate(read64_delegate_create(address_table_read, nop_r<UINT64>, *this));
m_handlers[STATIC_WATCHPOINT]->set_delegate(read64_delegate_create(address_table_read, watchpoint_r<UINT64>, *this));
m_handlers[STATIC_UNMAP]->set_delegate(read64_delegate(FUNC(address_table_read::unmap_r<UINT64>), this));
m_handlers[STATIC_NOP]->set_delegate(read64_delegate(FUNC(address_table_read::nop_r<UINT64>), this));
m_handlers[STATIC_WATCHPOINT]->set_delegate(read64_delegate(FUNC(address_table_read::watchpoint_r<UINT64>), this));
break;
}
@ -3819,30 +3819,30 @@ address_table_write::address_table_write(address_space &space, bool large)
{
// 8-bit case
case 8:
m_handlers[STATIC_UNMAP]->set_delegate(write8_delegate_create(address_table_write, unmap_w<UINT8>, *this));
m_handlers[STATIC_NOP]->set_delegate(write8_delegate_create(address_table_write, nop_w<UINT8>, *this));
m_handlers[STATIC_WATCHPOINT]->set_delegate(write8_delegate_create(address_table_write, watchpoint_w<UINT8>, *this));
m_handlers[STATIC_UNMAP]->set_delegate(write8_delegate(FUNC(address_table_write::unmap_w<UINT8>), this));
m_handlers[STATIC_NOP]->set_delegate(write8_delegate(FUNC(address_table_write::nop_w<UINT8>), this));
m_handlers[STATIC_WATCHPOINT]->set_delegate(write8_delegate(FUNC(address_table_write::watchpoint_w<UINT8>), this));
break;
// 16-bit case
case 16:
m_handlers[STATIC_UNMAP]->set_delegate(write16_delegate_create(address_table_write, unmap_w<UINT16>, *this));
m_handlers[STATIC_NOP]->set_delegate(write16_delegate_create(address_table_write, nop_w<UINT16>, *this));
m_handlers[STATIC_WATCHPOINT]->set_delegate(write16_delegate_create(address_table_write, watchpoint_w<UINT16>, *this));
m_handlers[STATIC_UNMAP]->set_delegate(write16_delegate(FUNC(address_table_write::unmap_w<UINT16>), this));
m_handlers[STATIC_NOP]->set_delegate(write16_delegate(FUNC(address_table_write::nop_w<UINT16>), this));
m_handlers[STATIC_WATCHPOINT]->set_delegate(write16_delegate(FUNC(address_table_write::watchpoint_w<UINT16>), this));
break;
// 32-bit case
case 32:
m_handlers[STATIC_UNMAP]->set_delegate(write32_delegate_create(address_table_write, unmap_w<UINT32>, *this));
m_handlers[STATIC_NOP]->set_delegate(write32_delegate_create(address_table_write, nop_w<UINT32>, *this));
m_handlers[STATIC_WATCHPOINT]->set_delegate(write32_delegate_create(address_table_write, watchpoint_w<UINT32>, *this));
m_handlers[STATIC_UNMAP]->set_delegate(write32_delegate(FUNC(address_table_write::unmap_w<UINT32>), this));
m_handlers[STATIC_NOP]->set_delegate(write32_delegate(FUNC(address_table_write::nop_w<UINT32>), this));
m_handlers[STATIC_WATCHPOINT]->set_delegate(write32_delegate(FUNC(address_table_write::watchpoint_w<UINT32>), this));
break;
// 64-bit case
case 64:
m_handlers[STATIC_UNMAP]->set_delegate(write64_delegate_create(address_table_write, unmap_w<UINT64>, *this));
m_handlers[STATIC_NOP]->set_delegate(write64_delegate_create(address_table_write, nop_w<UINT64>, *this));
m_handlers[STATIC_WATCHPOINT]->set_delegate(write64_delegate_create(address_table_write, watchpoint_w<UINT64>, *this));
m_handlers[STATIC_UNMAP]->set_delegate(write64_delegate(FUNC(address_table_write::unmap_w<UINT64>), this));
m_handlers[STATIC_NOP]->set_delegate(write64_delegate(FUNC(address_table_write::nop_w<UINT64>), this));
m_handlers[STATIC_WATCHPOINT]->set_delegate(write64_delegate(FUNC(address_table_write::watchpoint_w<UINT64>), this));
break;
}
@ -4446,11 +4446,11 @@ void handler_entry_read::set_delegate(read8_delegate delegate, UINT64 mask)
{
configure_subunits(mask, 8);
if (m_datawidth == 16)
set_delegate(read16_delegate(read16_proto_delegate::_create_member<handler_entry_read, &handler_entry_read::read_stub_16_from_8>(delegate.name()), *this));
set_delegate(read16_delegate(&handler_entry_read::read_stub_16_from_8, delegate.name(), this));
else if (m_datawidth == 32)
set_delegate(read32_delegate(read32_proto_delegate::_create_member<handler_entry_read, &handler_entry_read::read_stub_32_from_8>(delegate.name()), *this));
set_delegate(read32_delegate(&handler_entry_read::read_stub_32_from_8, delegate.name(), this));
else if (m_datawidth == 64)
set_delegate(read64_delegate(read64_proto_delegate::_create_member<handler_entry_read, &handler_entry_read::read_stub_64_from_8>(delegate.name()), *this));
set_delegate(read64_delegate(&handler_entry_read::read_stub_64_from_8, delegate.name(), this));
}
}
@ -4475,9 +4475,9 @@ void handler_entry_read::set_delegate(read16_delegate delegate, UINT64 mask)
{
configure_subunits(mask, 16);
if (m_datawidth == 32)
set_delegate(read32_delegate(read32_proto_delegate::_create_member<handler_entry_read, &handler_entry_read::read_stub_32_from_16>(delegate.name()), *this));
set_delegate(read32_delegate(&handler_entry_read::read_stub_32_from_16, delegate.name(), this));
else if (m_datawidth == 64)
set_delegate(read64_delegate(read64_proto_delegate::_create_member<handler_entry_read, &handler_entry_read::read_stub_64_from_16>(delegate.name()), *this));
set_delegate(read64_delegate(&handler_entry_read::read_stub_64_from_16, delegate.name(), this));
}
}
@ -4502,7 +4502,7 @@ void handler_entry_read::set_delegate(read32_delegate delegate, UINT64 mask)
{
configure_subunits(mask, 32);
if (m_datawidth == 64)
set_delegate(read64_delegate(read64_proto_delegate::_create_member<handler_entry_read, &handler_entry_read::read_stub_64_from_32>(delegate.name()), *this));
set_delegate(read64_delegate(&handler_entry_read::read_stub_64_from_32, delegate.name(), this));
}
}
@ -4532,28 +4532,28 @@ void handler_entry_read::set_legacy_func(address_space &space, read8_space_func
{
m_legacy_handler.space8 = func;
m_legacy_object.space = &space;
set_delegate(read8_delegate(read8_proto_delegate::_create_member<handler_entry_read, &handler_entry_read::read_stub_legacy>(name), *this), mask);
set_delegate(read8_delegate(&handler_entry_read::read_stub_legacy, name, this), mask);
}
void handler_entry_read::set_legacy_func(address_space &space, read16_space_func func, const char *name, UINT64 mask)
{
m_legacy_handler.space16 = func;
m_legacy_object.space = &space;
set_delegate(read16_delegate(read16_proto_delegate::_create_member<handler_entry_read, &handler_entry_read::read_stub_legacy>(name), *this), mask);
set_delegate(read16_delegate(&handler_entry_read::read_stub_legacy, name, this), mask);
}
void handler_entry_read::set_legacy_func(address_space &space, read32_space_func func, const char *name, UINT64 mask)
{
m_legacy_handler.space32 = func;
m_legacy_object.space = &space;
set_delegate(read32_delegate(read32_proto_delegate::_create_member<handler_entry_read, &handler_entry_read::read_stub_legacy>(name), *this), mask);
set_delegate(read32_delegate(&handler_entry_read::read_stub_legacy, name, this), mask);
}
void handler_entry_read::set_legacy_func(address_space &space, read64_space_func func, const char *name, UINT64 mask)
{
m_legacy_handler.space64 = func;
m_legacy_object.space = &space;
set_delegate(read64_delegate(read64_proto_delegate::_create_member<handler_entry_read, &handler_entry_read::read_stub_legacy>(name), *this), mask);
set_delegate(read64_delegate(&handler_entry_read::read_stub_legacy, name, this), mask);
}
@ -4566,28 +4566,28 @@ void handler_entry_read::set_legacy_func(device_t &device, read8_device_func fun
{
m_legacy_handler.device8 = func;
m_legacy_object.device = &device;
set_delegate(read8_delegate(read8_proto_delegate::_create_member<handler_entry_read, &handler_entry_read::read_stub_legacy>(name), *this), mask);
set_delegate(read8_delegate(&handler_entry_read::read_stub_legacy, name, this), mask);
}
void handler_entry_read::set_legacy_func(device_t &device, read16_device_func func, const char *name, UINT64 mask)
{
m_legacy_handler.device16 = func;
m_legacy_object.device = &device;
set_delegate(read16_delegate(read16_proto_delegate::_create_member<handler_entry_read, &handler_entry_read::read_stub_legacy>(name), *this), mask);
set_delegate(read16_delegate(&handler_entry_read::read_stub_legacy, name, this), mask);
}
void handler_entry_read::set_legacy_func(device_t &device, read32_device_func func, const char *name, UINT64 mask)
{
m_legacy_handler.device32 = func;
m_legacy_object.device = &device;
set_delegate(read32_delegate(read32_proto_delegate::_create_member<handler_entry_read, &handler_entry_read::read_stub_legacy>(name), *this), mask);
set_delegate(read32_delegate(&handler_entry_read::read_stub_legacy, name, this), mask);
}
void handler_entry_read::set_legacy_func(device_t &device, read64_device_func func, const char *name, UINT64 mask)
{
m_legacy_handler.device64 = func;
m_legacy_object.device = &device;
set_delegate(read64_delegate(read64_proto_delegate::_create_member<handler_entry_read, &handler_entry_read::read_stub_legacy>(name), *this), mask);
set_delegate(read64_delegate(&handler_entry_read::read_stub_legacy, name, this), mask);
}
@ -4600,13 +4600,13 @@ void handler_entry_read::set_ioport(const input_port_config &ioport)
{
m_ioport = &ioport;
if (m_datawidth == 8)
set_delegate(read8_delegate(read8_proto_delegate::_create_member<handler_entry_read, &handler_entry_read::read_stub_ioport<UINT8> >(ioport.tag), *this));
set_delegate(read8_delegate(&handler_entry_read::read_stub_ioport<UINT8>, ioport.tag, this));
else if (m_datawidth == 16)
set_delegate(read16_delegate(read16_proto_delegate::_create_member<handler_entry_read, &handler_entry_read::read_stub_ioport<UINT16> >(ioport.tag), *this));
set_delegate(read16_delegate(&handler_entry_read::read_stub_ioport<UINT16>, ioport.tag, this));
else if (m_datawidth == 32)
set_delegate(read32_delegate(read32_proto_delegate::_create_member<handler_entry_read, &handler_entry_read::read_stub_ioport<UINT32> >(ioport.tag), *this));
set_delegate(read32_delegate(&handler_entry_read::read_stub_ioport<UINT32>, ioport.tag, this));
else if (m_datawidth == 64)
set_delegate(read64_delegate(read64_proto_delegate::_create_member<handler_entry_read, &handler_entry_read::read_stub_ioport<UINT64> >(ioport.tag), *this));
set_delegate(read64_delegate(&handler_entry_read::read_stub_ioport<UINT64>, ioport.tag, this));
}
@ -4788,11 +4788,11 @@ void handler_entry_write::set_delegate(write8_delegate delegate, UINT64 mask)
{
configure_subunits(mask, 8);
if (m_datawidth == 16)
set_delegate(write16_delegate(write16_proto_delegate::_create_member<handler_entry_write, &handler_entry_write::write_stub_16_from_8>(delegate.name()), *this));
set_delegate(write16_delegate(&handler_entry_write::write_stub_16_from_8, delegate.name(), this));
else if (m_datawidth == 32)
set_delegate(write32_delegate(write32_proto_delegate::_create_member<handler_entry_write, &handler_entry_write::write_stub_32_from_8>(delegate.name()), *this));
set_delegate(write32_delegate(&handler_entry_write::write_stub_32_from_8, delegate.name(), this));
else if (m_datawidth == 64)
set_delegate(write64_delegate(write64_proto_delegate::_create_member<handler_entry_write, &handler_entry_write::write_stub_64_from_8>(delegate.name()), *this));
set_delegate(write64_delegate(&handler_entry_write::write_stub_64_from_8, delegate.name(), this));
}
}
@ -4812,9 +4812,9 @@ void handler_entry_write::set_delegate(write16_delegate delegate, UINT64 mask)
{
configure_subunits(mask, 16);
if (m_datawidth == 32)
set_delegate(write32_delegate(write32_proto_delegate::_create_member<handler_entry_write, &handler_entry_write::write_stub_32_from_16>(delegate.name()), *this));
set_delegate(write32_delegate(&handler_entry_write::write_stub_32_from_16, delegate.name(), this));
else if (m_datawidth == 64)
set_delegate(write64_delegate(write64_proto_delegate::_create_member<handler_entry_write, &handler_entry_write::write_stub_64_from_16>(delegate.name()), *this));
set_delegate(write64_delegate(&handler_entry_write::write_stub_64_from_16, delegate.name(), this));
}
}
@ -4834,7 +4834,7 @@ void handler_entry_write::set_delegate(write32_delegate delegate, UINT64 mask)
{
configure_subunits(mask, 32);
if (m_datawidth == 64)
set_delegate(write64_delegate(write64_proto_delegate::_create_member<handler_entry_write, &handler_entry_write::write_stub_64_from_32>(delegate.name()), *this));
set_delegate(write64_delegate(&handler_entry_write::write_stub_64_from_32, delegate.name(), this));
}
}
@ -4859,28 +4859,28 @@ void handler_entry_write::set_legacy_func(address_space &space, write8_space_fun
{
m_legacy_handler.space8 = func;
m_legacy_object.space = &space;
set_delegate(write8_delegate(write8_proto_delegate::_create_member<handler_entry_write, &handler_entry_write::write_stub_legacy>(name), *this), mask);
set_delegate(write8_delegate(&handler_entry_write::write_stub_legacy, name, this), mask);
}
void handler_entry_write::set_legacy_func(address_space &space, write16_space_func func, const char *name, UINT64 mask)
{
m_legacy_handler.space16 = func;
m_legacy_object.space = &space;
set_delegate(write16_delegate(write16_proto_delegate::_create_member<handler_entry_write, &handler_entry_write::write_stub_legacy>(name), *this), mask);
set_delegate(write16_delegate(&handler_entry_write::write_stub_legacy, name, this), mask);
}
void handler_entry_write::set_legacy_func(address_space &space, write32_space_func func, const char *name, UINT64 mask)
{
m_legacy_handler.space32 = func;
m_legacy_object.space = &space;
set_delegate(write32_delegate(write32_proto_delegate::_create_member<handler_entry_write, &handler_entry_write::write_stub_legacy>(name), *this), mask);
set_delegate(write32_delegate(&handler_entry_write::write_stub_legacy, name, this), mask);
}
void handler_entry_write::set_legacy_func(address_space &space, write64_space_func func, const char *name, UINT64 mask)
{
m_legacy_handler.space64 = func;
m_legacy_object.space = &space;
set_delegate(write64_delegate(write64_proto_delegate::_create_member<handler_entry_write, &handler_entry_write::write_stub_legacy>(name), *this), mask);
set_delegate(write64_delegate(&handler_entry_write::write_stub_legacy, name, this), mask);
}
@ -4893,28 +4893,28 @@ void handler_entry_write::set_legacy_func(device_t &device, write8_device_func f
{
m_legacy_handler.device8 = func;
m_legacy_object.device = &device;
set_delegate(write8_delegate(write8_proto_delegate::_create_member<handler_entry_write, &handler_entry_write::write_stub_legacy>(name), *this), mask);
set_delegate(write8_delegate(&handler_entry_write::write_stub_legacy, name, this), mask);
}
void handler_entry_write::set_legacy_func(device_t &device, write16_device_func func, const char *name, UINT64 mask)
{
m_legacy_handler.device16 = func;
m_legacy_object.device = &device;
set_delegate(write16_delegate(write16_proto_delegate::_create_member<handler_entry_write, &handler_entry_write::write_stub_legacy>(name), *this), mask);
set_delegate(write16_delegate(&handler_entry_write::write_stub_legacy, name, this), mask);
}
void handler_entry_write::set_legacy_func(device_t &device, write32_device_func func, const char *name, UINT64 mask)
{
m_legacy_handler.device32 = func;
m_legacy_object.device = &device;
set_delegate(write32_delegate(write32_proto_delegate::_create_member<handler_entry_write, &handler_entry_write::write_stub_legacy>(name), *this), mask);
set_delegate(write32_delegate(&handler_entry_write::write_stub_legacy, name, this), mask);
}
void handler_entry_write::set_legacy_func(device_t &device, write64_device_func func, const char *name, UINT64 mask)
{
m_legacy_handler.device64 = func;
m_legacy_object.device = &device;
set_delegate(write64_delegate(write64_proto_delegate::_create_member<handler_entry_write, &handler_entry_write::write_stub_legacy>(name), *this), mask);
set_delegate(write64_delegate(&handler_entry_write::write_stub_legacy, name, this), mask);
}
@ -4927,13 +4927,13 @@ void handler_entry_write::set_ioport(const input_port_config &ioport)
{
m_ioport = &ioport;
if (m_datawidth == 8)
set_delegate(write8_delegate(write8_proto_delegate::_create_member<handler_entry_write, &handler_entry_write::write_stub_ioport<UINT8> >(ioport.tag), *this));
set_delegate(write8_delegate(&handler_entry_write::write_stub_ioport<UINT8>, ioport.tag, this));
else if (m_datawidth == 16)
set_delegate(write16_delegate(write16_proto_delegate::_create_member<handler_entry_write, &handler_entry_write::write_stub_ioport<UINT16> >(ioport.tag), *this));
set_delegate(write16_delegate(&handler_entry_write::write_stub_ioport<UINT16>, ioport.tag, this));
else if (m_datawidth == 32)
set_delegate(write32_delegate(write32_proto_delegate::_create_member<handler_entry_write, &handler_entry_write::write_stub_ioport<UINT32> >(ioport.tag), *this));
set_delegate(write32_delegate(&handler_entry_write::write_stub_ioport<UINT32>, ioport.tag, this));
else if (m_datawidth == 64)
set_delegate(write64_delegate(write64_proto_delegate::_create_member<handler_entry_write, &handler_entry_write::write_stub_ioport<UINT64> >(ioport.tag), *this));
set_delegate(write64_delegate(&handler_entry_write::write_stub_ioport<UINT64>, ioport.tag, this));
}

View File

@ -151,65 +151,25 @@ struct data_accessors
// ======================> direct_update_delegate
// direct region update handler
typedef proto_delegate_2param<offs_t, direct_read_data &, offs_t> direct_update_proto_delegate;
typedef delegate_2param<offs_t, direct_read_data &, offs_t> direct_update_delegate;
#define direct_update_delegate_create(_Class, _Method, _Object) direct_update_delegate(direct_update_proto_delegate::_create_member<_Class, &_Class::_Method>(#_Class "::" #_Method), _Object)
#define direct_update_delegate_create_static(_Function, _Object) direct_update_delegate(direct_update_proto_delegate::_create_static<running_machine, &_Function>(#_Function), _Object)
typedef delegate<offs_t (direct_read_data &, offs_t)> direct_update_delegate;
// ======================> read_delegate
// declare proto-delegates for each width
typedef proto_delegate_3param<UINT8, address_space &, offs_t, UINT8> read8_proto_delegate;
typedef proto_delegate_3param<UINT16, address_space &, offs_t, UINT16> read16_proto_delegate;
typedef proto_delegate_3param<UINT32, address_space &, offs_t, UINT32> read32_proto_delegate;
typedef proto_delegate_3param<UINT64, address_space &, offs_t, UINT64> read64_proto_delegate;
// declare delegates for each width
typedef delegate_3param<UINT8, address_space &, offs_t, UINT8> read8_delegate;
typedef delegate_3param<UINT16, address_space &, offs_t, UINT16> read16_delegate;
typedef delegate_3param<UINT32, address_space &, offs_t, UINT32> read32_delegate;
typedef delegate_3param<UINT64, address_space &, offs_t, UINT64> read64_delegate;
// macros for creating read proto-delegates
#define read8_proto_delegate_create(_Class, _Method) read8_proto_delegate::_create_member<_Class, &_Class::_Method>(#_Class "::" #_Method)
#define read16_proto_delegate_create(_Class, _Method) read16_proto_delegate::_create_member<_Class, &_Class::_Method>(#_Class "::" #_Method)
#define read32_proto_delegate_create(_Class, _Method) read32_proto_delegate::_create_member<_Class, &_Class::_Method>(#_Class "::" #_Method)
#define read64_proto_delegate_create(_Class, _Method) read64_proto_delegate::_create_member<_Class, &_Class::_Method>(#_Class "::" #_Method)
// macros for creating read delegates, bound to the provided object
#define read8_delegate_create(_Class, _Method, _Object) read8_delegate(read8_proto_delegate_create(_Class, _Method), _Object)
#define read16_delegate_create(_Class, _Method, _Object) read16_delegate(read16_proto_delegate_create(_Class, _Method), _Object)
#define read32_delegate_create(_Class, _Method, _Object) read32_delegate(read32_proto_delegate_create(_Class, _Method), _Object)
#define read64_delegate_create(_Class, _Method, _Object) read64_delegate(read64_proto_delegate_create(_Class, _Method), _Object)
typedef delegate<UINT8 (address_space &, offs_t, UINT8)> read8_delegate;
typedef delegate<UINT16 (address_space &, offs_t, UINT16)> read16_delegate;
typedef delegate<UINT32 (address_space &, offs_t, UINT32)> read32_delegate;
typedef delegate<UINT64 (address_space &, offs_t, UINT64)> read64_delegate;
// ======================> write_delegate
// declare proto-delegates for each width
typedef proto_delegate_4param<void, address_space &, offs_t, UINT8, UINT8> write8_proto_delegate;
typedef proto_delegate_4param<void, address_space &, offs_t, UINT16, UINT16> write16_proto_delegate;
typedef proto_delegate_4param<void, address_space &, offs_t, UINT32, UINT32> write32_proto_delegate;
typedef proto_delegate_4param<void, address_space &, offs_t, UINT64, UINT64> write64_proto_delegate;
// declare delegates for each width
typedef delegate_4param<void, address_space &, offs_t, UINT8, UINT8> write8_delegate;
typedef delegate_4param<void, address_space &, offs_t, UINT16, UINT16> write16_delegate;
typedef delegate_4param<void, address_space &, offs_t, UINT32, UINT32> write32_delegate;
typedef delegate_4param<void, address_space &, offs_t, UINT64, UINT64> write64_delegate;
// macros for creating write proto-delegates
#define write8_proto_delegate_create(_Class, _Method) write8_proto_delegate::_create_member<_Class, &_Class::_Method>(#_Class "::" #_Method)
#define write16_proto_delegate_create(_Class, _Method) write16_proto_delegate::_create_member<_Class, &_Class::_Method>(#_Class "::" #_Method)
#define write32_proto_delegate_create(_Class, _Method) write32_proto_delegate::_create_member<_Class, &_Class::_Method>(#_Class "::" #_Method)
#define write64_proto_delegate_create(_Class, _Method) write64_proto_delegate::_create_member<_Class, &_Class::_Method>(#_Class "::" #_Method)
// macros for creating write delegates, bound to the provided object
#define write8_delegate_create(_Class, _Method, _Object) write8_delegate(write8_proto_delegate::_create_member<_Class, &_Class::_Method>(#_Class "::" #_Method), _Object)
#define write16_delegate_create(_Class, _Method, _Object) write16_delegate(write16_proto_delegate::_create_member<_Class, &_Class::_Method>(#_Class "::" #_Method), _Object)
#define write32_delegate_create(_Class, _Method, _Object) write32_delegate(write32_proto_delegate::_create_member<_Class, &_Class::_Method>(#_Class "::" #_Method), _Object)
#define write64_delegate_create(_Class, _Method, _Object) write64_delegate(write64_proto_delegate::_create_member<_Class, &_Class::_Method>(#_Class "::" #_Method), _Object)
typedef delegate<void (address_space &, offs_t, UINT8, UINT8)> write8_delegate;
typedef delegate<void (address_space &, offs_t, UINT16, UINT16)> write16_delegate;
typedef delegate<void (address_space &, offs_t, UINT32, UINT32)> write32_delegate;
typedef delegate<void (address_space &, offs_t, UINT64, UINT64)> write64_delegate;
// ======================> direct_read_data
@ -604,7 +564,7 @@ protected:
// opcode base adjustment handler function macro
#define DIRECT_UPDATE_MEMBER(name) offs_t name(ATTR_UNUSED direct_read_data &direct, ATTR_UNUSED offs_t address)
#define DIRECT_UPDATE_HANDLER(name) offs_t name(ATTR_UNUSED running_machine *machine, ATTR_UNUSED direct_read_data &direct, ATTR_UNUSED offs_t address)
#define DIRECT_UPDATE_HANDLER(name) offs_t name(ATTR_UNUSED running_machine &machine, ATTR_UNUSED direct_read_data &direct, ATTR_UNUSED offs_t address)
// space read/write handler function macros

View File

@ -258,7 +258,7 @@ static DEVICE_START( k053260 )
/* setup SH1 timer if necessary */
if ( ic->intf->irq )
device->machine().scheduler().timer_pulse( attotime::from_hz(device->clock()) * 32, FUNC(ic->intf->irq ));
device->machine().scheduler().timer_pulse( attotime::from_hz(device->clock()) * 32, ic->intf->irq, "ic->intf->irq" );
}
INLINE void check_bounds( k053260_state *ic, int channel )

View File

@ -648,7 +648,7 @@ static DEVICE_START( pokey )
chip->clockmult = DIV_64;
chip->KBCODE = 0x09; /* Atari 800 'no key' */
chip->SKCTL = SK_RESET; /* let the RNG run after reset */
chip->rtimer = device->machine().scheduler().timer_alloc(FUNC(NULL));
chip->rtimer = device->machine().scheduler().timer_alloc(FUNC_NULL);
chip->timer[0] = device->machine().scheduler().timer_alloc(FUNC(pokey_timer_expire), chip);
chip->timer[1] = device->machine().scheduler().timer_alloc(FUNC(pokey_timer_expire), chip);

View File

@ -116,16 +116,16 @@ static TIMER_CALLBACK( update_irq_state_timer_5 );
static TIMER_CALLBACK( update_irq_state_timer_6 );
static TIMER_CALLBACK( update_irq_state_timer_7 );
static const timer_expired_func update_irq_state_cb[] =
static const struct { timer_expired_func func; const char *name; } update_irq_state_cb[] =
{
update_irq_state_timer_0,
update_irq_state_timer_1,
update_irq_state_timer_2,
update_irq_state_timer_3,
update_irq_state_timer_4,
update_irq_state_timer_5,
update_irq_state_timer_6,
update_irq_state_timer_7
{ FUNC(update_irq_state_timer_0) },
{ FUNC(update_irq_state_timer_1) },
{ FUNC(update_irq_state_timer_2) },
{ FUNC(update_irq_state_timer_3) },
{ FUNC(update_irq_state_timer_4) },
{ FUNC(update_irq_state_timer_5) },
{ FUNC(update_irq_state_timer_6) },
{ FUNC(update_irq_state_timer_7) }
};
@ -205,7 +205,7 @@ static STATE_POSTLOAD( YMZ280B_state_save_update_step )
struct YMZ280BVoice *voice = &chip->voice[j];
update_step(chip, voice);
if(voice->irq_schedule)
machine.scheduler().timer_set(attotime::zero, FUNC(update_irq_state_cb[j]), 0, chip);
machine.scheduler().timer_set(attotime::zero, update_irq_state_cb[j].func, update_irq_state_cb[j].name, 0, chip);
}
}
@ -581,7 +581,7 @@ static STREAM_UPDATE( ymz280b_update )
voice->playing = 0;
/* set update_irq_state_timer. IRQ is signaled on next CPU execution. */
chip->device->machine().scheduler().timer_set(attotime::zero, FUNC(update_irq_state_cb[v]), 0, chip);
chip->device->machine().scheduler().timer_set(attotime::zero, update_irq_state_cb[v].func, update_irq_state_cb[v].name, 0, chip);
voice->irq_schedule = 1;
}
}

View File

@ -180,7 +180,7 @@ video_manager::video_manager(running_machine &machine)
// if no screens, create a periodic timer to drive updates
if (machine.primary_screen == NULL)
{
m_screenless_frame_timer = machine.scheduler().timer_alloc(FUNC(&screenless_update_callback), this);
m_screenless_frame_timer = machine.scheduler().timer_alloc(FUNC(screenless_update_callback), this);
m_screenless_frame_timer->adjust(screen_device::DEFAULT_FRAME_PERIOD, 0, screen_device::DEFAULT_FRAME_PERIOD);
}
}

View File

@ -598,8 +598,8 @@ static void vga_cpu_interface(running_machine &machine)
{
address_space *space = machine.firstcpu->memory().space(AS_PROGRAM);
static int sequencer, gc;
read8_space_func read_handler;
write8_space_func write_handler;
read8_space_func read_handler; const char *read_handler_name;
write8_space_func write_handler; const char *write_handler_name;
read16_space_func read_handler16;
write16_space_func write_handler16;
read32_space_func read_handler32;
@ -616,8 +616,8 @@ static void vga_cpu_interface(running_machine &machine)
if (vga.sequencer.data[4]&8)
{
read_handler = vga_vga_r;
write_handler = vga_vga_w;
read_handler = vga_vga_r; read_handler_name = "vga_vga_r";
write_handler = vga_vga_w; write_handler_name = "vga_vga_w";
read_handler16 = vga_vga16_r;
write_handler16 = vga_vga16_w;
read_handler32 = vga_vga32_r;
@ -627,8 +627,8 @@ static void vga_cpu_interface(running_machine &machine)
}
else if (vga.sequencer.data[4] & 4)
{
read_handler = vga_ega_r;
write_handler = vga_ega_w;
read_handler = vga_ega_r; read_handler_name = "vga_ega_r";
write_handler = vga_ega_w; read_handler_name = "vga_ega_w";
read_handler16 = vga_ega16_r;
write_handler16 = vga_ega16_w;
read_handler32 = vga_ega32_r;
@ -638,8 +638,8 @@ static void vga_cpu_interface(running_machine &machine)
}
else
{
read_handler = vga_text_r;
write_handler = vga_text_w;
read_handler = vga_text_r; read_handler_name = "vga_text_r";
write_handler = vga_text_w; read_handler_name = "vga_text_w";
read_handler16 = vga_text16_r;
write_handler16 = vga_text16_w;
read_handler32 = vga_text32_r;
@ -682,12 +682,12 @@ static void vga_cpu_interface(running_machine &machine)
sel = vga.gc.data[6] & 0x0c;
if (sel)
{
if (sel == 0x04) space->install_legacy_read_handler(0xa0000, 0xaffff, FUNC(read_handler) ); else space->nop_read(0xa0000, 0xaffff);
if (sel == 0x08) space->install_legacy_read_handler(0xb0000, 0xb7fff, FUNC(read_handler) ); else space->nop_read(0xb0000, 0xb7fff);
if (sel == 0x0C) space->install_legacy_read_handler(0xb8000, 0xbffff, FUNC(read_handler) ); else space->nop_read(0xb8000, 0xbffff);
if (sel == 0x04) space->install_legacy_write_handler(0xa0000, 0xaffff, FUNC(write_handler)); else space->nop_write(0xa0000, 0xaffff);
if (sel == 0x08) space->install_legacy_write_handler(0xb0000, 0xb7fff, FUNC(write_handler)); else space->nop_write(0xb0000, 0xb7fff);
if (sel == 0x0C) space->install_legacy_write_handler(0xb8000, 0xbffff, FUNC(write_handler)); else space->nop_write(0xb8000, 0xbffff);
if (sel == 0x04) space->install_legacy_read_handler(0xa0000, 0xaffff, read_handler, read_handler_name); else space->nop_read(0xa0000, 0xaffff);
if (sel == 0x08) space->install_legacy_read_handler(0xb0000, 0xb7fff, read_handler, read_handler_name); else space->nop_read(0xb0000, 0xb7fff);
if (sel == 0x0C) space->install_legacy_read_handler(0xb8000, 0xbffff, read_handler, read_handler_name); else space->nop_read(0xb8000, 0xbffff);
if (sel == 0x04) space->install_legacy_write_handler(0xa0000, 0xaffff, write_handler, write_handler_name); else space->nop_write(0xa0000, 0xaffff);
if (sel == 0x08) space->install_legacy_write_handler(0xb0000, 0xb7fff, write_handler, write_handler_name); else space->nop_write(0xb0000, 0xb7fff);
if (sel == 0x0C) space->install_legacy_write_handler(0xb8000, 0xbffff, write_handler, write_handler_name); else space->nop_write(0xb8000, 0xbffff);
}
else
{
@ -701,12 +701,12 @@ static void vga_cpu_interface(running_machine &machine)
sel = vga.gc.data[6] & 0x0c;
if (sel)
{
if (sel == 0x04) space->install_legacy_read_handler(0xa0000, 0xaffff, FUNC(read_handler16) ); else space->nop_read(0xa0000, 0xaffff);
if (sel == 0x08) space->install_legacy_read_handler(0xb0000, 0xb7fff, FUNC(read_handler16) ); else space->nop_read(0xb0000, 0xb7fff);
if (sel == 0x0C) space->install_legacy_read_handler(0xb8000, 0xbffff, FUNC(read_handler16) ); else space->nop_read(0xb8000, 0xbffff);
if (sel == 0x04) space->install_legacy_write_handler(0xa0000, 0xaffff, FUNC(write_handler16)); else space->nop_write(0xa0000, 0xaffff);
if (sel == 0x08) space->install_legacy_write_handler(0xb0000, 0xb7fff, FUNC(write_handler16)); else space->nop_write(0xb0000, 0xb7fff);
if (sel == 0x0C) space->install_legacy_write_handler(0xb8000, 0xbffff, FUNC(write_handler16)); else space->nop_write(0xb8000, 0xbffff);
if (sel == 0x04) space->install_legacy_read_handler(0xa0000, 0xaffff, read_handler16, read_handler_name); else space->nop_read(0xa0000, 0xaffff);
if (sel == 0x08) space->install_legacy_read_handler(0xb0000, 0xb7fff, read_handler16, read_handler_name); else space->nop_read(0xb0000, 0xb7fff);
if (sel == 0x0C) space->install_legacy_read_handler(0xb8000, 0xbffff, read_handler16, read_handler_name); else space->nop_read(0xb8000, 0xbffff);
if (sel == 0x04) space->install_legacy_write_handler(0xa0000, 0xaffff, write_handler16, write_handler_name); else space->nop_write(0xa0000, 0xaffff);
if (sel == 0x08) space->install_legacy_write_handler(0xb0000, 0xb7fff, write_handler16, write_handler_name); else space->nop_write(0xb0000, 0xb7fff);
if (sel == 0x0C) space->install_legacy_write_handler(0xb8000, 0xbffff, write_handler16, write_handler_name); else space->nop_write(0xb8000, 0xbffff);
}
else
{
@ -720,12 +720,12 @@ static void vga_cpu_interface(running_machine &machine)
sel = vga.gc.data[6] & 0x0c;
if (sel)
{
if (sel == 0x04) space->install_legacy_read_handler(0xa0000, 0xaffff, FUNC(read_handler32) ); else space->nop_read(0xa0000, 0xaffff);
if (sel == 0x08) space->install_legacy_read_handler(0xb0000, 0xb7fff, FUNC(read_handler32) ); else space->nop_read(0xb0000, 0xb7fff);
if (sel == 0x0C) space->install_legacy_read_handler(0xb8000, 0xbffff, FUNC(read_handler32) ); else space->nop_read(0xb8000, 0xbffff);
if (sel == 0x04) space->install_legacy_write_handler(0xa0000, 0xaffff, FUNC(write_handler32)); else space->nop_write(0xa0000, 0xaffff);
if (sel == 0x08) space->install_legacy_write_handler(0xb0000, 0xb7fff, FUNC(write_handler32)); else space->nop_write(0xb0000, 0xb7fff);
if (sel == 0x0C) space->install_legacy_write_handler(0xb8000, 0xbffff, FUNC(write_handler32)); else space->nop_write(0xb8000, 0xbffff);
if (sel == 0x04) space->install_legacy_read_handler(0xa0000, 0xaffff, read_handler32, read_handler_name); else space->nop_read(0xa0000, 0xaffff);
if (sel == 0x08) space->install_legacy_read_handler(0xb0000, 0xb7fff, read_handler32, read_handler_name); else space->nop_read(0xb0000, 0xb7fff);
if (sel == 0x0C) space->install_legacy_read_handler(0xb8000, 0xbffff, read_handler32, read_handler_name); else space->nop_read(0xb8000, 0xbffff);
if (sel == 0x04) space->install_legacy_write_handler(0xa0000, 0xaffff, write_handler32, write_handler_name); else space->nop_write(0xa0000, 0xaffff);
if (sel == 0x08) space->install_legacy_write_handler(0xb0000, 0xb7fff, write_handler32, write_handler_name); else space->nop_write(0xb0000, 0xb7fff);
if (sel == 0x0C) space->install_legacy_write_handler(0xb8000, 0xbffff, write_handler32, write_handler_name); else space->nop_write(0xb8000, 0xbffff);
}
else
{
@ -739,12 +739,12 @@ static void vga_cpu_interface(running_machine &machine)
sel = vga.gc.data[6] & 0x0c;
if (sel)
{
if (sel == 0x04) space->install_legacy_read_handler(0xa0000, 0xaffff, FUNC(read_handler64) ); else space->nop_read(0xa0000, 0xaffff);
if (sel == 0x08) space->install_legacy_read_handler(0xb0000, 0xb7fff, FUNC(read_handler64) ); else space->nop_read(0xb0000, 0xb7fff);
if (sel == 0x0C) space->install_legacy_read_handler(0xb8000, 0xbffff, FUNC(read_handler64) ); else space->nop_read(0xb8000, 0xbffff);
if (sel == 0x04) space->install_legacy_write_handler(0xa0000, 0xaffff, FUNC(write_handler64)); else space->nop_write(0xa0000, 0xaffff);
if (sel == 0x08) space->install_legacy_write_handler(0xb0000, 0xb7fff, FUNC(write_handler64)); else space->nop_write(0xb0000, 0xb7fff);
if (sel == 0x0C) space->install_legacy_write_handler(0xb8000, 0xbffff, FUNC(write_handler64)); else space->nop_write(0xb8000, 0xbffff);
if (sel == 0x04) space->install_legacy_read_handler(0xa0000, 0xaffff, read_handler64, read_handler_name); else space->nop_read(0xa0000, 0xaffff);
if (sel == 0x08) space->install_legacy_read_handler(0xb0000, 0xb7fff, read_handler64, read_handler_name); else space->nop_read(0xb0000, 0xb7fff);
if (sel == 0x0C) space->install_legacy_read_handler(0xb8000, 0xbffff, read_handler64, read_handler_name); else space->nop_read(0xb8000, 0xbffff);
if (sel == 0x04) space->install_legacy_write_handler(0xa0000, 0xaffff, write_handler64, write_handler_name); else space->nop_write(0xa0000, 0xaffff);
if (sel == 0x08) space->install_legacy_write_handler(0xb0000, 0xb7fff, write_handler64, write_handler_name); else space->nop_write(0xb0000, 0xb7fff);
if (sel == 0x0C) space->install_legacy_write_handler(0xb8000, 0xbffff, write_handler64, write_handler_name); else space->nop_write(0xb8000, 0xbffff);
}
else
{

View File

@ -560,14 +560,14 @@ static DEVICE_START( common_sh_start )
state->m_i80186.timer[0].int_timer = machine.scheduler().timer_alloc(FUNC(internal_timer_int), device);
state->m_i80186.timer[1].int_timer = machine.scheduler().timer_alloc(FUNC(internal_timer_int), device);
state->m_i80186.timer[2].int_timer = machine.scheduler().timer_alloc(FUNC(internal_timer_int), device);
state->m_i80186.timer[0].time_timer = machine.scheduler().timer_alloc(FUNC(NULL));
state->m_i80186.timer[1].time_timer = machine.scheduler().timer_alloc(FUNC(NULL));
state->m_i80186.timer[2].time_timer = machine.scheduler().timer_alloc(FUNC(NULL));
state->m_i80186.timer[0].time_timer = machine.scheduler().timer_alloc(FUNC_NULL);
state->m_i80186.timer[1].time_timer = machine.scheduler().timer_alloc(FUNC_NULL);
state->m_i80186.timer[2].time_timer = machine.scheduler().timer_alloc(FUNC_NULL);
state->m_i80186.dma[0].finish_timer = machine.scheduler().timer_alloc(FUNC(dma_timer_callback), device);
state->m_i80186.dma[1].finish_timer = machine.scheduler().timer_alloc(FUNC(dma_timer_callback), device);
for (i = 0; i < 9; i++)
state->m_counter[i].timer = machine.scheduler().timer_alloc(FUNC(NULL));
state->m_counter[i].timer = machine.scheduler().timer_alloc(FUNC_NULL);
}
static DEVICE_START( leland_80186_sound )

View File

@ -144,7 +144,7 @@ DIRECT_UPDATE_HANDLER( atarig42_sloop_direct_handler )
{
if (address < 0x80000)
{
atarig42_state *state = machine->driver_data<atarig42_state>();
atarig42_state *state = machine.driver_data<atarig42_state>();
direct.explicit_configure(0x00000, 0x7ffff, 0x7ffff, state->m_sloop_base);
return (offs_t)-1;
}
@ -802,7 +802,7 @@ static DRIVER_INIT( roadriot )
address_space *main = machine.device<m68000_device>("maincpu")->space(AS_PROGRAM);
state->m_sloop_base = main->install_legacy_readwrite_handler(0x000000, 0x07ffff, FUNC(roadriot_sloop_data_r), FUNC(roadriot_sloop_data_w));
main->set_direct_update_handler(direct_update_delegate_create_static(atarig42_sloop_direct_handler, machine));
main->set_direct_update_handler(direct_update_delegate(FUNC(atarig42_sloop_direct_handler), &machine));
asic65_config(machine, ASIC65_ROMBASED);
/*
@ -841,7 +841,7 @@ static DRIVER_INIT( guardian )
address_space *main = machine.device<m68000_device>("maincpu")->space(AS_PROGRAM);
state->m_sloop_base = main->install_legacy_readwrite_handler(0x000000, 0x07ffff, FUNC(guardians_sloop_data_r), FUNC(guardians_sloop_data_w));
main->set_direct_update_handler(direct_update_delegate_create_static(atarig42_sloop_direct_handler, machine));
main->set_direct_update_handler(direct_update_delegate(FUNC(atarig42_sloop_direct_handler), &machine));
asic65_config(machine, ASIC65_GUARDIANS);
/*

View File

@ -213,7 +213,7 @@ DIRECT_UPDATE_HANDLER( atarisy2_direct_handler )
/* make sure slapstic area looks like ROM */
if (address >= 0x8000 && address < 0x8200)
{
atarisy2_state *state = machine->driver_data<atarisy2_state>();
atarisy2_state *state = machine.driver_data<atarisy2_state>();
direct.explicit_configure(0x8000, 0x81ff, 0x1ff, (UINT8 *)state->m_slapstic_base);
return ~0;
}
@ -246,7 +246,7 @@ static MACHINE_RESET( atarisy2 )
atarigen_scanline_timer_reset(*machine.primary_screen, scanline_update, 64);
address_space *main = machine.device<t11_device>("maincpu")->space(AS_PROGRAM);
main->set_direct_update_handler(direct_update_delegate_create_static(atarisy2_direct_handler, machine));
main->set_direct_update_handler(direct_update_delegate(FUNC(atarisy2_direct_handler), &machine));
state->m_p2portwr_state = 0;
state->m_p2portrd_state = 0;

View File

@ -503,8 +503,8 @@ static DRIVER_INIT( beathead )
atarijsa_init(machine, "IN2", 0x0040);
/* prepare the speedups */
state->m_speedup_data = state->m_maincpu->space(AS_PROGRAM)->install_read_handler(0x00000ae8, 0x00000aeb, 0, 0, read32_delegate_create(beathead_state, speedup_r, *state));
state->m_movie_speedup_data = state->m_maincpu->space(AS_PROGRAM)->install_read_handler(0x00000804, 0x00000807, 0, 0, read32_delegate_create(beathead_state, movie_speedup_r, *state));
state->m_speedup_data = state->m_maincpu->space(AS_PROGRAM)->install_read_handler(0x00000ae8, 0x00000aeb, 0, 0, read32_delegate(FUNC(beathead_state::speedup_r), state));
state->m_movie_speedup_data = state->m_maincpu->space(AS_PROGRAM)->install_read_handler(0x00000804, 0x00000807, 0, 0, read32_delegate(FUNC(beathead_state::movie_speedup_r), state));
}

View File

@ -53,7 +53,7 @@ static TIMER_CALLBACK( delayed_sound_w )
device_triggerint(machine.device("audiocpu"));
/* use a timer to make long transfers faster */
machine.scheduler().timer_set(attotime::from_usec(50), FUNC(NULL));
machine.scheduler().timer_set(attotime::from_usec(50), FUNC_NULL);
}

View File

@ -687,7 +687,7 @@ static MACHINE_START( combatsc )
state->m_page[0] = MEM + 0x4000;
state->m_page[1] = MEM + 0x6000;
state->m_interleave_timer = machine.scheduler().timer_alloc(FUNC(NULL));
state->m_interleave_timer = machine.scheduler().timer_alloc(FUNC_NULL);
state->m_audiocpu = machine.device<cpu_device>("audiocpu");
state->m_k007121_1 = machine.device("k007121_1");

View File

@ -731,7 +731,7 @@ static void init_common(running_machine &machine, UINT32 key1, UINT32 key2, int
state->m_0xc0000000_ram_decrypted = auto_alloc_array(machine, UINT32, 0x400/4);
address_space *main = machine.device<sh2_device>("maincpu")->space(AS_PROGRAM);
main->set_direct_update_handler(direct_update_delegate_create_static(cps3_direct_handler, machine));
main->set_direct_update_handler(direct_update_delegate(FUNC(cps3_direct_handler), &machine));
// flash roms
astring tempstr;
@ -1298,7 +1298,7 @@ static WRITE32_HANDLER( cps3_0xc0000000_ram_w )
DIRECT_UPDATE_HANDLER( cps3_direct_handler )
{
cps3_state *state = machine->driver_data<cps3_state>();
cps3_state *state = machine.driver_data<cps3_state>();
// if(DEBUG_PRINTF) printf("address %04x\n",address);
/* BIOS ROM */

View File

@ -2210,15 +2210,15 @@ static void security_w(device_t *device, UINT8 data)
/*****************************************************************************/
static void init_lights(running_machine &machine, write32_space_func out1, write32_space_func out2, write32_space_func out3)
static void init_lights(running_machine &machine, write32_space_func out1, const char *out1name, write32_space_func out2, const char *out2name, write32_space_func out3, const char *out3name)
{
if(!out1) out1 = lamp_output_w;
if(!out2) out1 = lamp_output2_w;
if(!out3) out1 = lamp_output3_w;
if(!out1) out1 = lamp_output_w, out1name = "lamp_output_w";
if(!out2) out2 = lamp_output2_w, out2name = "lamp_output2_w";
if(!out3) out3 = lamp_output3_w, out3name = "lamp_output3_w";
machine.device("maincpu")->memory().space(AS_PROGRAM)->install_legacy_write_handler(0x7d000804, 0x7d000807, FUNC(out1));
machine.device("maincpu")->memory().space(AS_PROGRAM)->install_legacy_write_handler(0x7d000320, 0x7d000323, FUNC(out2));
machine.device("maincpu")->memory().space(AS_PROGRAM)->install_legacy_write_handler(0x7d000324, 0x7d000327, FUNC(out3));
machine.device("maincpu")->memory().space(AS_PROGRAM)->install_legacy_write_handler(0x7d000804, 0x7d000807, out1, out1name);
machine.device("maincpu")->memory().space(AS_PROGRAM)->install_legacy_write_handler(0x7d000320, 0x7d000323, out2, out2name);
machine.device("maincpu")->memory().space(AS_PROGRAM)->install_legacy_write_handler(0x7d000324, 0x7d000327, out3, out3name);
}
static void init_firebeat(running_machine &machine)
@ -2240,20 +2240,20 @@ static void init_firebeat(running_machine &machine)
set_ibutton(state, rom);
init_lights(machine, NULL, NULL, NULL);
init_lights(machine, FUNC_NULL, FUNC_NULL, FUNC_NULL);
}
static DRIVER_INIT(ppp)
{
init_firebeat(machine);
init_lights(machine, lamp_output_ppp_w, lamp_output2_ppp_w, lamp_output3_ppp_w);
init_lights(machine, FUNC(lamp_output_ppp_w), FUNC(lamp_output2_ppp_w), FUNC(lamp_output3_ppp_w));
}
static DRIVER_INIT(ppd)
{
firebeat_state *state = machine.driver_data<firebeat_state>();
init_firebeat(machine);
init_lights(machine, lamp_output_ppp_w, lamp_output2_ppp_w, lamp_output3_ppp_w);
init_lights(machine, FUNC(lamp_output_ppp_w), FUNC(lamp_output2_ppp_w), FUNC(lamp_output3_ppp_w));
state->m_cur_cab_data = ppd_cab_data;
}
@ -2270,7 +2270,7 @@ static DRIVER_INIT(kbm)
{
firebeat_state *state = machine.driver_data<firebeat_state>();
init_firebeat(machine);
init_lights(machine, lamp_output_kbm_w, NULL, NULL);
init_lights(machine, FUNC(lamp_output_kbm_w), FUNC_NULL, FUNC_NULL);
init_keyboard(machine);

View File

@ -1107,7 +1107,7 @@ ADDRESS_MAP_END
DIRECT_UPDATE_HANDLER( KL5C80_direct_handler )
{
hng64_state *state = machine->driver_data<hng64_state>();
hng64_state *state = machine.driver_data<hng64_state>();
direct.explicit_configure(0x0000, 0xffff, 0xffff, state->m_com_op_base);
return ~0;
@ -1702,7 +1702,7 @@ static MACHINE_RESET(hyperneo)
KL5C80_virtual_mem_sync(state);
address_space *space = machine.device<z80_device>("comm")->space(AS_PROGRAM);
space->set_direct_update_handler(direct_update_delegate_create_static(KL5C80_direct_handler, machine));
space->set_direct_update_handler(direct_update_delegate(FUNC(KL5C80_direct_handler), &machine));
cputag_set_input_line(machine, "comm", INPUT_LINE_RESET, PULSE_LINE); // reset the CPU and let 'er rip
// cputag_set_input_line(machine, "comm", INPUT_LINE_HALT, ASSERT_LINE); // hold on there pardner...

View File

@ -1232,11 +1232,11 @@ static READ32_HANDLER( speedup9_r ) { return generic_speedup(space, 9); }
static READ32_HANDLER( speedup10_r ) { return generic_speedup(space, 10); }
static READ32_HANDLER( speedup11_r ) { return generic_speedup(space, 11); }
static const read32_space_func speedup_handlers[] =
static const struct { read32_space_func func; const char *name; } speedup_handlers[] =
{
speedup0_r, speedup1_r, speedup2_r, speedup3_r,
speedup4_r, speedup5_r, speedup6_r, speedup7_r,
speedup8_r, speedup9_r, speedup10_r, speedup11_r
{ FUNC(speedup0_r) }, { FUNC(speedup1_r) }, { FUNC(speedup2_r) }, { FUNC(speedup3_r) },
{ FUNC(speedup4_r) }, { FUNC(speedup5_r) }, { FUNC(speedup6_r) }, { FUNC(speedup7_r) },
{ FUNC(speedup8_r) }, { FUNC(speedup9_r) }, { FUNC(speedup10_r) }, { FUNC(speedup11_r) }
};
#ifdef MAME_DEBUG
@ -1261,7 +1261,7 @@ static void install_speedups(running_machine &machine, const speedup_entry *entr
state->m_speedup_count = count;
for (i = 0; i < count; i++)
machine.device("maincpu")->memory().space(AS_PROGRAM)->install_legacy_read_handler(entries[i].offset, entries[i].offset + 3, FUNC(speedup_handlers[i]));
machine.device("maincpu")->memory().space(AS_PROGRAM)->install_legacy_read_handler(entries[i].offset, entries[i].offset + 3, speedup_handlers[i].func, speedup_handlers[i].name);
#ifdef MAME_DEBUG
machine.add_notifier(MACHINE_NOTIFY_EXIT, report_speedups);

View File

@ -78,8 +78,8 @@ static TIMER_CALLBACK( invasn_gun_callback );
static MACHINE_START( midzeus )
{
timer[0] = machine.scheduler().timer_alloc(FUNC(NULL));
timer[1] = machine.scheduler().timer_alloc(FUNC(NULL));
timer[0] = machine.scheduler().timer_alloc(FUNC_NULL);
timer[1] = machine.scheduler().timer_alloc(FUNC_NULL);
gun_timer[0] = machine.scheduler().timer_alloc(FUNC(invasn_gun_callback));
gun_timer[1] = machine.scheduler().timer_alloc(FUNC(invasn_gun_callback));

View File

@ -515,7 +515,7 @@ static MACHINE_START( missile )
/* set up an opcode base handler since we use mapped handlers for RAM */
address_space *space = machine.device<m6502_device>("maincpu")->space(AS_PROGRAM);
space->set_direct_update_handler(direct_update_delegate_create_static(missile_direct_handler, machine));
space->set_direct_update_handler(direct_update_delegate(FUNC(missile_direct_handler), &machine));
/* create a timer to speed/slow the CPU */
state->m_cpu_timer = machine.scheduler().timer_alloc(FUNC(adjust_cpu_speed));

View File

@ -884,29 +884,30 @@ static const struct
{
const char *s_name;
read32_space_func keycus_r;
const char *keycus_r_name;
int n_daughterboard;
} namcos11_config_table[] =
{
{ "tekken", NULL, 32 },
{ "tekkena", NULL, 32 },
{ "tekkenb", NULL, 32 },
{ "tekkenc", NULL, 32 },
{ "tekken2", keycus_c406_r, 32 },
{ "tekken2a", keycus_c406_r, 32 },
{ "tekken2b", keycus_c406_r, 32 },
{ "souledge", keycus_c409_r, 32 },
{ "souledgea", keycus_c409_r, 32 },
{ "souledge1", keycus_c409_r, 32 },
{ "souledge1j", keycus_c409_r, 32 },
{ "dunkmnia", keycus_c410_r, 32 },
{ "dunkmniaj", keycus_c410_r, 32 },
{ "xevi3dg", keycus_c430_r, 32 },
{ "primglex", keycus_c411_r, 32 },
{ "danceyes", keycus_c431_r, 32 },
{ "pocketrc", keycus_c432_r, 32 },
{ "starswep", keycus_c442_r, 0 },
{ "myangel3", keycus_c443_r, 64 },
{ "ptblank2a",keycus_c443_r, 64 },
{ "tekken", FUNC_NULL, 32 },
{ "tekkena", FUNC_NULL, 32 },
{ "tekkenb", FUNC_NULL, 32 },
{ "tekkenc", FUNC_NULL, 32 },
{ "tekken2", FUNC(keycus_c406_r), 32 },
{ "tekken2a", FUNC(keycus_c406_r), 32 },
{ "tekken2b", FUNC(keycus_c406_r), 32 },
{ "souledge", FUNC(keycus_c409_r), 32 },
{ "souledgea", FUNC(keycus_c409_r), 32 },
{ "souledge1", FUNC(keycus_c409_r), 32 },
{ "souledge1j", FUNC(keycus_c409_r), 32 },
{ "dunkmnia", FUNC(keycus_c410_r), 32 },
{ "dunkmniaj", FUNC(keycus_c410_r), 32 },
{ "xevi3dg", FUNC(keycus_c430_r), 32 },
{ "primglex", FUNC(keycus_c411_r), 32 },
{ "danceyes", FUNC(keycus_c431_r), 32 },
{ "pocketrc", FUNC(keycus_c432_r), 32 },
{ "starswep", FUNC(keycus_c442_r), 0 },
{ "myangel3", FUNC(keycus_c443_r), 64 },
{ "ptblank2a",FUNC(keycus_c443_r), 64 },
{ NULL, NULL }
};
@ -932,7 +933,7 @@ static DRIVER_INIT( namcos11 )
{
if( namcos11_config_table[ n_game ].keycus_r != NULL )
{
machine.device("maincpu")->memory().space(AS_PROGRAM)->install_legacy_read_handler( 0x1fa20000, 0x1fa2ffff, FUNC(namcos11_config_table[ n_game ].keycus_r) );
machine.device("maincpu")->memory().space(AS_PROGRAM)->install_legacy_read_handler( 0x1fa20000, 0x1fa2ffff, namcos11_config_table[ n_game ].keycus_r, namcos11_config_table[ n_game ].keycus_r_name );
}
if( namcos11_config_table[ n_game ].n_daughterboard != 0 )
{

View File

@ -315,7 +315,7 @@ static READ16_HANDLER( dsp56k_bootload_r )
DIRECT_UPDATE_HANDLER( plygonet_dsp56k_direct_handler )
{
polygonet_state *state = machine->driver_data<polygonet_state>();
polygonet_state *state = machine.driver_data<polygonet_state>();
/* Call the dsp's update handler first */
if (!state->m_dsp56k_update_handler.isnull())
@ -757,7 +757,7 @@ static DRIVER_INIT(polygonet)
/* The dsp56k occasionally executes out of mapped memory */
address_space *space = machine.device<dsp56k_device>("dsp")->space(AS_PROGRAM);
state->m_dsp56k_update_handler = space->set_direct_update_handler(direct_update_delegate_create_static(plygonet_dsp56k_direct_handler, machine));
state->m_dsp56k_update_handler = space->set_direct_update_handler(direct_update_delegate(FUNC(plygonet_dsp56k_direct_handler), &machine));
/* save states */
state->save_item(NAME(state->m_dsp56k_bank00_ram));

View File

@ -342,17 +342,17 @@ static const ppi8255_interface single_ppi_intf =
static const segaic16_memory_map_entry outrun_info[] =
{
{ 0x35/2, 0x90000, 0x10000, 0xf00000, ~0, segaic16_road_control_0_r, NULL, segaic16_road_control_0_w, NULL, NULL, "road control" },
{ 0x35/2, 0x80000, 0x01000, 0xf0f000, ~0, NULL, "bank10", NULL, "bank10", &segaic16_roadram_0, "road RAM" },
{ 0x35/2, 0x60000, 0x08000, 0xf18000, ~0, NULL, "bank11", NULL, "bank11", &cpu1ram, "CPU 1 RAM" },
{ 0x35/2, 0x00000, 0x60000, 0xf00000, ~0, NULL, "bank12", NULL, NULL, &cpu1rom, "CPU 1 ROM" },
{ 0x31/2, 0x00000, 0x04000, 0xffc000, ~0, misc_io_r, NULL, misc_io_w, NULL, NULL, "I/O space" },
{ 0x2d/2, 0x00000, 0x01000, 0xfff000, ~0, NULL, "bank13", NULL, "bank13", &segaic16_spriteram_0, "object RAM" },
{ 0x29/2, 0x00000, 0x02000, 0xffe000, ~0, NULL, "bank14", segaic16_paletteram_w, NULL, &segaic16_paletteram, "color RAM" },
{ 0x25/2, 0x00000, 0x10000, 0xfe0000, ~0, NULL, "bank15", segaic16_tileram_0_w, NULL, &segaic16_tileram_0, "tile RAM" },
{ 0x25/2, 0x10000, 0x01000, 0xfef000, ~0, NULL, "bank16", segaic16_textram_0_w, NULL, &segaic16_textram_0, "text RAM" },
{ 0x21/2, 0x60000, 0x08000, 0xf98000, ~0, NULL, "bank17", NULL, "bank17", &workram, "CPU 0 RAM" },
{ 0x21/2, 0x00000, 0x60000, 0xf80000, 0x00000, NULL, "bank18", NULL, NULL, NULL, "CPU 0 ROM" },
{ 0x35/2, 0x90000, 0x10000, 0xf00000, ~0, FUNC(segaic16_road_control_0_r), NULL, FUNC(segaic16_road_control_0_w), NULL, NULL, "road control" },
{ 0x35/2, 0x80000, 0x01000, 0xf0f000, ~0, FUNC_NULL, "bank10", FUNC_NULL, "bank10", &segaic16_roadram_0, "road RAM" },
{ 0x35/2, 0x60000, 0x08000, 0xf18000, ~0, FUNC_NULL, "bank11", FUNC_NULL, "bank11", &cpu1ram, "CPU 1 RAM" },
{ 0x35/2, 0x00000, 0x60000, 0xf00000, ~0, FUNC_NULL, "bank12", FUNC_NULL, NULL, &cpu1rom, "CPU 1 ROM" },
{ 0x31/2, 0x00000, 0x04000, 0xffc000, ~0, FUNC(misc_io_r), NULL, FUNC(misc_io_w), NULL, NULL, "I/O space" },
{ 0x2d/2, 0x00000, 0x01000, 0xfff000, ~0, FUNC_NULL, "bank13", FUNC_NULL, "bank13", &segaic16_spriteram_0, "object RAM" },
{ 0x29/2, 0x00000, 0x02000, 0xffe000, ~0, FUNC_NULL, "bank14", FUNC(segaic16_paletteram_w), NULL, &segaic16_paletteram, "color RAM" },
{ 0x25/2, 0x00000, 0x10000, 0xfe0000, ~0, FUNC_NULL, "bank15", FUNC(segaic16_tileram_0_w), NULL, &segaic16_tileram_0, "tile RAM" },
{ 0x25/2, 0x10000, 0x01000, 0xfef000, ~0, FUNC_NULL, "bank16", FUNC(segaic16_textram_0_w), NULL, &segaic16_textram_0, "text RAM" },
{ 0x21/2, 0x60000, 0x08000, 0xf98000, ~0, FUNC_NULL, "bank17", FUNC_NULL, "bank17", &workram, "CPU 0 RAM" },
{ 0x21/2, 0x00000, 0x60000, 0xf80000, 0x00000, FUNC_NULL, "bank18", FUNC_NULL, NULL, NULL, "CPU 0 ROM" },
{ 0 }
};

View File

@ -937,71 +937,71 @@ static WRITE16_HANDLER( atomicp_sound_w );
static const segaic16_memory_map_entry rom_171_5358_info_small[] =
{
{ 0x3d/2, 0x00000, 0x04000, 0xffc000, ~0, misc_io_r, NULL, misc_io_w, NULL, NULL, "I/O space" },
{ 0x39/2, 0x00000, 0x01000, 0xfff000, ~0, NULL, "bank10", segaic16_paletteram_w, NULL, &segaic16_paletteram, "color RAM" },
{ 0x35/2, 0x00000, 0x10000, 0xfe0000, ~0, NULL, "bank11", segaic16_tileram_0_w, NULL, &segaic16_tileram_0, "tile RAM" },
{ 0x35/2, 0x10000, 0x01000, 0xfef000, ~0, NULL, "bank12", segaic16_textram_0_w, NULL, &segaic16_textram_0, "text RAM" },
{ 0x31/2, 0x00000, 0x00800, 0xfff800, ~0, NULL, "bank13", NULL, "bank13", &segaic16_spriteram_0, "object RAM" },
{ 0x2d/2, 0x00000, 0x04000, 0xffc000, ~0, NULL, "bank14", NULL, "bank14", &workram, "work RAM" },
{ 0x29/2, 0x00000, 0x20000, 0xfe0000, 0x20000, NULL, "bank15", NULL, NULL, NULL, "ROM 2" },
{ 0x25/2, 0x00000, 0x20000, 0xfe0000, 0x10000, NULL, "bank16", NULL, NULL, NULL, "ROM 1" },
{ 0x21/2, 0x00000, 0x20000, 0xfe0000, 0x00000, NULL, "bank17", NULL, NULL, NULL, "ROM 0" },
{ 0x3d/2, 0x00000, 0x04000, 0xffc000, ~0, FUNC(misc_io_r), NULL, FUNC(misc_io_w), NULL, NULL, "I/O space" },
{ 0x39/2, 0x00000, 0x01000, 0xfff000, ~0, FUNC_NULL, "bank10", FUNC(segaic16_paletteram_w), NULL, &segaic16_paletteram, "color RAM" },
{ 0x35/2, 0x00000, 0x10000, 0xfe0000, ~0, FUNC_NULL, "bank11", FUNC(segaic16_tileram_0_w), NULL, &segaic16_tileram_0, "tile RAM" },
{ 0x35/2, 0x10000, 0x01000, 0xfef000, ~0, FUNC_NULL, "bank12", FUNC(segaic16_textram_0_w), NULL, &segaic16_textram_0, "text RAM" },
{ 0x31/2, 0x00000, 0x00800, 0xfff800, ~0, FUNC_NULL, "bank13", FUNC_NULL, "bank13", &segaic16_spriteram_0, "object RAM" },
{ 0x2d/2, 0x00000, 0x04000, 0xffc000, ~0, FUNC_NULL, "bank14", FUNC_NULL, "bank14", &workram, "work RAM" },
{ 0x29/2, 0x00000, 0x20000, 0xfe0000, 0x20000, FUNC_NULL, "bank15", FUNC_NULL, NULL, NULL, "ROM 2" },
{ 0x25/2, 0x00000, 0x20000, 0xfe0000, 0x10000, FUNC_NULL, "bank16", FUNC_NULL, NULL, NULL, "ROM 1" },
{ 0x21/2, 0x00000, 0x20000, 0xfe0000, 0x00000, FUNC_NULL, "bank17", FUNC_NULL, NULL, NULL, "ROM 0" },
{ 0 }
};
static const segaic16_memory_map_entry rom_171_5358_info[] =
{
{ 0x3d/2, 0x00000, 0x04000, 0xffc000, ~0, misc_io_r, NULL, misc_io_w, NULL, NULL, "I/O space" },
{ 0x39/2, 0x00000, 0x01000, 0xfff000, ~0, NULL, "bank10", segaic16_paletteram_w, NULL, &segaic16_paletteram, "color RAM" },
{ 0x35/2, 0x00000, 0x10000, 0xfe0000, ~0, NULL, "bank11", segaic16_tileram_0_w, NULL, &segaic16_tileram_0, "tile RAM" },
{ 0x35/2, 0x10000, 0x01000, 0xfef000, ~0, NULL, "bank12", segaic16_textram_0_w, NULL, &segaic16_textram_0, "text RAM" },
{ 0x31/2, 0x00000, 0x00800, 0xfff800, ~0, NULL, "bank13", NULL, "bank13", &segaic16_spriteram_0, "object RAM" },
{ 0x2d/2, 0x00000, 0x04000, 0xffc000, ~0, NULL, "bank14", NULL, "bank14", &workram, "work RAM" },
{ 0x29/2, 0x00000, 0x20000, 0xfe0000, 0x40000, NULL, "bank15", NULL, NULL, NULL, "ROM 2" },
{ 0x25/2, 0x00000, 0x20000, 0xfe0000, 0x20000, NULL, "bank16", NULL, NULL, NULL, "ROM 1" },
{ 0x21/2, 0x00000, 0x20000, 0xfe0000, 0x00000, NULL, "bank17", NULL, NULL, NULL, "ROM 0" },
{ 0x3d/2, 0x00000, 0x04000, 0xffc000, ~0, FUNC(misc_io_r), NULL, FUNC(misc_io_w), NULL, NULL, "I/O space" },
{ 0x39/2, 0x00000, 0x01000, 0xfff000, ~0, FUNC_NULL, "bank10", FUNC(segaic16_paletteram_w), NULL, &segaic16_paletteram, "color RAM" },
{ 0x35/2, 0x00000, 0x10000, 0xfe0000, ~0, FUNC_NULL, "bank11", FUNC(segaic16_tileram_0_w), NULL, &segaic16_tileram_0, "tile RAM" },
{ 0x35/2, 0x10000, 0x01000, 0xfef000, ~0, FUNC_NULL, "bank12", FUNC(segaic16_textram_0_w), NULL, &segaic16_textram_0, "text RAM" },
{ 0x31/2, 0x00000, 0x00800, 0xfff800, ~0, FUNC_NULL, "bank13", FUNC_NULL, "bank13", &segaic16_spriteram_0, "object RAM" },
{ 0x2d/2, 0x00000, 0x04000, 0xffc000, ~0, FUNC_NULL, "bank14", FUNC_NULL, "bank14", &workram, "work RAM" },
{ 0x29/2, 0x00000, 0x20000, 0xfe0000, 0x40000, FUNC_NULL, "bank15", FUNC_NULL, NULL, NULL, "ROM 2" },
{ 0x25/2, 0x00000, 0x20000, 0xfe0000, 0x20000, FUNC_NULL, "bank16", FUNC_NULL, NULL, NULL, "ROM 1" },
{ 0x21/2, 0x00000, 0x20000, 0xfe0000, 0x00000, FUNC_NULL, "bank17", FUNC_NULL, NULL, NULL, "ROM 0" },
{ 0 }
};
static const segaic16_memory_map_entry rom_171_5704_info[] =
{
{ 0x3d/2, 0x00000, 0x04000, 0xffc000, ~0, misc_io_r, NULL, misc_io_w, NULL, NULL, "I/O space" },
{ 0x39/2, 0x00000, 0x01000, 0xfff000, ~0, NULL, "bank10", segaic16_paletteram_w, NULL, &segaic16_paletteram, "color RAM" },
{ 0x35/2, 0x00000, 0x10000, 0xfe0000, ~0, NULL, "bank11", segaic16_tileram_0_w, NULL, &segaic16_tileram_0, "tile RAM" },
{ 0x35/2, 0x10000, 0x01000, 0xfef000, ~0, NULL, "bank12", segaic16_textram_0_w, NULL, &segaic16_textram_0, "text RAM" },
{ 0x31/2, 0x00000, 0x00800, 0xfff800, ~0, NULL, "bank13", NULL, "bank13", &segaic16_spriteram_0, "object RAM" },
{ 0x2d/2, 0x00000, 0x04000, 0xffc000, ~0, NULL, "bank14", NULL, "bank14", &workram, "work RAM" },
{ 0x29/2, 0x00000, 0x10000, 0xff0000, ~0, NULL, NULL, rom_5704_bank_w, NULL, NULL, "tile bank" },
{ 0x25/2, 0x00000, 0x80000, 0xfc0000, 0x80000, NULL, "bank16", NULL, NULL, NULL, "ROM 1" },
{ 0x21/2, 0x00000, 0x80000, 0xfc0000, 0x00000, NULL, "bank17", NULL, NULL, NULL, "ROM 0" },
{ 0x3d/2, 0x00000, 0x04000, 0xffc000, ~0, FUNC(misc_io_r), NULL, FUNC(misc_io_w), NULL, NULL, "I/O space" },
{ 0x39/2, 0x00000, 0x01000, 0xfff000, ~0, FUNC_NULL, "bank10", FUNC(segaic16_paletteram_w), NULL, &segaic16_paletteram, "color RAM" },
{ 0x35/2, 0x00000, 0x10000, 0xfe0000, ~0, FUNC_NULL, "bank11", FUNC(segaic16_tileram_0_w), NULL, &segaic16_tileram_0, "tile RAM" },
{ 0x35/2, 0x10000, 0x01000, 0xfef000, ~0, FUNC_NULL, "bank12", FUNC(segaic16_textram_0_w), NULL, &segaic16_textram_0, "text RAM" },
{ 0x31/2, 0x00000, 0x00800, 0xfff800, ~0, FUNC_NULL, "bank13", FUNC_NULL, "bank13", &segaic16_spriteram_0, "object RAM" },
{ 0x2d/2, 0x00000, 0x04000, 0xffc000, ~0, FUNC_NULL, "bank14", FUNC_NULL, "bank14", &workram, "work RAM" },
{ 0x29/2, 0x00000, 0x10000, 0xff0000, ~0, FUNC_NULL, NULL, FUNC(rom_5704_bank_w), NULL, NULL, "tile bank" },
{ 0x25/2, 0x00000, 0x80000, 0xfc0000, 0x80000, FUNC_NULL, "bank16", FUNC_NULL, NULL, NULL, "ROM 1" },
{ 0x21/2, 0x00000, 0x80000, 0xfc0000, 0x00000, FUNC_NULL, "bank17", FUNC_NULL, NULL, NULL, "ROM 0" },
{ 0 }
};
static const segaic16_memory_map_entry rom_atomicp_info[] =
{
{ 0x3d/2, 0x00000, 0x04000, 0xffc000, ~0, misc_io_r, NULL, misc_io_w, NULL, NULL, "I/O space" },
{ 0x39/2, 0x00000, 0x01000, 0xfff000, ~0, NULL, "bank10", segaic16_paletteram_w, NULL, &segaic16_paletteram, "color RAM" },
{ 0x35/2, 0x00000, 0x10000, 0xfe0000, ~0, NULL, "bank11", segaic16_tileram_0_w, NULL, &segaic16_tileram_0, "tile RAM" },
{ 0x35/2, 0x10000, 0x01000, 0xfef000, ~0, NULL, "bank12", segaic16_textram_0_w, NULL, &segaic16_textram_0, "text RAM" },
{ 0x31/2, 0x00000, 0x00800, 0xfff800, ~0, NULL, "bank13", NULL, "bank13", &segaic16_spriteram_0, "object RAM" },
{ 0x2d/2, 0x00000, 0x04000, 0xffc000, ~0, NULL, "bank14", NULL, "bank14", &workram, "work RAM" },
{ 0x29/2, 0x00000, 0x10000, 0xff0000, ~0, NULL, NULL, rom_5704_bank_w, NULL, NULL, "tile bank" },
{ 0x25/2, 0x00000, 0x10000, 0xff0000, ~0, NULL, NULL, atomicp_sound_w, NULL, NULL, "sound" },
{ 0x21/2, 0x00000, 0x80000, 0xfc0000, 0x00000, NULL, "bank17", NULL, NULL, NULL, "ROM 0" },
{ 0x3d/2, 0x00000, 0x04000, 0xffc000, ~0, FUNC(misc_io_r), NULL, FUNC(misc_io_w), NULL, NULL, "I/O space" },
{ 0x39/2, 0x00000, 0x01000, 0xfff000, ~0, FUNC_NULL, "bank10", FUNC(segaic16_paletteram_w), NULL, &segaic16_paletteram, "color RAM" },
{ 0x35/2, 0x00000, 0x10000, 0xfe0000, ~0, FUNC_NULL, "bank11", FUNC(segaic16_tileram_0_w), NULL, &segaic16_tileram_0, "tile RAM" },
{ 0x35/2, 0x10000, 0x01000, 0xfef000, ~0, FUNC_NULL, "bank12", FUNC(segaic16_textram_0_w), NULL, &segaic16_textram_0, "text RAM" },
{ 0x31/2, 0x00000, 0x00800, 0xfff800, ~0, FUNC_NULL, "bank13", FUNC_NULL, "bank13", &segaic16_spriteram_0, "object RAM" },
{ 0x2d/2, 0x00000, 0x04000, 0xffc000, ~0, FUNC_NULL, "bank14", FUNC_NULL, "bank14", &workram, "work RAM" },
{ 0x29/2, 0x00000, 0x10000, 0xff0000, ~0, FUNC_NULL, NULL, FUNC(rom_5704_bank_w), NULL, NULL, "tile bank" },
{ 0x25/2, 0x00000, 0x10000, 0xff0000, ~0, FUNC_NULL, NULL, FUNC(atomicp_sound_w), NULL, NULL, "sound" },
{ 0x21/2, 0x00000, 0x80000, 0xfc0000, 0x00000, FUNC_NULL, "bank17", FUNC_NULL, NULL, NULL, "ROM 0" },
{ 0 }
};
static const segaic16_memory_map_entry rom_171_5797_info[] =
{
{ 0x3d/2, 0x00000, 0x04000, 0xffc000, ~0, misc_io_r, NULL, misc_io_w, NULL, NULL, "I/O space" },
{ 0x39/2, 0x00000, 0x01000, 0xfff000, ~0, NULL, "bank10", segaic16_paletteram_w, NULL, &segaic16_paletteram, "color RAM" },
{ 0x35/2, 0x00000, 0x10000, 0xfe0000, ~0, NULL, "bank11", segaic16_tileram_0_w, NULL, &segaic16_tileram_0, "tile RAM" },
{ 0x35/2, 0x10000, 0x01000, 0xfef000, ~0, NULL, "bank12", segaic16_textram_0_w, NULL, &segaic16_textram_0, "text RAM" },
{ 0x31/2, 0x00000, 0x00800, 0xfff800, ~0, NULL, "bank13", NULL, "bank13", &segaic16_spriteram_0, "object RAM" },
{ 0x2d/2, 0x00000, 0x04000, 0xffc000, ~0, NULL, "bank14", NULL, "bank14", &workram, "work RAM" },
{ 0x29/2, 0x00000, 0x10000, 0xff0000, ~0, unknown_rgn2_r, NULL, unknown_rgn2_w, NULL, NULL, "???" },
{ 0x25/2, 0x00000, 0x04000, 0xffc000, ~0, rom_5797_bank_math_r, NULL, rom_5797_bank_math_w, NULL, NULL, "tile bank/math" },
{ 0x21/2, 0x00000, 0x80000, 0xf80000, 0x00000, NULL, "bank17", NULL, NULL, NULL, "ROM 0" },
{ 0x3d/2, 0x00000, 0x04000, 0xffc000, ~0, FUNC(misc_io_r), NULL, FUNC(misc_io_w), NULL, NULL, "I/O space" },
{ 0x39/2, 0x00000, 0x01000, 0xfff000, ~0, FUNC_NULL, "bank10", FUNC(segaic16_paletteram_w), NULL, &segaic16_paletteram, "color RAM" },
{ 0x35/2, 0x00000, 0x10000, 0xfe0000, ~0, FUNC_NULL, "bank11", FUNC(segaic16_tileram_0_w), NULL, &segaic16_tileram_0, "tile RAM" },
{ 0x35/2, 0x10000, 0x01000, 0xfef000, ~0, FUNC_NULL, "bank12", FUNC(segaic16_textram_0_w), NULL, &segaic16_textram_0, "text RAM" },
{ 0x31/2, 0x00000, 0x00800, 0xfff800, ~0, FUNC_NULL, "bank13", FUNC_NULL, "bank13", &segaic16_spriteram_0, "object RAM" },
{ 0x2d/2, 0x00000, 0x04000, 0xffc000, ~0, FUNC_NULL, "bank14", FUNC_NULL, "bank14", &workram, "work RAM" },
{ 0x29/2, 0x00000, 0x10000, 0xff0000, ~0, FUNC(unknown_rgn2_r), NULL, FUNC(unknown_rgn2_w), NULL, NULL, "???" },
{ 0x25/2, 0x00000, 0x04000, 0xffc000, ~0, FUNC(rom_5797_bank_math_r), NULL, FUNC(rom_5797_bank_math_w), NULL, NULL, "tile bank/math" },
{ 0x21/2, 0x00000, 0x80000, 0xf80000, 0x00000, FUNC_NULL, "bank17", FUNC_NULL, NULL, NULL, "ROM 0" },
{ 0 }
};

View File

@ -82,43 +82,43 @@ static WRITE16_HANDLER( rom_5987_bank_w );
static const segaic16_memory_map_entry rom_171_shad_info[] =
{
{ 0x3d/2, 0x00000, 0x04000, 0xffc000, ~0, misc_io_r, NULL, misc_io_w, NULL, NULL, "I/O space" },
{ 0x39/2, 0x00000, 0x02000, 0xffe000, ~0, NULL, "bank10", segaic16_paletteram_w, NULL, &segaic16_paletteram, "color RAM" },
{ 0x35/2, 0x00000, 0x10000, 0xfe0000, ~0, NULL, "bank11", segaic16_tileram_0_w, NULL, &segaic16_tileram_0, "tile RAM" },
{ 0x35/2, 0x10000, 0x01000, 0xfef000, ~0, NULL, "bank12", segaic16_textram_0_w, NULL, &segaic16_textram_0, "text RAM" },
{ 0x31/2, 0x00000, 0x00800, 0xfff800, ~0, NULL, "bank13", NULL, "bank13", &segaic16_spriteram_0, "object RAM" },
{ 0x2d/2, 0x00000, 0x04000, 0xffc000, ~0, NULL, "bank14", NULL, "bank14", &workram, "work RAM" },
{ 0x29/2, 0x00000, 0x10000, 0xff0000, ~0, NULL, NULL, NULL, NULL, NULL, "????" },
{ 0x25/2, 0x00000, 0x00010, 0xfffff0, ~0, genesis_vdp_r, NULL, genesis_vdp_w, NULL, NULL, "VDP" },
{ 0x21/2, 0x00000, 0x80000, 0xf80000, 0x00000, NULL, "bank17", NULL, NULL, NULL, "ROM 0" },
{ 0x3d/2, 0x00000, 0x04000, 0xffc000, ~0, FUNC(misc_io_r), NULL, FUNC(misc_io_w), NULL, NULL, "I/O space" },
{ 0x39/2, 0x00000, 0x02000, 0xffe000, ~0, FUNC_NULL, "bank10", FUNC(segaic16_paletteram_w), NULL, &segaic16_paletteram, "color RAM" },
{ 0x35/2, 0x00000, 0x10000, 0xfe0000, ~0, FUNC_NULL, "bank11", FUNC(segaic16_tileram_0_w), NULL, &segaic16_tileram_0, "tile RAM" },
{ 0x35/2, 0x10000, 0x01000, 0xfef000, ~0, FUNC_NULL, "bank12", FUNC(segaic16_textram_0_w), NULL, &segaic16_textram_0, "text RAM" },
{ 0x31/2, 0x00000, 0x00800, 0xfff800, ~0, FUNC_NULL, "bank13", FUNC_NULL, "bank13", &segaic16_spriteram_0, "object RAM" },
{ 0x2d/2, 0x00000, 0x04000, 0xffc000, ~0, FUNC_NULL, "bank14", FUNC_NULL, "bank14", &workram, "work RAM" },
{ 0x29/2, 0x00000, 0x10000, 0xff0000, ~0, FUNC_NULL, NULL, FUNC_NULL, NULL, NULL, "????" },
{ 0x25/2, 0x00000, 0x00010, 0xfffff0, ~0, FUNC(genesis_vdp_r), NULL, FUNC(genesis_vdp_w), NULL, NULL, "VDP" },
{ 0x21/2, 0x00000, 0x80000, 0xf80000, 0x00000, FUNC_NULL, "bank17", FUNC_NULL, NULL, NULL, "ROM 0" },
{ 0 }
};
static const segaic16_memory_map_entry rom_171_5874_info[] =
{
{ 0x3d/2, 0x00000, 0x04000, 0xffc000, ~0, misc_io_r, NULL, misc_io_w, NULL, NULL, "I/O space" },
{ 0x39/2, 0x00000, 0x02000, 0xffe000, ~0, NULL, "bank10", segaic16_paletteram_w, NULL, &segaic16_paletteram, "color RAM" },
{ 0x35/2, 0x00000, 0x10000, 0xfe0000, ~0, NULL, "bank11", segaic16_tileram_0_w, NULL, &segaic16_tileram_0, "tile RAM" },
{ 0x35/2, 0x10000, 0x01000, 0xfef000, ~0, NULL, "bank12", segaic16_textram_0_w, NULL, &segaic16_textram_0, "text RAM" },
{ 0x31/2, 0x00000, 0x00800, 0xfff800, ~0, NULL, "bank13", NULL, "bank13", &segaic16_spriteram_0, "object RAM" },
{ 0x2d/2, 0x00000, 0x04000, 0xffc000, ~0, NULL, "bank14", NULL, "bank14", &workram, "work RAM" },
{ 0x29/2, 0x00000, 0x00010, 0xfffff0, ~0, genesis_vdp_r, NULL, genesis_vdp_w, NULL, NULL, "VDP" },
{ 0x25/2, 0x00000, 0x80000, 0xf80000, 0x80000, NULL, "bank16", NULL, NULL, NULL, "ROM 1" },
{ 0x21/2, 0x00000, 0x80000, 0xf80000, 0x00000, NULL, "bank17", NULL, NULL, NULL, "ROM 0" },
{ 0x3d/2, 0x00000, 0x04000, 0xffc000, ~0, FUNC(misc_io_r), NULL, FUNC(misc_io_w), NULL, NULL, "I/O space" },
{ 0x39/2, 0x00000, 0x02000, 0xffe000, ~0, FUNC_NULL, "bank10", FUNC(segaic16_paletteram_w), NULL, &segaic16_paletteram, "color RAM" },
{ 0x35/2, 0x00000, 0x10000, 0xfe0000, ~0, FUNC_NULL, "bank11", FUNC(segaic16_tileram_0_w), NULL, &segaic16_tileram_0, "tile RAM" },
{ 0x35/2, 0x10000, 0x01000, 0xfef000, ~0, FUNC_NULL, "bank12", FUNC(segaic16_textram_0_w), NULL, &segaic16_textram_0, "text RAM" },
{ 0x31/2, 0x00000, 0x00800, 0xfff800, ~0, FUNC_NULL, "bank13", FUNC_NULL, "bank13", &segaic16_spriteram_0, "object RAM" },
{ 0x2d/2, 0x00000, 0x04000, 0xffc000, ~0, FUNC_NULL, "bank14", FUNC_NULL, "bank14", &workram, "work RAM" },
{ 0x29/2, 0x00000, 0x00010, 0xfffff0, ~0, FUNC(genesis_vdp_r), NULL, FUNC(genesis_vdp_w), NULL, NULL, "VDP" },
{ 0x25/2, 0x00000, 0x80000, 0xf80000, 0x80000, FUNC_NULL, "bank16", FUNC_NULL, NULL, NULL, "ROM 1" },
{ 0x21/2, 0x00000, 0x80000, 0xf80000, 0x00000, FUNC_NULL, "bank17", FUNC_NULL, NULL, NULL, "ROM 0" },
{ 0 }
};
static const segaic16_memory_map_entry rom_171_5987_info[] =
{
{ 0x3d/2, 0x00000, 0x04000, 0xffc000, ~0, misc_io_r, NULL, misc_io_w, NULL, NULL, "I/O space" },
{ 0x39/2, 0x00000, 0x02000, 0xffe000, ~0, NULL, "bank10", segaic16_paletteram_w, NULL, &segaic16_paletteram, "color RAM" },
{ 0x35/2, 0x00000, 0x10000, 0xfe0000, ~0, NULL, "bank11", segaic16_tileram_0_w, NULL, &segaic16_tileram_0, "tile RAM" },
{ 0x35/2, 0x10000, 0x01000, 0xfef000, ~0, NULL, "bank12", segaic16_textram_0_w, NULL, &segaic16_textram_0, "text RAM" },
{ 0x31/2, 0x00000, 0x00800, 0xfff800, ~0, NULL, "bank13", NULL, "bank13", &segaic16_spriteram_0, "object RAM" },
{ 0x2d/2, 0x00000, 0x04000, 0xffc000, ~0, NULL, "bank14", NULL, "bank14", &workram, "work RAM" },
{ 0x29/2, 0x00000, 0x00010, 0xfffff0, ~0, genesis_vdp_r, NULL, genesis_vdp_w, NULL, NULL, "VDP" },
{ 0x25/2, 0x00000, 0x80000, 0xf80000, 0x80000, NULL, "bank16", rom_5987_bank_w, NULL, NULL, "ROM 1/banking" },
{ 0x21/2, 0x00000, 0x100000,0xf00000, 0x00000, NULL, "bank17", NULL, NULL, NULL, "ROM 0" },
{ 0x3d/2, 0x00000, 0x04000, 0xffc000, ~0, FUNC(misc_io_r), NULL, FUNC(misc_io_w), NULL, NULL, "I/O space" },
{ 0x39/2, 0x00000, 0x02000, 0xffe000, ~0, FUNC_NULL, "bank10", FUNC(segaic16_paletteram_w), NULL, &segaic16_paletteram, "color RAM" },
{ 0x35/2, 0x00000, 0x10000, 0xfe0000, ~0, FUNC_NULL, "bank11", FUNC(segaic16_tileram_0_w), NULL, &segaic16_tileram_0, "tile RAM" },
{ 0x35/2, 0x10000, 0x01000, 0xfef000, ~0, FUNC_NULL, "bank12", FUNC(segaic16_textram_0_w), NULL, &segaic16_textram_0, "text RAM" },
{ 0x31/2, 0x00000, 0x00800, 0xfff800, ~0, FUNC_NULL, "bank13", FUNC_NULL, "bank13", &segaic16_spriteram_0, "object RAM" },
{ 0x2d/2, 0x00000, 0x04000, 0xffc000, ~0, FUNC_NULL, "bank14", FUNC_NULL, "bank14", &workram, "work RAM" },
{ 0x29/2, 0x00000, 0x00010, 0xfffff0, ~0, FUNC(genesis_vdp_r), NULL, FUNC(genesis_vdp_w), NULL, NULL, "VDP" },
{ 0x25/2, 0x00000, 0x80000, 0xf80000, 0x80000, FUNC_NULL, "bank16", FUNC(rom_5987_bank_w), NULL, NULL, "ROM 1/banking" },
{ 0x21/2, 0x00000, 0x100000,0xf00000, 0x00000, FUNC_NULL, "bank17", FUNC_NULL, NULL, NULL, "ROM 0" },
{ 0 }
};

View File

@ -123,7 +123,7 @@ static WRITE8_HANDLER( esb_slapstic_w )
DIRECT_UPDATE_HANDLER( esb_setdirect )
{
starwars_state *state = machine->driver_data<starwars_state>();
starwars_state *state = machine.driver_data<starwars_state>();
/* if we are in the slapstic region, process it */
if ((address & 0xe000) == 0x8000)
{
@ -521,7 +521,7 @@ static DRIVER_INIT( esb )
/* install an opcode base handler */
address_space *space = machine.device<m6809_device>("maincpu")->space(AS_PROGRAM);
space->set_direct_update_handler(direct_update_delegate_create_static(esb_setdirect, machine));
space->set_direct_update_handler(direct_update_delegate(FUNC(esb_setdirect), &machine));
/* install read/write handlers for it */
machine.device("maincpu")->memory().space(AS_PROGRAM)->install_legacy_readwrite_handler(0x8000, 0x9fff, FUNC(esb_slapstic_r), FUNC(esb_slapstic_w));

View File

@ -404,7 +404,7 @@ static MACHINE_RESET( shadfgtr )
DIRECT_UPDATE_HANDLER( vcombat_vid_0_direct_handler )
{
vcombat_state *state = machine->driver_data<vcombat_state>();
vcombat_state *state = machine.driver_data<vcombat_state>();
if (address >= 0xfffc0000 && address <= 0xffffffff)
{
direct.explicit_configure(0xfffc0000, 0xffffffff, 0x3ffff, state->m_vid_0_shared_RAM);
@ -415,7 +415,7 @@ DIRECT_UPDATE_HANDLER( vcombat_vid_0_direct_handler )
DIRECT_UPDATE_HANDLER( vcombat_vid_1_direct_handler )
{
vcombat_state *state = machine->driver_data<vcombat_state>();
vcombat_state *state = machine.driver_data<vcombat_state>();
if (address >= 0xfffc0000 && address <= 0xffffffff)
{
direct.explicit_configure(0xfffc0000, 0xffffffff, 0x3ffff, state->m_vid_1_shared_RAM);
@ -432,10 +432,10 @@ static DRIVER_INIT( vcombat )
/* The two i860s execute out of RAM */
address_space *space = machine.device<i860_device>("vid_0")->space(AS_PROGRAM);
space->set_direct_update_handler(direct_update_delegate_create_static(vcombat_vid_0_direct_handler, machine));
space->set_direct_update_handler(direct_update_delegate(FUNC(vcombat_vid_0_direct_handler), &machine));
space = machine.device<i860_device>("vid_1")->space(AS_PROGRAM);
space->set_direct_update_handler(direct_update_delegate_create_static(vcombat_vid_1_direct_handler, machine));
space->set_direct_update_handler(direct_update_delegate(FUNC(vcombat_vid_1_direct_handler), &machine));
/* Allocate the 68000 framebuffers */
state->m_m68k_framebuffer[0] = auto_alloc_array(machine, UINT16, 0x8000);
@ -480,7 +480,7 @@ static DRIVER_INIT( shadfgtr )
/* The i860 executes out of RAM */
address_space *space = machine.device<i860_device>("vid_0")->space(AS_PROGRAM);
space->set_direct_update_handler(direct_update_delegate_create_static(vcombat_vid_0_direct_handler, machine));
space->set_direct_update_handler(direct_update_delegate(FUNC(vcombat_vid_0_direct_handler), &machine));
}

View File

@ -528,8 +528,8 @@ static MACHINE_START( vegas )
state->m_voodoo = machine.device("voodoo");
/* allocate timers for the NILE */
state->m_timer[0] = machine.scheduler().timer_alloc(FUNC(NULL));
state->m_timer[1] = machine.scheduler().timer_alloc(FUNC(NULL));
state->m_timer[0] = machine.scheduler().timer_alloc(FUNC_NULL);
state->m_timer[1] = machine.scheduler().timer_alloc(FUNC_NULL);
state->m_timer[2] = machine.scheduler().timer_alloc(FUNC(nile_timer_callback));
state->m_timer[3] = machine.scheduler().timer_alloc(FUNC(nile_timer_callback));

View File

@ -32,6 +32,7 @@ public:
UINT8 m_v493_irq_state;
UINT8 m_v493_irq_vector;
timer_expired_func m_v493_callback;
const char *m_v493_callback_name;
UINT8 m_zwackery_sound_data;
attotime m_m6840_counter_periods[3];
attotime m_m6840_internal_counter_period;

View File

@ -340,7 +340,7 @@ DIRECT_UPDATE_HANDLER( a310_setopbase )
void archimedes_driver_init(running_machine &machine)
{
// address_space *space = machine.device<arm_device>("maincpu")->space(AS_PROGRAM);
// space->set_direct_update_handler(direct_update_delegate_create_static(a310_setopbase, machine));
// space->set_direct_update_handler(direct_update_delegate(FUNC(a310_setopbase), &machine));
}
static const char *const ioc_regnames[] =

View File

@ -454,7 +454,7 @@ static STATE_POSTLOAD( slapstic_postload )
DIRECT_UPDATE_HANDLER( atarigen_slapstic_setdirect )
{
atarigen_state *state = machine->driver_data<atarigen_state>();
atarigen_state *state = machine.driver_data<atarigen_state>();
/* if we jump to an address in the slapstic region, tweak the slapstic
at that address and return ~0; this will cause us to be called on
@ -511,7 +511,7 @@ void atarigen_slapstic_init(device_t *device, offs_t base, offs_t mirror, int ch
state->m_slapstic_mirror = mirror;
address_space *space = downcast<cpu_device *>(device)->space(AS_PROGRAM);
space->set_direct_update_handler(direct_update_delegate_create_static(atarigen_slapstic_setdirect, device->machine()));
space->set_direct_update_handler(direct_update_delegate(FUNC(atarigen_slapstic_setdirect), &device->machine()));
}
}

View File

@ -173,7 +173,7 @@ WRITE8_HANDLER( beezer_bankswitch_w )
space->install_legacy_write_handler(0xc600, 0xc7ff, FUNC(watchdog_reset_w));
space->install_legacy_write_handler(0xc800, 0xc9ff, FUNC(beezer_map_w));
space->install_legacy_read_handler(0xca00, 0xcbff, FUNC(beezer_line_r));
space->install_readwrite_handler(0xce00, 0xcfff, read8_delegate_create(via6522_device, read, *via_0), write8_delegate_create(via6522_device, write, *via_0));
space->install_readwrite_handler(0xce00, 0xcfff, read8_delegate(FUNC(via6522_device::read), via_0), write8_delegate(FUNC(via6522_device::write), via_0));
}
else
{

View File

@ -182,6 +182,7 @@ MACHINE_RESET( mcr68 )
/* for the most part all MCR/68k games are the same */
mcr68_common_init(machine);
state->m_v493_callback = mcr68_493_callback;
state->m_v493_callback_name = "mcr68_493_callback";
/* vectors are 1 and 2 */
state->m_v493_irq_vector = 1;
@ -201,6 +202,7 @@ MACHINE_RESET( zwackery )
/* for the most part all MCR/68k games are the same */
mcr68_common_init(machine);
state->m_v493_callback = zwackery_493_callback;
state->m_v493_callback_name = "zwackery_493_callback";
/* vectors are 5 and 6 */
state->m_v493_irq_vector = 5;
@ -227,7 +229,7 @@ INTERRUPT_GEN( mcr68_interrupt )
/* also set a timer to generate the 493 signal at a specific time before the next VBLANK */
/* the timing of this is crucial for Blasted and Tri-Sports, which check the timing of */
/* VBLANK and 493 using counter 2 */
device->machine().scheduler().timer_set(attotime::from_hz(30) - state->m_timing_factor, FUNC(state->m_v493_callback));
device->machine().scheduler().timer_set(attotime::from_hz(30) - state->m_timing_factor, state->m_v493_callback, state->m_v493_callback_name);
}

View File

@ -136,7 +136,7 @@ static TIMER_CALLBACK( delayed_gamma_w )
cputag_set_input_line(machine, "gamma", INPUT_LINE_NMI, PULSE_LINE);
/* the sound CPU needs to reply in 250microseconds (according to Neil Bradley) */
machine.scheduler().timer_set(attotime::from_usec(250), FUNC(NULL));
machine.scheduler().timer_set(attotime::from_usec(250), FUNC_NULL);
}

View File

@ -506,7 +506,7 @@ DRIVER_INIT( mkyturbo )
/********************** Terminator 2 **********************/
static void term2_init_common(running_machine &machine, write16_space_func hack_w)
static void term2_init_common(running_machine &machine, write16_space_func hack_w, const char *name)
{
midyunit_state *state = machine.driver_data<midyunit_state>();
/* protection */
@ -526,13 +526,13 @@ static void term2_init_common(running_machine &machine, write16_space_func hack_
/* HACK: this prevents the freeze on the movies */
/* until we figure whats causing it, this is better than nothing */
state->m_t2_hack_mem = machine.device("maincpu")->memory().space(AS_PROGRAM)->install_legacy_write_handler(0x010aa0e0, 0x010aa0ff, FUNC(hack_w));
state->m_t2_hack_mem = machine.device("maincpu")->memory().space(AS_PROGRAM)->install_legacy_write_handler(0x010aa0e0, 0x010aa0ff, hack_w, name);
}
DRIVER_INIT( term2 ) { term2_init_common(machine, term2_hack_w); }
DRIVER_INIT( term2la3 ) { term2_init_common(machine, term2la3_hack_w); }
DRIVER_INIT( term2la2 ) { term2_init_common(machine, term2la2_hack_w); }
DRIVER_INIT( term2la1 ) { term2_init_common(machine, term2la1_hack_w); }
DRIVER_INIT( term2 ) { term2_init_common(machine, FUNC(term2_hack_w)); }
DRIVER_INIT( term2la3 ) { term2_init_common(machine, FUNC(term2la3_hack_w)); }
DRIVER_INIT( term2la2 ) { term2_init_common(machine, FUNC(term2la2_hack_w)); }
DRIVER_INIT( term2la1 ) { term2_init_common(machine, FUNC(term2la1_hack_w)); }

View File

@ -58,20 +58,20 @@ static WRITE8_HANDLER( bank14_w ) { bank_w(space, offset, data, 13); }
static WRITE8_HANDLER( bank15_w ) { bank_w(space, offset, data, 14); }
static WRITE8_HANDLER( bank16_w ) { bank_w(space, offset, data, 15); }
static const read8_space_func io_bank_handler_r[16] =
static const struct { read8_space_func func; const char *name; } io_bank_handler_r[16] =
{
bank1_r, bank2_r, bank3_r, bank4_r,
bank5_r, bank6_r, bank7_r, bank8_r,
bank9_r, bank10_r, bank11_r, bank12_r,
bank13_r, bank14_r, bank15_r, bank16_r
{ FUNC(bank1_r) }, { FUNC(bank2_r) }, { FUNC(bank3_r) }, { FUNC(bank4_r) },
{ FUNC(bank5_r) }, { FUNC(bank6_r) }, { FUNC(bank7_r) }, { FUNC(bank8_r) },
{ FUNC(bank9_r) }, { FUNC(bank10_r) }, { FUNC(bank11_r) }, { FUNC(bank12_r) },
{ FUNC(bank13_r) }, { FUNC(bank14_r) }, { FUNC(bank15_r) }, { FUNC(bank16_r) }
};
static const write8_space_func io_bank_handler_w[16] =
static const struct { write8_space_func func; const char *name; } io_bank_handler_w[16] =
{
bank1_w, bank2_w, bank3_w, bank4_w,
bank5_w, bank6_w, bank7_w, bank8_w,
bank9_w, bank10_w, bank11_w, bank12_w,
bank13_w, bank14_w, bank15_w, bank16_w
{ FUNC(bank1_w) }, { FUNC(bank2_w) }, { FUNC(bank3_w) }, { FUNC(bank4_w) },
{ FUNC(bank5_w) }, { FUNC(bank6_w) }, { FUNC(bank7_w) }, { FUNC(bank8_w) },
{ FUNC(bank9_w) }, { FUNC(bank10_w) }, { FUNC(bank11_w) }, { FUNC(bank12_w) },
{ FUNC(bank13_w) }, { FUNC(bank14_w) }, { FUNC(bank15_w) }, { FUNC(bank16_w) }
};
@ -690,7 +690,7 @@ static void set_bank(running_machine &machine, int banknum, const bankhandler *h
else
{
if (!state->m_active_bank[banknum].bank_handler_r)
space->install_legacy_read_handler(bankstart, bankstart + 0x1fff, FUNC(io_bank_handler_r[banknum]));
space->install_legacy_read_handler(bankstart, bankstart + 0x1fff, io_bank_handler_r[banknum].func, io_bank_handler_r[banknum].name);
}
/* write handlers (except for the 0xe000-0xffff range) */
@ -704,7 +704,7 @@ static void set_bank(running_machine &machine, int banknum, const bankhandler *h
else
{
if (!state->m_active_bank[banknum].bank_handler_r)
space->install_legacy_write_handler(bankstart, bankstart + 0x1fff, FUNC(io_bank_handler_w[banknum]));
space->install_legacy_write_handler(bankstart, bankstart + 0x1fff, io_bank_handler_w[banknum].func, io_bank_handler_w[banknum].name);
}
}

View File

@ -314,29 +314,31 @@ static void update_memory_mapping(running_machine &machine, struct memory_mapper
offs_t region_end = region_start + ((rgn->length - 1 < region_size) ? rgn->length - 1 : region_size);
const char *writebank = rgn->writebank;
write16_space_func write = rgn->write;
const char *writename = rgn->writename;
const char *readbank = rgn->readbank;
read16_space_func read = rgn->read;
const char *readname = rgn->readname;
/* ROM areas need extra clamping */
if (rgn->romoffset != ~0)
{
offs_t romsize = chip->cpu->region()->bytes();
if (region_start >= romsize)
read = NULL;
read = NULL, readname = "(null)";
else if (region_start + rgn->length > romsize)
region_end = romsize - 1;
}
/* map it */
if (read != NULL)
space->install_legacy_read_handler(region_start, region_end, 0, region_mirror, FUNC(read));
space->install_legacy_read_handler(region_start, region_end, 0, region_mirror, read, readname);
else if (readbank != NULL)
space->install_read_bank(region_start, region_end, 0, region_mirror, readbank);
else
space->install_legacy_read_handler(region_start, region_end, 0, region_mirror, FUNC(segaic16_open_bus_r));
if (write != NULL)
space->install_legacy_write_handler(region_start, region_end, 0, region_mirror, FUNC(write));
space->install_legacy_write_handler(region_start, region_end, 0, region_mirror, write, writename);
else if (writebank != NULL)
space->install_write_bank(region_start, region_end, 0, region_mirror, writebank);
else

View File

@ -19,8 +19,10 @@ struct _segaic16_memory_map_entry
offs_t mirror; /* maximal mirror values (will be truncated) */
offs_t romoffset; /* offset within REGION_CPU0, or ~0 for independent entries */
read16_space_func read; /* read handler */
const char * readname;
const char * readbank; /* bank for reading */
write16_space_func write; /* write handler */
const char * writename;
const char * writebank; /* bank for writing */
UINT16 ** base; /* pointer to memory base */
const char * name; /* friendly name for debugging */

View File

@ -1836,7 +1836,7 @@ static void snes_init_ram( running_machine &machine )
DIRECT_UPDATE_HANDLER( snes_spc_direct )
{
direct.explicit_configure(0x0000, 0xffff, 0xffff, spc_get_ram(machine->device("spc700")));
direct.explicit_configure(0x0000, 0xffff, 0xffff, spc_get_ram(machine.device("spc700")));
return ~0;
}
@ -1856,8 +1856,8 @@ MACHINE_START( snes )
state->m_spc700 = machine.device<snes_sound_device>("spc700");
state->m_superfx = machine.device<cpu_device>("superfx");
state->m_maincpu->space(AS_PROGRAM)->set_direct_update_handler(direct_update_delegate_create_static(snes_direct, machine));
state->m_soundcpu->space(AS_PROGRAM)->set_direct_update_handler(direct_update_delegate_create_static(snes_spc_direct, machine));
state->m_maincpu->space(AS_PROGRAM)->set_direct_update_handler(direct_update_delegate(FUNC(snes_direct), &machine));
state->m_soundcpu->space(AS_PROGRAM)->set_direct_update_handler(direct_update_delegate(FUNC(snes_spc_direct), &machine));
// power-on sets these registers like this
snes_ram[WRIO] = 0xff;

View File

@ -57,7 +57,7 @@ VIDEO_START( victory )
state->m_scrollx = state->m_scrolly = 0;
state->m_video_control = 0;
memset(&state->m_micro, 0, sizeof(state->m_micro));
state->m_micro.timer = machine.scheduler().timer_alloc(FUNC(NULL));
state->m_micro.timer = machine.scheduler().timer_alloc(FUNC_NULL);
/* register for state saving */
state_save_register_global_array(machine, state->m_paletteram);