summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/cpu/m6502/n2a03.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/devices/cpu/m6502/n2a03.h')
-rw-r--r--src/devices/cpu/m6502/n2a03.h29
1 files changed, 21 insertions, 8 deletions
diff --git a/src/devices/cpu/m6502/n2a03.h b/src/devices/cpu/m6502/n2a03.h
index 5a57bcbed2b..4232093c7a5 100644
--- a/src/devices/cpu/m6502/n2a03.h
+++ b/src/devices/cpu/m6502/n2a03.h
@@ -15,22 +15,18 @@
#include "m6502.h"
#include "sound/nes_apu.h"
-class n2a03_device : public m6502_device, public device_mixer_interface {
+class n2a03_core_device : public m6502_device {
public:
- n2a03_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
+ n2a03_core_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
virtual std::unique_ptr<util::disasm_interface> create_disassembler() override;
virtual void do_exec_full() override;
virtual void do_exec_partial() override;
- uint8_t psg1_4014_r();
- uint8_t psg1_4015_r();
- void psg1_4015_w(uint8_t data);
- void psg1_4017_w(uint8_t data);
-
- void n2a03_map(address_map &map);
protected:
+ n2a03_core_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock);
+
#define O(o) void o ## _full(); void o ## _partial()
// n2a03 opcodes - same as 6502 with D disabled
@@ -42,6 +38,21 @@ protected:
#undef O
+private:
+};
+
+class n2a03_device : public n2a03_core_device, public device_mixer_interface {
+public:
+ n2a03_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
+
+ uint8_t psg1_4014_r();
+ uint8_t psg1_4015_r();
+ void psg1_4015_w(uint8_t data);
+ void psg1_4017_w(uint8_t data);
+
+ void n2a03_map(address_map &map);
+protected:
+
required_device<nesapu_device> m_apu;
virtual void device_add_mconfig(machine_config &config) override;
@@ -52,6 +63,7 @@ private:
};
+
/* These are the official XTAL values and clock rates used by Nintendo for
manufacturing throughout the production of the 2A03. PALC_APU_CLOCK is
the clock rate devised by UMC(?) for PAL Famicom clone hardware. */
@@ -69,6 +81,7 @@ enum {
N2A03_SET_OVERFLOW = m6502_device::V_LINE
};
+DECLARE_DEVICE_TYPE(N2A03_CORE, n2a03_core_device)
DECLARE_DEVICE_TYPE(N2A03, n2a03_device)
#endif // MAME_CPU_M6502_N2A03_H