summaryrefslogtreecommitdiffstatshomepage
path: root/src/mame/machine/nes_vt09_soc.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mame/machine/nes_vt09_soc.cpp')
-rw-r--r--src/mame/machine/nes_vt09_soc.cpp50
1 files changed, 50 insertions, 0 deletions
diff --git a/src/mame/machine/nes_vt09_soc.cpp b/src/mame/machine/nes_vt09_soc.cpp
new file mode 100644
index 00000000000..2daac2744b8
--- /dev/null
+++ b/src/mame/machine/nes_vt09_soc.cpp
@@ -0,0 +1,50 @@
+// license:BSD-3-Clause
+// copyright-holders:David Haywood
+
+#include "emu.h"
+#include "nes_vt09_soc.h"
+
+
+DEFINE_DEVICE_TYPE(NES_VT09_SOC, nes_vt09_soc_device, "nes_vt09_soc", "VT09 series System on a Chip (NTSC)")
+
+nes_vt09_soc_device::nes_vt09_soc_device(const machine_config& mconfig, const char* tag, device_t* owner, uint32_t clock) :
+ nes_vt09_soc_device(mconfig, NES_VT09_SOC, tag, owner, clock)
+{
+}
+
+nes_vt09_soc_device::nes_vt09_soc_device(const machine_config& mconfig, device_type type, const char* tag, device_t* owner, uint32_t clock) :
+ nes_vt02_vt03_soc_device(mconfig, type, tag, owner, clock),
+ m_upper_write_412c_callback(*this),
+ m_upper_read_412c_callback(*this),
+ m_upper_read_412d_callback(*this)
+{
+}
+
+/***********************************************************************************************************************************************************/
+/* '4K' specifics */
+/***********************************************************************************************************************************************************/
+
+void nes_vt09_soc_device::device_add_mconfig(machine_config& config)
+{
+ nes_vt02_vt03_soc_device::device_add_mconfig(config);
+ m_maincpu->set_addrmap(AS_PROGRAM, &nes_vt09_soc_device::nes_vt_4k_ram_map);
+}
+
+void nes_vt09_soc_device::device_start()
+{
+ nes_vt02_vt03_soc_device::device_start();
+
+ m_upper_write_412c_callback.resolve_safe();
+ m_upper_read_412c_callback.resolve_safe(0xff);
+ m_upper_read_412d_callback.resolve_safe(0xff);
+}
+
+void nes_vt09_soc_device::nes_vt_4k_ram_map(address_map &map)
+{
+ nes_vt02_vt03_soc_device::nes_vt_map(map);
+ map(0x0800, 0x0fff).ram();
+
+// map(0x412c, 0x412c).rw(FUNC(nes_vt09_soc_device::vtfp_412c_r, FUNC(nes_vt09_soc_device::vtfp_412c_extbank_w)); // GPIO
+// map(0x412d, 0x412d).r(FUNC(nes_vt09_soc_device::vtfp_412d_r)); // GPIO
+
+}