summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/bus/cpc
diff options
context:
space:
mode:
Diffstat (limited to 'src/devices/bus/cpc')
-rw-r--r--src/devices/bus/cpc/amdrum.cpp12
-rw-r--r--src/devices/bus/cpc/cpc_rom.cpp21
-rw-r--r--src/devices/bus/cpc/cpc_rom.h3
-rw-r--r--src/devices/bus/cpc/cpcexp.cpp2
-rw-r--r--src/devices/bus/cpc/ddi1.cpp6
-rw-r--r--src/devices/bus/cpc/doubler.cpp13
-rw-r--r--src/devices/bus/cpc/hd20.cpp11
-rw-r--r--src/devices/bus/cpc/magicsound.cpp16
-rw-r--r--src/devices/bus/cpc/playcity.cpp12
-rw-r--r--src/devices/bus/cpc/smartwatch.cpp13
-rw-r--r--src/devices/bus/cpc/symbfac2.cpp19
11 files changed, 68 insertions, 60 deletions
diff --git a/src/devices/bus/cpc/amdrum.cpp b/src/devices/bus/cpc/amdrum.cpp
index 587577edf52..b0c0610b607 100644
--- a/src/devices/bus/cpc/amdrum.cpp
+++ b/src/devices/bus/cpc/amdrum.cpp
@@ -20,15 +20,13 @@
DEFINE_DEVICE_TYPE(CPC_AMDRUM, cpc_amdrum_device, "cpc_amdrum", "Amdrum")
-void cpc_amdrum_device::device_add_mconfig(machine_config &config)
-{
+MACHINE_CONFIG_START(cpc_amdrum_device::device_add_mconfig)
SPEAKER(config, "speaker").front_center();
- ZN428E(config, m_dac, 0).add_route(ALL_OUTPUTS, "speaker", 0.5);
- 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)
// no pass-through
-}
+MACHINE_CONFIG_END
//**************************************************************************
diff --git a/src/devices/bus/cpc/cpc_rom.cpp b/src/devices/bus/cpc/cpc_rom.cpp
index 69bd7f80035..a3fedd575bc 100644
--- a/src/devices/bus/cpc/cpc_rom.cpp
+++ b/src/devices/bus/cpc/cpc_rom.cpp
@@ -18,23 +18,22 @@ void cpc_exp_cards(device_slot_interface &device);
//**************************************************************************
// device machine config
-void cpc_rom_device::device_add_mconfig(machine_config &config)
-{
- CPC_ROMSLOT(config, m_rom[0], 0);
- CPC_ROMSLOT(config, m_rom[1], 0);
- CPC_ROMSLOT(config, m_rom[2], 0);
- CPC_ROMSLOT(config, m_rom[3], 0);
- CPC_ROMSLOT(config, m_rom[4], 0);
- CPC_ROMSLOT(config, m_rom[5], 0);
- CPC_ROMSLOT(config, m_rom[6], 0);
- CPC_ROMSLOT(config, m_rom[7], 0);
+MACHINE_CONFIG_START(cpc_rom_device::device_add_mconfig)
+ MCFG_CPC_ROMSLOT_ADD("rom1")
+ MCFG_CPC_ROMSLOT_ADD("rom2")
+ MCFG_CPC_ROMSLOT_ADD("rom3")
+ MCFG_CPC_ROMSLOT_ADD("rom4")
+ MCFG_CPC_ROMSLOT_ADD("rom5")
+ MCFG_CPC_ROMSLOT_ADD("rom6")
+ MCFG_CPC_ROMSLOT_ADD("rom7")
+ MCFG_CPC_ROMSLOT_ADD("rom8")
// pass-through
cpc_expansion_slot_device &exp(CPC_EXPANSION_SLOT(config, "exp", DERIVED_CLOCK(1, 1), cpc_exp_cards, nullptr));
exp.irq_callback().set(DEVICE_SELF_OWNER, FUNC(cpc_expansion_slot_device::irq_w));
exp.nmi_callback().set(DEVICE_SELF_OWNER, FUNC(cpc_expansion_slot_device::nmi_w));
exp.romdis_callback().set(DEVICE_SELF_OWNER, FUNC(cpc_expansion_slot_device::romdis_w)); // ROMDIS
-}
+MACHINE_CONFIG_END
//**************************************************************************
diff --git a/src/devices/bus/cpc/cpc_rom.h b/src/devices/bus/cpc/cpc_rom.h
index 67e88cf6137..0128dc79337 100644
--- a/src/devices/bus/cpc/cpc_rom.h
+++ b/src/devices/bus/cpc/cpc_rom.h
@@ -53,6 +53,9 @@ private:
DECLARE_DEVICE_TYPE(CPC_ROMSLOT, cpc_rom_image_device)
+#define MCFG_CPC_ROMSLOT_ADD(_tag) \
+ MCFG_DEVICE_ADD(_tag, CPC_ROMSLOT, 0)
+
/*** ROM box device ***/
class cpc_rom_device : public device_t,
diff --git a/src/devices/bus/cpc/cpcexp.cpp b/src/devices/bus/cpc/cpcexp.cpp
index 3f9f04e89ea..ab92c31a4df 100644
--- a/src/devices/bus/cpc/cpcexp.cpp
+++ b/src/devices/bus/cpc/cpcexp.cpp
@@ -83,7 +83,7 @@ void cpc_expansion_slot_device::device_start()
void cpc_expansion_slot_device::device_config_complete()
{
// for passthrough connectors, use the parent slot's CPU tag
- if ((m_cpu.finder_tag() == finder_base::DUMMY_TAG) && (dynamic_cast<device_cpc_expansion_card_interface *>(owner()) != nullptr))
+ if (strcmp(m_cpu.finder_tag(), finder_base::DUMMY_TAG) == 0 && dynamic_cast<device_cpc_expansion_card_interface *>(owner()) != nullptr)
{
auto parent = dynamic_cast<cpc_expansion_slot_device *>(owner()->owner());
if (parent != nullptr)
diff --git a/src/devices/bus/cpc/ddi1.cpp b/src/devices/bus/cpc/ddi1.cpp
index 76e09d36f34..0202f9374ae 100644
--- a/src/devices/bus/cpc/ddi1.cpp
+++ b/src/devices/bus/cpc/ddi1.cpp
@@ -116,7 +116,7 @@ WRITE8_MEMBER(cpc_ddi1_device::fdc_w)
switch(offset)
{
case 0x01:
- m_fdc->fifo_w(data);
+ m_fdc->fifo_w(space, 0,data);
break;
}
}
@@ -128,10 +128,10 @@ READ8_MEMBER(cpc_ddi1_device::fdc_r)
switch(offset)
{
case 0x00:
- data = m_fdc->msr_r();
+ data = m_fdc->msr_r(space, 0);
break;
case 0x01:
- data = m_fdc->fifo_r();
+ data = m_fdc->fifo_r(space, 0);
break;
}
return data;
diff --git a/src/devices/bus/cpc/doubler.cpp b/src/devices/bus/cpc/doubler.cpp
index e9ed2e5b5f4..ce89c0819dd 100644
--- a/src/devices/bus/cpc/doubler.cpp
+++ b/src/devices/bus/cpc/doubler.cpp
@@ -16,15 +16,14 @@
DEFINE_DEVICE_TYPE(CPC_DOUBLER, cpc_doubler_device, "cpc_doubler", "Draysoft Doubler")
-void cpc_doubler_device::device_add_mconfig(machine_config &config)
-{
- CASSETTE(config, m_tape);
- m_tape->set_formats(cdt_cassette_formats);
- m_tape->set_default_state(CASSETTE_STOPPED | CASSETTE_MOTOR_ENABLED);
- m_tape->set_interface("cpc_cass");
+MACHINE_CONFIG_START(cpc_doubler_device::device_add_mconfig)
+ MCFG_CASSETTE_ADD( "doubler_tape" )
+ MCFG_CASSETTE_FORMATS(cdt_cassette_formats)
+ MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_STOPPED | CASSETTE_MOTOR_ENABLED)
+ MCFG_CASSETTE_INTERFACE("cpc_cass")
// no pass-through seen on remake PCBs, unknown if actual hardware had a pass-through port or not
-}
+MACHINE_CONFIG_END
//**************************************************************************
diff --git a/src/devices/bus/cpc/hd20.cpp b/src/devices/bus/cpc/hd20.cpp
index c13ffca6b4b..3ad082ee90d 100644
--- a/src/devices/bus/cpc/hd20.cpp
+++ b/src/devices/bus/cpc/hd20.cpp
@@ -15,13 +15,12 @@
DEFINE_DEVICE_TYPE(CPC_HD20, cpc_hd20_device, "cpc_hd20", "Dobbertin HD20")
-void cpc_hd20_device::device_add_mconfig(machine_config &config)
-{
- ST11M_HDC(config, m_hdc,0);
- m_hdc->irq_handler().set(FUNC(cpc_hd20_device::irq_w));
- HARDDISK(config, "hdc:primary");
+MACHINE_CONFIG_START(cpc_hd20_device::device_add_mconfig)
+ MCFG_DEVICE_ADD("hdc",ST11M_HDC,0)
+ MCFG_XTHDC_IRQ_HANDLER(WRITELINE(*this, cpc_hd20_device, irq_w))
+ MCFG_HARDDISK_ADD("hdc:primary")
// no pass-through (?)
-}
+MACHINE_CONFIG_END
ROM_START( cpc_hd20 )
diff --git a/src/devices/bus/cpc/magicsound.cpp b/src/devices/bus/cpc/magicsound.cpp
index 1a85915dca1..f1a940a72c3 100644
--- a/src/devices/bus/cpc/magicsound.cpp
+++ b/src/devices/bus/cpc/magicsound.cpp
@@ -20,8 +20,7 @@
DEFINE_DEVICE_TYPE(AL_MAGICSOUND, al_magicsound_device, "al_magicsound", "Aleste Magic Sound Board")
-void al_magicsound_device::device_add_mconfig(machine_config &config)
-{
+MACHINE_CONFIG_START(al_magicsound_device::device_add_mconfig)
AM9517A(config, m_dmac, DERIVED_CLOCK(1, 1)); // CLK from expansion port
// According to the schematics, the TC pin (EOP on western chips) is connected to NMI on the expansion port.
// NMIs seem to occur too quickly when this is active, so either EOP is not triggered at the correct time, or
@@ -58,12 +57,11 @@ void al_magicsound_device::device_add_mconfig(machine_config &config)
m_timer2->set_clk<2>(4000000);
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)
// no pass-through(?)
-}
+MACHINE_CONFIG_END
//**************************************************************************
@@ -115,12 +113,12 @@ void al_magicsound_device::device_reset()
READ8_MEMBER(al_magicsound_device::dmac_r)
{
- return m_dmac->read(offset);
+ return m_dmac->read(space,offset);
}
WRITE8_MEMBER(al_magicsound_device::dmac_w)
{
- m_dmac->write(offset,data);
+ m_dmac->write(space,offset,data);
}
WRITE8_MEMBER(al_magicsound_device::timer_w)
diff --git a/src/devices/bus/cpc/playcity.cpp b/src/devices/bus/cpc/playcity.cpp
index 1e6f3b0cfa6..f9d225ef7b6 100644
--- a/src/devices/bus/cpc/playcity.cpp
+++ b/src/devices/bus/cpc/playcity.cpp
@@ -99,32 +99,32 @@ WRITE8_MEMBER(cpc_playcity_device::ctc_w)
WRITE8_MEMBER(cpc_playcity_device::ymz1_address_w)
{
- m_ymz1->address_w(data);
+ m_ymz1->address_w(space,offset,data);
}
WRITE8_MEMBER(cpc_playcity_device::ymz2_address_w)
{
- m_ymz2->address_w(data);
+ m_ymz2->address_w(space,offset,data);
}
WRITE8_MEMBER(cpc_playcity_device::ymz1_data_w)
{
- m_ymz1->data_w(data);
+ m_ymz1->data_w(space,offset,data);
}
WRITE8_MEMBER(cpc_playcity_device::ymz2_data_w)
{
- m_ymz2->data_w(data);
+ m_ymz2->data_w(space,offset,data);
}
READ8_MEMBER(cpc_playcity_device::ymz1_data_r)
{
- return m_ymz1->data_r();
+ return m_ymz1->data_r(space,offset);
}
READ8_MEMBER(cpc_playcity_device::ymz2_data_r)
{
- return m_ymz2->data_r();
+ return m_ymz2->data_r(space,offset);
}
void cpc_playcity_device::update_ymz_clock()
diff --git a/src/devices/bus/cpc/smartwatch.cpp b/src/devices/bus/cpc/smartwatch.cpp
index 272b7ca953e..bd039c40735 100644
--- a/src/devices/bus/cpc/smartwatch.cpp
+++ b/src/devices/bus/cpc/smartwatch.cpp
@@ -71,18 +71,15 @@ void cpc_smartwatch_device::device_reset()
READ8_MEMBER(cpc_smartwatch_device::rtc_w)
{
uint8_t* bank = (uint8_t*)m_bank->base();
- if (!machine().side_effects_disabled())
- {
- if(offset & 1)
- m_rtc->read_1();
- else
- m_rtc->read_0();
- }
+ if(offset & 1)
+ m_rtc->read_1(space,0);
+ else
+ m_rtc->read_0(space,0);
return bank[offset & 1];
}
READ8_MEMBER(cpc_smartwatch_device::rtc_r)
{
uint8_t* bank = (uint8_t*)m_bank->base();
- return ((bank[(offset & 1)+4]) & 0xfe) | (m_rtc->read_data() & 0x01);
+ return ((bank[(offset & 1)+4]) & 0xfe) | (m_rtc->read_data(space,0) & 0x01);
}
diff --git a/src/devices/bus/cpc/symbfac2.cpp b/src/devices/bus/cpc/symbfac2.cpp
index fbdb67f5085..a68ecdbd900 100644
--- a/src/devices/bus/cpc/symbfac2.cpp
+++ b/src/devices/bus/cpc/symbfac2.cpp
@@ -161,12 +161,27 @@ WRITE8_MEMBER(cpc_symbiface2_device::ide_cs1_w)
// #FD14 (read/write) read from or write into selected register
READ8_MEMBER(cpc_symbiface2_device::rtc_r)
{
- return m_rtc->read(~offset & 0x01);
+ switch(offset & 0x01)
+ {
+ case 0x00:
+ return m_rtc->read(space,1);
+ case 0x01:
+ return m_rtc->read(space,0);
+ }
+ return 0;
}
WRITE8_MEMBER(cpc_symbiface2_device::rtc_w)
{
- m_rtc->write(~offset & 0x01, data);
+ switch(offset & 0x01)
+ {
+ case 0x00:
+ m_rtc->write(space,1,data);
+ break;
+ case 0x01:
+ m_rtc->write(space,0,data);
+ break;
+ }
}
// PS/2 Mouse connector