diff --git a/src/emu/delegate.h b/src/emu/delegate.h index f09fdc35dd6..bd7d4035d5d 100644 --- a/src/emu/delegate.h +++ b/src/emu/delegate.h @@ -338,13 +338,25 @@ public: _ReturnType operator()(_P1Type p1, _P2Type p2, _P3Type p3) const { return (*m_function)(m_callobject, p1, p2, p3); } _ReturnType operator()(_P1Type p1, _P2Type p2, _P3Type p3, _P4Type p4) const { return (*m_function)(m_callobject, p1, p2, p3, p4); } - // static stub creator + // static stub creators template::member_func_type _Function> static delegate_base static_creator(const char *name) { return delegate_base(_Function, name, (_FunctionClass *)NULL); } + template::static_func_type _Function> + static delegate_base static_creator(const char *name) + { + return delegate_base(_Function, name, (_FunctionClass *)NULL); + } + + template::static_ref_func_type _Function> + static delegate_base static_creator(const char *name) + { + return delegate_base(_Function, name, (_FunctionClass *)NULL); + } + protected: // bind the actual object void bind(delegate_generic_class *object) @@ -553,13 +565,25 @@ public: _ReturnType operator()(_P1Type p1, _P2Type p2, _P3Type p3) const { return (*m_function)(m_object, p1, p2, p3); } _ReturnType operator()(_P1Type p1, _P2Type p2, _P3Type p3, _P4Type p4) const { return (*m_function)(m_object, p1, p2, p3, p4); } - // static stub creator + // static stub creators template::member_func_type _Function> static delegate_base static_creator(const char *name) { return delegate_base(_Function, name, (_FunctionClass *)NULL); } + template::static_func_type _Function> + static delegate_base static_creator(const char *name) + { + return delegate_base(_Function, name, (_FunctionClass *)NULL); + } + + template::static_ref_func_type _Function> + static delegate_base static_creator(const char *name) + { + return delegate_base(_Function, name, (_FunctionClass *)NULL); + } + protected: // bind the actual object void bind(delegate_generic_class *object) diff --git a/src/emu/devcb.h b/src/emu/devcb.h index 38fbea53390..b45e4be3b3a 100644 --- a/src/emu/devcb.h +++ b/src/emu/devcb.h @@ -197,21 +197,6 @@ void devcb_stub16(device_t *device, offs_t offset, UINT16 data) #define DECLARE_WRITE_LINE_MEMBER(name) void name(ATTR_UNUSED int state) #define WRITE_LINE_MEMBER(name) void name(ATTR_UNUSED int state) -// macros for inline device handler initialization - -#define MCFG_DEVICE_CONFIG_DEVCB_GENERIC(_access, _struct, _entry, _tag, _type, _linefunc, _devfunc, _spacefunc) \ - MCFG_DEVICE_CONFIG_DATA32(_struct, _entry .type, DEVCB_TYPE_DEVICE) \ - MCFG_DEVICE_CONFIG_DATAPTR(_struct, _entry .tag, _tag) \ - MCFG_DEVICE_CONFIG_DATAPTR(_struct, _entry . _access ## line, _linefunc) \ - MCFG_DEVICE_CONFIG_DATAPTR(_struct, _entry . _access ## device, _devfunc) \ - MCFG_DEVICE_CONFIG_DATAPTR(_struct, _entry . _access ## space, _spacefunc) - -#define MCFG_DEVICE_CONFIG_READ_LINE(_struct, _entry, _tag, _func) MCFG_DEVICE_CONFIG_DEVCB_GENERIC(read, _struct, _entry, _tag, DEVCB_TYPE_DEVICE, _func, NULL, NULL) -#define MCFG_DEVICE_CONFIG_WRITE_LINE(_struct, _entry, _tag, _func) MCFG_DEVICE_CONFIG_DEVCB_GENERIC(write, _struct, _entry, _tag, DEVCB_TYPE_DEVICE, _func, NULL, NULL) - -#define MCFG_DEVICE_CONFIG_READ_HANDLER(_struct, _entry, _tag, _func) MCFG_DEVICE_CONFIG_DEVCB_GENERIC(read, _struct, _entry, _tag, DEVCB_TYPE_DEVICE, NULL, _func, NULL) -#define MCFG_DEVICE_CONFIG_WRITE_HANDLER(_struct, _entry, _tag, _func) MCFG_DEVICE_CONFIG_DEVCB_GENERIC(write, _struct, _entry, _tag, DEVCB_TYPE_DEVICE, NULL, _func, NULL) - //**************************************************************************