diff options
Diffstat (limited to 'src/mame/machine/segacrp2_device.h')
-rw-r--r-- | src/mame/machine/segacrp2_device.h | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/src/mame/machine/segacrp2_device.h b/src/mame/machine/segacrp2_device.h index 2b8a8039990..b1035f45182 100644 --- a/src/mame/machine/segacrp2_device.h +++ b/src/mame/machine/segacrp2_device.h @@ -8,22 +8,20 @@ #include "cpu/z80/z80.h" - -#define MCFG_SEGAZ80_SET_DECRYPTED_TAG(_tag) \ - downcast<segacrp2_z80_device &>(*device).set_decrypted_tag(_tag); - // base class class segacrp2_z80_device : public z80_device { public: - void set_decrypted_tag(const char* decrypted_tag) { m_decrypted_tag = decrypted_tag; } - const char* m_decrypted_tag; + template <typename T> void set_decrypted_tag(T &&decrypted_tag) { m_decrypted.set_tag(std::forward<T>(decrypted_tag)); } + protected: segacrp2_z80_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); virtual void device_start() override; virtual void device_reset() override; virtual void decrypt(); + + required_shared_ptr<uint8_t> m_decrypted; }; |