st_mp200: added s14001a_new_device

This commit is contained in:
hap 2016-01-19 19:34:06 +01:00
parent e65900c490
commit 33bc65e983

View File

@ -19,7 +19,7 @@ ToDo:
#include "machine/genpin.h"
#include "cpu/m6800/m6800.h"
#include "machine/6821pia.h"
#include "sound/s14001a.h"
#include "sound/s14001a_new.h"
#include "st_mp200.lh"
#define S14001_CLOCK (25e5)
@ -81,7 +81,7 @@ private:
virtual void machine_start() override;
virtual void machine_reset() override;
required_device<m6800_cpu_device> m_maincpu;
optional_device<s14001a_device> m_s14001a;
optional_device<s14001a_new_device> m_s14001a;
required_device<pia6821_device> m_pia_u10;
required_device<pia6821_device> m_pia_u11;
required_ioport m_io_test;
@ -323,7 +323,7 @@ WRITE_LINE_MEMBER( st_mp200_state::u10_cb2_w )
{
if (m_su)
{
if (m_s14001a->bsy_r())
if (m_s14001a->busy_r())
m_pia_u11->cb1_w(0);
else
m_pia_u11->cb1_w(state);
@ -338,14 +338,15 @@ WRITE_LINE_MEMBER( st_mp200_state::u11_ca2_w )
{
if BIT(m_u10a, 7)
{
m_s14001a->reg_w(m_u10a & 0x3f);
m_s14001a->rst_w(1);
m_s14001a->rst_w(0);
m_s14001a->data_w(generic_space(), 0, m_u10a & 0x3f);
m_s14001a->start_w(1);
m_s14001a->start_w(0);
}
else
if BIT(m_u10a, 6)
{
m_s14001a->set_volume(((m_u10a & 0x38) >> 3) + 1);
m_s14001a->force_update();
m_s14001a->set_output_gain(0, ((m_u10a >> 3 & 0xf) + 1) / 16.0);
UINT8 clock_divisor = 16 - (m_u10a & 0x07);
@ -537,7 +538,6 @@ WRITE8_MEMBER( st_mp200_state::u11_b_w )
void st_mp200_state::machine_start()
{
m_s14001a->set_volume(0);
}
void st_mp200_state::machine_reset()
@ -619,8 +619,8 @@ MACHINE_CONFIG_END
static MACHINE_CONFIG_DERIVED( st_mp201, st_mp200 )
MCFG_SPEAKER_STANDARD_MONO("mono")
MCFG_SOUND_ADD("speech", S14001A, S14001_CLOCK)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
MCFG_SOUND_ADD("speech", S14001A_NEW, S14001_CLOCK)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.00)
MACHINE_CONFIG_END