summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author mahlemiut <bsr@xnet.co.nz>2014-11-03 00:29:47 +1300
committer mahlemiut <bsr@xnet.co.nz>2014-11-03 00:29:55 +1300
commit3cd94ce83dafba577adc1a1b53e6414f4681c776 (patch)
treea6ea3f746b83e68adc9737d489289a3910897932
parent9f107c0d7fa53178cae625c7b6843f128bc47c4c (diff)
amstrad: made PlayCity output in stereo, add the device has its own stereo audio output.
-rw-r--r--src/emu/bus/cpc/playcity.c16
-rw-r--r--src/emu/bus/cpc/playcity.h8
2 files changed, 15 insertions, 9 deletions
diff --git a/src/emu/bus/cpc/playcity.c b/src/emu/bus/cpc/playcity.c
index aea15b5393e..382d80b3d92 100644
--- a/src/emu/bus/cpc/playcity.c
+++ b/src/emu/bus/cpc/playcity.c
@@ -3,6 +3,10 @@
Z80 CTC
2x YMZ294 (clocks provided by CTC)
+
+ TODO:
+ 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.
+ Add CRTC Cursor signal support to the expansion bus, this should get NMIs working consistently.
*/
#include "playcity.h"
@@ -18,13 +22,14 @@ const device_type CPC_PLAYCITY = &device_creator<cpc_playcity_device>;
static MACHINE_CONFIG_FRAGMENT( cpc_playcity )
MCFG_DEVICE_ADD("ctc", Z80CTC, XTAL_4MHz)
MCFG_Z80CTC_ZC1_CB(WRITELINE(cpc_playcity_device,ctc_zc1_cb))
- MCFG_Z80CTC_ZC2_CB(WRITELINE(cpc_playcity_device,ctc_zc2_cb))
+ MCFG_Z80CTC_ZC2_CB(DEVWRITELINE("ctc",z80ctc_device,trg3))
+ MCFG_Z80CTC_INTR_CB(WRITELINE(cpc_playcity_device,ctc_intr_cb))
- MCFG_SPEAKER_STANDARD_MONO("mono")
+ MCFG_SPEAKER_STANDARD_STEREO("lspeaker","rspeaker")
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)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.30)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 0.30)
MCFG_SOUND_ADD("ymz_2",YMZ294,XTAL_4MHz)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.30)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 0.30)
// pass-through
MCFG_DEVICE_ADD("exp", CPC_EXPANSION_SLOT, 0)
@@ -89,7 +94,8 @@ READ8_MEMBER(cpc_playcity_device::ctc_r)
WRITE8_MEMBER(cpc_playcity_device::ctc_w)
{
m_ctc->write(space,offset,data);
- update_ymz_clock();
+ if(offset == 0)
+ update_ymz_clock();
}
WRITE8_MEMBER(cpc_playcity_device::ymz1_address_w)
diff --git a/src/emu/bus/cpc/playcity.h b/src/emu/bus/cpc/playcity.h
index 5f1f46d08fb..b1056860ea1 100644
--- a/src/emu/bus/cpc/playcity.h
+++ b/src/emu/bus/cpc/playcity.h
@@ -3,9 +3,9 @@
I/O ports:
* F880 - Z80CTC channel 0 (input is system clock (4MHz), output to YMZ294 clock)
- * F881 - Z80CTC channel 1 (input from CRTC CURSOR, output to NMI)
+ * F881 - Z80CTC channel 1 (input from CRTC CURSOR, output to /NMI)
* F882 - Z80CTC channel 2 (input is system clock (4MHz), output to channel 3 input)
- * F883 - Z80CTC channel 3 (input is channel 2 output, output to IRQ)
+ * F883 - Z80CTC channel 3 (input is channel 2 output)
* F884 - YMZ294 #1 (right) data
* F888 - YMZ294 #2 (left) data
* F984 - YMZ294 #1 (right) register select
@@ -39,8 +39,8 @@ public:
DECLARE_WRITE8_MEMBER(ymz2_data_w);
DECLARE_READ8_MEMBER(ymz1_data_r);
DECLARE_READ8_MEMBER(ymz2_data_r);
- DECLARE_WRITE_LINE_MEMBER(ctc_zc1_cb) { if(state) {m_slot->nmi_w(1); m_slot->nmi_w(0); } }
- DECLARE_WRITE_LINE_MEMBER(ctc_zc2_cb) { m_slot->irq_w(state); }
+ DECLARE_WRITE_LINE_MEMBER(ctc_zc1_cb) { if(state) { m_slot->nmi_w(1); m_slot->nmi_w(0); } printf("NMI %i",state); }
+ DECLARE_WRITE_LINE_MEMBER(ctc_intr_cb) { m_slot->irq_w(state); }
protected:
// device-level overrides