summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author AJR <ajrhacker@users.noreply.github.com>2018-06-26 16:23:14 -0400
committer AJR <ajrhacker@users.noreply.github.com>2018-06-26 16:23:14 -0400
commitafba990a4271e5feb3875d2abebb43f97fed78f2 (patch)
tree624e56340e1326fe29774a79abfee640410e63cb
parentffd75faf5c27de2ab8d579aa540232cc8682f0df (diff)
cpzodiac: Add devices (nw)
-rw-r--r--src/mame/drivers/cpzodiac.cpp42
1 files changed, 39 insertions, 3 deletions
diff --git a/src/mame/drivers/cpzodiac.cpp b/src/mame/drivers/cpzodiac.cpp
index 6073380ecaf..ee7826c7418 100644
--- a/src/mame/drivers/cpzodiac.cpp
+++ b/src/mame/drivers/cpzodiac.cpp
@@ -13,7 +13,7 @@ Main PCB:
- 27C512 ROM, TMS27C010A ROM
- 3*5563-100 (8KB RAM?)
- YM2610B, 16MHz XTAL
-- TE7750, TC040SYT
+- TE7750, TC0140SYT
- SED1351F LCD controller
Display PCB:
@@ -29,6 +29,9 @@ TODO:
#include "emu.h"
#include "cpu/z80/z80.h"
+#include "audio/taitosnd.h"
+#include "machine/te7750.h"
+#include "machine/z80ctc.h"
#include "sound/2610intf.h"
#include "speaker.h"
@@ -49,6 +52,7 @@ private:
required_device<cpu_device> m_audiocpu;
void main_map(address_map &map);
+ void main_io_map(address_map &map);
void sound_map(address_map &map);
};
@@ -61,14 +65,28 @@ private:
void cpzodiac_state::main_map(address_map &map)
{
- map(0x0000, 0x7fff).rom();
+ map(0x0000, 0x9fff).rom();
map(0xa000, 0xbfff).ram();
+ map(0xc000, 0xdfff).ram(); // video?
+ map(0xe000, 0xe00f).rw("io", FUNC(te7750_device::read), FUNC(te7750_device::write));
+ map(0xe020, 0xe020).w("syt", FUNC(tc0140syt_device::master_port_w));
+ map(0xe021, 0xe021).rw("syt", FUNC(tc0140syt_device::master_comm_r), FUNC(tc0140syt_device::master_comm_w));
+}
+
+void cpzodiac_state::main_io_map(address_map &map)
+{
+ map.global_mask(0xff);
+ map(0x00, 0x03).rw("ctc", FUNC(z80ctc_device::read), FUNC(z80ctc_device::write));
}
void cpzodiac_state::sound_map(address_map &map)
{
map(0x0000, 0x7fff).rom();
- map(0xc000, 0xffff).ram();
+ map(0xc000, 0xdfff).ram();
+ map(0xe000, 0xe003).rw("ymsnd", FUNC(ym2610_device::read), FUNC(ym2610_device::write));
+ map(0xe200, 0xe200).w("syt", FUNC(tc0140syt_device::slave_port_w));
+ map(0xe201, 0xe201).rw("syt", FUNC(tc0140syt_device::slave_comm_r), FUNC(tc0140syt_device::slave_comm_w));
+ map(0xf200, 0xf200).nopw();
}
@@ -88,11 +106,25 @@ INPUT_PORTS_END
***************************************************************************/
+static const z80_daisy_config daisy_chain[] =
+{
+ { "ctc" },
+ { nullptr }
+};
+
MACHINE_CONFIG_START(cpzodiac_state::cpzodiac)
/* basic machine hardware */
MCFG_DEVICE_ADD("maincpu", Z80, 12_MHz_XTAL/2)
MCFG_DEVICE_PROGRAM_MAP(main_map)
+ MCFG_DEVICE_IO_MAP(main_io_map)
+ MCFG_Z80_DAISY_CHAIN(daisy_chain)
+
+ MCFG_DEVICE_ADD("io", TE7750, 0)
+ MCFG_TE7750_IOS_CB(CONSTANT(2))
+
+ MCFG_DEVICE_ADD("ctc", Z80CTC, 12_MHz_XTAL/2)
+ MCFG_Z80CTC_INTR_CB(INPUTLINE("maincpu", 0))
MCFG_DEVICE_ADD("audiocpu", Z80, 12_MHz_XTAL/2)
MCFG_DEVICE_PROGRAM_MAP(sound_map)
@@ -110,6 +142,10 @@ MACHINE_CONFIG_START(cpzodiac_state::cpzodiac)
MCFG_SOUND_ROUTE(0, "rspeaker", 0.25)
MCFG_SOUND_ROUTE(1, "lspeaker", 1.0)
MCFG_SOUND_ROUTE(2, "rspeaker", 1.0)
+
+ MCFG_DEVICE_ADD("syt", TC0140SYT, 0)
+ MCFG_TC0140SYT_MASTER_CPU("maincpu")
+ MCFG_TC0140SYT_SLAVE_CPU("audiocpu")
MACHINE_CONFIG_END