summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author AJR <ajrhacker@users.noreply.github.com>2023-04-05 21:27:33 -0400
committer AJR <ajrhacker@users.noreply.github.com>2023-04-05 21:27:33 -0400
commit2963fcab5794f8e9e15d133d69c2425e6dedb544 (patch)
tree39df390479fa1d6f695f14d71ec0392737b90293
parentb0a5f203c905f28984a7a8fbf2d683a76704e3aa (diff)
roland_s50.cpp: Driver modernization
- Replace address_map_bank_device with memory views - Add SCSI controller to s550 and w30 - Eliminate deprecated #ifdef in favor of [[maybe_unused]] attributes
-rw-r--r--src/mame/roland/roland_s50.cpp360
1 files changed, 180 insertions, 180 deletions
diff --git a/src/mame/roland/roland_s50.cpp b/src/mame/roland/roland_s50.cpp
index c5a336ba78b..d1ed413b707 100644
--- a/src/mame/roland/roland_s50.cpp
+++ b/src/mame/roland/roland_s50.cpp
@@ -9,11 +9,14 @@
#include "emu.h"
#include "bu3905.h"
#include "sa16.h"
+#include "mb63h149.h"
+
//#include "bus/midi/midi.h"
+#include "bus/nscsi/hd.h"
#include "cpu/mcs96/i8x9x.h"
#include "imagedev/floppy.h"
-#include "machine/bankdev.h"
-#include "mb63h149.h"
+#include "machine/mb87030.h"
+#include "machine/nscsi_bus.h"
#include "machine/timer.h"
#include "machine/wd_fdc.h"
#include "video/tms3556.h"
@@ -24,14 +27,13 @@
namespace {
-class roland_s50_state : public driver_device
+class roland_s50_base_state : public driver_device
{
public:
- roland_s50_state(const machine_config &mconfig, device_type type, const char *tag)
+ roland_s50_base_state(const machine_config &mconfig, device_type type, const char *tag)
: driver_device(mconfig, type, tag)
, m_maincpu(*this, "maincpu")
- , m_sram(*this, "sram")
- , m_io(*this, "io")
+ , m_common_ram(*this, "common")
, m_fdc(*this, "fdc")
, m_floppy(*this, "fdc:0")
, m_vdp(*this, "vdp")
@@ -40,32 +42,19 @@ public:
{
}
- void s50(machine_config &config);
-
protected:
- virtual void machine_start() override;
-
- TIMER_DEVICE_CALLBACK_MEMBER(vdp_timer);
-
- void p2_w(u8 data);
u8 floppy_status_r();
u8 floppy_unknown_r();
u16 key_r(offs_t offset);
void key_w(offs_t offset, u16 data);
- void sram_map(address_map &map);
- void vram_map(address_map &map);
-
-private:
- void ioga_out_w(u8 data);
+ TIMER_DEVICE_CALLBACK_MEMBER(vdp_timer);
- void mem_map(address_map &map);
- void io_map(address_map &map);
+ void vram_map(address_map &map);
protected:
required_device<i8x9x_device> m_maincpu;
- optional_device<address_map_bank_device> m_sram;
- optional_device<address_map_bank_device> m_io;
+ required_memory_bank m_common_ram;
required_device<wd_fdc_digital_device_base> m_fdc;
required_device<floppy_connector> m_floppy;
optional_device<tms3556_device> m_vdp;
@@ -73,44 +62,81 @@ protected:
optional_device<mb63h149_device> m_keyscan;
};
+class roland_s50_state : public roland_s50_base_state
+{
+public:
+ roland_s50_state(const machine_config &mconfig, device_type type, const char *tag)
+ : roland_s50_base_state(mconfig, type, tag)
+ , m_sram_bank(*this, "sram")
+ , m_sram(*this, "sram", 0x10000U, ENDIANNESS_LITTLE)
+ , m_io_view(*this, "io")
+ {
+ }
+
+ void s50(machine_config &config);
+
+protected:
+ virtual void machine_start() override;
+
+ void p2_w(u8 data);
+
+private:
+ void ioga_out_w(u8 data);
+
+ void mem_map(address_map &map);
+
+protected:
+ required_memory_bank m_sram_bank;
+ memory_share_creator<u16> m_sram;
+ memory_view m_io_view;
+};
+
class roland_s550_state : public roland_s50_state
{
public:
roland_s550_state(const machine_config &mconfig, device_type type, const char *tag)
: roland_s50_state(mconfig, type, tag)
- , m_lowmem(*this, "lowmem")
+ , m_lowram_bank(*this, "lowram")
+ , m_lowmem_view(*this, "lowmem")
+ , m_lowram(*this, "lowram", 0x10000U, ENDIANNESS_LITTLE)
{
}
void s550(machine_config &config);
+protected:
+ virtual void machine_start() override;
+
private:
void sram_bank_w(u8 data);
void mem_map(address_map &map);
- void io_map(address_map &map);
- void lowmem_map(address_map &map);
- required_device<address_map_bank_device> m_lowmem;
+ required_memory_bank m_lowram_bank;
+ memory_view m_lowmem_view;
+ memory_share_creator<u16> m_lowram;
};
-class roland_w30_state : public roland_s50_state
+class roland_w30_state : public roland_s50_base_state
{
public:
roland_w30_state(const machine_config &mconfig, device_type type, const char *tag)
- : roland_s50_state(mconfig, type, tag)
- , m_psram(*this, "psram%u", 1U)
+ : roland_s50_base_state(mconfig, type, tag)
+ , m_bank1_view(*this, "bank1")
+ , m_bank2_view(*this, "bank2")
+ , m_psram1_bank(*this, "psram1")
+ , m_psram2_bank(*this, "psram2")
+ , m_psram(*this, "psram", 0x20000U, ENDIANNESS_LITTLE)
, m_psram_bank(0)
{
}
void w30(machine_config &config);
-#ifdef UNUSED_DEFINITION
- void s330(machine_config &config);
-#endif
+ [[maybe_unused]] void s330(machine_config &config);
protected:
virtual void machine_start() override;
+ virtual void machine_reset() override;
private:
u8 psram_bank_r();
@@ -118,13 +144,15 @@ private:
u8 unknown_status_r();
void w30_mem_map(address_map &map);
-#ifdef UNUSED_DEFINITION
- void s330_mem_map(address_map &map);
-#endif
+ [[maybe_unused]] void s330_mem_map(address_map &map);
void psram1_map(address_map &map);
void psram2_map(address_map &map);
- required_device_array<address_map_bank_device, 2> m_psram;
+ memory_view m_bank1_view;
+ memory_view m_bank2_view;
+ required_memory_bank m_psram1_bank;
+ required_memory_bank m_psram2_bank;
+ memory_share_creator<u16> m_psram;
u8 m_psram_bank;
};
@@ -133,14 +161,38 @@ void roland_s50_state::machine_start()
{
m_fdc->set_floppy(m_floppy->get_device());
m_fdc->dden_w(0);
+
+ m_sram_bank->configure_entries(0, 4, &m_sram[0], 0x4000);
+ m_sram_bank->set_entry(0);
+ m_common_ram->set_base(&m_sram[0]);
+}
+
+void roland_s550_state::machine_start()
+{
+ roland_s50_state::machine_start();
+
+ m_lowram_bank->configure_entries(0, 8, &m_lowram[0], 0x2000);
+ m_lowram_bank->set_entry(0);
}
void roland_w30_state::machine_start()
{
+ m_fdc->set_floppy(m_floppy->get_device());
+ m_fdc->dden_w(0);
+
+ m_psram1_bank->configure_entries(0, 8, &m_psram[0x10000], 0x2000);
+ m_psram2_bank->configure_entries(0, 4, &m_psram[0], 0x4000);
+ m_common_ram->set_base(&m_psram[0]);
+
save_item(NAME(m_psram_bank));
}
-TIMER_DEVICE_CALLBACK_MEMBER(roland_s50_state::vdp_timer)
+void roland_w30_state::machine_reset()
+{
+ psram_bank_w(0);
+}
+
+TIMER_DEVICE_CALLBACK_MEMBER(roland_s50_base_state::vdp_timer)
{
// FIXME: internalize this ridiculousness
m_vdp->interrupt();
@@ -149,18 +201,19 @@ TIMER_DEVICE_CALLBACK_MEMBER(roland_s50_state::vdp_timer)
void roland_s50_state::p2_w(u8 data)
{
- m_io->set_bank(BIT(data, 5));
+ m_io_view.select(BIT(data, 5));
}
void roland_s50_state::ioga_out_w(u8 data)
{
- m_sram->set_bank(BIT(data, 6, 2));
+ m_sram_bank->set_entry(BIT(data, 6, 2));
}
void roland_s550_state::sram_bank_w(u8 data)
{
- m_sram->set_bank(BIT(data, 0, 2));
- m_lowmem->set_bank(BIT(data, 2, 3));
+ m_sram_bank->set_entry(BIT(data, 0, 2));
+ m_lowram_bank->set_entry(BIT(data, 2, 3));
+ m_lowmem_view.select(BIT(data, 2, 3) == 0 ? 0 : 1);
}
u8 roland_w30_state::psram_bank_r()
@@ -171,26 +224,28 @@ u8 roland_w30_state::psram_bank_r()
void roland_w30_state::psram_bank_w(u8 data)
{
m_psram_bank = data;
- m_psram[1]->set_bank(BIT(data, 0, 3));
- m_psram[0]->set_bank(BIT(data, 3, 4));
+ m_bank1_view.select(BIT(data, 3, 4) == 0 ? 0 : 1);
+ m_bank2_view.select(BIT(data, 0, 3) == 0 ? 0 : 1);
+ m_psram1_bank->set_entry(BIT(data, 3, 3));
+ m_psram2_bank->set_entry(BIT(data, 0, 2));
}
-u8 roland_s50_state::floppy_status_r()
+u8 roland_s50_base_state::floppy_status_r()
{
return 1 | m_fdc->intrq_r() << 2 | m_fdc->drq_r() << 3;
}
-u8 roland_s50_state::floppy_unknown_r()
+u8 roland_s50_base_state::floppy_unknown_r()
{
return 1;
}
-u16 roland_s50_state::key_r(offs_t offset)
+u16 roland_s50_base_state::key_r(offs_t offset)
{
return m_keyscan->read(offset) << 1;
}
-void roland_s50_state::key_w(offs_t offset, u16 data)
+void roland_s50_base_state::key_w(offs_t offset, u16 data)
{
m_keyscan->write(offset, data >> 1);
}
@@ -204,102 +259,78 @@ u8 roland_w30_state::unknown_status_r()
void roland_s50_state::mem_map(address_map &map)
{
map(0x0000, 0x3fff).rom().region("program", 0);
- map(0x4000, 0x7fff).ram().share("common");
- map(0x8000, 0xbfff).m(m_sram, FUNC(address_map_bank_device::amap16));
- map(0xc000, 0xffff).m(m_io, FUNC(address_map_bank_device::amap16));
-}
-
-void roland_s50_state::io_map(address_map &map)
-{
- map(0x0000, 0x0000).w(FUNC(roland_s50_state::ioga_out_w));
- map(0x0200, 0x0200).r(FUNC(roland_s50_state::floppy_status_r));
- map(0x0300, 0x0300).r(FUNC(roland_s50_state::floppy_unknown_r));
- map(0x0800, 0x0807).rw(m_fdc, FUNC(wd1772_device::read), FUNC(wd1772_device::write)).umask16(0x00ff);
- map(0x1200, 0x1200).r(m_vdp, FUNC(tms3556_device::vram_r));
- map(0x1202, 0x1202).rw(m_vdp, FUNC(tms3556_device::initptr_r), FUNC(tms3556_device::vram_w));
- map(0x1204, 0x1204).rw(m_vdp, FUNC(tms3556_device::reg_r), FUNC(tms3556_device::reg_w));
- map(0x0000, 0x3fff).rw(m_wave, FUNC(rf5c36_device::read), FUNC(rf5c36_device::write)).umask16(0xff00);
- map(0x4000, 0x4fff).mirror(0x3000).rw(FUNC(roland_s50_state::key_r), FUNC(roland_s50_state::key_w));
+ map(0x4000, 0x7fff).bankrw(m_common_ram);
+ map(0x8000, 0xbfff).bankrw(m_sram_bank);
+ map(0xc000, 0xffff).view(m_io_view);
+ m_io_view[0](0xc000, 0xc000).w(FUNC(roland_s50_state::ioga_out_w));
+ m_io_view[0](0xc200, 0xc200).r(FUNC(roland_s50_state::floppy_status_r));
+ m_io_view[0](0xc300, 0xc300).r(FUNC(roland_s50_state::floppy_unknown_r));
+ m_io_view[0](0xc800, 0xc807).rw(m_fdc, FUNC(wd1772_device::read), FUNC(wd1772_device::write)).umask16(0x00ff);
+ m_io_view[0](0xd200, 0xd200).r(m_vdp, FUNC(tms3556_device::vram_r));
+ m_io_view[0](0xd202, 0xd202).rw(m_vdp, FUNC(tms3556_device::initptr_r), FUNC(tms3556_device::vram_w));
+ m_io_view[0](0xd204, 0xd204).rw(m_vdp, FUNC(tms3556_device::reg_r), FUNC(tms3556_device::reg_w));
+ m_io_view[0](0xc000, 0xffff).rw(m_wave, FUNC(rf5c36_device::read), FUNC(rf5c36_device::write)).umask16(0xff00);
+ m_io_view[1](0xc000, 0xcfff).mirror(0x3000).rw(FUNC(roland_s50_state::key_r), FUNC(roland_s50_state::key_w));
}
void roland_s550_state::mem_map(address_map &map)
{
- map(0x0000, 0x1fff).m(m_lowmem, FUNC(address_map_bank_device::amap16));
+ map(0x0000, 0x1fff).view(m_lowmem_view);
+ m_lowmem_view[0](0x0000, 0x1fff).rom().region("program", 0);
+ m_lowmem_view[1](0x0000, 0x1fff).bankrw(m_lowram_bank);
map(0x2000, 0x3fff).rom().region("program", 0x2000);
- map(0x4000, 0x7fff).ram().share("common");
- map(0x8000, 0xbfff).m(m_sram, FUNC(address_map_bank_device::amap16));
- map(0xc000, 0xffff).m(m_io, FUNC(address_map_bank_device::amap16));
-}
-
-void roland_s550_state::io_map(address_map &map)
-{
- map(0x0200, 0x0200).r(FUNC(roland_s550_state::floppy_status_r));
- map(0x0300, 0x0300).r(FUNC(roland_s550_state::floppy_unknown_r));
- map(0x0800, 0x0807).rw(m_fdc, FUNC(wd1772_device::read), FUNC(wd1772_device::write)).umask16(0x00ff);
- map(0x1000, 0x1000).r(m_vdp, FUNC(tms3556_device::vram_r));
- map(0x1002, 0x1002).rw(m_vdp, FUNC(tms3556_device::initptr_r), FUNC(tms3556_device::vram_w));
- map(0x1004, 0x1004).rw(m_vdp, FUNC(tms3556_device::reg_r), FUNC(tms3556_device::reg_w));
- //map(0x1800, 0x181f).rw(m_tvf, FUNC(mb654419u_device::read), FUNC(mb654419u_device::write)).umask16(0x00ff);
- map(0x2000, 0x2000).w(FUNC(roland_s550_state::sram_bank_w));
- map(0x2800, 0x281f).w("outas", FUNC(bu3905_device::write)).umask16(0x00ff);
- //map(0x3800, 0x381f).rw(m_scsic, FUNC(mb89352_device::read), FUNC(mb89352_device::write)).umask16(0x00ff);
- map(0x0000, 0x3fff).rw(m_wave, FUNC(rf5c36_device::read), FUNC(rf5c36_device::write)).umask16(0xff00);
+ map(0x4000, 0x7fff).bankrw(m_common_ram);
+ map(0x8000, 0xbfff).bankrw(m_sram_bank);
+ map(0xc000, 0xffff).view(m_io_view);
+ m_io_view[0](0xc200, 0xc200).r(FUNC(roland_s550_state::floppy_status_r));
+ m_io_view[0](0xc300, 0xc300).r(FUNC(roland_s550_state::floppy_unknown_r));
+ m_io_view[0](0xc800, 0xc807).rw(m_fdc, FUNC(wd1772_device::read), FUNC(wd1772_device::write)).umask16(0x00ff);
+ m_io_view[0](0xd000, 0xd000).r(m_vdp, FUNC(tms3556_device::vram_r));
+ m_io_view[0](0xd002, 0xd002).rw(m_vdp, FUNC(tms3556_device::initptr_r), FUNC(tms3556_device::vram_w));
+ m_io_view[0](0xd004, 0xd004).rw(m_vdp, FUNC(tms3556_device::reg_r), FUNC(tms3556_device::reg_w));
+ //m_io_view[0](0xd800, 0xd81f).rw(m_tvf, FUNC(mb654419u_device::read), FUNC(mb654419u_device::write)).umask16(0x00ff);
+ m_io_view[0](0xe000, 0xe000).w(FUNC(roland_s550_state::sram_bank_w));
+ m_io_view[0](0xe800, 0xe81f).w("outas", FUNC(bu3905_device::write)).umask16(0x00ff);
+ m_io_view[0](0xf800, 0xf81f).m("scsi:7:scsic", FUNC(mb89352_device::map)).umask16(0x00ff);
+ m_io_view[0](0xc000, 0xffff).rw(m_wave, FUNC(rf5c36_device::read), FUNC(rf5c36_device::write)).umask16(0xff00);
+ m_io_view[1](0xc000, 0xffff).unmaprw();
}
void roland_w30_state::w30_mem_map(address_map &map)
{
- map(0x0000, 0x1fff).m(m_psram[0], FUNC(address_map_bank_device::amap16));
+ map(0x0000, 0x1fff).view(m_bank1_view);
+ m_bank1_view[0](0x0000, 0x1fff).rom().region("program", 0);
+ m_bank1_view[1](0x0000, 0x1fff).bankrw(m_psram1_bank);
map(0x2000, 0x3fff).rom().region("program", 0x2000);
- map(0x4000, 0x7fff).ram().share("common");
- map(0x8000, 0xbfff).m(m_psram[1], FUNC(address_map_bank_device::amap16));
+ map(0x4000, 0x7fff).bankrw(m_common_ram);
+ map(0x8000, 0xbfff).view(m_bank2_view);
+ m_bank2_view[0](0x8000, 0xbfff).rom().region("program", 0);
+ m_bank2_view[1](0x8000, 0xbfff).bankrw(m_psram2_bank);
map(0xc200, 0xc200).r(FUNC(roland_w30_state::floppy_status_r));
map(0xc600, 0xc600).rw(FUNC(roland_w30_state::psram_bank_r), FUNC(roland_w30_state::psram_bank_w));
map(0xc800, 0xc807).rw(m_fdc, FUNC(wd1772_device::read), FUNC(wd1772_device::write)).umask16(0x00ff);
map(0xd806, 0xd806).r(FUNC(roland_w30_state::unknown_status_r));
- //map(0xe000, 0xe01f).rw(m_scsic, FUNC(mb89352_device::read), FUNC(mb89352_device::write)).umask16(0x00ff);
+ map(0xe000, 0xe01f).m("scsi:7:scsic", FUNC(mb89352_device::map)).umask16(0x00ff);
map(0xe400, 0xe403).rw("lcd", FUNC(lm24014h_device::read), FUNC(lm24014h_device::write)).umask16(0x00ff);
//map(0xe800, 0xe83f).w("output", FUNC(upd65006gf_376_3b8_device::write)).umask16(0x00ff);
//map(0xf000, 0xf01f).rw(m_tvf, FUNC(mb654419u_device::read), FUNC(mb654419u_device::write)).umask16(0x00ff);
map(0xc000, 0xffff).rw(m_wave, FUNC(sa16_device::read), FUNC(sa16_device::write)).umask16(0xff00);
}
-#ifdef UNUSED_DEFINITION
-void roland_w30_state::s330_mem_map(address_map &map)
+[[maybe_unused]] void roland_w30_state::s330_mem_map(address_map &map)
{
- map(0x0000, 0x1fff).m(m_psram[0], FUNC(address_map_bank_device::amap16));
+ map(0x0000, 0x1fff).view(m_bank1_view);
+ m_bank1_view[0](0x0000, 0x1fff).rom().region("program", 0);
+ m_bank1_view[1](0x0000, 0x1fff).bankrw(m_psram1_bank);
map(0x2000, 0x3fff).rom().region("program", 0x2000);
- map(0x4000, 0x7fff).ram().share("common");
- map(0x8000, 0xbfff).m(m_psram[1], FUNC(address_map_bank_device::amap16));
+ map(0x4000, 0x7fff).bankrw(m_common_ram);
+ map(0x8000, 0xbfff).view(m_bank2_view);
+ m_bank2_view[0](0x8000, 0xbfff).rom().region("program", 0);
+ m_bank2_view[1](0x8000, 0xbfff).bankrw(m_psram2_bank);
map(0xc000, 0xffff).rw(m_wave, FUNC(sa16_device::read), FUNC(sa16_device::write)).umask16(0xff00);
}
-#endif
-void roland_s50_state::sram_map(address_map &map)
-{
- map(0x0000, 0x3fff).ram().share("common");
- map(0x4000, 0xffff).ram();
-}
-
-void roland_s550_state::lowmem_map(address_map &map)
-{
- map(0x0000, 0x1fff).rom().region("program", 0);
- map(0x2000, 0xffff).ram();
-}
-
-void roland_w30_state::psram1_map(address_map &map)
-{
- map(0x0000, 0x1fff).rom().region("program", 0);
- map(0x2000, 0xffff).ram();
-}
-
-void roland_w30_state::psram2_map(address_map &map)
-{
- map(0x00000, 0x03fff).rom().region("program", 0);
- map(0x04000, 0x0ffff).mirror(0x10000).ram();
- map(0x10000, 0x13fff).ram().share("common");
-}
-
-void roland_s50_state::vram_map(address_map &map)
+void roland_s50_base_state::vram_map(address_map &map)
{
map(0x0000, 0xffff).ram();
}
@@ -313,36 +344,25 @@ INPUT_PORTS_END
static INPUT_PORTS_START(w30)
INPUT_PORTS_END
-#ifdef UNUSED_DEFINITION
-static INPUT_PORTS_START(s330)
+[[maybe_unused]] static INPUT_PORTS_START(s330)
INPUT_PORTS_END
-#endif
static void s50_floppies(device_slot_interface &device)
{
device.option_add("35dd", FLOPPY_35_DD);
}
+static void scsi_devices(device_slot_interface &device)
+{
+ device.option_add("harddisk", NSCSI_HARDDISK);
+}
+
void roland_s50_state::s50(machine_config &config)
{
C8095_90(config, m_maincpu, 24_MHz_XTAL / 2);
m_maincpu->set_addrmap(AS_PROGRAM, &roland_s50_state::mem_map);
m_maincpu->out_p2_cb().set(FUNC(roland_s50_state::p2_w));
- ADDRESS_MAP_BANK(config, m_sram);
- m_sram->set_endianness(ENDIANNESS_LITTLE);
- m_sram->set_data_width(16);
- m_sram->set_addr_width(16);
- m_sram->set_stride(0x4000);
- m_sram->set_addrmap(0, &roland_s50_state::sram_map);
-
- ADDRESS_MAP_BANK(config, m_io);
- m_io->set_endianness(ENDIANNESS_LITTLE);
- m_io->set_data_width(16);
- m_io->set_addr_width(15);
- m_io->set_stride(0x4000);
- m_io->set_addrmap(0, &roland_s50_state::io_map);
-
MB63H149(config, m_keyscan, 24_MHz_XTAL / 2);
m_keyscan->int_callback().set_inputline(m_maincpu, i8x9x_device::EXTINT_LINE);
@@ -382,21 +402,24 @@ void roland_s550_state::s550(machine_config &config)
s50(config);
m_maincpu->set_addrmap(AS_PROGRAM, &roland_s550_state::mem_map);
- m_io->set_addrmap(0, &roland_s550_state::io_map);
-
- ADDRESS_MAP_BANK(config, m_lowmem);
- m_lowmem->set_endianness(ENDIANNESS_LITTLE);
- m_lowmem->set_data_width(16);
- m_lowmem->set_addr_width(16);
- m_lowmem->set_stride(0x2000);
- m_lowmem->set_addrmap(0, &roland_s550_state::lowmem_map);
//UPD7537(config.device_replace(), "fipcpu", 400_kHz_XTAL);
config.device_remove("keyscan");
- //MB89352(config, m_scsic, 8_MHz_XTAL); // on Option Board
- //m_scsic->intr_callback().set_inputline(m_maincpu, i8x9x_device::EXTINT_LINE);
+ // SCSI controller on Option Board
+ NSCSI_BUS(config, "scsi");
+ NSCSI_CONNECTOR(config, "scsi:0", scsi_devices, nullptr);
+ NSCSI_CONNECTOR(config, "scsi:1", scsi_devices, nullptr);
+ NSCSI_CONNECTOR(config, "scsi:2", scsi_devices, nullptr);
+ NSCSI_CONNECTOR(config, "scsi:3", scsi_devices, nullptr);
+ NSCSI_CONNECTOR(config, "scsi:4", scsi_devices, nullptr);
+ NSCSI_CONNECTOR(config, "scsi:5", scsi_devices, nullptr);
+ NSCSI_CONNECTOR(config, "scsi:6", scsi_devices, nullptr);
+ NSCSI_CONNECTOR(config, "scsi:7").option_set("scsic", MB89352).machine_config([this](device_t *device) {
+ device->set_clock(8_MHz_XTAL);
+ downcast<mb89352_device &>(*device).out_irq_callback().set_inputline(m_maincpu, i8x9x_device::EXTINT_LINE);
+ });
BU3905(config, "outas");
@@ -410,20 +433,6 @@ void roland_w30_state::w30(machine_config &config)
N8097BH(config, m_maincpu, 24_MHz_XTAL / 2);
m_maincpu->set_addrmap(AS_PROGRAM, &roland_w30_state::w30_mem_map);
- ADDRESS_MAP_BANK(config, m_psram[0]);
- m_psram[0]->set_endianness(ENDIANNESS_LITTLE);
- m_psram[0]->set_data_width(16);
- m_psram[0]->set_addr_width(16);
- m_psram[0]->set_stride(0x2000);
- m_psram[0]->set_addrmap(0, &roland_w30_state::psram1_map);
-
- ADDRESS_MAP_BANK(config, m_psram[1]);
- m_psram[1]->set_endianness(ENDIANNESS_LITTLE);
- m_psram[1]->set_data_width(16);
- m_psram[1]->set_addr_width(17);
- m_psram[1]->set_stride(0x4000);
- m_psram[1]->set_addrmap(0, &roland_w30_state::psram2_map);
-
MB63H149(config, m_keyscan, 24_MHz_XTAL / 2);
m_keyscan->int_callback().set_inputline(m_maincpu, i8x9x_device::EXTINT_LINE);
@@ -432,7 +441,16 @@ void roland_w30_state::w30(machine_config &config)
// Floppy unit: FX-354 (307F1JC)
FLOPPY_CONNECTOR(config, m_floppy, s50_floppies, "35dd", floppy_image_device::default_mfm_floppy_formats).enable_sound(true);
- //MB89352(config, m_scsic, 8_MHz_XTAL); // by option
+ // SCSI controller on main board, by option (KW-30)
+ NSCSI_BUS(config, "scsi");
+ NSCSI_CONNECTOR(config, "scsi:0", scsi_devices, nullptr);
+ NSCSI_CONNECTOR(config, "scsi:1", scsi_devices, nullptr);
+ NSCSI_CONNECTOR(config, "scsi:2", scsi_devices, nullptr);
+ NSCSI_CONNECTOR(config, "scsi:3", scsi_devices, nullptr);
+ NSCSI_CONNECTOR(config, "scsi:4", scsi_devices, nullptr);
+ NSCSI_CONNECTOR(config, "scsi:5", scsi_devices, nullptr);
+ NSCSI_CONNECTOR(config, "scsi:6", scsi_devices, nullptr);
+ NSCSI_CONNECTOR(config, "scsi:7").option_set("scsic", MB89352).clock(8_MHz_XTAL); // INTR & DREQ not connected
LM24014H(config, "lcd"); // LCD unit: LM240142
@@ -444,26 +462,11 @@ void roland_w30_state::w30(machine_config &config)
//MB654419U(config, m_tvf, 20_MHz_XTAL);
}
-#ifdef UNUSED_DEFINITION
void roland_w30_state::s330(machine_config &config)
{
- P8097(config, m_maincpu, 24_MHz_XTAL / 2); // P8097-90
+ C8095_90(config, m_maincpu, 24_MHz_XTAL / 2); // P8097-90
m_maincpu->set_addrmap(AS_PROGRAM, &roland_w30_state::s330_mem_map);
- ADDRESS_MAP_BANK(config, m_psram[0]);
- m_psram[0]->set_endianness(ENDIANNESS_LITTLE);
- m_psram[0]->set_data_width(16);
- m_psram[0]->set_addr_width(16);
- m_psram[0]->set_stride(0x2000);
- m_psram[0]->set_addrmap(0, &roland_w30_state::psram1_map);
-
- ADDRESS_MAP_BANK(config, m_psram[1]);
- m_psram[1]->set_endianness(ENDIANNESS_LITTLE);
- m_psram[1]->set_data_width(16);
- m_psram[1]->set_addr_width(17);
- m_psram[1]->set_stride(0x4000);
- m_psram[1]->set_addrmap(0, &roland_w30_state::psram2_map);
-
WD1772(config, m_fdc, 8_MHz_XTAL); // WD1772-02
// Floppy unit: ND-362S-A
@@ -495,7 +498,6 @@ void roland_w30_state::s330(machine_config &config)
//MB654419U(config, m_tvf, 20_MHz_XTAL);
}
-#endif
ROM_START(s50)
ROM_REGION16_LE(0x4000, "program", 0)
@@ -527,13 +529,11 @@ ROM_START(w30)
ROM_LOAD16_BYTE("lh534145_15179936.ic29", 0x00001, 0x80000, NO_DUMP)
ROM_END
-#ifdef UNUSED_DEFINITION
-ROM_START(s330)
+[[maybe_unused]] ROM_START(s330)
ROM_REGION16_LE(0x4000, "program", 0)
ROM_LOAD16_BYTE("s-330.ic15", 0x0000, 0x2000, NO_DUMP)
ROM_LOAD16_BYTE("s-330.ic14", 0x0001, 0x2000, NO_DUMP)
ROM_END
-#endif
} // anonymous namespace