Previous 199869 Revisions Next

r33139 Sunday 2nd November, 2014 at 11:29:55 UTC by Barry Rodewald
amstrad: made PlayCity output in stereo, add the device has its own stereo audio output.
[src/emu/bus/cpc]playcity.c playcity.h

trunk/src/emu/bus/cpc/playcity.c
r241650r241651
33
44   Z80 CTC
55   2x YMZ294 (clocks provided by CTC)
6
7   TODO:
8   IRQs aren't working currently, the Z80CTC core requires the daisy chain setup to acknowledge IRQs properly, and that can't be used in a slot device currently.
9   Add CRTC Cursor signal support to the expansion bus, this should get NMIs working consistently.
610*/
711
812#include "playcity.h"
r241650r241651
1822static MACHINE_CONFIG_FRAGMENT( cpc_playcity )
1923   MCFG_DEVICE_ADD("ctc", Z80CTC, XTAL_4MHz)
2024   MCFG_Z80CTC_ZC1_CB(WRITELINE(cpc_playcity_device,ctc_zc1_cb))
21   MCFG_Z80CTC_ZC2_CB(WRITELINE(cpc_playcity_device,ctc_zc2_cb))
25   MCFG_Z80CTC_ZC2_CB(DEVWRITELINE("ctc",z80ctc_device,trg3))
26   MCFG_Z80CTC_INTR_CB(WRITELINE(cpc_playcity_device,ctc_intr_cb))
2227
23   MCFG_SPEAKER_STANDARD_MONO("mono")
28   MCFG_SPEAKER_STANDARD_STEREO("lspeaker","rspeaker")
2429   MCFG_SOUND_ADD("ymz_1",YMZ294,XTAL_4MHz)  // when timer is not set, operates at 4MHz (interally divided by 2, so equivalent to the ST)
25   MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.30)
30   MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 0.30)
2631   MCFG_SOUND_ADD("ymz_2",YMZ294,XTAL_4MHz)
27   MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.30)
32   MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 0.30)
2833
2934   // pass-through
3035   MCFG_DEVICE_ADD("exp", CPC_EXPANSION_SLOT, 0)
r241650r241651
8994WRITE8_MEMBER(cpc_playcity_device::ctc_w)
9095{
9196   m_ctc->write(space,offset,data);
92   update_ymz_clock();
97   if(offset == 0)
98      update_ymz_clock();
9399}
94100
95101WRITE8_MEMBER(cpc_playcity_device::ymz1_address_w)
trunk/src/emu/bus/cpc/playcity.h
r241650r241651
33
44   I/O ports:
55   * F880 - Z80CTC channel 0 (input is system clock (4MHz), output to YMZ294 clock)
6   * F881 - Z80CTC channel 1 (input from CRTC CURSOR, output to NMI)
6   * F881 - Z80CTC channel 1 (input from CRTC CURSOR, output to /NMI)
77   * F882 - Z80CTC channel 2 (input is system clock (4MHz), output to channel 3 input)
8   * F883 - Z80CTC channel 3 (input is channel 2 output, output to IRQ)
8   * F883 - Z80CTC channel 3 (input is channel 2 output)
99   * F884 - YMZ294 #1 (right) data
1010   * F888 - YMZ294 #2 (left) data
1111   * F984 - YMZ294 #1 (right) register select
r241650r241651
3939   DECLARE_WRITE8_MEMBER(ymz2_data_w);
4040   DECLARE_READ8_MEMBER(ymz1_data_r);
4141   DECLARE_READ8_MEMBER(ymz2_data_r);
42   DECLARE_WRITE_LINE_MEMBER(ctc_zc1_cb) { if(state) {m_slot->nmi_w(1); m_slot->nmi_w(0); } }
43   DECLARE_WRITE_LINE_MEMBER(ctc_zc2_cb) { m_slot->irq_w(state); }
42   DECLARE_WRITE_LINE_MEMBER(ctc_zc1_cb) { if(state) { m_slot->nmi_w(1); m_slot->nmi_w(0); } printf("NMI %i",state); }
43   DECLARE_WRITE_LINE_MEMBER(ctc_intr_cb) { m_slot->irq_w(state); }
4444
4545protected:
4646   // device-level overrides


Previous 199869 Revisions Next


© 1997-2024 The MAME Team