partial revert of r31054: daisy chain config is on TMPZ84C011 external pins

This commit is contained in:
Michaël Banaan Ananas 2014-06-21 16:09:21 +00:00
parent b359f4ad2c
commit 773ccd25e8
6 changed files with 42 additions and 16 deletions

View File

@ -205,17 +205,9 @@ WRITE8_MEMBER(tmpz84c011_device::tmpz84c011_dir_pe_w)
}
static const z80_daisy_config daisy_chain[] =
{
{ "ctc" },
{ NULL }
};
static MACHINE_CONFIG_FRAGMENT( tmpz84c011 )
MCFG_DEVICE_ADD("ctc", Z80CTC, DERIVED_CLOCK(1,1) )
MCFG_Z80CTC_INTR_CB(INPUTLINE(DEVICE_SELF, INPUT_LINE_IRQ0))
MCFG_CPU_MODIFY(DEVICE_SELF)
MCFG_CPU_CONFIG(daisy_chain)
MACHINE_CONFIG_END
machine_config_constructor tmpz84c011_device::device_mconfig_additions() const

View File

@ -61,9 +61,9 @@ void z80_daisy_chain::init(device_t *cpudevice, const z80_daisy_config *daisy)
{
// find the device
device_t *target;
if ((target = cpudevice->subdevice(daisy->devname)) == NULL)
if ((target = cpudevice->siblingdevice(daisy->devname)) == NULL)
{
if ((target = cpudevice->siblingdevice(daisy->devname)) == NULL)
if ((target = cpudevice->subdevice(daisy->devname)) == NULL)
fatalerror("Unable to locate device '%s'\n", daisy->devname);
}

View File

@ -44,14 +44,16 @@ public:
m_v9958(*this, "v9958"),
m_dac1(*this, "dac1"),
m_dac2(*this, "dac2")
{ }
UINT16 m_mux_data;
{ }
required_device<cpu_device> m_maincpu;
required_device<tmp68301_device> m_tmp68301;
required_device<v9958_device> m_v9958;
required_device<dac_device> m_dac1;
required_device<dac_device> m_dac2;
UINT16 m_mux_data;
DECLARE_READ16_MEMBER(csplayh5_mux_r);
DECLARE_WRITE16_MEMBER(csplayh5_mux_w);
DECLARE_WRITE16_MEMBER(csplayh5_sound_w);
@ -78,8 +80,6 @@ public:
virtual void machine_reset();
TIMER_DEVICE_CALLBACK_MEMBER(csplayh5_irq);
DECLARE_WRITE_LINE_MEMBER(csplayh5_vdp0_interrupt);
required_device<dac_device> m_dac1;
required_device<dac_device> m_dac2;
};
@ -448,6 +448,12 @@ TIMER_DEVICE_CALLBACK_MEMBER(csplayh5_state::csplayh5_irq)
}
}
static const z80_daisy_config daisy_chain_sound[] =
{
{ "audiocpu:ctc" },
{ NULL }
};
static MACHINE_CONFIG_START( csplayh5, csplayh5_state )
/* basic machine hardware */
@ -466,6 +472,7 @@ static MACHINE_CONFIG_START( csplayh5, csplayh5_state )
#endif
MCFG_CPU_ADD("audiocpu", TMPZ84C011, 8000000) /* TMPZ84C011, unknown clock */
MCFG_CPU_CONFIG(daisy_chain_sound)
MCFG_CPU_PROGRAM_MAP(csplayh5_sound_map)
MCFG_CPU_IO_MAP(csplayh5_sound_io_map)
MCFG_TMPZ84C011_PORTA_WRITE_CB(WRITE8(csplayh5_state, soundcpu_porta_w))

View File

@ -464,11 +464,17 @@ ADDRESS_MAP_END
static const z80_daisy_config daisy_chain_gamecpu[] =
{
{ "gamecpu:ctc" },
{ NULL }
};
static MACHINE_CONFIG_DERIVED_CLASS( kenseim, cps1_12MHz, kenseim_state )
/* basic machine hardware */
MCFG_CPU_ADD("gamecpu", TMPZ84C011, XTAL_16MHz/2) // tmpz84c011-8
MCFG_CPU_CONFIG(daisy_chain_gamecpu)
MCFG_CPU_PROGRAM_MAP(kenseim_map)
MCFG_CPU_IO_MAP(kenseim_io_map)
MCFG_TMPZ84C011_PORTC_WRITE_CB(WRITE8(kenseim_state, cpu_portc_w))

View File

@ -2778,6 +2778,19 @@ static INPUT_PORTS_START( mjegolf )
INPUT_PORTS_END
static const z80_daisy_config daisy_chain_main[] =
{
{ "maincpu:ctc" },
{ NULL }
};
static const z80_daisy_config daisy_chain_sound[] =
{
{ "audiocpu:ctc" },
{ NULL }
};
// the only difference between these 2 setups is the DAC is swapped, is that intentional?
#define OTHERS_TMZ84C011_SOUND_PORTS \
MCFG_TMPZ84C011_PORTA_WRITE_CB(WRITE8(nbmj9195_state, soundcpu_porta_w)) \
@ -2816,11 +2829,13 @@ static MACHINE_CONFIG_START( NBMJDRV1_base, nbmj9195_state )
/* basic machine hardware */
MCFG_CPU_ADD("maincpu", TMPZ84C011, 12000000/2) /* TMPZ84C011, 6.00 MHz */
MCFG_CPU_CONFIG(daisy_chain_main)
MCFG_CPU_PROGRAM_MAP(sailorws_map)
MCFG_CPU_IO_MAP(sailorws_io_map)
MCFG_CPU_VBLANK_INT_DRIVER("screen", nbmj9195_state, ctc0_trg1) /* vblank is connect to ctc trigger */
MCFG_CPU_ADD("audiocpu", TMPZ84C011, 8000000) /* TMPZ84C011, 8.00 MHz */
MCFG_CPU_CONFIG(daisy_chain_sound)
MCFG_CPU_PROGRAM_MAP(sailorws_sound_map)
MCFG_CPU_IO_MAP(sailorws_sound_io_map)
MCFG_DEVICE_MODIFY("audiocpu:ctc")

View File

@ -760,6 +760,11 @@ INTERRUPT_GEN_MEMBER(niyanpai_state::niyanpai_interrupt)
m_tmp68301->external_interrupt_0();
}
static const z80_daisy_config daisy_chain_sound[] =
{
{ "audiocpu:ctc" },
{ NULL }
};
static MACHINE_CONFIG_START( niyanpai, niyanpai_state )
@ -773,6 +778,7 @@ static MACHINE_CONFIG_START( niyanpai, niyanpai_state )
MCFG_TMP68301_OUT_PARALLEL_CB(WRITE16(niyanpai_state, tmp68301_parallel_port_w))
MCFG_CPU_ADD("audiocpu", TMPZ84C011, 8000000) /* TMPZ84C011, 8.00 MHz */
MCFG_CPU_CONFIG(daisy_chain_sound)
MCFG_CPU_PROGRAM_MAP(niyanpai_sound_map)
MCFG_CPU_IO_MAP(niyanpai_sound_io_map)
MCFG_TMPZ84C011_PORTD_READ_CB(READ8(niyanpai_state, cpu_portd_r))