mirror of
https://github.com/holub/mame
synced 2025-05-25 15:25:33 +03:00
amstrad: made PlayCity output in stereo, add the device has its own stereo audio output.
This commit is contained in:
parent
9f107c0d7f
commit
3cd94ce83d
@ -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)
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user