summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/bus/neogeo/boot_cthd.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/devices/bus/neogeo/boot_cthd.h')
-rw-r--r--src/devices/bus/neogeo/boot_cthd.h60
1 files changed, 32 insertions, 28 deletions
diff --git a/src/devices/bus/neogeo/boot_cthd.h b/src/devices/bus/neogeo/boot_cthd.h
index 7d3bb213b80..1846d1dd744 100644
--- a/src/devices/bus/neogeo/boot_cthd.h
+++ b/src/devices/bus/neogeo/boot_cthd.h
@@ -1,37 +1,44 @@
// license:BSD-3-Clause
// copyright-holders:S. Smith,David Haywood,Fabio Priuli
-#ifndef __NEOGEO_BOOTCTHD_H
-#define __NEOGEO_BOOTCTHD_H
+#ifndef MAME_BUS_NEOGEO_BOOT_CTHD_H
+#define MAME_BUS_NEOGEO_BOOT_CTHD_H
+
+#pragma once
#include "slot.h"
-#include "rom.h"
+#include "prot_cmc.h"
#include "prot_cthd.h"
+#include "prot_kof2k2.h"
+#include "rom.h"
-// ======================> neogeo_cthd2k3_cart
-class neogeo_cthd2k3_cart : public neogeo_rom_device
+// ======================> neogeo_cthd2k3_cart_device
+
+class neogeo_cthd2k3_cart_device : public neogeo_rom_device
{
public:
// construction/destruction
- neogeo_cthd2k3_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_cthd2k3_cart(const machine_config &mconfig, const char *tag, device_t *owner, uint16_t clock);
+ neogeo_cthd2k3_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
virtual uint32_t get_bank_base(uint16_t sel) override { return m_prot->get_bank_base(sel); }
virtual void decrypt_all(DECRYPT_ALL_PARAMS) override;
- virtual int get_fixed_bank_type(void) override { return 0; }
+ virtual int get_fixed_bank_type() override { return 0; }
protected:
+ neogeo_cthd2k3_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<cthd_prot_device> m_prot;
};
// device type definition
-extern const device_type NEOGEO_CTHD2K3_CART;
+DECLARE_DEVICE_TYPE(NEOGEO_CTHD2K3_CART, neogeo_cthd2k3_cart_device)
@@ -39,45 +46,42 @@ extern const device_type NEOGEO_CTHD2K3_CART;
ct2k3sp
**************************************************/
-class neogeo_ct2k3sp_cart : public neogeo_cthd2k3_cart
+class neogeo_ct2k3sp_cart_device : public neogeo_cthd2k3_cart_device
{
public:
- neogeo_ct2k3sp_cart(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
+ neogeo_ct2k3sp_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 0; }
+ virtual int get_fixed_bank_type() override { return 0; }
};
-extern const device_type NEOGEO_CT2K3SP_CART;
+DECLARE_DEVICE_TYPE(NEOGEO_CT2K3SP_CART, neogeo_ct2k3sp_cart_device)
/*************************************************
ct2k3sa
**************************************************/
-class neogeo_ct2k3sa_cart : public neogeo_cthd2k3_cart
+class neogeo_ct2k3sa_cart_device : public neogeo_cthd2k3_cart_device
{
public:
- neogeo_ct2k3sa_cart(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
+ neogeo_ct2k3sa_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 0; }
+ virtual int get_fixed_bank_type() override { return 0; }
};
-extern const device_type NEOGEO_CT2K3SA_CART;
+DECLARE_DEVICE_TYPE(NEOGEO_CT2K3SA_CART, neogeo_ct2k3sa_cart_device)
/*************************************************
matrimbl
**************************************************/
-#include "prot_cmc.h"
-#include "prot_kof2k2.h"
-
-class neogeo_matrimbl_cart : public neogeo_cthd2k3_cart
+class neogeo_matrimbl_cart_device : public neogeo_cthd2k3_cart_device
{
public:
- neogeo_matrimbl_cart(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
+ neogeo_matrimbl_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; }
virtual machine_config_constructor device_mconfig_additions() const override;
@@ -86,7 +90,7 @@ private:
required_device<kof2002_prot_device> m_kof2k2_prot;
};
-extern const device_type NEOGEO_MATRIMBL_CART;
+DECLARE_DEVICE_TYPE(NEOGEO_MATRIMBL_CART, neogeo_matrimbl_cart_device)
-#endif
+#endif // MAME_BUS_NEOGEO_BOOT_CTHD_H