diff options
Diffstat (limited to 'src/devices/bus/neogeo/pvc.h')
-rw-r--r-- | src/devices/bus/neogeo/pvc.h | 63 |
1 files changed, 34 insertions, 29 deletions
diff --git a/src/devices/bus/neogeo/pvc.h b/src/devices/bus/neogeo/pvc.h index 064efef717a..89e95bfa59d 100644 --- a/src/devices/bus/neogeo/pvc.h +++ b/src/devices/bus/neogeo/pvc.h @@ -1,7 +1,9 @@ // license:BSD-3-Clause // copyright-holders:S. Smith,David Haywood,Fabio Priuli -#ifndef __NEOGEO_PVC_H -#define __NEOGEO_PVC_H +#ifndef MAME_BUS_NEOGEO_PVC_H +#define MAME_BUS_NEOGEO_PVC_H + +#pragma once #include "slot.h" #include "rom.h" @@ -9,18 +11,14 @@ #include "prot_cmc.h" #include "prot_pvc.h" -// ======================> neogeo_pvc_cart +// ======================> neogeo_pvc_cart_device -class neogeo_pvc_cart : public neogeo_rom_device +class neogeo_pvc_cart_device : public neogeo_rom_device { public: // construction/destruction - neogeo_pvc_cart(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, uint16_t clock, const char *shortname, const char *source); - neogeo_pvc_cart(const machine_config &mconfig, const char *tag, device_t *owner, uint16_t clock); + neogeo_pvc_cart_device(const machine_config &mconfig, const char *tag, device_t *owner, uint16_t clock); - // device-level overrides - virtual void device_start() override; - virtual void device_reset() override; virtual machine_config_constructor device_mconfig_additions() const override; // reading and writing @@ -28,8 +26,15 @@ public: virtual DECLARE_READ16_MEMBER(protection_r) override { return m_pvc_prot->protection_r(space, offset, mem_mask); } virtual DECLARE_WRITE16_MEMBER(protection_w) override { m_pvc_prot->protection_w(space, offset, data, mem_mask); } - virtual void decrypt_all(DECRYPT_ALL_PARAMS) override {} - virtual int get_fixed_bank_type(void) override { return 0; } + virtual void decrypt_all(DECRYPT_ALL_PARAMS) override { } + virtual int get_fixed_bank_type() override { return 0; } + +protected: + neogeo_pvc_cart_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint16_t clock); + + // device-level overrides + virtual void device_start() override; + virtual void device_reset() override; required_device<cmc_prot_device> m_cmc_prot; required_device<pcm2_prot_device> m_pcm2_prot; @@ -38,67 +43,67 @@ public: }; // device type definition -extern const device_type NEOGEO_PVC_CART; +DECLARE_DEVICE_TYPE(NEOGEO_PVC_CART, neogeo_pvc_cart_device) /************************************************* mslug5 **************************************************/ -class neogeo_pvc_mslug5_cart : public neogeo_pvc_cart +class neogeo_pvc_mslug5_cart_device : public neogeo_pvc_cart_device { public: - neogeo_pvc_mslug5_cart(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + neogeo_pvc_mslug5_cart_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); virtual void decrypt_all(DECRYPT_ALL_PARAMS) override; - virtual int get_fixed_bank_type(void) override { return 1; } + virtual int get_fixed_bank_type() override { return 1; } }; -extern const device_type NEOGEO_PVC_MSLUG5_CART; +DECLARE_DEVICE_TYPE(NEOGEO_PVC_MSLUG5_CART, neogeo_pvc_mslug5_cart_device) /************************************************* svc **************************************************/ -class neogeo_pvc_svc_cart : public neogeo_pvc_cart +class neogeo_pvc_svc_cart_device : public neogeo_pvc_cart_device { public: - neogeo_pvc_svc_cart(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + neogeo_pvc_svc_cart_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); virtual void decrypt_all(DECRYPT_ALL_PARAMS) override; - virtual int get_fixed_bank_type(void) override { return 2; } + virtual int get_fixed_bank_type() override { return 2; } }; -extern const device_type NEOGEO_PVC_SVC_CART; +DECLARE_DEVICE_TYPE(NEOGEO_PVC_SVC_CART, neogeo_pvc_svc_cart_device) /************************************************* kof2003 **************************************************/ -class neogeo_pvc_kof2003_cart : public neogeo_pvc_cart +class neogeo_pvc_kof2003_cart_device : public neogeo_pvc_cart_device { public: - neogeo_pvc_kof2003_cart(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + neogeo_pvc_kof2003_cart_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); virtual void decrypt_all(DECRYPT_ALL_PARAMS) override; - virtual int get_fixed_bank_type(void) override { return 2; } + virtual int get_fixed_bank_type() override { return 2; } }; -extern const device_type NEOGEO_PVC_KOF2003_CART; +DECLARE_DEVICE_TYPE(NEOGEO_PVC_KOF2003_CART, neogeo_pvc_kof2003_cart_device) /************************************************* kof2003h **************************************************/ -class neogeo_pvc_kof2003h_cart : public neogeo_pvc_cart +class neogeo_pvc_kof2003h_cart_device : public neogeo_pvc_cart_device { public: - neogeo_pvc_kof2003h_cart(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + neogeo_pvc_kof2003h_cart_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); virtual void decrypt_all(DECRYPT_ALL_PARAMS) override; - virtual int get_fixed_bank_type(void) override { return 2; } + virtual int get_fixed_bank_type() override { return 2; } }; -extern const device_type NEOGEO_PVC_KOF2003H_CART; +DECLARE_DEVICE_TYPE(NEOGEO_PVC_KOF2003H_CART, neogeo_pvc_kof2003h_cart_device) -#endif +#endif // MAME_BUS_NEOGEO_PVC_H |