summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author AJR <ajrhacker@users.noreply.github.com>2018-12-17 11:17:09 -0500
committer AJR <ajrhacker@users.noreply.github.com>2018-12-17 11:17:23 -0500
commitc943494f13b9fdeba0c6f8719921f988e4c1a3ad (patch)
treea1cad232e6efc34675ffd8bc4e49473699c5a4d8
parent378dde23af8dc1f386fb67767df8f679905f3ab2 (diff)
bus/cpc: Use DERIVED_CLOCK to obtain 4 MHz (nw)
-rw-r--r--src/devices/bus/cpc/cpc_pds.cpp2
-rw-r--r--src/devices/bus/cpc/cpc_rs232.cpp2
-rw-r--r--src/devices/bus/cpc/cpc_ssa1.cpp2
-rw-r--r--src/devices/bus/cpc/magicsound.cpp14
-rw-r--r--src/devices/bus/cpc/playcity.cpp6
5 files changed, 13 insertions, 13 deletions
diff --git a/src/devices/bus/cpc/cpc_pds.cpp b/src/devices/bus/cpc/cpc_pds.cpp
index e0a234e3c88..841a7a1677b 100644
--- a/src/devices/bus/cpc/cpc_pds.cpp
+++ b/src/devices/bus/cpc/cpc_pds.cpp
@@ -19,7 +19,7 @@ DEFINE_DEVICE_TYPE(CPC_PDS, cpc_pds_device, "cpc_pds", "Programmers Development
void cpc_pds_device::device_add_mconfig(machine_config &config)
{
- Z80PIO(config, m_pio, XTAL(4'000'000)); // no clock on the PCB, so will presume that it uses the CPC's clock
+ Z80PIO(config, m_pio, DERIVED_CLOCK(1, 1)); // no clock on the PCB, so will presume that it uses the CPC's clock
// no pass-through seen on remake PCBs, unknown if actual hardware had a pass-through port or not
}
diff --git a/src/devices/bus/cpc/cpc_rs232.cpp b/src/devices/bus/cpc/cpc_rs232.cpp
index 73514b02114..d4439ff1eaf 100644
--- a/src/devices/bus/cpc/cpc_rs232.cpp
+++ b/src/devices/bus/cpc/cpc_rs232.cpp
@@ -43,7 +43,7 @@ void cpc_rs232_device::device_add_mconfig(machine_config &config)
m_pit->out_handler<1>().set(FUNC(cpc_rs232_device::pit_out1_w));
m_pit->out_handler<2>().set(FUNC(cpc_rs232_device::pit_out2_w));
- Z80DART(config, m_dart, XTAL(4'000'000));
+ Z80DART(config, m_dart, DERIVED_CLOCK(1, 1));
m_dart->out_txda_callback().set(m_rs232, FUNC(rs232_port_device::write_txd));
m_dart->out_dtra_callback().set(m_rs232, FUNC(rs232_port_device::write_dtr));
m_dart->out_rtsa_callback().set(m_rs232, FUNC(rs232_port_device::write_rts));
diff --git a/src/devices/bus/cpc/cpc_ssa1.cpp b/src/devices/bus/cpc/cpc_ssa1.cpp
index 2ad9dd9beaf..bdfedce16ed 100644
--- a/src/devices/bus/cpc/cpc_ssa1.cpp
+++ b/src/devices/bus/cpc/cpc_ssa1.cpp
@@ -133,7 +133,7 @@ void cpc_ssa1_device::device_add_mconfig(machine_config &config)
void cpc_dkspeech_device::device_add_mconfig(machine_config &config)
{
SPEAKER(config, "mono").front_center();
- SP0256(config, m_sp0256_device, XTAL(4'000'000)); // uses the CPC's clock from pin 50 of the expansion port
+ SP0256(config, m_sp0256_device, DERIVED_CLOCK(1, 1)); // uses the CPC's clock from pin 50 of the expansion port
m_sp0256_device->data_request_callback().set(FUNC(cpc_dkspeech_device::lrq_cb));
m_sp0256_device->standby_callback().set(FUNC(cpc_dkspeech_device::sby_cb));
m_sp0256_device->add_route(ALL_OUTPUTS, "mono", 1.00);
diff --git a/src/devices/bus/cpc/magicsound.cpp b/src/devices/bus/cpc/magicsound.cpp
index fdb0257f72c..f1a940a72c3 100644
--- a/src/devices/bus/cpc/magicsound.cpp
+++ b/src/devices/bus/cpc/magicsound.cpp
@@ -21,7 +21,7 @@ DEFINE_DEVICE_TYPE(AL_MAGICSOUND, al_magicsound_device, "al_magicsound", "Aleste
MACHINE_CONFIG_START(al_magicsound_device::device_add_mconfig)
- AM9517A(config, m_dmac, 4_MHz_XTAL); // CLK from expansion port
+ 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
// the K1810WT37 is different to the i8237/AM9517A
@@ -42,19 +42,19 @@ MACHINE_CONFIG_START(al_magicsound_device::device_add_mconfig)
// passes through an inverter to each CLK pin on both timers. This seems to be too fast.
// Timer outputs to SAM0/1/2/3 are sample clocks for each sound channel, D/A0 is the low bit of the channel select.
PIT8254(config, m_timer1, 0);
- m_timer1->set_clk<0>(4_MHz_XTAL);
+ m_timer1->set_clk<0>(4000000);
m_timer1->out_handler<0>().set(FUNC(al_magicsound_device::sam0_w));
- m_timer1->set_clk<1>(4_MHz_XTAL);
+ m_timer1->set_clk<1>(4000000);
m_timer1->out_handler<1>().set(FUNC(al_magicsound_device::sam1_w));
- m_timer1->set_clk<2>(4_MHz_XTAL);
+ m_timer1->set_clk<2>(4000000);
m_timer1->out_handler<2>().set(FUNC(al_magicsound_device::sam2_w));
PIT8254(config, m_timer2, 0);
- m_timer2->set_clk<0>(4_MHz_XTAL);
+ m_timer2->set_clk<0>(4000000);
m_timer2->out_handler<0>().set(FUNC(al_magicsound_device::sam3_w));
- m_timer2->set_clk<1>(4_MHz_XTAL);
+ m_timer2->set_clk<1>(4000000);
m_timer2->out_handler<1>().set(FUNC(al_magicsound_device::da0_w));
- m_timer2->set_clk<2>(4_MHz_XTAL);
+ m_timer2->set_clk<2>(4000000);
SPEAKER(config, "speaker").front_center();
MCFG_DEVICE_ADD("dac", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.5) // unknown DAC
diff --git a/src/devices/bus/cpc/playcity.cpp b/src/devices/bus/cpc/playcity.cpp
index 548e35f4437..f9d225ef7b6 100644
--- a/src/devices/bus/cpc/playcity.cpp
+++ b/src/devices/bus/cpc/playcity.cpp
@@ -26,16 +26,16 @@ DEFINE_DEVICE_TYPE(CPC_PLAYCITY, cpc_playcity_device, "cpc_playcity", "PlayCity"
// device machine config
void cpc_playcity_device::device_add_mconfig(machine_config &config)
{
- Z80CTC(config, m_ctc, XTAL(4'000'000));
+ Z80CTC(config, m_ctc, DERIVED_CLOCK(1, 1));
m_ctc->zc_callback<1>().set(FUNC(cpc_playcity_device::ctc_zc1_cb));
m_ctc->zc_callback<2>().set(m_ctc, FUNC(z80ctc_device::trg3));
m_ctc->intr_callback().set(FUNC(cpc_playcity_device::ctc_intr_cb));
SPEAKER(config, "lspeaker").front_left();
SPEAKER(config, "rspeaker").front_right();
- YMZ294(config, m_ymz1, XTAL(4'000'000)); // when timer is not set, operates at 4MHz (interally divided by 2, so equivalent to the ST)
+ YMZ294(config, m_ymz1, DERIVED_CLOCK(1, 1)); // when timer is not set, operates at 4MHz (interally divided by 2, so equivalent to the ST)
m_ymz1->add_route(ALL_OUTPUTS, "rspeaker", 0.30);
- YMZ294(config, m_ymz2, XTAL(4'000'000));
+ YMZ294(config, m_ymz2, DERIVED_CLOCK(1, 1));
m_ymz2->add_route(ALL_OUTPUTS, "lspeaker", 0.30);
// pass-through