summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/bus/gameboy/gb_slot.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/devices/bus/gameboy/gb_slot.h')
-rw-r--r--src/devices/bus/gameboy/gb_slot.h27
1 files changed, 15 insertions, 12 deletions
diff --git a/src/devices/bus/gameboy/gb_slot.h b/src/devices/bus/gameboy/gb_slot.h
index 9ac41618f82..f3198f8e20c 100644
--- a/src/devices/bus/gameboy/gb_slot.h
+++ b/src/devices/bus/gameboy/gb_slot.h
@@ -1,7 +1,7 @@
// license:BSD-3-Clause
// copyright-holders:Fabio Priuli, Wilbert Pol
-#ifndef __GB_SLOT_H
-#define __GB_SLOT_H
+#ifndef MAME_BUS_GAMEBOY_GB_SLOT_H
+#define MAME_BUS_GAMEBOY_GB_SLOT_H
#include "softlist_dev.h"
@@ -55,7 +55,6 @@ class device_gb_cart_interface : public device_slot_card_interface
{
public:
// construction/destruction
- device_gb_cart_interface(const machine_config &mconfig, device_t &device);
virtual ~device_gb_cart_interface();
// reading and writing
@@ -82,6 +81,9 @@ public:
void save_ram() { device().save_item(NAME(m_ram)); }
+protected:
+ device_gb_cart_interface(const machine_config &mconfig, device_t &device);
+
// internal state
uint8_t *m_rom;
uint32_t m_rom_size;
@@ -103,16 +105,15 @@ public:
};
-// ======================> base_gb_cart_slot_device
+// ======================> gb_cart_slot_device_base
-class base_gb_cart_slot_device : public device_t,
+class gb_cart_slot_device_base : public device_t,
public device_image_interface,
public device_slot_interface
{
public:
// construction/destruction
- base_gb_cart_slot_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, uint32_t clock, const char *shortname, const char *source);
- virtual ~base_gb_cart_slot_device();
+ virtual ~gb_cart_slot_device_base();
// device-level overrides
virtual void device_start() override;
@@ -152,6 +153,8 @@ public:
protected:
+ gb_cart_slot_device_base(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock);
+
// Donkey Kong Land 2 + 3 store SGB border tiles differently... this will be hopefully be removed when SGB is properly emulated!
int m_sgb_hack;
@@ -161,7 +164,7 @@ protected:
// ======================> gb_cart_slot_device
-class gb_cart_slot_device : public base_gb_cart_slot_device
+class gb_cart_slot_device : public gb_cart_slot_device_base
{
public:
// construction/destruction
@@ -171,7 +174,7 @@ public:
// ======================> megaduck_cart_slot_device
-class megaduck_cart_slot_device : public base_gb_cart_slot_device
+class megaduck_cart_slot_device : public gb_cart_slot_device_base
{
public:
// construction/destruction
@@ -190,8 +193,8 @@ public:
// device type definition
-extern const device_type GB_CART_SLOT;
-extern const device_type MEGADUCK_CART_SLOT;
+DECLARE_DEVICE_TYPE(GB_CART_SLOT, gb_cart_slot_device)
+DECLARE_DEVICE_TYPE(MEGADUCK_CART_SLOT, megaduck_cart_slot_device)
/***************************************************************************
@@ -209,4 +212,4 @@ extern const device_type MEGADUCK_CART_SLOT;
MCFG_DEVICE_SLOT_INTERFACE(_slot_intf, _def_slot, false)
-#endif
+#endif // MAME_BUS_GAMEBOY_GB_SLOT_H