diff options
author | AJR <ajrhacker@users.noreply.github.com> | 2018-12-02 20:37:55 -0500 |
---|---|---|
committer | AJR <ajrhacker@users.noreply.github.com> | 2018-12-02 20:37:55 -0500 |
commit | 5c6a98647bf2cdc3a0159ae31a303c4246b5b15d (patch) | |
tree | dc135a29fee16f50830538b7d5a5a40478242988 | |
parent | c59217cdd2906e1c8fc534e07f519e29ed6c3c08 (diff) |
fs3216: Try hooking up a few devices (nw)
-rw-r--r-- | src/mame/drivers/fs3216.cpp | 32 |
1 files changed, 30 insertions, 2 deletions
diff --git a/src/mame/drivers/fs3216.cpp b/src/mame/drivers/fs3216.cpp index a1bb6ed73fa..22375c9f136 100644 --- a/src/mame/drivers/fs3216.cpp +++ b/src/mame/drivers/fs3216.cpp @@ -10,9 +10,9 @@ //#include "bus/rs232/rs232.h" #include "cpu/m68000/m68000.h" #include "cpu/8x300/8x300.h" -#include "cpu/mcs48/mcs48.h" //#include "machine/com8116.h" //#include "machine/upd765.h" +//#include "machine/x2212.h" #include "machine/z80ctc.h" #include "machine/z80dart.h" #include "video/mc6845.h" @@ -25,6 +25,7 @@ public: fs3216_state(const machine_config &mconfig, device_type type, const char *tag) : driver_device(mconfig, type, tag) , m_maincpu(*this, "maincpu") + , m_ctc(*this, "ctc") { } @@ -33,11 +34,15 @@ public: private: MC6845_UPDATE_ROW(update_row); + DECLARE_READ8_MEMBER(ctc_r); + DECLARE_WRITE8_MEMBER(ctc_w); + void main_map(address_map &map); void wdcpu_prog_map(address_map &map); void wdcpu_bank_map(address_map &map); required_device<cpu_device> m_maincpu; + required_device<z80ctc_device> m_ctc; }; @@ -46,9 +51,26 @@ MC6845_UPDATE_ROW(fs3216_state::update_row) } +READ8_MEMBER(fs3216_state::ctc_r) +{ + return m_ctc->read(space, offset >> 1); +} + +WRITE8_MEMBER(fs3216_state::ctc_w) +{ + m_ctc->write(space, offset >> 1, data); +} + + void fs3216_state::main_map(address_map &map) { map(0x000000, 0x003fff).rom().region("bios", 0); + map(0x015000, 0x017fff).ram(); + map(0x394680, 0x39468f).rw(FUNC(fs3216_state::ctc_r), FUNC(fs3216_state::ctc_w)).umask16(0x00ff); + map(0x394701, 0x394701).rw("dart", FUNC(z80dart_device::da_r), FUNC(z80dart_device::da_w)); + map(0x394709, 0x394709).rw("dart", FUNC(z80dart_device::ca_r), FUNC(z80dart_device::ca_w)); + map(0x394711, 0x394711).rw("dart", FUNC(z80dart_device::db_r), FUNC(z80dart_device::db_w)); + map(0x394719, 0x394719).rw("dart", FUNC(z80dart_device::cb_r), FUNC(z80dart_device::cb_w)); map(0x780000, 0x783fff).rom().region("bios", 0); map(0x800000, 0x803fff).rom().region("bios", 0); } @@ -60,6 +82,7 @@ void fs3216_state::wdcpu_prog_map(address_map &map) void fs3216_state::wdcpu_bank_map(address_map &map) { + map(0x000, 0x000).nopr(); } @@ -68,7 +91,12 @@ void fs3216_state::fs3216(machine_config &config) M68000(config, m_maincpu, 44.2368_MHz_XTAL / 8); // 5.5 MHz m_maincpu->set_addrmap(AS_PROGRAM, &fs3216_state::main_map); - Z80CTC(config, "ctc", 44.2368_MHz_XTAL / 8); // Z8430BPS + Z80CTC(config, m_ctc, 44.2368_MHz_XTAL / 8); // Z8430BPS + m_ctc->set_clk<0>(44.2368_MHz_XTAL / 16); // CLK0 rate guessed + m_ctc->set_clk<1>(44.2368_MHz_XTAL / 16); // CLK1 rate guessed + m_ctc->zc_callback<0>().set("dart", FUNC(z80dart_device::rxca_w)); + m_ctc->zc_callback<0>().append("dart", FUNC(z80dart_device::txca_w)); + m_ctc->zc_callback<1>().set("dart", FUNC(z80dart_device::rxtxcb_w)); Z80DART(config, "dart", 44.2368_MHz_XTAL / 8); // Z8470BPS |