Previous 15994 Revisions Next

r15370 Thursday 31st May, 2012 at 14:52:05 UTC by Curt Coder
[VIDBRAIN] Improved sound slightly. [Kurt Woloch]
[src/mess/drivers]vidbrain.c
[src/mess/includes]vidbrain.h

src/mess/includes/vidbrain.h
r15369r15370
88#include "imagedev/cartslot.h"
99#include "machine/f3853.h"
1010#include "machine/ram.h"
11#include "sound/dac.h"
1112#include "sound/discrete.h"
1213#include "video/uv201.h"
1314
r15369r15370
1617#define UV201_TAG         "uv201"
1718#define SCREEN_TAG         "screen"
1819#define DISCRETE_TAG      "discrete"
20#define DAC_TAG            "dac"
1921
2022class vidbrain_state : public driver_device
2123{
r15369r15370
2628        m_smi(*this, F3853_TAG),
2729        m_uv(*this, UV201_TAG),
2830        m_discrete(*this, DISCRETE_TAG),
31         m_dac(*this, DAC_TAG),
2932        m_screen(*this, SCREEN_TAG)
3033   { }
3134
r15369r15370
3336   required_device<f3853_device> m_smi;
3437   required_device<uv201_device> m_uv;
3538   required_device<device_t> m_discrete;
39   required_device<device_t> m_dac;
3640   required_device<screen_device> m_screen;
3741
3842   virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr);
src/mess/drivers/vidbrain.c
r15369r15370
135135
136136   if (!m_sound_clk && sound_clk)
137137   {
138      discrete_sound_w(m_discrete, NODE_01, m_keylatch & 0x03);
138      //discrete_sound_w(m_discrete, NODE_01, m_keylatch & 0x03);
139
140      UINT8 dac_data = 0;
141
142      switch (m_keylatch & 0x03)
143      {
144      case 0: dac_data = 0x00; break;
145      case 1: dac_data = 0x55; break;
146      case 2: dac_data = 0xaa; break;
147      case 3: dac_data = 0xff; break;
148      }
149
150      dac_data_w(m_dac, dac_data);
139151   }
140152
141153   m_sound_clk = sound_clk;
r15369r15370
544556   MCFG_SOUND_ADD(DISCRETE_TAG, DISCRETE, 0)
545557   MCFG_SOUND_CONFIG_DISCRETE(vidbrain)
546558   MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.80)
559   MCFG_SOUND_ADD(DAC_TAG, DAC, 0)
560   MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
547561
548562   // devices
549563   MCFG_F3853_ADD(F3853_TAG, XTAL_14_31818MHz/8, smi_intf)

Previous 15994 Revisions Next


© 1998-2018 The MESS Team