summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/bus/nes/mmc1.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/devices/bus/nes/mmc1.h')
-rw-r--r--src/devices/bus/nes/mmc1.h30
1 files changed, 16 insertions, 14 deletions
diff --git a/src/devices/bus/nes/mmc1.h b/src/devices/bus/nes/mmc1.h
index 8b30b6f0bbf..dd9ecccac75 100644
--- a/src/devices/bus/nes/mmc1.h
+++ b/src/devices/bus/nes/mmc1.h
@@ -1,7 +1,9 @@
// license:BSD-3-Clause
// copyright-holders:Fabio Priuli
-#ifndef __NES_MMC1_H
-#define __NES_MMC1_H
+#ifndef MAME_BUS_NES_MMC1_H
+#define MAME_BUS_NES_MMC1_H
+
+#pragma once
#include "nxrom.h"
@@ -12,20 +14,23 @@ class nes_sxrom_device : public nes_nrom_device
{
public:
// construction/destruction
- nes_sxrom_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_sxrom_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;
- virtual void update_regs(int reg); // this is needed to simplify NES-EVENT pcb implementation, which handle differently some regs!
virtual void pcb_reset() override;
protected:
+ nes_sxrom_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;
+
TIMER_CALLBACK_MEMBER(resync_callback);
+
+ virtual void update_regs(int reg); // this is needed to simplify NES-EVENT pcb implementation, which handle differently some regs!
virtual void set_prg();
virtual void set_chr();
@@ -70,13 +75,10 @@ public:
};
-
-
// device type definition
-extern const device_type NES_SXROM;
-extern const device_type NES_SOROM;
-extern const device_type NES_SXROM_A;
-extern const device_type NES_SOROM_A;
-
+DECLARE_DEVICE_TYPE(NES_SXROM, nes_sxrom_device)
+DECLARE_DEVICE_TYPE(NES_SOROM, nes_sorom_device)
+DECLARE_DEVICE_TYPE(NES_SXROM_A, nes_sxrom_a_device)
+DECLARE_DEVICE_TYPE(NES_SOROM_A, nes_sorom_a_device)
-#endif
+#endif // MAME_BUS_NES_MMC1_H