From 5c21151190ac284154284d50794712da6265db97 Mon Sep 17 00:00:00 2001 From: AJR Date: Sat, 3 Jul 2021 09:45:51 -0400 Subject: heromem, sbmjb: Map I/O expanders (and some RAM for sbmjb) --- src/devices/machine/te7750.cpp | 10 ++++++++++ src/devices/machine/te7750.h | 9 +++++++++ src/mame/drivers/heromem.cpp | 4 +++- src/mame/drivers/sbmjb.cpp | 5 ++++- 4 files changed, 26 insertions(+), 2 deletions(-) diff --git a/src/devices/machine/te7750.cpp b/src/devices/machine/te7750.cpp index 58fd60cc49c..540b3b27cf5 100644 --- a/src/devices/machine/te7750.cpp +++ b/src/devices/machine/te7750.cpp @@ -177,6 +177,7 @@ //************************************************************************** DEFINE_DEVICE_TYPE(TE7750, te7750_device, "te7750", "TE7750 Super I/O Expander") +DEFINE_DEVICE_TYPE(TE7751, te7751_device, "te7751", "TE7751 Super I/O Expander") DEFINE_DEVICE_TYPE(TE7752, te7752_device, "te7752", "TE7752 Super I/O Expander") //************************************************************************** @@ -201,6 +202,15 @@ te7750_device::te7750_device(const machine_config &mconfig, const char *tag, dev { } +//------------------------------------------------- +// te7751_device - constructor +//------------------------------------------------- + +te7751_device::te7751_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) + : te7750_device(mconfig, TE7751, tag, owner, clock) +{ +} + //------------------------------------------------- // te7752_device - constructor //------------------------------------------------- diff --git a/src/devices/machine/te7750.h b/src/devices/machine/te7750.h index fea02f2b4c1..8417fbce51a 100644 --- a/src/devices/machine/te7750.h +++ b/src/devices/machine/te7750.h @@ -73,6 +73,14 @@ private: u8 m_data_dir[9]; }; +// ======================> te7751_device + +class te7751_device : public te7750_device +{ +public: + te7751_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock = 0); +}; + // ======================> te7752_device class te7752_device : public te7750_device @@ -83,6 +91,7 @@ public: // device type definitions DECLARE_DEVICE_TYPE(TE7750, te7750_device) +DECLARE_DEVICE_TYPE(TE7751, te7751_device) DECLARE_DEVICE_TYPE(TE7752, te7752_device) #endif // MAME_MACHINE_TE7750_H diff --git a/src/mame/drivers/heromem.cpp b/src/mame/drivers/heromem.cpp index 405d4a64805..362d5928770 100644 --- a/src/mame/drivers/heromem.cpp +++ b/src/mame/drivers/heromem.cpp @@ -115,6 +115,8 @@ void heromem_state::maincpu_prg_map(address_map &map) map(0xf201, 0xf201).rw("tc0140syt_l", FUNC(tc0140syt_device::master_comm_r), FUNC(tc0140syt_device::master_comm_w)); map(0xf300, 0xf300).w("tc0140syt_r", FUNC(tc0140syt_device::master_port_w)); map(0xf301, 0xf301).rw("tc0140syt_r", FUNC(tc0140syt_device::master_comm_r), FUNC(tc0140syt_device::master_comm_w)); + map(0xf400, 0xf403).rw("ppi", FUNC(i8255_device::read), FUNC(i8255_device::write)); + map(0xf500, 0xf50f).rw("io", FUNC(te7751_device::read), FUNC(te7751_device::write)); // TODO: lots more writes } @@ -218,7 +220,7 @@ void heromem_state::heromem(machine_config &config) I8255(config, "ppi"); // MB89255B - TE7750(config, "io"); // TE7751 + TE7751(config, "io"); // video hardware screen_device &lscreen(SCREEN(config, "lscreen", SCREEN_TYPE_RASTER)); // all wrong diff --git a/src/mame/drivers/sbmjb.cpp b/src/mame/drivers/sbmjb.cpp index 2894ec5febb..e9b8f6522f7 100644 --- a/src/mame/drivers/sbmjb.cpp +++ b/src/mame/drivers/sbmjb.cpp @@ -67,11 +67,14 @@ WRITE_LINE_MEMBER(sbmjb_state::screen_vblank) // TODO: copy-pasted from other dr void sbmjb_state::main_map(address_map &map) { map(0x0000, 0x7fff).rom().region("maincpu", 0); + map(0xc000, 0xdfff).ram(); + map(0xf000, 0xf00f).rw("io", FUNC(te7751_device::read), FUNC(te7751_device::write)); } void sbmjb_state::sound_map(address_map &map) { map(0x0000, 0x7fff).rom().region("audiocpu", 0); + map(0xc000, 0xdfff).ram(); } void sbmjb_state::tc0091lvc_map(address_map &map) // TODO: copy-pasted from other drivers using same chip, to be verified @@ -126,7 +129,7 @@ void sbmjb_state::sbmjb(machine_config &config) TIMER(config, "scantimer").configure_scanline(FUNC(sbmjb_state::scanline_callback), "screen", 0, 1); - TE7750(config, "io"); // TE7751 + TE7751(config, "io"); // video hardware screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER)); // all wrong -- cgit v1.2.3