summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/bus/newbrain
diff options
context:
space:
mode:
author AJR <ajrhacker@users.noreply.github.com>2021-06-20 17:32:35 -0400
committer AJR <ajrhacker@users.noreply.github.com>2021-06-20 17:34:42 -0400
commit87894e9c99a63d33100e982674d491234a432ca4 (patch)
tree361e10b3d8c846a0cb661ab55d4aea5232a30cf5 /src/devices/bus/newbrain
parentcf01398c86af96c7320726de6361e9bbca4db68c (diff)
adam, bw2, cbm2, newbrain, pet, plus4, pofo, vic10, vic20: Eliminate bus tag macros and legacy lookups; use finder arrays in some places
Diffstat (limited to 'src/devices/bus/newbrain')
-rw-r--r--src/devices/bus/newbrain/eim.cpp2
-rw-r--r--src/devices/bus/newbrain/exp.h7
-rw-r--r--src/devices/bus/newbrain/fdc.cpp14
-rw-r--r--src/devices/bus/newbrain/fdc.h5
4 files changed, 7 insertions, 21 deletions
diff --git a/src/devices/bus/newbrain/eim.cpp b/src/devices/bus/newbrain/eim.cpp
index be3cae2e615..7b3685eeea7 100644
--- a/src/devices/bus/newbrain/eim.cpp
+++ b/src/devices/bus/newbrain/eim.cpp
@@ -113,7 +113,7 @@ newbrain_eim_device::newbrain_eim_device(const machine_config &mconfig, const ch
device_newbrain_expansion_slot_interface(mconfig, *this),
m_ctc(*this, Z80CTC_TAG),
m_acia(*this, MC6850_TAG),
- m_exp(*this, NEWBRAIN_EXPANSION_SLOT_TAG),
+ m_exp(*this, "exp"),
m_rom(*this, "eim"),
m_ram(*this, RAM_TAG)
{
diff --git a/src/devices/bus/newbrain/exp.h b/src/devices/bus/newbrain/exp.h
index e8293a9c540..922ef17213a 100644
--- a/src/devices/bus/newbrain/exp.h
+++ b/src/devices/bus/newbrain/exp.h
@@ -43,13 +43,6 @@
//**************************************************************************
-// CONSTANTS
-//**************************************************************************
-
-#define NEWBRAIN_EXPANSION_SLOT_TAG "exp"
-
-
-//**************************************************************************
// TYPE DEFINITIONS
//**************************************************************************
diff --git a/src/devices/bus/newbrain/fdc.cpp b/src/devices/bus/newbrain/fdc.cpp
index a356d034a39..fa046e0d5a9 100644
--- a/src/devices/bus/newbrain/fdc.cpp
+++ b/src/devices/bus/newbrain/fdc.cpp
@@ -135,11 +135,8 @@ newbrain_fdc_device::newbrain_fdc_device(const machine_config &mconfig, const ch
device_newbrain_expansion_slot_interface(mconfig, *this),
m_maincpu(*this, Z80_TAG),
m_fdc(*this, UPD765_TAG),
- m_floppy0(*this, UPD765_TAG ":0"),
- m_floppy1(*this, UPD765_TAG ":1"),
- m_floppy2(*this, UPD765_TAG ":2"),
- m_floppy3(*this, UPD765_TAG ":3"),
- m_exp(*this, NEWBRAIN_EXPANSION_SLOT_TAG)
+ m_floppy(*this, UPD765_TAG ":%u", 0U),
+ m_exp(*this, "exp")
{
}
@@ -224,10 +221,9 @@ void newbrain_fdc_device::iorq_w(offs_t offset, uint8_t data, bool &prtov)
void newbrain_fdc_device::moton(int state)
{
- if (m_floppy0->get_device()) m_floppy0->get_device()->mon_w(!state);
- if (m_floppy1->get_device()) m_floppy1->get_device()->mon_w(!state);
- if (m_floppy2->get_device()) m_floppy2->get_device()->mon_w(!state);
- if (m_floppy3->get_device()) m_floppy3->get_device()->mon_w(!state);
+ for (auto &floppy : m_floppy)
+ if (floppy->get_device())
+ floppy->get_device()->mon_w(!state);
}
diff --git a/src/devices/bus/newbrain/fdc.h b/src/devices/bus/newbrain/fdc.h
index e5d6665a078..3ac24faffa6 100644
--- a/src/devices/bus/newbrain/fdc.h
+++ b/src/devices/bus/newbrain/fdc.h
@@ -57,10 +57,7 @@ private:
required_device<z80_device> m_maincpu;
required_device<upd765a_device> m_fdc;
- required_device<floppy_connector> m_floppy0;
- required_device<floppy_connector> m_floppy1;
- required_device<floppy_connector> m_floppy2;
- required_device<floppy_connector> m_floppy3;
+ required_device_array<floppy_connector, 4> m_floppy;
required_device<newbrain_expansion_slot_device> m_exp;
void moton(int state);