summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/bus/nes/mmc3.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/devices/bus/nes/mmc3.h')
-rw-r--r--src/devices/bus/nes/mmc3.h37
1 files changed, 20 insertions, 17 deletions
diff --git a/src/devices/bus/nes/mmc3.h b/src/devices/bus/nes/mmc3.h
index 17578b92adf..d16a0000268 100644
--- a/src/devices/bus/nes/mmc3.h
+++ b/src/devices/bus/nes/mmc3.h
@@ -1,7 +1,9 @@
// license:BSD-3-Clause
// copyright-holders:Fabio Priuli
-#ifndef __NES_MMC3_H
-#define __NES_MMC3_H
+#ifndef MAME_BUS_NES_MMC3_H
+#define MAME_BUS_NES_MMC3_H
+
+#pragma once
#include "nxrom.h"
@@ -12,11 +14,8 @@ class nes_txrom_device : public nes_nrom_device
{
public:
// construction/destruction
- nes_txrom_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);
nes_txrom_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
- // device-level overrides
- virtual void device_start() override { mmc3_start(); }
virtual DECLARE_READ8_MEMBER(read_m) override;
virtual DECLARE_WRITE8_MEMBER(write_m) override;
virtual DECLARE_WRITE8_MEMBER(txrom_write);
@@ -28,6 +27,11 @@ public:
virtual void pcb_reset() override;
protected:
+ nes_txrom_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock);
+
+ // device-level overrides
+ virtual void device_start() override { mmc3_start(); }
+
virtual void set_prg(int prg_base, int prg_mask);
virtual void set_chr(uint8_t chr, int chr_base, int chr_mask);
void mmc3_start();
@@ -58,8 +62,6 @@ public:
// construction/destruction
nes_hkrom_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
- // device-level overrides
- virtual void device_start() override;
virtual DECLARE_READ8_MEMBER(read_m) override;
virtual DECLARE_WRITE8_MEMBER(write_m) override;
virtual DECLARE_WRITE8_MEMBER(write_h) override;
@@ -67,6 +69,9 @@ public:
virtual void pcb_reset() override;
protected:
+ // device-level overrides
+ virtual void device_start() override;
+
int m_wram_enable;
uint8_t m_mmc6_reg;
@@ -133,14 +138,12 @@ public:
};
-
-
// device type definition
-extern const device_type NES_TXROM;
-extern const device_type NES_HKROM;
-extern const device_type NES_TXSROM;
-extern const device_type NES_TQROM;
-extern const device_type NES_QJ_PCB;
-extern const device_type NES_ZZ_PCB;
-
-#endif
+DECLARE_DEVICE_TYPE(NES_TXROM, nes_txrom_device)
+DECLARE_DEVICE_TYPE(NES_HKROM, nes_hkrom_device)
+DECLARE_DEVICE_TYPE(NES_TXSROM, nes_txsrom_device)
+DECLARE_DEVICE_TYPE(NES_TQROM, nes_tqrom_device)
+DECLARE_DEVICE_TYPE(NES_QJ_PCB, nes_qj_device)
+DECLARE_DEVICE_TYPE(NES_ZZ_PCB, nes_zz_device)
+
+#endif // MAME_BUS_NES_MMC3_H