summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/bus/a2bus
diff options
context:
space:
mode:
Diffstat (limited to 'src/devices/bus/a2bus')
-rw-r--r--src/devices/bus/a2bus/a2alfam2.cpp44
-rw-r--r--src/devices/bus/a2bus/a2arcadebd.cpp6
-rw-r--r--src/devices/bus/a2bus/a2bus.cpp28
-rw-r--r--src/devices/bus/a2bus/a2bus.h49
-rw-r--r--src/devices/bus/a2bus/a2cffa.cpp2
-rw-r--r--src/devices/bus/a2bus/a2corvus.cpp19
-rw-r--r--src/devices/bus/a2bus/a2diskii.cpp22
-rw-r--r--src/devices/bus/a2bus/a2diskiing.cpp29
-rw-r--r--src/devices/bus/a2bus/a2diskiing.h5
-rw-r--r--src/devices/bus/a2bus/a2dx1.cpp14
-rw-r--r--src/devices/bus/a2bus/a2eauxslot.cpp37
-rw-r--r--src/devices/bus/a2bus/a2eauxslot.h59
-rw-r--r--src/devices/bus/a2bus/a2eext80col.cpp1
-rw-r--r--src/devices/bus/a2bus/a2eramworks3.cpp3
-rw-r--r--src/devices/bus/a2bus/a2eramworks3.h2
-rw-r--r--src/devices/bus/a2bus/a2estd80col.cpp1
-rw-r--r--src/devices/bus/a2bus/a2hsscsi.cpp39
-rw-r--r--src/devices/bus/a2bus/a2hsscsi.h2
-rw-r--r--src/devices/bus/a2bus/a2mcms.cpp18
-rw-r--r--src/devices/bus/a2bus/a2mcms.h2
-rw-r--r--src/devices/bus/a2bus/a2memexp.cpp5
-rw-r--r--src/devices/bus/a2bus/a2midi.cpp22
-rw-r--r--src/devices/bus/a2bus/a2mockingboard.cpp50
-rw-r--r--src/devices/bus/a2bus/a2pic.cpp8
-rw-r--r--src/devices/bus/a2bus/a2sam.cpp12
-rw-r--r--src/devices/bus/a2bus/a2scsi.cpp39
-rw-r--r--src/devices/bus/a2bus/a2scsi.h2
-rw-r--r--src/devices/bus/a2bus/a2softcard.cpp28
-rw-r--r--src/devices/bus/a2bus/a2ssc.cpp4
-rw-r--r--src/devices/bus/a2bus/a2themill.cpp28
-rw-r--r--src/devices/bus/a2bus/a2ultraterm.cpp17
-rw-r--r--src/devices/bus/a2bus/a2videoterm.cpp17
-rw-r--r--src/devices/bus/a2bus/a2zipdrive.cpp107
-rw-r--r--src/devices/bus/a2bus/a2zipdrive.h18
-rw-r--r--src/devices/bus/a2bus/agat7ports.cpp12
-rw-r--r--src/devices/bus/a2bus/agat840k_hle.cpp15
-rw-r--r--src/devices/bus/a2bus/corvfdc02.cpp6
-rw-r--r--src/devices/bus/a2bus/ezcgi.cpp34
-rw-r--r--src/devices/bus/a2bus/laser128.cpp5
-rw-r--r--src/devices/bus/a2bus/mouse.cpp4
-rw-r--r--src/devices/bus/a2bus/pc_xporter.cpp45
-rw-r--r--src/devices/bus/a2bus/pc_xporter.h1
-rw-r--r--src/devices/bus/a2bus/ssbapple.cpp9
-rw-r--r--src/devices/bus/a2bus/ssprite.cpp6
-rw-r--r--src/devices/bus/a2bus/timemasterho.cpp4
-rw-r--r--src/devices/bus/a2bus/transwarp.cpp37
-rw-r--r--src/devices/bus/a2bus/transwarp.h1
47 files changed, 420 insertions, 498 deletions
diff --git a/src/devices/bus/a2bus/a2alfam2.cpp b/src/devices/bus/a2bus/a2alfam2.cpp
index e97722708da..6817176c202 100644
--- a/src/devices/bus/a2bus/a2alfam2.cpp
+++ b/src/devices/bus/a2bus/a2alfam2.cpp
@@ -39,39 +39,37 @@ DEFINE_DEVICE_TYPE(A2BUS_AESMS, a2bus_aesms_device, "a2aesms", "Applied Engin
// device_add_mconfig - add device configuration
//-------------------------------------------------
-void a2bus_sn76489_device::device_add_mconfig(machine_config &config)
-{
+MACHINE_CONFIG_START(a2bus_sn76489_device::device_add_mconfig)
SPEAKER(config, "alf_l").front_left();
SPEAKER(config, "alf_r").front_right();
- SN76489(config, m_sn1, 1020484);
- m_sn1->add_route(ALL_OUTPUTS, "alf_l", 0.50);
- SN76489(config, m_sn2, 1020484);
- m_sn2->add_route(ALL_OUTPUTS, "alf_l", 0.50);
- m_sn2->add_route(ALL_OUTPUTS, "alf_r", 0.50);
- SN76489(config, m_sn3, 1020484);
- m_sn3->add_route(ALL_OUTPUTS, "alf_r", 0.50);
-}
+ MCFG_DEVICE_ADD(SN1_TAG, SN76489, 1020484)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "alf_l", 0.50)
+ MCFG_DEVICE_ADD(SN2_TAG, SN76489, 1020484)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "alf_l", 0.50)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "alf_r", 0.50)
+ MCFG_DEVICE_ADD(SN3_TAG, SN76489, 1020484)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "alf_r", 0.50)
+MACHINE_CONFIG_END
-void a2bus_aesms_device::device_add_mconfig(machine_config &config)
-{
+MACHINE_CONFIG_START(a2bus_aesms_device::device_add_mconfig)
SPEAKER(config, "alf_l").front_left();
SPEAKER(config, "alf_r").front_right();
- SN76489(config, m_sn1, 1020484);
- m_sn1->add_route(ALL_OUTPUTS, "alf_l", 0.50);
+ MCFG_DEVICE_ADD(SN1_TAG, SN76489, 1020484)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "alf_l", 0.50)
- SN76489(config, m_sn2, 1020484);
- m_sn2->add_route(ALL_OUTPUTS, "alf_l", 0.50);
- m_sn2->add_route(ALL_OUTPUTS, "alf_r", 0.50);
+ MCFG_DEVICE_ADD(SN2_TAG, SN76489, 1020484)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "alf_l", 0.50)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "alf_r", 0.50)
- SN76489(config, m_sn3, 1020484);
- m_sn3->add_route(ALL_OUTPUTS, "alf_r", 0.50);
+ MCFG_DEVICE_ADD(SN3_TAG, SN76489, 1020484)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "alf_r", 0.50)
- SN76489(config, m_sn4, 1020484);
- m_sn4->add_route(ALL_OUTPUTS, "alf_l", 0.50);
- m_sn4->add_route(ALL_OUTPUTS, "alf_r", 0.50);
-}
+ MCFG_DEVICE_ADD(SN4_TAG, SN76489, 1020484)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "alf_l", 0.50)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "alf_r", 0.50)
+MACHINE_CONFIG_END
//**************************************************************************
// LIVE DEVICE
diff --git a/src/devices/bus/a2bus/a2arcadebd.cpp b/src/devices/bus/a2bus/a2arcadebd.cpp
index 169971ea3e5..4bdd0a6911b 100644
--- a/src/devices/bus/a2bus/a2arcadebd.cpp
+++ b/src/devices/bus/a2bus/a2arcadebd.cpp
@@ -97,7 +97,7 @@ uint8_t a2bus_arcboard_device::read_c0nx(uint8_t offset)
return m_tms->register_read();
case 6:
- return m_ay->data_r();
+ return m_ay->read_data();
}
return 0xff;
@@ -118,11 +118,11 @@ void a2bus_arcboard_device::write_c0nx(uint8_t offset, uint8_t data)
break;
case 5:
- m_ay->address_w(data);
+ m_ay->write_address(data);
break;
case 6:
- m_ay->data_w(data);
+ m_ay->write_data(data);
break;
}
}
diff --git a/src/devices/bus/a2bus/a2bus.cpp b/src/devices/bus/a2bus/a2bus.cpp
index 7adcaf368a7..84df6f73b35 100644
--- a/src/devices/bus/a2bus/a2bus.cpp
+++ b/src/devices/bus/a2bus/a2bus.cpp
@@ -145,11 +145,8 @@ a2bus_device::a2bus_device(const machine_config &mconfig, const char *tag, devic
a2bus_device::a2bus_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock)
: device_t(mconfig, type, tag, owner, clock)
- , m_maincpu_space(*this, finder_base::DUMMY_TAG, -1)
- , m_out_irq_cb(*this)
- , m_out_nmi_cb(*this)
- , m_out_inh_cb(*this)
- , m_out_dma_cb(*this)
+ , m_maincpu(*this, finder_base::DUMMY_TAG), m_maincpu_space(nullptr)
+ , m_out_irq_cb(*this) , m_out_nmi_cb(*this), m_out_inh_cb(*this)
, m_slot_irq_mask(0), m_slot_nmi_mask(0)
{
}
@@ -160,11 +157,12 @@ a2bus_device::a2bus_device(const machine_config &mconfig, device_type type, cons
void a2bus_device::device_resolve_objects()
{
+ m_maincpu_space = &m_maincpu->space(AS_PROGRAM);
+
// resolve callbacks
m_out_irq_cb.resolve_safe();
m_out_nmi_cb.resolve_safe();
m_out_inh_cb.resolve_safe();
- m_out_dma_cb.resolve_safe();
}
void a2bus_device::device_start()
@@ -241,17 +239,27 @@ void a2bus_device::set_nmi_line(int state, int slot)
}
}
-void a2bus_device::set_dma_line(int state)
+void a2bus_device::set_maincpu_halt(int state)
{
- m_out_dma_cb(state);
+ m_maincpu->set_input_line(INPUT_LINE_HALT, state);
+}
+
+uint8_t a2bus_device::dma_r(address_space &space, uint16_t offset)
+{
+ return m_maincpu_space->read_byte(offset);
+}
+
+void a2bus_device::dma_w(address_space &space, uint16_t offset, uint8_t data)
+{
+ m_maincpu_space->write_byte(offset, data);
}
-uint8_t a2bus_device::dma_r(uint16_t offset)
+uint8_t a2bus_device::dma_nospace_r(uint16_t offset)
{
return m_maincpu_space->read_byte(offset);
}
-void a2bus_device::dma_w(uint16_t offset, uint8_t data)
+void a2bus_device::dma_nospace_w(uint16_t offset, uint8_t data)
{
m_maincpu_space->write_byte(offset, data);
}
diff --git a/src/devices/bus/a2bus/a2bus.h b/src/devices/bus/a2bus/a2bus.h
index 502ff72e854..862aeca3803 100644
--- a/src/devices/bus/a2bus/a2bus.h
+++ b/src/devices/bus/a2bus/a2bus.h
@@ -25,6 +25,22 @@
#define INH_READ 0x01
#define INH_WRITE 0x02
+//**************************************************************************
+// INTERFACE CONFIGURATION MACROS
+//**************************************************************************
+
+#define MCFG_A2BUS_CPU(_cputag) \
+ downcast<a2bus_device &>(*device).set_cputag(_cputag);
+
+#define MCFG_A2BUS_OUT_IRQ_CB(_devcb) \
+ downcast<a2bus_device &>(*device).set_out_irq_callback(DEVCB_##_devcb);
+
+#define MCFG_A2BUS_OUT_NMI_CB(_devcb) \
+ downcast<a2bus_device &>(*device).set_out_nmi_callback(DEVCB_##_devcb);
+
+#define MCFG_A2BUS_OUT_INH_CB(_devcb) \
+ downcast<a2bus_device &>(*device).set_out_inh_callback(DEVCB_##_devcb);
+
// 7M = XTAL(14'318'181) / 2 or XTAL(28'636'363) / 4 (for IIgs)
static constexpr uint32_t A2BUS_7M_CLOCK = 7159090;
@@ -83,11 +99,15 @@ public:
a2bus_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
// inline configuration
- template <typename T> void set_space(T &&tag, int spacenum) { m_maincpu_space.set_tag(std::forward<T>(tag), spacenum); }
+ template <typename T> void set_cputag(T &&tag) { m_maincpu.set_tag(std::forward<T>(tag)); }
+ template <class Object> devcb_base &set_out_irq_callback(Object &&cb) { return m_out_irq_cb.set_callback(std::forward<Object>(cb)); }
+ template <class Object> devcb_base &set_out_nmi_callback(Object &&cb) { return m_out_nmi_cb.set_callback(std::forward<Object>(cb)); }
+ template <class Object> devcb_base &set_out_inh_callback(Object &&cb) { return m_out_inh_cb.set_callback(std::forward<Object>(cb)); }
+
+ // devcb3
auto irq_w() { return m_out_irq_cb.bind(); }
auto nmi_w() { return m_out_nmi_cb.bind(); }
auto inh_w() { return m_out_inh_cb.bind(); }
- auto dma_w() { return m_out_dma_cb.bind(); }
void add_a2bus_card(int slot, device_a2bus_card_interface *card);
device_a2bus_card_interface *get_a2bus_card(int slot);
@@ -96,10 +116,12 @@ public:
void set_irq_line(int state, int slot);
void set_nmi_line(int state, int slot);
- void set_dma_line(int state);
+ void set_maincpu_halt(int state);
void recalc_inh(int slot);
- uint8_t dma_r(uint16_t offset);
- void dma_w(uint16_t offset, uint8_t data);
+ uint8_t dma_r(address_space &space, uint16_t offset);
+ void dma_w(address_space &space, uint16_t offset, uint8_t data);
+ uint8_t dma_nospace_r(uint16_t offset);
+ void dma_nospace_w(uint16_t offset, uint8_t data);
DECLARE_WRITE_LINE_MEMBER( irq_w );
DECLARE_WRITE_LINE_MEMBER( nmi_w );
@@ -113,12 +135,12 @@ protected:
virtual void device_reset() override;
// internal state
- required_address_space m_maincpu_space;
+ required_device<cpu_device> m_maincpu;
+ address_space *m_maincpu_space;
devcb_write_line m_out_irq_cb;
devcb_write_line m_out_nmi_cb;
devcb_write8 m_out_inh_cb;
- devcb_write_line m_out_dma_cb;
device_a2bus_card_interface *m_device_list[8];
@@ -159,8 +181,14 @@ public:
void set_a2bus(a2bus_device *a2bus, const char *slottag) { m_a2bus = a2bus; m_a2bus_slottag = slottag; }
template <typename T> void set_onboard(T &&a2bus) { m_a2bus_finder.set_tag(std::forward<T>(a2bus)); m_a2bus_slottag = device().tag(); }
- uint8_t slot_dma_read(uint16_t offset) { return m_a2bus->dma_r(offset); }
- void slot_dma_write(uint16_t offset, uint8_t data) { m_a2bus->dma_w(offset, data); }
+ // pass through the original address space if any for debugger protection
+ // when debugging e.g. coprocessor cards (Z80 SoftCard etc).
+ uint8_t slot_dma_read(address_space &space, uint16_t offset) { return m_a2bus->dma_r(space, offset); }
+ void slot_dma_write(address_space &space, uint16_t offset, uint8_t data) { m_a2bus->dma_w(space, offset, data); }
+
+ // these versions forego that protection for when the DMA isn't coming from a debuggable CPU device
+ uint8_t slot_dma_read_no_space(uint16_t offset) { return m_a2bus->dma_nospace_r(offset); }
+ void slot_dma_write_no_space(uint16_t offset, uint8_t data) { m_a2bus->dma_nospace_w(offset, data); }
protected:
uint32_t get_slotromspace() { return 0xc000 | (m_slot<<8); } // return Cn00 address for this slot
@@ -171,8 +199,7 @@ protected:
void raise_slot_nmi() { m_a2bus->set_nmi_line(ASSERT_LINE, m_slot); }
void lower_slot_nmi() { m_a2bus->set_nmi_line(CLEAR_LINE, m_slot); }
void recalc_slot_inh() { m_a2bus->recalc_inh(m_slot); }
- void raise_slot_dma() { m_a2bus->set_dma_line(ASSERT_LINE); }
- void lower_slot_dma() { m_a2bus->set_dma_line(CLEAR_LINE); }
+ void set_maincpu_halt(int state) { m_a2bus->set_maincpu_halt(state); }
device_a2bus_card_interface(const machine_config &mconfig, device_t &device);
diff --git a/src/devices/bus/a2bus/a2cffa.cpp b/src/devices/bus/a2bus/a2cffa.cpp
index 41c5a1603f6..4eb5c7d2d98 100644
--- a/src/devices/bus/a2bus/a2cffa.cpp
+++ b/src/devices/bus/a2bus/a2cffa.cpp
@@ -56,7 +56,7 @@ void a2bus_cffa2000_device::device_add_mconfig(machine_config &config)
ATA_INTERFACE(config, m_ata).options(ata_devices, "hdd", nullptr, false);
// not yet, the core explodes
-// SOFTWARE_LIST(config, "hdd_list").set_original("apple2gs_hdd");
+// MCFG_SOFTWARE_LIST_ADD("hdd_list", "apple2gs_hdd")
}
//-------------------------------------------------
diff --git a/src/devices/bus/a2bus/a2corvus.cpp b/src/devices/bus/a2bus/a2corvus.cpp
index 3b0af093659..251485d3f28 100644
--- a/src/devices/bus/a2bus/a2corvus.cpp
+++ b/src/devices/bus/a2bus/a2corvus.cpp
@@ -71,14 +71,17 @@ ROM_END
// device_add_mconfig - add device configuration
//-------------------------------------------------
-void a2bus_corvus_device::device_add_mconfig(machine_config &config)
-{
- CORVUS_HDC(config, m_corvushd, 0);
- HARDDISK(config, "harddisk1", "corvus_hdd");
- HARDDISK(config, "harddisk2", "corvus_hdd");
- HARDDISK(config, "harddisk3", "corvus_hdd");
- HARDDISK(config, "harddisk4", "corvus_hdd");
-}
+MACHINE_CONFIG_START(a2bus_corvus_device::device_add_mconfig)
+ MCFG_DEVICE_ADD(CORVUS_HD_TAG, CORVUS_HDC, 0)
+ MCFG_HARDDISK_ADD("harddisk1")
+ MCFG_HARDDISK_INTERFACE("corvus_hdd")
+ MCFG_HARDDISK_ADD("harddisk2")
+ MCFG_HARDDISK_INTERFACE("corvus_hdd")
+ MCFG_HARDDISK_ADD("harddisk3")
+ MCFG_HARDDISK_INTERFACE("corvus_hdd")
+ MCFG_HARDDISK_ADD("harddisk4")
+ MCFG_HARDDISK_INTERFACE("corvus_hdd")
+MACHINE_CONFIG_END
//-------------------------------------------------
// rom_region - device-specific ROM region
diff --git a/src/devices/bus/a2bus/a2diskii.cpp b/src/devices/bus/a2bus/a2diskii.cpp
index 20aff173549..9673abbb1da 100644
--- a/src/devices/bus/a2bus/a2diskii.cpp
+++ b/src/devices/bus/a2bus/a2diskii.cpp
@@ -61,19 +61,15 @@ ROM_END
// device_add_mconfig - add device configuration
//-------------------------------------------------
-void a2bus_floppy_device::device_add_mconfig(machine_config &config)
-{
- APPLEFDC(config, m_fdc, &fdc_interface);
- FLOPPY_APPLE(config, FLOPPY_0, &floppy_interface, 15, 16);
- FLOPPY_APPLE(config, FLOPPY_1, &floppy_interface, 15, 16);
-}
-
-void a2bus_iwmflop_device::device_add_mconfig(machine_config &config)
-{
- IWM(config, m_fdc, &fdc_interface);
- FLOPPY_APPLE(config, FLOPPY_0, &floppy_interface, 15, 16);
- FLOPPY_APPLE(config, FLOPPY_1, &floppy_interface, 15, 16);
-}
+MACHINE_CONFIG_START(a2bus_floppy_device::device_add_mconfig)
+ MCFG_APPLEFDC_ADD(FDC_TAG, fdc_interface)
+ MCFG_LEGACY_FLOPPY_APPLE_2_DRIVES_ADD(floppy_interface,15,16)
+MACHINE_CONFIG_END
+
+MACHINE_CONFIG_START(a2bus_iwmflop_device::device_add_mconfig)
+ MCFG_IWM_ADD(FDC_TAG, fdc_interface)
+ MCFG_LEGACY_FLOPPY_APPLE_2_DRIVES_ADD(floppy_interface,15,16)
+MACHINE_CONFIG_END
//-------------------------------------------------
// rom_region - device-specific ROM region
diff --git a/src/devices/bus/a2bus/a2diskiing.cpp b/src/devices/bus/a2bus/a2diskiing.cpp
index 1846b447a04..28194db0421 100644
--- a/src/devices/bus/a2bus/a2diskiing.cpp
+++ b/src/devices/bus/a2bus/a2diskiing.cpp
@@ -54,19 +54,17 @@ FLOPPY_FORMATS_END
// device_add_mconfig - add device configuration
//-------------------------------------------------
-void diskiing_device::device_add_mconfig(machine_config &config)
-{
- DISKII_FDC(config, m_wozfdc, 1021800*2);
- for (auto &floppy : m_floppy)
- FLOPPY_CONNECTOR(config, floppy, a2_floppies, "525", diskiing_device::floppy_formats);
-}
-
-void a2bus_diskiing13_device::device_add_mconfig(machine_config &config)
-{
- DISKII_FDC(config, m_wozfdc, 1021800*2);
- for (auto &floppy : m_floppy)
- FLOPPY_CONNECTOR(config, floppy, a2_floppies, "525", a2bus_diskiing13_device::floppy_formats);
-}
+MACHINE_CONFIG_START(diskiing_device::device_add_mconfig)
+ MCFG_DEVICE_ADD(WOZFDC_TAG, DISKII_FDC, 1021800*2)
+ MCFG_FLOPPY_DRIVE_ADD("0", a2_floppies, "525", diskiing_device::floppy_formats)
+ MCFG_FLOPPY_DRIVE_ADD("1", a2_floppies, "525", diskiing_device::floppy_formats)
+MACHINE_CONFIG_END
+
+MACHINE_CONFIG_START(a2bus_diskiing13_device::device_add_mconfig)
+ MCFG_DEVICE_ADD(WOZFDC_TAG, DISKII_FDC, 1021800*2)
+ MCFG_FLOPPY_DRIVE_ADD("0", a2_floppies, "525", a2bus_diskiing13_device::floppy_formats)
+ MCFG_FLOPPY_DRIVE_ADD("1", a2_floppies, "525", a2bus_diskiing13_device::floppy_formats)
+MACHINE_CONFIG_END
//-------------------------------------------------
// rom_region - device-specific ROM region
@@ -90,7 +88,8 @@ diskiing_device::diskiing_device(const machine_config &mconfig, device_type type
device_t(mconfig, type, tag, owner, clock),
device_a2bus_card_interface(mconfig, *this),
m_wozfdc(*this, WOZFDC_TAG),
- m_floppy(*this, "%u", 0U),
+ floppy0(*this, "0"),
+ floppy1(*this, "1"),
m_rom(nullptr)
{
}
@@ -116,7 +115,7 @@ void diskiing_device::device_start()
void diskiing_device::device_reset()
{
- m_wozfdc->set_floppies(m_floppy[0], m_floppy[1]);
+ m_wozfdc->set_floppies(floppy0, floppy1);
}
/*-------------------------------------------------
diff --git a/src/devices/bus/a2bus/a2diskiing.h b/src/devices/bus/a2bus/a2diskiing.h
index c30d49ebf0d..e6476cb29a7 100644
--- a/src/devices/bus/a2bus/a2diskiing.h
+++ b/src/devices/bus/a2bus/a2diskiing.h
@@ -42,10 +42,11 @@ protected:
virtual void write_c0nx(uint8_t offset, uint8_t data) override;
virtual uint8_t read_cnxx(uint8_t offset) override;
+private:
required_device<diskii_fdc_device> m_wozfdc;
- required_device_array<floppy_connector, 2> m_floppy;
+ required_device<floppy_connector> floppy0;
+ required_device<floppy_connector> floppy1;
-private:
const uint8_t *m_rom;
DECLARE_FLOPPY_FORMATS( floppy_formats );
diff --git a/src/devices/bus/a2bus/a2dx1.cpp b/src/devices/bus/a2bus/a2dx1.cpp
index 9c1a0733405..5efd112a779 100644
--- a/src/devices/bus/a2bus/a2dx1.cpp
+++ b/src/devices/bus/a2bus/a2dx1.cpp
@@ -31,14 +31,14 @@ DEFINE_DEVICE_TYPE(A2BUS_DX1, a2bus_dx1_device, "a2dx1", "Decillonix DX-1")
// device_add_mconfig - add device configuration
//-------------------------------------------------
-void a2bus_dx1_device::device_add_mconfig(machine_config &config)
-{
+MACHINE_CONFIG_START(a2bus_dx1_device::device_add_mconfig)
SPEAKER(config, "speaker").front_center();
- DAC_8BIT_R2R(config, m_dac, 0).add_route(ALL_OUTPUTS, "speaker", 0.5); // unknown DAC
- DAC_8BIT_R2R(config, m_dacvol, 0).add_route(0, "dac", 1.0, DAC_VREF_POS_INPUT).add_route(0, "dac", -1.0, DAC_VREF_NEG_INPUT); // unknown DAC
- voltage_regulator_device &vref(VOLTAGE_REGULATOR(config, "vref"));
- vref.add_route(0, "dacvol", 1.0, DAC_VREF_POS_INPUT);
-}
+ MCFG_DEVICE_ADD("dac", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.5) // unknown DAC
+ MCFG_DEVICE_ADD("dacvol", DAC_8BIT_R2R, 0) // unknown DAC
+ MCFG_SOUND_ROUTE(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE(0, "dac", -1.0, DAC_VREF_NEG_INPUT)
+ MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
+ MCFG_SOUND_ROUTE(0, "dacvol", 1.0, DAC_VREF_POS_INPUT)
+MACHINE_CONFIG_END
//**************************************************************************
// LIVE DEVICE
diff --git a/src/devices/bus/a2bus/a2eauxslot.cpp b/src/devices/bus/a2bus/a2eauxslot.cpp
index 5fab40ba9ae..6885d528128 100644
--- a/src/devices/bus/a2bus/a2eauxslot.cpp
+++ b/src/devices/bus/a2bus/a2eauxslot.cpp
@@ -33,16 +33,20 @@ a2eauxslot_slot_device::a2eauxslot_slot_device(const machine_config &mconfig, co
a2eauxslot_slot_device::a2eauxslot_slot_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock)
: device_t(mconfig, type, tag, owner, clock)
, device_slot_interface(mconfig, *this)
- , m_a2eauxslot(*this, finder_base::DUMMY_TAG)
+ , m_a2eauxslot_tag(nullptr)
+ , m_a2eauxslot_slottag(nullptr)
{
}
-void a2eauxslot_slot_device::device_resolve_objects()
+//-------------------------------------------------
+// device_start - device-specific startup
+//-------------------------------------------------
+
+void a2eauxslot_slot_device::device_start()
{
device_a2eauxslot_card_interface *dev = dynamic_cast<device_a2eauxslot_card_interface *>(get_card_device());
- if (dev)
- dev->set_a2eauxslot_device(m_a2eauxslot.target());
+ if (dev) dev->set_a2eauxslot_tag(m_a2eauxslot_tag, m_a2eauxslot_slottag);
}
//**************************************************************************
@@ -66,31 +70,34 @@ a2eauxslot_device::a2eauxslot_device(const machine_config &mconfig, const char *
a2eauxslot_device::a2eauxslot_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock)
: device_t(mconfig, type, tag, owner, clock)
- , m_space(*this, finder_base::DUMMY_TAG, -1)
+ , m_maincpu(nullptr)
, m_out_irq_cb(*this)
, m_out_nmi_cb(*this)
, m_device(nullptr)
+ , m_cputag(nullptr)
{
}
-
//-------------------------------------------------
-// device_resolve_objects - resolve objects that
-// may be needed for other devices to set
-// initial conditions at start time
+// device_start - device-specific startup
//-------------------------------------------------
-void a2eauxslot_device::device_resolve_objects()
+void a2eauxslot_device::device_start()
{
+ m_maincpu = machine().device<cpu_device>(m_cputag);
+
// resolve callbacks
m_out_irq_cb.resolve_safe();
m_out_nmi_cb.resolve_safe();
+
+ // clear slot
+ m_device = nullptr;
}
//-------------------------------------------------
-// device_start - device-specific startup
+// device_reset - device-specific reset
//-------------------------------------------------
-void a2eauxslot_device::device_start()
+void a2eauxslot_device::device_reset()
{
}
@@ -134,7 +141,7 @@ WRITE_LINE_MEMBER( a2eauxslot_device::nmi_w ) { m_out_nmi_cb(state); }
device_a2eauxslot_card_interface::device_a2eauxslot_card_interface(const machine_config &mconfig, device_t &device)
: device_slot_card_interface(mconfig, device),
m_a2eauxslot(nullptr),
- m_slot(0), m_next(nullptr)
+ m_a2eauxslot_tag(nullptr), m_a2eauxslot_slottag(nullptr), m_slot(0), m_next(nullptr)
{
}
@@ -147,8 +154,8 @@ device_a2eauxslot_card_interface::~device_a2eauxslot_card_interface()
{
}
-void device_a2eauxslot_card_interface::set_a2eauxslot_device(a2eauxslot_device *a2eauxslot)
+void device_a2eauxslot_card_interface::set_a2eauxslot_device()
{
- m_a2eauxslot = a2eauxslot;
+ m_a2eauxslot = dynamic_cast<a2eauxslot_device *>(device().machine().device(m_a2eauxslot_tag));
m_a2eauxslot->add_a2eauxslot_card(this);
}
diff --git a/src/devices/bus/a2bus/a2eauxslot.h b/src/devices/bus/a2bus/a2eauxslot.h
index 4351bc6112a..1da89b18d7a 100644
--- a/src/devices/bus/a2bus/a2eauxslot.h
+++ b/src/devices/bus/a2bus/a2eauxslot.h
@@ -15,6 +15,25 @@
#include "a2bus.h"
+//**************************************************************************
+// INTERFACE CONFIGURATION MACROS
+//**************************************************************************
+
+#define MCFG_A2EAUXSLOT_CPU(_cputag) \
+ downcast<a2eauxslot_device &>(*device).set_cputag(_cputag);
+
+#define MCFG_A2EAUXSLOT_OUT_IRQ_CB(_devcb) \
+ downcast<a2eauxslot_device &>(*device).set_out_irq_callback(DEVCB_##_devcb);
+
+#define MCFG_A2EAUXSLOT_OUT_NMI_CB(_devcb) \
+ downcast<a2eauxslot_device &>(*device).set_out_nmi_callback(DEVCB_##_devcb);
+
+#define MCFG_A2EAUXSLOT_SLOT_ADD(_nbtag, _tag, _slot_intf, _def_slot) \
+ MCFG_DEVICE_ADD(_tag, A2EAUXSLOT_SLOT, 0) \
+ MCFG_DEVICE_SLOT_INTERFACE(_slot_intf, _def_slot, false) \
+ downcast<a2eauxslot_slot_device &>(*device).set_a2eauxslot_slot(_nbtag, _tag);
+#define MCFG_A2EAUXSLOT_SLOT_REMOVE(_tag) \
+ MCFG_DEVICE_REMOVE(_tag)
//**************************************************************************
// TYPE DEFINITIONS
@@ -27,28 +46,19 @@ class a2eauxslot_slot_device : public device_t,
{
public:
// construction/destruction
- template <typename T, typename U>
- a2eauxslot_slot_device(machine_config const &mconfig, char const *tag, device_t *owner, T &&slottag, U &&opts, char const *dflt)
- : a2eauxslot_slot_device(mconfig, tag, owner, 0)
- {
- option_reset();
- opts(*this);
- set_default_option(dflt);
- set_fixed(false);
- m_a2eauxslot.set_tag(std::forward<T>(slottag));
- }
-
- a2eauxslot_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0);
+ a2eauxslot_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
// device-level overrides
- virtual void device_resolve_objects() override;
- virtual void device_start() override { }
+ virtual void device_start() override;
+
+ // inline configuration
+ void set_a2eauxslot_slot(const char *tag, const char *slottag) { m_a2eauxslot_tag = tag; m_a2eauxslot_slottag = slottag; }
protected:
a2eauxslot_slot_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock);
// configuration
- required_device<a2eauxslot_device> m_a2eauxslot;
+ const char *m_a2eauxslot_tag, *m_a2eauxslot_slottag;
};
// device type definition
@@ -65,9 +75,9 @@ public:
a2eauxslot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
// inline configuration
- template <typename T> void set_space(T &&tag, int spacenum) { m_space.set_tag(std::forward<T>(tag), spacenum); }
- auto out_irq_callback() { return m_out_irq_cb.bind(); }
- auto out_nmi_callback() { return m_out_nmi_cb.bind(); }
+ void set_cputag(const char *tag) { m_cputag = tag; }
+ template <class Object> devcb_base &set_out_irq_callback(Object &&cb) { return m_out_irq_cb.set_callback(std::forward<Object>(cb)); }
+ template <class Object> devcb_base &set_out_nmi_callback(Object &&cb) { return m_out_nmi_cb.set_callback(std::forward<Object>(cb)); }
void add_a2eauxslot_card(device_a2eauxslot_card_interface *card);
device_a2eauxslot_card_interface *get_a2eauxslot_card();
@@ -82,16 +92,17 @@ protected:
a2eauxslot_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock);
// device-level overrides
- virtual void device_resolve_objects() override;
virtual void device_start() override;
+ virtual void device_reset() override;
// internal state
- required_address_space m_space;
+ cpu_device *m_maincpu;
devcb_write_line m_out_irq_cb;
devcb_write_line m_out_nmi_cb;
device_a2eauxslot_card_interface *m_device;
+ const char *m_cputag;
};
@@ -110,24 +121,28 @@ public:
virtual uint8_t read_auxram(uint16_t offset) { printf("a2eauxslot: unhandled auxram read @ %04x\n", offset); return 0xff; }
virtual void write_auxram(uint16_t offset, uint8_t data) { printf("a2eauxslot: unhandled auxram write %02x @ %04x\n", data, offset); }
- virtual void write_c07x(uint8_t offset, uint8_t data) {}
+ virtual void write_c07x(address_space &space, uint8_t offset, uint8_t data) {}
virtual uint8_t *get_vram_ptr() = 0;
virtual uint8_t *get_auxbank_ptr() = 0;
virtual bool allow_dhr() { return true; }
device_a2eauxslot_card_interface *next() const { return m_next; }
- void set_a2eauxslot_device(a2eauxslot_device *a2eauxslot);
+ void set_a2eauxslot_device();
void raise_slot_irq() { m_a2eauxslot->set_irq_line(ASSERT_LINE); }
void lower_slot_irq() { m_a2eauxslot->set_irq_line(CLEAR_LINE); }
void raise_slot_nmi() { m_a2eauxslot->set_nmi_line(ASSERT_LINE); }
void lower_slot_nmi() { m_a2eauxslot->set_nmi_line(CLEAR_LINE); }
+ // inline configuration
+ void set_a2eauxslot_tag(const char *tag, const char *slottag) { m_a2eauxslot_tag = tag; m_a2eauxslot_slottag = slottag; }
+
protected:
device_a2eauxslot_card_interface(const machine_config &mconfig, device_t &device);
a2eauxslot_device *m_a2eauxslot;
+ const char *m_a2eauxslot_tag, *m_a2eauxslot_slottag;
int m_slot;
device_a2eauxslot_card_interface *m_next;
};
diff --git a/src/devices/bus/a2bus/a2eext80col.cpp b/src/devices/bus/a2bus/a2eext80col.cpp
index 2ddb4a0b476..b98d31c0d5c 100644
--- a/src/devices/bus/a2bus/a2eext80col.cpp
+++ b/src/devices/bus/a2bus/a2eext80col.cpp
@@ -43,6 +43,7 @@ a2eaux_ext80col_device::a2eaux_ext80col_device(const machine_config &mconfig, de
void a2eaux_ext80col_device::device_start()
{
+ set_a2eauxslot_device();
memset(m_ram, 0, sizeof(m_ram));
save_item(NAME(m_ram));
}
diff --git a/src/devices/bus/a2bus/a2eramworks3.cpp b/src/devices/bus/a2bus/a2eramworks3.cpp
index 46ada4066a1..e82225cbd27 100644
--- a/src/devices/bus/a2bus/a2eramworks3.cpp
+++ b/src/devices/bus/a2bus/a2eramworks3.cpp
@@ -45,6 +45,7 @@ a2eaux_ramworks3_device::a2eaux_ramworks3_device(const machine_config &mconfig,
void a2eaux_ramworks3_device::device_start()
{
+ set_a2eauxslot_device();
save_item(NAME(m_ram));
save_item(NAME(m_bank));
}
@@ -87,7 +88,7 @@ uint8_t *a2eaux_ramworks3_device::get_auxbank_ptr()
However, the software will recognize and correctly use a configuration in which
all of banks 00-7F are populated for a total of 8 megabytes. So that's what we do.
*/
-void a2eaux_ramworks3_device::write_c07x(uint8_t offset, uint8_t data)
+void a2eaux_ramworks3_device::write_c07x(address_space &space, uint8_t offset, uint8_t data)
{
// write to C073?
if (offset == 3)
diff --git a/src/devices/bus/a2bus/a2eramworks3.h b/src/devices/bus/a2bus/a2eramworks3.h
index d47d88c37d9..f2b327ebfab 100644
--- a/src/devices/bus/a2bus/a2eramworks3.h
+++ b/src/devices/bus/a2bus/a2eramworks3.h
@@ -36,7 +36,7 @@ protected:
virtual uint8_t *get_vram_ptr() override;
virtual uint8_t *get_auxbank_ptr() override;
virtual bool allow_dhr() override { return true; }
- virtual void write_c07x(uint8_t offset, uint8_t data) override;
+ virtual void write_c07x(address_space &space, uint8_t offset, uint8_t data) override;
private:
uint8_t m_ram[8*1024*1024];
diff --git a/src/devices/bus/a2bus/a2estd80col.cpp b/src/devices/bus/a2bus/a2estd80col.cpp
index 8eecf223c48..e5a9741e7a0 100644
--- a/src/devices/bus/a2bus/a2estd80col.cpp
+++ b/src/devices/bus/a2bus/a2estd80col.cpp
@@ -43,6 +43,7 @@ a2eaux_std80col_device::a2eaux_std80col_device(const machine_config &mconfig, de
void a2eaux_std80col_device::device_start()
{
+ set_a2eauxslot_device();
save_item(NAME(m_ram));
}
diff --git a/src/devices/bus/a2bus/a2hsscsi.cpp b/src/devices/bus/a2bus/a2hsscsi.cpp
index ec4eea8080a..6be63715d88 100644
--- a/src/devices/bus/a2bus/a2hsscsi.cpp
+++ b/src/devices/bus/a2bus/a2hsscsi.cpp
@@ -57,6 +57,14 @@ DEFINE_DEVICE_TYPE(A2BUS_HSSCSI, a2bus_hsscsi_device, "a2hsscsi", "Apple II High
#define SCSI_BUS_TAG "scsibus"
#define SCSI_5380_TAG "scsibus:7:ncr5380"
+void a2bus_hsscsi_device::ncr5380(device_t *device)
+{
+ devcb_base *devcb;
+ (void)devcb;
+ MCFG_DEVICE_CLOCK(10000000)
+ MCFG_NCR5380N_DRQ_HANDLER(WRITELINE("^^", a2bus_hsscsi_device, drq_w))
+}
+
static void hsscsi_devices(device_slot_interface &device)
{
device.option_add("cdrom", NSCSI_CDROM);
@@ -77,21 +85,18 @@ ROM_END
// device_add_mconfig - add device configuration
//-------------------------------------------------
-void a2bus_hsscsi_device::device_add_mconfig(machine_config &config)
-{
- NSCSI_BUS(config, m_scsibus);
- NSCSI_CONNECTOR(config, "scsibus:0", hsscsi_devices, nullptr, false);
- NSCSI_CONNECTOR(config, "scsibus:1", hsscsi_devices, nullptr, false);
- NSCSI_CONNECTOR(config, "scsibus:2", hsscsi_devices, nullptr, false);
- NSCSI_CONNECTOR(config, "scsibus:3", hsscsi_devices, nullptr, false);
- NSCSI_CONNECTOR(config, "scsibus:4", hsscsi_devices, nullptr, false);
- NSCSI_CONNECTOR(config, "scsibus:5", hsscsi_devices, nullptr, false);
- NSCSI_CONNECTOR(config, "scsibus:6", hsscsi_devices, "harddisk", false);
- NSCSI_CONNECTOR(config, "scsibus:7", hsscsi_devices, "ncr5380", true).set_option_machine_config("ncr5380", [this](device_t *device) {
- device->set_clock(10000000);
- downcast<ncr5380n_device &>(*device).drq_handler().set(*this, FUNC(a2bus_hsscsi_device::drq_w));
- });
-}
+MACHINE_CONFIG_START(a2bus_hsscsi_device::device_add_mconfig)
+ MCFG_NSCSI_BUS_ADD(SCSI_BUS_TAG)
+ MCFG_NSCSI_ADD("scsibus:0", hsscsi_devices, nullptr, false)
+ MCFG_NSCSI_ADD("scsibus:1", hsscsi_devices, nullptr, false)
+ MCFG_NSCSI_ADD("scsibus:2", hsscsi_devices, nullptr, false)
+ MCFG_NSCSI_ADD("scsibus:3", hsscsi_devices, nullptr, false)
+ MCFG_NSCSI_ADD("scsibus:4", hsscsi_devices, nullptr, false)
+ MCFG_NSCSI_ADD("scsibus:5", hsscsi_devices, nullptr, false)
+ MCFG_NSCSI_ADD("scsibus:6", hsscsi_devices, "harddisk", false)
+ MCFG_NSCSI_ADD("scsibus:7", hsscsi_devices, "ncr5380", true)
+ MCFG_SLOT_OPTION_MACHINE_CONFIG("ncr5380", ncr5380)
+MACHINE_CONFIG_END
//-------------------------------------------------
// rom_region - device-specific ROM region
@@ -163,7 +168,7 @@ uint8_t a2bus_hsscsi_device::read_c0nx(uint8_t offset)
case 6:
case 7:
// logerror("Read 5380 @ %x\n", offset);
- return m_ncr5380->read(offset);
+ return m_ncr5380->read(machine().dummy_space(), offset);
case 0xc:
return 0x00; // indicate watchdog?
@@ -200,7 +205,7 @@ void a2bus_hsscsi_device::write_c0nx(uint8_t offset, uint8_t data)
case 6:
case 7:
// logerror("%02x to 5380 reg %x\n", data, offset);
- m_ncr5380->write(offset, data);
+ m_ncr5380->write(machine().dummy_space(), offset, data);
break;
#if 0
case 8: // DMA address low
diff --git a/src/devices/bus/a2bus/a2hsscsi.h b/src/devices/bus/a2bus/a2hsscsi.h
index da96b3e8776..c3534ede770 100644
--- a/src/devices/bus/a2bus/a2hsscsi.h
+++ b/src/devices/bus/a2bus/a2hsscsi.h
@@ -30,6 +30,8 @@ public:
DECLARE_WRITE_LINE_MEMBER( drq_w );
+ static void ncr5380(device_t *device);
+
protected:
a2bus_hsscsi_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock);
diff --git a/src/devices/bus/a2bus/a2mcms.cpp b/src/devices/bus/a2bus/a2mcms.cpp
index 7e2cab57b6b..1442d7d68bc 100644
--- a/src/devices/bus/a2bus/a2mcms.cpp
+++ b/src/devices/bus/a2bus/a2mcms.cpp
@@ -38,6 +38,8 @@ DEFINE_DEVICE_TYPE(A2BUS_MCMS2, a2bus_mcms2_device, "a2mcms2", "Mountain Compute
#define ENGINE_TAG "engine"
+#define MCFG_MCMS_IRQ_CALLBACK(_cb) \
+ downcast<mcms_device &>(*device).set_irq_cb(DEVCB_##_cb);
/***************************************************************************
FUNCTION PROTOTYPES
@@ -47,16 +49,16 @@ DEFINE_DEVICE_TYPE(A2BUS_MCMS2, a2bus_mcms2_device, "a2mcms2", "Mountain Compute
// device_add_mconfig - add device configuration
//-------------------------------------------------
-void a2bus_mcms1_device::device_add_mconfig(machine_config &config)
-{
+MACHINE_CONFIG_START(a2bus_mcms1_device::device_add_mconfig)
SPEAKER(config, "mcms_l").front_left();
SPEAKER(config, "mcms_r").front_right();
- MCMS(config, m_mcms, 1000000);
- m_mcms->irq_cb().set(FUNC(a2bus_mcms1_device::irq_w));
- m_mcms->add_route(0, "mcms_l", 1.0);
- m_mcms->add_route(1, "mcms_r", 1.0);
-}
+ MCFG_DEVICE_ADD(ENGINE_TAG, MCMS, 1000000)
+ MCFG_MCMS_IRQ_CALLBACK(WRITELINE(*this, a2bus_mcms1_device, irq_w))
+
+ MCFG_SOUND_ROUTE(0, "mcms_l", 1.0)
+ MCFG_SOUND_ROUTE(1, "mcms_r", 1.0)
+MACHINE_CONFIG_END
//**************************************************************************
// LIVE DEVICE - Card 1
@@ -275,7 +277,7 @@ void mcms_device::sound_stream_update(sound_stream &stream, stream_sample_t **in
wptr = (m_table[v]<<8) | (m_acc[v]>>8);
m_rand = (m_acc[v]>>8) & 0x1f;
- sample = (m_pBusDevice->slot_dma_read(wptr) ^ 0x80);
+ sample = (m_pBusDevice->slot_dma_read_no_space(wptr) ^ 0x80);
if (v & 1)
{
mixL += sample * m_vols[v];
diff --git a/src/devices/bus/a2bus/a2mcms.h b/src/devices/bus/a2bus/a2mcms.h
index 9a183a9313d..f1026d97afd 100644
--- a/src/devices/bus/a2bus/a2mcms.h
+++ b/src/devices/bus/a2bus/a2mcms.h
@@ -33,7 +33,7 @@ public:
void set_bus_device(a2bus_mcms1_device *pDev) { m_pBusDevice = pDev; }
- auto irq_cb() { return m_write_irq.bind(); }
+ template<class Object> devcb_base &set_irq_cb(Object &&wr) { return m_write_irq.set_callback(std::forward<Object>(wr)); }
devcb_write_line m_write_irq;
protected:
diff --git a/src/devices/bus/a2bus/a2memexp.cpp b/src/devices/bus/a2bus/a2memexp.cpp
index 6b088a1ea12..a544713abb7 100644
--- a/src/devices/bus/a2bus/a2memexp.cpp
+++ b/src/devices/bus/a2bus/a2memexp.cpp
@@ -46,9 +46,8 @@ ROM_END
// device_add_mconfig - add device configuration
//-------------------------------------------------
-void a2bus_memexp_device::device_add_mconfig(machine_config &config)
-{
-}
+MACHINE_CONFIG_START(a2bus_memexp_device::device_add_mconfig)
+MACHINE_CONFIG_END
//-------------------------------------------------
// rom_region - device-specific ROM region
diff --git a/src/devices/bus/a2bus/a2midi.cpp b/src/devices/bus/a2bus/a2midi.cpp
index dfd6ce71694..d73aaf82bbc 100644
--- a/src/devices/bus/a2bus/a2midi.cpp
+++ b/src/devices/bus/a2bus/a2midi.cpp
@@ -32,8 +32,7 @@ DEFINE_DEVICE_TYPE(A2BUS_MIDI, a2bus_midi_device, "a2midi", "6850 MIDI card")
// device_add_mconfig - add device configuration
//-------------------------------------------------
-void a2bus_midi_device::device_add_mconfig(machine_config &config)
-{
+MACHINE_CONFIG_START(a2bus_midi_device::device_add_mconfig)
PTM6840(config, m_ptm, 1021800);
m_ptm->set_external_clocks(1021800.0f, 1021800.0f, 1021800.0f);
m_ptm->irq_callback().set(FUNC(a2bus_midi_device::ptm_irq_w));
@@ -42,13 +41,14 @@ void a2bus_midi_device::device_add_mconfig(machine_config &config)
m_acia->txd_handler().set("mdout", FUNC(midi_port_device::write_txd));
m_acia->irq_handler().set(FUNC(a2bus_midi_device::acia_irq_w));
- MIDI_PORT(config, "mdin", midiin_slot, "midiin").rxd_handler().set(m_acia, FUNC(acia6850_device::write_rxd));
+ MCFG_MIDI_PORT_ADD("mdin", midiin_slot, "midiin")
+ MCFG_MIDI_RX_HANDLER(WRITELINE(MIDI_ACIA_TAG, acia6850_device, write_rxd))
- MIDI_PORT(config, "mdout", midiout_slot, "midiout");
+ MCFG_MIDI_PORT_ADD("mdout", midiout_slot, "midiout")
- clock_device &acia_clock(CLOCK(config, "acia_clock", 31250*16));
- acia_clock.signal_handler().set(FUNC(a2bus_midi_device::write_acia_clock));
-}
+ MCFG_DEVICE_ADD("acia_clock", CLOCK, 31250*16)
+ MCFG_CLOCK_SIGNAL_HANDLER(WRITELINE(*this, a2bus_midi_device, write_acia_clock))
+MACHINE_CONFIG_END
//**************************************************************************
// LIVE DEVICE
@@ -91,11 +91,11 @@ uint8_t a2bus_midi_device::read_c0nx(uint8_t offset)
if (offset < 8)
{
- return m_ptm->read(offset & 7);
+ return m_ptm->read(machine().dummy_space(), offset & 7);
}
else if (offset == 8 || offset == 9)
{
- return m_acia->read(offset & 1);
+ return m_acia->read(machine().dummy_space(), offset & 1);
}
return 0;
@@ -109,11 +109,11 @@ void a2bus_midi_device::write_c0nx(uint8_t offset, uint8_t data)
{
if (offset < 8)
{
- m_ptm->write(offset & 7, data);
+ m_ptm->write(machine().dummy_space(), offset & 7, data);
}
else if (offset == 8 || offset == 9)
{
- m_acia->write(offset & 1, data);
+ m_acia->write(machine().dummy_space(), offset & 1, data);
}
}
diff --git a/src/devices/bus/a2bus/a2mockingboard.cpp b/src/devices/bus/a2bus/a2mockingboard.cpp
index c4c45b6975b..c1d67bfa7d3 100644
--- a/src/devices/bus/a2bus/a2mockingboard.cpp
+++ b/src/devices/bus/a2bus/a2mockingboard.cpp
@@ -238,7 +238,7 @@ WRITE8_MEMBER( a2bus_ayboard_device::via1_out_b )
{
if (!BIT(data, 2))
{
- m_ay1->reset_w();
+ m_ay1->reset_w(space, 0, 0);
}
else
{
@@ -248,15 +248,15 @@ WRITE8_MEMBER( a2bus_ayboard_device::via1_out_b )
break;
case 1: // BDIR=0, BC1=1 (read PSG)
- m_porta1 = m_ay1->data_r();
+ m_porta1 = m_ay1->read_data();
break;
case 2: // BDIR=1, BC1=0 (write PSG)
- m_ay1->data_w(m_porta1);
+ m_ay1->write_data(m_porta1);
break;
case 3: // BDIR=1, BC1=1 (latch)
- m_ay1->address_w(m_porta1);
+ m_ay1->write_address(m_porta1);
break;
}
}
@@ -266,10 +266,10 @@ WRITE8_MEMBER( a2bus_phasor_device::via1_out_b )
{
if (!(data & 4))
{
- m_ay1->reset_w();
+ m_ay1->reset_w(space, 0, 0);
if (m_native)
{
- m_ay2->reset_w();
+ m_ay2->reset_w(space, 0, 0);
}
}
else
@@ -289,23 +289,23 @@ WRITE8_MEMBER( a2bus_phasor_device::via1_out_b )
case 1: // BDIR=0, BC1=1 (read PSG)
if (BIT(chip_sel, 0))
- m_porta1 = m_ay1->data_r();
+ m_porta1 = m_ay1->read_data();
if (BIT(chip_sel, 1))
- m_porta1 = m_ay2->data_r();
+ m_porta1 = m_ay2->read_data();
break;
case 2: // BDIR=1, BC1=0 (write PSG)
if (BIT(chip_sel, 0))
- m_ay1->data_w(m_porta1);
+ m_ay1->write_data(m_porta1);
if (BIT(chip_sel, 1))
- m_ay2->data_w(m_porta1);
+ m_ay2->write_data(m_porta1);
break;
case 3: // BDIR=1, BC1=1 (latch)
if (BIT(chip_sel, 0))
- m_ay1->address_w(m_porta1);
+ m_ay1->write_address(m_porta1);
if (BIT(chip_sel, 1))
- m_ay2->address_w(m_porta1);
+ m_ay2->write_address(m_porta1);
break;
}
}
@@ -320,7 +320,7 @@ WRITE8_MEMBER( a2bus_ayboard_device::via2_out_b )
{
if (!BIT(data, 2))
{
- m_ay2->reset_w();
+ m_ay2->reset_w(space, 0, 0);
}
else
{
@@ -330,15 +330,15 @@ WRITE8_MEMBER( a2bus_ayboard_device::via2_out_b )
break;
case 1: // BDIR=0, BC1=1 (read PSG)
- m_porta2 = m_ay2->data_r();
+ m_porta2 = m_ay2->read_data();
break;
case 2: // BDIR=1, BC1=0 (write PSG)
- m_ay2->data_w(m_porta2);
+ m_ay2->write_data(m_porta2);
break;
case 3: // BDIR=1, BC1=1 (latch)
- m_ay2->data_w(m_porta2);
+ m_ay2->write_data(m_porta2);
break;
}
}
@@ -350,12 +350,12 @@ WRITE8_MEMBER( a2bus_phasor_device::via2_out_b )
{
if (m_native)
{
- m_ay3->reset_w();
- m_ay4->reset_w();
+ m_ay3->reset_w(space, 0, 0);
+ m_ay4->reset_w(space, 0, 0);
}
else
{
- m_ay2->reset_w();
+ m_ay2->reset_w(space, 0, 0);
}
}
else
@@ -375,23 +375,23 @@ WRITE8_MEMBER( a2bus_phasor_device::via2_out_b )
case 1: // BDIR=0, BC1=1 (read PSG)
if (BIT(chip_sel, 0))
- m_porta2 = m_ay3->data_r();
+ m_porta2 = m_ay3->read_data();
if (BIT(chip_sel, 1))
- m_porta2 = m_ay4->data_r();
+ m_porta2 = m_ay4->read_data();
break;
case 2: // BDIR=1, BC1=0 (write PSG)
if (BIT(chip_sel, 0))
- m_ay3->data_w(m_porta2);
+ m_ay3->write_data(m_porta2);
if (BIT(chip_sel, 1))
- m_ay4->data_w(m_porta2);
+ m_ay4->write_data(m_porta2);
break;
case 3: // BDIR=1, BC1=1 (latch)
if (BIT(chip_sel, 0))
- m_ay3->address_w(m_porta2);
+ m_ay3->write_address(m_porta2);
if (BIT(chip_sel, 1))
- m_ay4->address_w(m_porta2);
+ m_ay4->write_address(m_porta2);
break;
}
}
diff --git a/src/devices/bus/a2bus/a2pic.cpp b/src/devices/bus/a2bus/a2pic.cpp
index 21c749eb50c..218d3ac6892 100644
--- a/src/devices/bus/a2bus/a2pic.cpp
+++ b/src/devices/bus/a2bus/a2pic.cpp
@@ -71,16 +71,14 @@ ioport_constructor a2bus_pic_device::device_input_ports() const
// device_add_mconfig - add device configuration
//-------------------------------------------------
-void a2bus_pic_device::device_add_mconfig(machine_config &config)
-{
+MACHINE_CONFIG_START(a2bus_pic_device::device_add_mconfig)
CENTRONICS(config, m_ctx, centronics_devices, "printer");
m_ctx->set_data_input_buffer(m_ctx_data_in);
m_ctx->ack_handler().set(FUNC(a2bus_pic_device::ack_w));
INPUT_BUFFER(config, m_ctx_data_in);
- OUTPUT_LATCH(config, m_ctx_data_out);
- m_ctx->set_output_latch(*m_ctx_data_out);
-}
+ MCFG_CENTRONICS_OUTPUT_LATCH_ADD("ctx_data_out", PIC_CENTRONICS_TAG)
+MACHINE_CONFIG_END
//-------------------------------------------------
// rom_region - device-specific ROM region
diff --git a/src/devices/bus/a2bus/a2sam.cpp b/src/devices/bus/a2bus/a2sam.cpp
index 16b8b5affe8..21ea8d1fdca 100644
--- a/src/devices/bus/a2bus/a2sam.cpp
+++ b/src/devices/bus/a2bus/a2sam.cpp
@@ -31,14 +31,12 @@ DEFINE_DEVICE_TYPE(A2BUS_SAM, a2bus_sam_device, "a2sam", "Don't Ask Software S.A
// device_add_mconfig - add device configuration
//-------------------------------------------------
-void a2bus_sam_device::device_add_mconfig(machine_config &config)
-{
+MACHINE_CONFIG_START(a2bus_sam_device::device_add_mconfig)
SPEAKER(config, "speaker").front_center();
- DAC_8BIT_R2R(config, m_dac, 0).add_route(ALL_OUTPUTS, "speaker", 0.5); // unknown DAC
- voltage_regulator_device &vref(VOLTAGE_REGULATOR(config, "vref"));
- vref.add_route(0, "dac", 1.0, DAC_VREF_POS_INPUT);
- vref.add_route(0, "dac", -1.0, DAC_VREF_NEG_INPUT);
-}
+ MCFG_DEVICE_ADD("dac", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.5) // unknown DAC
+ MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
+ MCFG_SOUND_ROUTE(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE(0, "dac", -1.0, DAC_VREF_NEG_INPUT)
+MACHINE_CONFIG_END
//**************************************************************************
// LIVE DEVICE
diff --git a/src/devices/bus/a2bus/a2scsi.cpp b/src/devices/bus/a2bus/a2scsi.cpp
index 014414e7e98..ef3422e9783 100644
--- a/src/devices/bus/a2bus/a2scsi.cpp
+++ b/src/devices/bus/a2bus/a2scsi.cpp
@@ -50,6 +50,14 @@ DEFINE_DEVICE_TYPE(A2BUS_SCSI, a2bus_scsi_device, "a2scsi", "Apple II SCSI Card"
#define SCSI_BUS_TAG "scsibus"
#define SCSI_5380_TAG "scsibus:7:ncr5380"
+void a2bus_scsi_device::ncr5380(device_t *device)
+{
+ devcb_base *devcb;
+ (void)devcb;
+ MCFG_DEVICE_CLOCK(10000000)
+ MCFG_NCR5380N_DRQ_HANDLER(WRITELINE("^^", a2bus_scsi_device, drq_w))
+}
+
static void scsi_devices(device_slot_interface &device)
{
device.option_add("cdrom", NSCSI_CDROM);
@@ -70,21 +78,18 @@ ROM_END
// device_add_mconfig - add device configuration
//-------------------------------------------------
-void a2bus_scsi_device::device_add_mconfig(machine_config &config)
-{
- NSCSI_BUS(config, m_scsibus);
- NSCSI_CONNECTOR(config, "scsibus:0", scsi_devices, nullptr, false);
- NSCSI_CONNECTOR(config, "scsibus:1", scsi_devices, nullptr, false);
- NSCSI_CONNECTOR(config, "scsibus:2", scsi_devices, nullptr, false);
- NSCSI_CONNECTOR(config, "scsibus:3", scsi_devices, nullptr, false);
- NSCSI_CONNECTOR(config, "scsibus:4", scsi_devices, nullptr, false);
- NSCSI_CONNECTOR(config, "scsibus:5", scsi_devices, nullptr, false);
- NSCSI_CONNECTOR(config, "scsibus:6", scsi_devices, "harddisk", false);
- NSCSI_CONNECTOR(config, "scsibus:7", scsi_devices, "ncr5380", true).set_option_machine_config("ncr5380", [this](device_t *device) {
- device->set_clock(10000000);
- downcast<ncr5380n_device &>(*device).drq_handler().set(*this, FUNC(a2bus_scsi_device::drq_w));
- });
-}
+MACHINE_CONFIG_START(a2bus_scsi_device::device_add_mconfig)
+ MCFG_NSCSI_BUS_ADD(SCSI_BUS_TAG)
+ MCFG_NSCSI_ADD("scsibus:0", scsi_devices, nullptr, false)
+ MCFG_NSCSI_ADD("scsibus:1", scsi_devices, nullptr, false)
+ MCFG_NSCSI_ADD("scsibus:2", scsi_devices, nullptr, false)
+ MCFG_NSCSI_ADD("scsibus:3", scsi_devices, nullptr, false)
+ MCFG_NSCSI_ADD("scsibus:4", scsi_devices, nullptr, false)
+ MCFG_NSCSI_ADD("scsibus:5", scsi_devices, nullptr, false)
+ MCFG_NSCSI_ADD("scsibus:6", scsi_devices, "harddisk", false)
+ MCFG_NSCSI_ADD("scsibus:7", scsi_devices, "ncr5380", true)
+ MCFG_SLOT_OPTION_MACHINE_CONFIG("ncr5380", ncr5380)
+MACHINE_CONFIG_END
//-------------------------------------------------
// rom_region - device-specific ROM region
@@ -154,7 +159,7 @@ uint8_t a2bus_scsi_device::read_c0nx(uint8_t offset)
case 6:
case 7:
// logerror("Read 5380 @ %x\n", offset);
- return m_ncr5380->read(offset);
+ return m_ncr5380->read(machine().dummy_space(), offset);
case 8: // read and DACK
return m_ncr5380->dma_r();
@@ -194,7 +199,7 @@ void a2bus_scsi_device::write_c0nx(uint8_t offset, uint8_t data)
case 6:
case 7:
// logerror("%02x to 5380 reg %x\n", data, offset);
- m_ncr5380->write(offset, data);
+ m_ncr5380->write(machine().dummy_space(), offset, data);
break;
case 8: // write and DACK
diff --git a/src/devices/bus/a2bus/a2scsi.h b/src/devices/bus/a2bus/a2scsi.h
index f1a556eeab7..d9d143da6e9 100644
--- a/src/devices/bus/a2bus/a2scsi.h
+++ b/src/devices/bus/a2bus/a2scsi.h
@@ -30,6 +30,8 @@ public:
DECLARE_WRITE_LINE_MEMBER( drq_w );
+ static void ncr5380(device_t *device);
+
protected:
a2bus_scsi_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock);
diff --git a/src/devices/bus/a2bus/a2softcard.cpp b/src/devices/bus/a2bus/a2softcard.cpp
index d41c84b9425..b8c71153e7b 100644
--- a/src/devices/bus/a2bus/a2softcard.cpp
+++ b/src/devices/bus/a2bus/a2softcard.cpp
@@ -82,7 +82,7 @@ void a2bus_softcard_device::write_cnxx(uint8_t offset, uint8_t data)
if (!m_bEnabled)
{
m_z80->set_input_line(INPUT_LINE_HALT, CLEAR_LINE);
- raise_slot_dma();
+ set_maincpu_halt(ASSERT_LINE);
if (m_FirstZ80Boot)
{
@@ -95,7 +95,7 @@ void a2bus_softcard_device::write_cnxx(uint8_t offset, uint8_t data)
else
{
m_z80->set_input_line(INPUT_LINE_HALT, ASSERT_LINE);
- lower_slot_dma();
+ set_maincpu_halt(CLEAR_LINE);
m_bEnabled = false;
}
}
@@ -106,27 +106,27 @@ READ8_MEMBER( a2bus_softcard_device::dma_r )
{
if (offset <= 0xafff)
{
- return slot_dma_read(offset+0x1000);
+ return slot_dma_read(space, offset+0x1000);
}
else if (offset <= 0xbfff) // LC bank 2 d000-dfff
{
- return slot_dma_read((offset&0xfff) + 0xd000);
+ return slot_dma_read(space, (offset&0xfff) + 0xd000);
}
else if (offset <= 0xcfff) // LC e000-efff
{
- return slot_dma_read((offset&0xfff) + 0xe000);
+ return slot_dma_read(space, (offset&0xfff) + 0xe000);
}
else if (offset <= 0xdfff) // LC f000-ffff (or ROM?)
{
- return slot_dma_read((offset&0xfff) + 0xf000);
+ return slot_dma_read(space, (offset&0xfff) + 0xf000);
}
else if (offset <= 0xefff) // I/O space c000-cfff
{
- return slot_dma_read((offset&0xfff) + 0xc000);
+ return slot_dma_read(space, (offset&0xfff) + 0xc000);
}
else // zero page
{
- return slot_dma_read(offset&0xfff);
+ return slot_dma_read(space, offset&0xfff);
}
}
@@ -144,27 +144,27 @@ WRITE8_MEMBER( a2bus_softcard_device::dma_w )
{
if (offset <= 0xafff)
{
- slot_dma_write(offset+0x1000, data);
+ slot_dma_write(space, offset+0x1000, data);
}
else if (offset <= 0xbfff) // LC bank 2 d000-dfff
{
- slot_dma_write((offset&0xfff) + 0xd000, data);
+ slot_dma_write(space, (offset&0xfff) + 0xd000, data);
}
else if (offset <= 0xcfff) // LC e000-efff
{
- slot_dma_write((offset&0xfff) + 0xe000, data);
+ slot_dma_write(space, (offset&0xfff) + 0xe000, data);
}
else if (offset <= 0xdfff) // LC f000-ffff (or ROM?)
{
- slot_dma_write((offset&0xfff) + 0xf000, data);
+ slot_dma_write(space, (offset&0xfff) + 0xf000, data);
}
else if (offset <= 0xefff) // I/O space c000-cfff
{
- slot_dma_write((offset&0xfff) + 0xc000, data);
+ slot_dma_write(space, (offset&0xfff) + 0xc000, data);
}
else // zero page
{
- slot_dma_write(offset&0xfff, data);
+ slot_dma_write(space, offset&0xfff, data);
}
}
}
diff --git a/src/devices/bus/a2bus/a2ssc.cpp b/src/devices/bus/a2bus/a2ssc.cpp
index 773f4db246f..0261835e1d7 100644
--- a/src/devices/bus/a2bus/a2ssc.cpp
+++ b/src/devices/bus/a2bus/a2ssc.cpp
@@ -189,7 +189,7 @@ uint8_t a2bus_ssc_device::read_c0nx(uint8_t offset)
case 9:
case 0xa:
case 0xb:
- return m_acia->read(offset-8);
+ return m_acia->read(machine().dummy_space(), offset-8);
}
@@ -208,7 +208,7 @@ void a2bus_ssc_device::write_c0nx(uint8_t offset, uint8_t data)
case 9:
case 0xa:
case 0xb:
- m_acia->write(offset-8, data);
+ m_acia->write(machine().dummy_space(), offset-8, data);
break;
}
}
diff --git a/src/devices/bus/a2bus/a2themill.cpp b/src/devices/bus/a2bus/a2themill.cpp
index 14474662ef8..effa5ac9cfb 100644
--- a/src/devices/bus/a2bus/a2themill.cpp
+++ b/src/devices/bus/a2bus/a2themill.cpp
@@ -238,34 +238,34 @@ READ8_MEMBER( a2bus_themill_device::dma_r )
{
if (offset <= 0x7fff)
{
- return slot_dma_read(offset+0x1000);
+ return slot_dma_read(space, offset+0x1000);
}
else if (offset <= 0xafff)
{
- return slot_dma_read((offset&0x3fff) + 0xd000);
+ return slot_dma_read(space, (offset&0x3fff) + 0xd000);
}
else if (offset <= 0xbfff)
{
- return slot_dma_read((offset&0xfff) + 0xc000);
+ return slot_dma_read(space, (offset&0xfff) + 0xc000);
}
else if (offset <= 0xcfff) // 6809 Cxxx -> 6502 ZP
{
- return slot_dma_read((offset&0xfff));
+ return slot_dma_read(space, (offset&0xfff));
}
else // 6809 Dxxx -> 6502 9000
{
- return slot_dma_read((offset-0xd000)+0x9000);
+ return slot_dma_read(space, (offset-0xd000)+0x9000);
}
}
else
{
if (m_flipAddrSpace)
{
- return slot_dma_read(offset^0x8000);
+ return slot_dma_read(space, offset^0x8000);
}
else
{
- return slot_dma_read(offset);
+ return slot_dma_read(space, offset);
}
}
@@ -283,34 +283,34 @@ WRITE8_MEMBER( a2bus_themill_device::dma_w )
{
if (offset <= 0x7fff)
{
- slot_dma_write(offset+0x1000, data);
+ slot_dma_write(space, offset+0x1000, data);
}
else if (offset <= 0xafff)
{
- slot_dma_write((offset&0x3fff) + 0xd000, data);
+ slot_dma_write(space, (offset&0x3fff) + 0xd000, data);
}
else if (offset <= 0xbfff)
{
- slot_dma_write((offset&0xfff) + 0xc000, data);
+ slot_dma_write(space, (offset&0xfff) + 0xc000, data);
}
else if (offset <= 0xcfff)
{
- slot_dma_write((offset&0xfff), data);
+ slot_dma_write(space, (offset&0xfff), data);
}
else // 6809 Dxxx -> 6502 9000
{
- slot_dma_write((offset-0xd000)+0x9000, data);
+ slot_dma_write(space, (offset-0xd000)+0x9000, data);
}
}
else
{
if (m_flipAddrSpace)
{
- slot_dma_write(offset^0x8000, data);
+ slot_dma_write(space, offset^0x8000, data);
}
else
{
- slot_dma_write(offset, data);
+ slot_dma_write(space, offset, data);
}
}
}
diff --git a/src/devices/bus/a2bus/a2ultraterm.cpp b/src/devices/bus/a2bus/a2ultraterm.cpp
index fd8fb2a895a..9ea36ea2496 100644
--- a/src/devices/bus/a2bus/a2ultraterm.cpp
+++ b/src/devices/bus/a2bus/a2ultraterm.cpp
@@ -104,11 +104,10 @@ ROM_END
// device_add_mconfig - add device configuration
//-------------------------------------------------
-void a2bus_videx160_device::device_add_mconfig(machine_config &config)
-{
- screen_device &screen(SCREEN(config, ULTRATERM_SCREEN_NAME, SCREEN_TYPE_RASTER));
- screen.set_raw(CLOCK_LOW, 882, 0, 720, 370, 0, 350);
- screen.set_screen_update(ULTRATERM_MC6845_NAME, FUNC(mc6845_device::screen_update));
+MACHINE_CONFIG_START(a2bus_videx160_device::device_add_mconfig)
+ MCFG_SCREEN_ADD( ULTRATERM_SCREEN_NAME, RASTER)
+ MCFG_SCREEN_RAW_PARAMS(CLOCK_LOW, 882, 0, 720, 370, 0, 350 )
+ MCFG_SCREEN_UPDATE_DEVICE( ULTRATERM_MC6845_NAME, mc6845_device, screen_update )
MC6845(config, m_crtc, CLOCK_LOW/9);
m_crtc->set_screen(ULTRATERM_SCREEN_NAME);
@@ -116,7 +115,7 @@ void a2bus_videx160_device::device_add_mconfig(machine_config &config)
m_crtc->set_char_width(8);
m_crtc->set_update_row_callback(FUNC(a2bus_videx160_device::crtc_update_row), this);
m_crtc->out_vsync_callback().set(FUNC(a2bus_videx160_device::vsync_changed));
-}
+MACHINE_CONFIG_END
//-------------------------------------------------
// rom_region - device-specific ROM region
@@ -195,7 +194,7 @@ uint8_t a2bus_videx160_device::read_c0nx(uint8_t offset)
switch (offset)
{
case 1:
- return m_crtc->register_r(); // status_r?
+ return m_crtc->read_register(); // status_r?
case 2:
return m_ctrl1;
@@ -219,11 +218,11 @@ void a2bus_videx160_device::write_c0nx(uint8_t offset, uint8_t data)
switch (offset)
{
case 0:
- m_crtc->address_w(data);
+ m_crtc->write_address(data);
break;
case 1:
- m_crtc->register_w(data);
+ m_crtc->write_register(data);
break;
case 2:
diff --git a/src/devices/bus/a2bus/a2videoterm.cpp b/src/devices/bus/a2bus/a2videoterm.cpp
index 35cb657afd9..519496b1b1b 100644
--- a/src/devices/bus/a2bus/a2videoterm.cpp
+++ b/src/devices/bus/a2bus/a2videoterm.cpp
@@ -117,11 +117,10 @@ ROM_END
// device_add_mconfig - add device configuration
//-------------------------------------------------
-void a2bus_videx80_device::device_add_mconfig(machine_config &config)
-{
- screen_device &screen(SCREEN(config, VIDEOTERM_SCREEN_NAME, SCREEN_TYPE_RASTER)); // 560x216? (80x24 7x9 characters)
- screen.set_raw(MDA_CLOCK, 882, 0, 720, 370, 0, 350);
- screen.set_screen_update(VIDEOTERM_MC6845_NAME, FUNC(mc6845_device::screen_update));
+MACHINE_CONFIG_START(a2bus_videx80_device::device_add_mconfig)
+ MCFG_SCREEN_ADD( VIDEOTERM_SCREEN_NAME, RASTER) // 560x216? (80x24 7x9 characters)
+ MCFG_SCREEN_RAW_PARAMS(MDA_CLOCK, 882, 0, 720, 370, 0, 350 )
+ MCFG_SCREEN_UPDATE_DEVICE( VIDEOTERM_MC6845_NAME, mc6845_device, screen_update )
MC6845(config, m_crtc, MDA_CLOCK/9);
m_crtc->set_screen(VIDEOTERM_SCREEN_NAME);
@@ -129,7 +128,7 @@ void a2bus_videx80_device::device_add_mconfig(machine_config &config)
m_crtc->set_char_width(8);
m_crtc->set_update_row_callback(FUNC(a2bus_videx80_device::crtc_update_row), this);
m_crtc->out_vsync_callback().set(FUNC(a2bus_videx80_device::vsync_changed));
-}
+MACHINE_CONFIG_END
//-------------------------------------------------
// rom_region - device-specific ROM region
@@ -241,7 +240,7 @@ uint8_t a2bus_videx80_device::read_c0nx(uint8_t offset)
if (offset == 1)
{
- return m_crtc->register_r(); // status_r?
+ return m_crtc->read_register(); // status_r?
}
return 0xff;
@@ -256,11 +255,11 @@ void a2bus_videx80_device::write_c0nx(uint8_t offset, uint8_t data)
{
if (offset == 0)
{
- m_crtc->address_w(data);
+ m_crtc->write_address(data);
}
else if (offset == 1)
{
- m_crtc->register_w(data);
+ m_crtc->write_register(data);
}
m_rambank = ((offset>>2) & 3) * 512;
diff --git a/src/devices/bus/a2bus/a2zipdrive.cpp b/src/devices/bus/a2bus/a2zipdrive.cpp
index 41034fab231..aaeb6ed6219 100644
--- a/src/devices/bus/a2bus/a2zipdrive.cpp
+++ b/src/devices/bus/a2bus/a2zipdrive.cpp
@@ -2,19 +2,16 @@
// copyright-holders:R. Belmont
/*********************************************************************
- a2zipdrive.cpp
+ a2zipdrive.c
ZIP Technologies ZipDrive IDE card
- Parsons Engineering Focus Drive IDE card
- These cards are very, very similar. Maybe Parsons designed both?
-
- NOTE: No known dump exists of the Zip formatter utility and the
+ NOTE: No known dump exists of the formatter utility and the
format of the custom partition record (block 0) that the card
expects has not yet been determined, so this is largely untested
and will work only with a drive dump from real h/w.
- PLEASE use it only on a backup copy of said dump and contact MAMEdev
+ PLEASE use it only on a backup copy of said dump and contact MESSdev
if you have one!
Partition block format:
@@ -32,7 +29,6 @@
//**************************************************************************
DEFINE_DEVICE_TYPE(A2BUS_ZIPDRIVE, a2bus_zipdrive_device, "a2zipdrv", "Zip Technologies ZipDrive")
-DEFINE_DEVICE_TYPE(A2BUS_FOCUSDRIVE, a2bus_focusdrive_device, "a2focdrv", "Parsons Engineering Focus Drive")
#define ZIPDRIVE_ROM_REGION "zipdrive_rom"
#define ZIPDRIVE_ATA_TAG "zipdrive_ata"
@@ -42,11 +38,6 @@ ROM_START( zipdrive )
ROM_LOAD( "zip drive - rom.bin", 0x000000, 0x002000, CRC(fd800a40) SHA1(46636bfed88c864139e3d2826661908a8c07c459) )
ROM_END
-ROM_START( focusdrive )
- ROM_REGION(0x2000, ZIPDRIVE_ROM_REGION, 0)
- ROM_LOAD( "focusrom.bin", 0x001000, 0x001000, CRC(0fd0ba25) SHA1(acf414aa145fcfa1c12aca0269f1f7ada82f1c04) )
-ROM_END
-
/***************************************************************************
FUNCTION PROTOTYPES
***************************************************************************/
@@ -69,11 +60,6 @@ const tiny_rom_entry *a2bus_zipdrivebase_device::device_rom_region() const
return ROM_NAME( zipdrive );
}
-const tiny_rom_entry *a2bus_focusdrive_device::device_rom_region() const
-{
- return ROM_NAME( focusdrive );
-}
-
//**************************************************************************
// LIVE DEVICE
//**************************************************************************
@@ -90,11 +76,6 @@ a2bus_zipdrive_device::a2bus_zipdrive_device(const machine_config &mconfig, cons
{
}
-a2bus_focusdrive_device::a2bus_focusdrive_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) :
- a2bus_zipdrivebase_device(mconfig, A2BUS_FOCUSDRIVE, tag, owner, clock)
-{
-}
-
//-------------------------------------------------
// device_start - device-specific startup
//-------------------------------------------------
@@ -108,12 +89,9 @@ void a2bus_zipdrivebase_device::device_start()
void a2bus_zipdrivebase_device::device_reset()
{
+ popmessage("Zip Drive partition format unknown, contact MESSdev if you have the software or a drive dump!");
}
-void a2bus_focusdrive_device::device_reset()
-{
- m_rom[0x1c6c] = 0x03; // eat 3 IDE words here instead of 1, fixes a bug? in the original ROM
-}
/*-------------------------------------------------
read_c0nx - called for reads from this card's c0nx space
@@ -134,7 +112,7 @@ uint8_t a2bus_zipdrivebase_device::read_c0nx(uint8_t offset)
return m_ata->read_cs0(offset, 0xff);
case 8: // data port
- m_lastdata = m_ata->read_cs0(offset, 0xffff);
+ m_lastdata = m_ata->read_cs0(offset);
// printf("%04x @ IDE data\n", m_lastdata);
return m_lastdata&0xff;
@@ -142,42 +120,13 @@ uint8_t a2bus_zipdrivebase_device::read_c0nx(uint8_t offset)
return (m_lastdata>>8) & 0xff;
default:
- logerror("unhandled read @ C0n%x\n", offset);
+ logerror("a2zipdrive: unhandled read @ C0n%x\n", offset);
break;
}
return 0xff;
}
-uint8_t a2bus_focusdrive_device::read_c0nx(uint8_t offset)
-{
- switch (offset)
- {
- case 8:
- case 9:
- case 0xa:
- case 0xb:
- case 0xc:
- case 0xd:
- case 0xe:
- case 0xf:
- return m_ata->read_cs0(offset&7, 0xff);
-
- case 0: // data port
- m_lastdata = m_ata->read_cs0(offset, 0xffff);
- //printf("%04x @ IDE data\n", m_lastdata);
- return m_lastdata&0xff;
-
- case 1:
- return (m_lastdata>>8) & 0xff;
-
- default:
- logerror("unhandled read @ C0n%x\n", offset);
- break;
- }
-
- return 0xff;
-}
/*-------------------------------------------------
write_c0nx - called for writes to this card's c0nx space
@@ -208,7 +157,7 @@ void a2bus_zipdrivebase_device::write_c0nx(uint8_t offset, uint8_t data)
// printf("%02x to IDE data hi\n", data);
m_lastdata &= 0x00ff;
m_lastdata |= (data << 8);
- m_ata->write_cs0(0, m_lastdata, 0xffff);
+ m_ata->write_cs0(0, m_lastdata);
break;
default:
@@ -217,48 +166,6 @@ void a2bus_zipdrivebase_device::write_c0nx(uint8_t offset, uint8_t data)
}
}
-void a2bus_focusdrive_device::write_c0nx(uint8_t offset, uint8_t data)
-{
- switch (offset)
- {
- case 8:
- case 9:
- case 0xa:
- case 0xb:
- case 0xc:
- case 0xd:
- case 0xe:
- case 0xf:
- // due to a bug in the 6502 firmware, eat data if DRQ is set
- #if 0
- while (m_ata->read_cs0(7, 0xff) & 0x08)
- {
- m_ata->read_cs0(0, 0xffff);
- printf("eating 2 bytes to clear DRQ\n");
- }
- #endif
-// printf("%02x to IDE controller @ %x\n", data, offset);
- m_ata->write_cs0(offset & 7, data, 0xff);
- break;
-
- case 0:
-// printf("%02x to IDE data lo\n", data);
- m_lastdata = data;
- break;
-
- case 1:
-// printf("%02x to IDE data hi\n", data);
- m_lastdata &= 0x00ff;
- m_lastdata |= (data << 8);
- m_ata->write_cs0(0, m_lastdata, 0xffff);
- break;
-
- default:
- printf("focus: write %02x @ unhandled C0n%x\n", data, offset);
- break;
- }
-}
-
/*-------------------------------------------------
read_cnxx - called for reads from this card's cnxx space
-------------------------------------------------*/
diff --git a/src/devices/bus/a2bus/a2zipdrive.h b/src/devices/bus/a2bus/a2zipdrive.h
index 9e3e68e79f2..8187e04cdd2 100644
--- a/src/devices/bus/a2bus/a2zipdrive.h
+++ b/src/devices/bus/a2bus/a2zipdrive.h
@@ -5,9 +5,8 @@
a2zipdrive.h
ZIP Technologies ZipDrive IDE card
- Parsons Engineering Focus Drive IDE card
- See important NOTE at the top of a2zipdrive.cpp!
+ See important NOTE at the top of a2zipdrive.c!
*********************************************************************/
@@ -45,6 +44,8 @@ protected:
required_device<ata_interface_device> m_ata;
uint8_t *m_rom;
+
+private:
uint16_t m_lastdata;
};
@@ -54,20 +55,7 @@ public:
a2bus_zipdrive_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
};
-class a2bus_focusdrive_device : public a2bus_zipdrivebase_device
-{
-public:
- a2bus_focusdrive_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
-
-protected:
- virtual void device_reset() override;
- virtual const tiny_rom_entry *device_rom_region() const override;
- virtual uint8_t read_c0nx(uint8_t offset) override;
- virtual void write_c0nx(uint8_t offset, uint8_t data) override;
-};
-
// device type definition
DECLARE_DEVICE_TYPE(A2BUS_ZIPDRIVE, a2bus_zipdrive_device)
-DECLARE_DEVICE_TYPE(A2BUS_FOCUSDRIVE, a2bus_focusdrive_device)
#endif // MAME_BUS_A2BUS_ZIPDRIVE_H
diff --git a/src/devices/bus/a2bus/agat7ports.cpp b/src/devices/bus/a2bus/agat7ports.cpp
index 5c24d8fac8f..d7c12ad81d9 100644
--- a/src/devices/bus/a2bus/agat7ports.cpp
+++ b/src/devices/bus/a2bus/agat7ports.cpp
@@ -51,20 +51,18 @@ INPUT_PORTS_END
// device_add_mconfig - add device configuration
//-------------------------------------------------
-void a2bus_agat7_ports_device::device_add_mconfig(machine_config &config)
-{
+MACHINE_CONFIG_START(a2bus_agat7_ports_device::device_add_mconfig)
I8255(config, m_d9);
m_d9->out_pa_callback().set("cent_data_out", FUNC(output_latch_device::bus_w));
m_d9->out_pb_callback().set(FUNC(a2bus_agat7_ports_device::write_portb));
m_d9->in_pc_callback().set(FUNC(a2bus_agat7_ports_device::read_portc));
- CENTRONICS(config, m_centronics, centronics_devices, "printer");
- m_centronics->busy_handler().set(FUNC(a2bus_agat7_ports_device::write_centronics_busy));
- output_latch_device &cent_data_out(OUTPUT_LATCH(config, "cent_data_out"));
- m_centronics->set_output_latch(cent_data_out);
+ MCFG_DEVICE_ADD(m_centronics, CENTRONICS, centronics_devices, "printer")
+ MCFG_CENTRONICS_BUSY_HANDLER(WRITELINE(*this, a2bus_agat7_ports_device, write_centronics_busy))
+ MCFG_CENTRONICS_OUTPUT_LATCH_ADD("cent_data_out", "centronics")
I8251(config, m_d10, 0);
-}
+MACHINE_CONFIG_END
//-------------------------------------------------
// input_ports - device-specific input ports
diff --git a/src/devices/bus/a2bus/agat840k_hle.cpp b/src/devices/bus/a2bus/agat840k_hle.cpp
index c95d66a09e9..3571513b7d5 100644
--- a/src/devices/bus/a2bus/agat840k_hle.cpp
+++ b/src/devices/bus/a2bus/agat840k_hle.cpp
@@ -51,12 +51,13 @@ static const floppy_interface agat840k_hle_floppy_interface =
"floppy_5_25"
};
-void a2bus_agat840k_hle_device::device_add_mconfig(machine_config &config)
-{
- legacy_floppy_image_device &floppy0(LEGACY_FLOPPY(config, FLOPPY_0, 0, &agat840k_hle_floppy_interface));
- floppy0.out_idx_cb().set(FUNC(a2bus_agat840k_hle_device::index_0_w));
- legacy_floppy_image_device &floppy1(LEGACY_FLOPPY(config, FLOPPY_1, 0, &agat840k_hle_floppy_interface));
- floppy1.out_idx_cb().set(FUNC(a2bus_agat840k_hle_device::index_1_w));
+MACHINE_CONFIG_START(a2bus_agat840k_hle_device::device_add_mconfig)
+ MCFG_DEVICE_ADD(FLOPPY_0, LEGACY_FLOPPY, 0)
+ MCFG_LEGACY_FLOPPY_CONFIG(agat840k_hle_floppy_interface)
+ MCFG_LEGACY_FLOPPY_IDX_CB(WRITELINE(*this, a2bus_agat840k_hle_device, index_0_w))
+ MCFG_DEVICE_ADD(FLOPPY_1, LEGACY_FLOPPY, 0)
+ MCFG_LEGACY_FLOPPY_CONFIG(agat840k_hle_floppy_interface)
+ MCFG_LEGACY_FLOPPY_IDX_CB(WRITELINE(*this, a2bus_agat840k_hle_device, index_1_w))
I8255(config, m_d14);
// PA not connected
@@ -68,7 +69,7 @@ void a2bus_agat840k_hle_device::device_add_mconfig(machine_config &config)
// m_d15->out_pb_callback().set(FUNC(a2bus_agat840k_hle_device::d15_o_b)); // write data
m_d15->in_pc_callback().set(FUNC(a2bus_agat840k_hle_device::d15_i_c));
m_d15->out_pc_callback().set(FUNC(a2bus_agat840k_hle_device::d15_o_c));
-}
+MACHINE_CONFIG_END
//-------------------------------------------------
// rom_region - device-specific ROM region
diff --git a/src/devices/bus/a2bus/corvfdc02.cpp b/src/devices/bus/a2bus/corvfdc02.cpp
index 36f5dbbd09c..7d4bc6ed785 100644
--- a/src/devices/bus/a2bus/corvfdc02.cpp
+++ b/src/devices/bus/a2bus/corvfdc02.cpp
@@ -132,10 +132,10 @@ uint8_t a2bus_corvfdc02_device::read_c0nx(uint8_t offset)
switch (offset)
{
case 0: // 765 FIFO
- return m_fdc->fifo_r();
+ return m_fdc->read_fifo();
case 1: // 765 MSR
- return m_fdc->msr_r();
+ return m_fdc->read_msr();
case 2: // buffer address
return (m_bufptr>>1) & 0xff;
@@ -170,7 +170,7 @@ void a2bus_corvfdc02_device::write_c0nx(uint8_t offset, uint8_t data)
switch (offset)
{
case 0: // FDC FIFO write
- m_fdc->fifo_w(data);
+ m_fdc->write_fifo(data);
break;
case 1: // FDC ???
diff --git a/src/devices/bus/a2bus/ezcgi.cpp b/src/devices/bus/a2bus/ezcgi.cpp
index a9bc648f08e..ec9dce1cad4 100644
--- a/src/devices/bus/a2bus/ezcgi.cpp
+++ b/src/devices/bus/a2bus/ezcgi.cpp
@@ -48,35 +48,33 @@ void a2bus_ezcgi_device::device_add_mconfig(machine_config &config)
SCREEN(config, SCREEN_TAG, SCREEN_TYPE_RASTER);
}
-void a2bus_ezcgi_9938_device::device_add_mconfig(machine_config &config)
-{
+MACHINE_CONFIG_START(a2bus_ezcgi_9938_device::device_add_mconfig)
V9938(config, m_tms, XTAL(21'477'272)); // typical 9938 clock, not verified
m_tms->set_vram_size(0x30000); // 192K of VRAM
m_tms->set_screen(SCREEN_TAG);
m_tms->int_cb().set(FUNC(a2bus_ezcgi_9938_device::tms_irq_w));
- screen_device &screen(SCREEN(config, SCREEN_TAG, SCREEN_TYPE_RASTER));
- screen.set_video_attributes(VIDEO_UPDATE_BEFORE_VBLANK);
- screen.set_refresh_hz(60);
- screen.set_vblank_time(ATTOSECONDS_IN_USEC(2500)); /* not accurate */
- screen.set_size(MSX2_TOTAL_XRES_PIXELS, 262*2);
- screen.set_visarea(MSX2_XBORDER_PIXELS - MSX2_VISIBLE_XBORDER_PIXELS, MSX2_TOTAL_XRES_PIXELS - MSX2_XBORDER_PIXELS + MSX2_VISIBLE_XBORDER_PIXELS - 1, MSX2_YBORDER_PIXELS - MSX2_VISIBLE_YBORDER_PIXELS, MSX2_TOTAL_YRES_PIXELS - MSX2_YBORDER_PIXELS + MSX2_VISIBLE_YBORDER_PIXELS - 1);
-}
+ MCFG_SCREEN_ADD(SCREEN_TAG, RASTER)
+ MCFG_SCREEN_VIDEO_ATTRIBUTES(VIDEO_UPDATE_BEFORE_VBLANK)
+ MCFG_SCREEN_REFRESH_RATE(60)
+ MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500)) /* not accurate */
+ MCFG_SCREEN_SIZE(MSX2_TOTAL_XRES_PIXELS, 262*2)
+ MCFG_SCREEN_VISIBLE_AREA(MSX2_XBORDER_PIXELS - MSX2_VISIBLE_XBORDER_PIXELS, MSX2_TOTAL_XRES_PIXELS - MSX2_XBORDER_PIXELS + MSX2_VISIBLE_XBORDER_PIXELS - 1, MSX2_YBORDER_PIXELS - MSX2_VISIBLE_YBORDER_PIXELS, MSX2_TOTAL_YRES_PIXELS - MSX2_YBORDER_PIXELS + MSX2_VISIBLE_YBORDER_PIXELS - 1)
+MACHINE_CONFIG_END
-void a2bus_ezcgi_9958_device::device_add_mconfig(machine_config &config)
-{
+MACHINE_CONFIG_START(a2bus_ezcgi_9958_device::device_add_mconfig)
V9958(config, m_tms, XTAL(21'477'272)); // typical 9938/9958 clock, not verified
m_tms->set_vram_size(0x30000); // 192K of VRAM
m_tms->set_screen(SCREEN_TAG);
m_tms->int_cb().set(FUNC(a2bus_ezcgi_9958_device::tms_irq_w));
- screen_device &screen(SCREEN(config, SCREEN_TAG, SCREEN_TYPE_RASTER));
- screen.set_video_attributes(VIDEO_UPDATE_BEFORE_VBLANK);
- screen.set_refresh_hz(60);
- screen.set_vblank_time(ATTOSECONDS_IN_USEC(2500)); /* not accurate */
- screen.set_size(MSX2_TOTAL_XRES_PIXELS, 262*2);
- screen.set_visarea(MSX2_XBORDER_PIXELS - MSX2_VISIBLE_XBORDER_PIXELS, MSX2_TOTAL_XRES_PIXELS - MSX2_XBORDER_PIXELS + MSX2_VISIBLE_XBORDER_PIXELS - 1, MSX2_YBORDER_PIXELS - MSX2_VISIBLE_YBORDER_PIXELS, MSX2_TOTAL_YRES_PIXELS - MSX2_YBORDER_PIXELS + MSX2_VISIBLE_YBORDER_PIXELS - 1);
-}
+ MCFG_SCREEN_ADD(SCREEN_TAG, RASTER)
+ MCFG_SCREEN_VIDEO_ATTRIBUTES(VIDEO_UPDATE_BEFORE_VBLANK)
+ MCFG_SCREEN_REFRESH_RATE(60)
+ MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500)) /* not accurate */
+ MCFG_SCREEN_SIZE(MSX2_TOTAL_XRES_PIXELS, 262*2)
+ MCFG_SCREEN_VISIBLE_AREA(MSX2_XBORDER_PIXELS - MSX2_VISIBLE_XBORDER_PIXELS, MSX2_TOTAL_XRES_PIXELS - MSX2_XBORDER_PIXELS + MSX2_VISIBLE_XBORDER_PIXELS - 1, MSX2_YBORDER_PIXELS - MSX2_VISIBLE_YBORDER_PIXELS, MSX2_TOTAL_YRES_PIXELS - MSX2_YBORDER_PIXELS + MSX2_VISIBLE_YBORDER_PIXELS - 1)
+MACHINE_CONFIG_END
//**************************************************************************
// LIVE DEVICE
diff --git a/src/devices/bus/a2bus/laser128.cpp b/src/devices/bus/a2bus/laser128.cpp
index e0c7626aa93..dc7ae4fea21 100644
--- a/src/devices/bus/a2bus/laser128.cpp
+++ b/src/devices/bus/a2bus/laser128.cpp
@@ -32,9 +32,8 @@ DEFINE_DEVICE_TYPE(A2BUS_LASER128, a2bus_laser128_device, "a2laser128", "VTech L
// device_add_mconfig - add device configuration
//-------------------------------------------------
-void a2bus_laser128_device::device_add_mconfig(machine_config &config)
-{
-}
+MACHINE_CONFIG_START(a2bus_laser128_device::device_add_mconfig)
+MACHINE_CONFIG_END
//**************************************************************************
// LIVE DEVICE
diff --git a/src/devices/bus/a2bus/mouse.cpp b/src/devices/bus/a2bus/mouse.cpp
index a960c74e52c..e95bb6f019a 100644
--- a/src/devices/bus/a2bus/mouse.cpp
+++ b/src/devices/bus/a2bus/mouse.cpp
@@ -203,7 +203,7 @@ void a2bus_mouse_device::device_reset()
uint8_t a2bus_mouse_device::read_c0nx(uint8_t offset)
{
- return m_pia->read(offset & 3);
+ return m_pia->reg_r(offset & 3);
}
/*-------------------------------------------------
@@ -212,7 +212,7 @@ uint8_t a2bus_mouse_device::read_c0nx(uint8_t offset)
void a2bus_mouse_device::write_c0nx(uint8_t offset, uint8_t data)
{
- m_pia->write(offset & 3, data);
+ m_pia->reg_w(offset & 3, data);
}
/*-------------------------------------------------
diff --git a/src/devices/bus/a2bus/pc_xporter.cpp b/src/devices/bus/a2bus/pc_xporter.cpp
index 305da9aa868..6334463533b 100644
--- a/src/devices/bus/a2bus/pc_xporter.cpp
+++ b/src/devices/bus/a2bus/pc_xporter.cpp
@@ -115,15 +115,14 @@ void a2bus_pcxporter_device::pc_io(address_map &map)
// device_add_mconfig - add device configuration
//-------------------------------------------------
-void a2bus_pcxporter_device::device_add_mconfig(machine_config &config)
-{
- V30(config, m_v30, A2BUS_7M_CLOCK); // 7.16 MHz as per manual
- m_v30->set_addrmap(AS_PROGRAM, &a2bus_pcxporter_device::pc_map);
- m_v30->set_addrmap(AS_IO, &a2bus_pcxporter_device::pc_io);
- m_v30->set_irq_acknowledge_callback("pic8259", FUNC(pic8259_device::inta_cb));
- m_v30->set_disable();
-
- PIT8253(config, m_pit8253);
+MACHINE_CONFIG_START(a2bus_pcxporter_device::device_add_mconfig)
+ MCFG_DEVICE_ADD(m_v30, V30, A2BUS_7M_CLOCK) // 7.16 MHz as per manual
+ MCFG_DEVICE_PROGRAM_MAP(pc_map)
+ MCFG_DEVICE_IO_MAP(pc_io)
+ MCFG_DEVICE_IRQ_ACKNOWLEDGE_DEVICE("pic8259", pic8259_device, inta_cb)
+ MCFG_DEVICE_DISABLE()
+
+ PIT8253(config, m_pit8253, 0);
m_pit8253->set_clk<0>(A2BUS_7M_CLOCK / 6.0); // heartbeat IRQ
m_pit8253->out_handler<0>().set(m_pic8259, FUNC(pic8259_device::ir0_w));
m_pit8253->set_clk<1>(A2BUS_7M_CLOCK / 6.0); // DRAM refresh
@@ -148,12 +147,11 @@ void a2bus_pcxporter_device::device_add_mconfig(machine_config &config)
m_dma8237->out_dack_callback<2>().set(FUNC(a2bus_pcxporter_device::pc_dack2_w));
m_dma8237->out_dack_callback<3>().set(FUNC(a2bus_pcxporter_device::pc_dack3_w));
- PIC8259(config, m_pic8259);
+ PIC8259(config, m_pic8259, 0);
m_pic8259->out_int_callback().set_inputline(m_v30, 0);
ISA8(config, m_isabus, 0);
- m_isabus->set_memspace(m_v30, AS_PROGRAM);
- m_isabus->set_iospace(m_v30, AS_IO);
+ m_isabus->set_cputag(m_v30);
m_isabus->irq2_callback().set(m_pic8259, FUNC(pic8259_device::ir2_w));
m_isabus->irq3_callback().set(m_pic8259, FUNC(pic8259_device::ir3_w));
m_isabus->irq4_callback().set(m_pic8259, FUNC(pic8259_device::ir4_w));
@@ -164,18 +162,18 @@ void a2bus_pcxporter_device::device_add_mconfig(machine_config &config)
m_isabus->drq2_callback().set(m_dma8237, FUNC(am9517a_device::dreq2_w));
m_isabus->drq3_callback().set(m_dma8237, FUNC(am9517a_device::dreq3_w));
- PC_KBDC(config, m_pc_kbdc, 0);
- m_pc_kbdc->out_clock_cb().set(FUNC(a2bus_pcxporter_device::keyboard_clock_w));
- m_pc_kbdc->out_data_cb().set(FUNC(a2bus_pcxporter_device::keyboard_data_w));
- PC_KBDC_SLOT(config, "kbd", pc_xt_keyboards, STR_KBD_KEYTRONIC_PC3270).set_pc_kbdc_slot(m_pc_kbdc);
+ MCFG_DEVICE_ADD(m_pc_kbdc, PC_KBDC, 0)
+ MCFG_PC_KBDC_OUT_CLOCK_CB(WRITELINE(*this, a2bus_pcxporter_device, keyboard_clock_w))
+ MCFG_PC_KBDC_OUT_DATA_CB(WRITELINE(*this, a2bus_pcxporter_device, keyboard_data_w))
+ MCFG_PC_KBDC_SLOT_ADD("pc_kbdc", "kbd", pc_xt_keyboards, STR_KBD_KEYTRONIC_PC3270)
/* sound hardware */
SPEAKER(config, "mono").front_center();
SPEAKER_SOUND(config, m_speaker).add_route(ALL_OUTPUTS, "mono", 1.00);
- ISA8_SLOT(config, "isa1", 0, m_isabus, pc_isa8_cards, "cga", true); // FIXME: determine ISA bus clock
- ISA8_SLOT(config, "isa2", 0, m_isabus, pc_isa8_cards, "fdc_xt", true);
-}
+ MCFG_DEVICE_ADD("isa1", ISA8_SLOT, 0, m_isabus, pc_isa8_cards, "cga", true) // FIXME: determine ISA bus clock
+ MCFG_DEVICE_ADD("isa2", ISA8_SLOT, 0, m_isabus, pc_isa8_cards, "fdc_xt", true)
+MACHINE_CONFIG_END
//**************************************************************************
// LIVE DEVICE
@@ -633,12 +631,5 @@ WRITE_LINE_MEMBER( a2bus_pcxporter_device::keyboard_data_w )
WRITE8_MEMBER( a2bus_pcxporter_device::nmi_enable_w )
{
m_nmi_enabled = BIT(data,7);
- if (!m_nmi_enabled)
- m_v30->set_input_line(INPUT_LINE_NMI, CLEAR_LINE);
-}
-
-WRITE_LINE_MEMBER( a2bus_pcxporter_device::iochck_w )
-{
- if (m_nmi_enabled && !state)
- m_v30->set_input_line(INPUT_LINE_NMI, ASSERT_LINE);
+ m_isabus->set_nmi_state(m_nmi_enabled);
}
diff --git a/src/devices/bus/a2bus/pc_xporter.h b/src/devices/bus/a2bus/pc_xporter.h
index 2a449ed4019..da9aecc6c6c 100644
--- a/src/devices/bus/a2bus/pc_xporter.h
+++ b/src/devices/bus/a2bus/pc_xporter.h
@@ -113,7 +113,6 @@ private:
DECLARE_WRITE8_MEMBER(pc_page_w);
DECLARE_WRITE8_MEMBER(nmi_enable_w);
- DECLARE_WRITE_LINE_MEMBER(iochck_w);
void pc_select_dma_channel(int channel, bool state);
diff --git a/src/devices/bus/a2bus/ssbapple.cpp b/src/devices/bus/a2bus/ssbapple.cpp
index 89165617867..bde53973c13 100644
--- a/src/devices/bus/a2bus/ssbapple.cpp
+++ b/src/devices/bus/a2bus/ssbapple.cpp
@@ -34,12 +34,11 @@ DEFINE_DEVICE_TYPE(A2BUS_SSBAPPLE, a2bus_ssb_device, "a2ssbapl", "Multitech Indu
// device_add_mconfig - add device configuration
//-------------------------------------------------
-void a2bus_ssb_device::device_add_mconfig(machine_config &config)
-{
+MACHINE_CONFIG_START(a2bus_ssb_device::device_add_mconfig)
SPEAKER(config, "ssbapple").front_center();
- TMS5220(config, m_tms, 640000); // guess - this gives 8 kHz output according to the datasheet
- m_tms->add_route(ALL_OUTPUTS, "ssbapple", 1.0);
-}
+ MCFG_DEVICE_ADD(TMS_TAG, TMS5220, 640000) // guess - this gives 8 kHz output according to the datasheet
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "ssbapple", 1.0)
+MACHINE_CONFIG_END
//**************************************************************************
// LIVE DEVICE
diff --git a/src/devices/bus/a2bus/ssprite.cpp b/src/devices/bus/a2bus/ssprite.cpp
index 69e12dc98dd..818bde14b89 100644
--- a/src/devices/bus/a2bus/ssprite.cpp
+++ b/src/devices/bus/a2bus/ssprite.cpp
@@ -104,7 +104,7 @@ uint8_t a2bus_ssprite_device::read_c0nx(uint8_t offset)
return 0x1f | m_tms5220->status_r();
case 14:
case 15:
- return m_ay->data_r();
+ return m_ay->read_data();
}
return 0xff;
@@ -125,11 +125,11 @@ void a2bus_ssprite_device::write_c0nx(uint8_t offset, uint8_t data)
break;
case 12:
case 13:
- m_ay->data_w(data);
+ m_ay->write_data(data);
break;
case 14:
case 15:
- m_ay->address_w(data);
+ m_ay->write_address(data);
break;
}
}
diff --git a/src/devices/bus/a2bus/timemasterho.cpp b/src/devices/bus/a2bus/timemasterho.cpp
index 6b7f0b1f5eb..ad0e96f2ab3 100644
--- a/src/devices/bus/a2bus/timemasterho.cpp
+++ b/src/devices/bus/a2bus/timemasterho.cpp
@@ -157,7 +157,7 @@ uint8_t a2bus_timemasterho_device::read_c0nx(uint8_t offset)
{
if (offset <= 3)
{
- return m_pia->read(offset);
+ return m_pia->reg_r(offset);
}
return 0xff;
@@ -172,7 +172,7 @@ void a2bus_timemasterho_device::write_c0nx(uint8_t offset, uint8_t data)
{
if (offset <= 3)
{
- m_pia->write(offset, data);
+ m_pia->reg_w(offset, data);
}
}
diff --git a/src/devices/bus/a2bus/transwarp.cpp b/src/devices/bus/a2bus/transwarp.cpp
index 97e02eb8b4e..06557e28cb0 100644
--- a/src/devices/bus/a2bus/transwarp.cpp
+++ b/src/devices/bus/a2bus/transwarp.cpp
@@ -121,11 +121,10 @@ ioport_constructor a2bus_transwarp_device::device_input_ports() const
// device_add_mconfig - add device configuration
//-------------------------------------------------
-void a2bus_transwarp_device::device_add_mconfig(machine_config &config)
-{
- M65C02(config, m_ourcpu, A2BUS_7M_CLOCK / 2);
- m_ourcpu->set_addrmap(AS_PROGRAM, &a2bus_transwarp_device::m65c02_mem);
-}
+MACHINE_CONFIG_START(a2bus_transwarp_device::device_add_mconfig)
+ MCFG_DEVICE_ADD(CPU_TAG, M65C02, A2BUS_7M_CLOCK / 2)
+ MCFG_DEVICE_PROGRAM_MAP(m65c02_mem)
+MACHINE_CONFIG_END
//**************************************************************************
// LIVE DEVICE
@@ -162,7 +161,7 @@ void a2bus_transwarp_device::device_reset()
{
m_bEnabled = true;
m_bReadA2ROM = false;
- raise_slot_dma();
+ set_maincpu_halt(ASSERT_LINE);
if (!(m_dsw2->read() & 0x80))
{
if (m_dsw1->read() & 0x80)
@@ -190,11 +189,6 @@ void a2bus_transwarp_device::device_timer(emu_timer &timer, device_timer_id id,
READ8_MEMBER( a2bus_transwarp_device::dma_r )
{
- if (offset == 0xc070)
- {
- hit_slot_joy();
- }
-
if ((offset >= 0xc090) && (offset <= 0xc0ff))
{
hit_slot(((offset >> 4) & 0xf) - 8);
@@ -205,7 +199,7 @@ READ8_MEMBER( a2bus_transwarp_device::dma_r )
return m_rom[offset & 0xfff];
}
- return slot_dma_read(offset);
+ return slot_dma_read(space, offset);
}
@@ -217,11 +211,6 @@ WRITE8_MEMBER( a2bus_transwarp_device::dma_w )
{
//if ((offset >= 0xc070) && (offset <= 0xc07f)) printf("%02x to %04x\n", data, offset);
- if (offset == 0xc070)
- {
- hit_slot_joy();
- }
-
if (offset == 0xc072)
{
m_bReadA2ROM = true;
@@ -232,7 +221,7 @@ WRITE8_MEMBER( a2bus_transwarp_device::dma_w )
hit_slot(((offset >> 4) & 0xf) - 8);
}
- slot_dma_write(offset, data);
+ slot_dma_write(space, offset, data);
}
bool a2bus_transwarp_device::take_c800()
@@ -254,15 +243,3 @@ void a2bus_transwarp_device::hit_slot(int slot)
}
}
}
-
-void a2bus_transwarp_device::hit_slot_joy()
-{
- // only do slot slowdown if acceleration is enabled
- if (!(m_dsw2->read() & 0x80))
- {
- // accleration's on
- m_ourcpu->set_unscaled_clock(1021800);
- // PREAD main loop counts up to 11*256 uSec, add 1 to cover the setup
- m_timer->adjust(attotime::from_usec(11*257));
- }
-}
diff --git a/src/devices/bus/a2bus/transwarp.h b/src/devices/bus/a2bus/transwarp.h
index e687ae6d350..8b42aefa7e5 100644
--- a/src/devices/bus/a2bus/transwarp.h
+++ b/src/devices/bus/a2bus/transwarp.h
@@ -54,7 +54,6 @@ private:
void m65c02_mem(address_map &map);
void hit_slot(int slot);
- void hit_slot_joy();
};
// device type definition