bus/cpc: Use DERIVED_CLOCK to obtain 4 MHz (nw)

This commit is contained in:
AJR 2018-12-17 11:17:09 -05:00
parent 378dde23af
commit c943494f13
5 changed files with 13 additions and 13 deletions

View File

@ -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
}

View File

@ -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));

View File

@ -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);

View File

@ -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

View File

@ -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