diff options
Diffstat (limited to 'src/devices/bus/z88')
-rw-r--r-- | src/devices/bus/z88/flash.cpp | 4 | ||||
-rw-r--r-- | src/devices/bus/z88/z88.h | 19 |
2 files changed, 11 insertions, 12 deletions
diff --git a/src/devices/bus/z88/flash.cpp b/src/devices/bus/z88/flash.cpp index ee92f351ec7..1fb8f9b6420 100644 --- a/src/devices/bus/z88/flash.cpp +++ b/src/devices/bus/z88/flash.cpp @@ -73,7 +73,7 @@ uint8_t* z88_1024k_flash_device::get_cart_base() READ8_MEMBER(z88_1024k_flash_device::read) { - return m_flash->read(offset & (get_cart_size() - 1)); + return m_flash->read(space, offset & (get_cart_size() - 1)); } /*------------------------------------------------- @@ -82,5 +82,5 @@ READ8_MEMBER(z88_1024k_flash_device::read) WRITE8_MEMBER(z88_1024k_flash_device::write) { - m_flash->write(offset & (get_cart_size() - 1), data); + m_flash->write(space, offset & (get_cart_size() - 1), data); } diff --git a/src/devices/bus/z88/z88.h b/src/devices/bus/z88/z88.h index 444eeb3c111..de8ecdc883f 100644 --- a/src/devices/bus/z88/z88.h +++ b/src/devices/bus/z88/z88.h @@ -90,18 +90,9 @@ class z88cart_slot_device : public device_t, { public: // construction/destruction - template <typename T> - z88cart_slot_device(machine_config const &mconfig, char const *tag, device_t *owner, T &&opts, char const *dflt) - : z88cart_slot_device(mconfig, tag, owner, 0) - { - option_reset(); - opts(*this); - set_default_option(dflt); - set_fixed(false); - } z88cart_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); - auto out_flp_callback() { return m_out_flp_cb.bind(); } + template <class Object> devcb_base &set_out_flp_callback(Object &&cb) { return m_out_flp_cb.set_callback(std::forward<Object>(cb)); } // image-level overrides virtual image_init_result call_load() override; @@ -142,4 +133,12 @@ private: // device type definition DECLARE_DEVICE_TYPE(Z88CART_SLOT, z88cart_slot_device) + +/*************************************************************************** + DEVICE CONFIGURATION MACROS +***************************************************************************/ + +#define MCFG_Z88CART_SLOT_OUT_FLP_CB(_devcb) \ + downcast<z88cart_slot_device &>(*device).set_out_flp_callback(DEVCB_##_devcb); + #endif // MAME_BUS_Z88_Z88_H |