summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/cpu/m6502
diff options
context:
space:
mode:
author David Haywood <davidhaywood@users.noreply.github.com>2017-05-23 21:12:26 +0100
committer David Haywood <davidhaywood@users.noreply.github.com>2017-05-23 21:12:26 +0100
commit7eeae7892d6fec86b5466c22f66b6f464afcabfa (patch)
tree2e0b45c233c1b4c5fdc1bcacc53bcd7eb88e55e2 /src/devices/cpu/m6502
parentd0047a3ebefb03feca0c2f32a231cf956a48a30e (diff)
basic VT03 support
Diffstat (limited to 'src/devices/cpu/m6502')
-rw-r--r--src/devices/cpu/m6502/n2a03.cpp16
-rw-r--r--src/devices/cpu/m6502/n2a03.h3
2 files changed, 18 insertions, 1 deletions
diff --git a/src/devices/cpu/m6502/n2a03.cpp b/src/devices/cpu/m6502/n2a03.cpp
index efb603b91aa..8c425cfaf73 100644
--- a/src/devices/cpu/m6502/n2a03.cpp
+++ b/src/devices/cpu/m6502/n2a03.cpp
@@ -129,9 +129,23 @@ const address_space_config *n2a03_device::memory_space_config(address_spacenum s
}
}
+
+WRITE_LINE_MEMBER(n2a03_device::apu_irq)
+{
+ // games relying on the APU_IRQ don't seem to work anyway? (nes software list : timelord, mig29sf, firehawk)
+ set_input_line(N2A03_APU_IRQ_LINE, state ? ASSERT_LINE : CLEAR_LINE);
+}
+
+READ8_MEMBER(n2a03_device::apu_read_mem)
+{
+ return mintf->program->read_byte(offset);
+}
+
static MACHINE_CONFIG_START( n2a03_device )
MCFG_SOUND_ADD("nesapu", NES_APU, DERIVED_CLOCK(1,1) )
-
+ MCFG_NES_APU_IRQ_HANDLER(WRITELINE(n2a03_device, apu_irq))
+ MCFG_NES_APU_MEM_READ_CALLBACK(READ8(n2a03_device, apu_read_mem))
+
MCFG_SOUND_ROUTE(ALL_OUTPUTS, ":mono", 0.50)
MACHINE_CONFIG_END
diff --git a/src/devices/cpu/m6502/n2a03.h b/src/devices/cpu/m6502/n2a03.h
index 54fc137c8e6..3b7d0bfcfd3 100644
--- a/src/devices/cpu/m6502/n2a03.h
+++ b/src/devices/cpu/m6502/n2a03.h
@@ -33,6 +33,9 @@ public:
WRITE8_MEMBER(psg1_4015_w);
WRITE8_MEMBER(psg1_4017_w);
+ DECLARE_WRITE_LINE_MEMBER(apu_irq);
+ DECLARE_READ8_MEMBER(apu_read_mem);
+
protected:
class mi_2a03_normal : public memory_interface {
public: