Fixed sound on orao (nw)

This commit is contained in:
Miodrag Milanovic 2015-09-06 19:22:05 +02:00
parent b4a6a32e3b
commit c181ecb000
3 changed files with 11 additions and 8 deletions

View File

@ -14,7 +14,7 @@
#include "emu.h"
#include "cpu/m6502/m6502.h"
#include "sound/dac.h"
#include "sound/speaker.h"
#include "sound/wave.h"
#include "includes/orao.h"
#include "imagedev/cassette.h"
@ -183,8 +183,8 @@ static MACHINE_CONFIG_START( orao, orao_state )
/* audio hardware */
MCFG_SPEAKER_STANDARD_MONO("mono")
MCFG_SOUND_ADD("dac", DAC, 0)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 8.00)
MCFG_SOUND_ADD("speaker", SPEAKER_SOUND, 0)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
MCFG_SOUND_WAVE_ADD(WAVE_TAG, "cassette")
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)

View File

@ -8,7 +8,7 @@
#ifndef ORAO_H_
#define ORAO_H_
#include "sound/dac.h"
#include "sound/speaker.h"
#include "imagedev/cassette.h"
class orao_state : public driver_device
@ -19,9 +19,10 @@ public:
m_memory(*this, "memory"),
m_video_ram(*this, "video_ram"),
m_maincpu(*this, "maincpu"),
m_dac(*this, "dac"),
m_speaker(*this, "speaker"),
m_cassette(*this, "cassette"),
m_line(*this, "LINE")
m_line(*this, "LINE"),
m_beep(0)
{ }
DECLARE_READ8_MEMBER(orao_io_r);
@ -36,9 +37,10 @@ private:
required_shared_ptr<UINT8> m_memory;
required_shared_ptr<UINT8> m_video_ram;
required_device<cpu_device> m_maincpu;
required_device<dac_device> m_dac;
required_device<speaker_sound_device> m_speaker;
required_device<cassette_image_device> m_cassette;
required_ioport_array<20> m_line;
UINT8 m_beep;
};
#endif /* ORAO_H_ */

View File

@ -74,6 +74,7 @@ WRITE8_MEMBER(orao_state::orao_io_w)
{
if (offset == 0x0800)
{
m_dac->write_unsigned8(data); //beeper
m_speaker->level_w(m_beep);
m_beep ^= 1;
}
}