mirror of
https://github.com/holub/mame
synced 2025-06-06 12:53:46 +03:00
given to another couple of sound devices their own include. nw.
This commit is contained in:
parent
b67e8155b6
commit
b9ba2fc331
6
.gitattributes
vendored
6
.gitattributes
vendored
@ -8034,7 +8034,8 @@ src/mess/audio/arcadia.c svneol=native#text/plain
|
||||
src/mess/audio/arcadia.h svneol=native#text/plain
|
||||
src/mess/audio/channelf.c svneol=native#text/plain
|
||||
src/mess/audio/channelf.h svneol=native#text/plain
|
||||
src/mess/audio/dai.c svneol=native#text/plain
|
||||
src/mess/audio/dai_snd.c svneol=native#text/plain
|
||||
src/mess/audio/dai_snd.h svneol=native#text/plain
|
||||
src/mess/audio/dave.c svneol=native#text/plain
|
||||
src/mess/audio/dave.h svneol=native#text/plain
|
||||
src/mess/audio/gb.c svneol=native#text/plain
|
||||
@ -8046,7 +8047,8 @@ src/mess/audio/mea8000.c svneol=native#text/plain
|
||||
src/mess/audio/mea8000.h svneol=native#text/plain
|
||||
src/mess/audio/socrates.c svneol=native#text/plain
|
||||
src/mess/audio/socrates.h svneol=native#text/plain
|
||||
src/mess/audio/special.c svneol=native#text/plain
|
||||
src/mess/audio/specimx_snd.c svneol=native#text/plain
|
||||
src/mess/audio/specimx_snd.h svneol=native#text/plain
|
||||
src/mess/audio/svision.c svneol=native#text/plain
|
||||
src/mess/audio/tvc_snd.c svneol=native#text/plain
|
||||
src/mess/audio/tvc_snd.h svneol=native#text/plain
|
||||
|
@ -1,6 +1,6 @@
|
||||
/***************************************************************************
|
||||
|
||||
audio/dai.c
|
||||
audio/dai_snd.c
|
||||
|
||||
Functions to emulate sound hardware of DAI Personal Computer
|
||||
|
||||
@ -9,7 +9,7 @@
|
||||
****************************************************************************/
|
||||
|
||||
#include "emu.h"
|
||||
#include "includes/dai.h"
|
||||
#include "dai_snd.h"
|
||||
|
||||
// device type definition
|
||||
const device_type DAI_SOUND = &device_creator<dai_sound_device>;
|
44
src/mess/audio/dai_snd.h
Normal file
44
src/mess/audio/dai_snd.h
Normal file
@ -0,0 +1,44 @@
|
||||
/*****************************************************************************
|
||||
*
|
||||
* dai_snd.h
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef DAI_SND_H_
|
||||
#define DAI_SND_H_
|
||||
|
||||
#include "emu.h"
|
||||
|
||||
// ======================> dai_sound_device
|
||||
|
||||
class dai_sound_device : public device_t,
|
||||
public device_sound_interface
|
||||
{
|
||||
public:
|
||||
// construction/destruction
|
||||
dai_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
|
||||
|
||||
DECLARE_WRITE_LINE_MEMBER(set_input_ch0);
|
||||
DECLARE_WRITE_LINE_MEMBER(set_input_ch1);
|
||||
DECLARE_WRITE_LINE_MEMBER(set_input_ch2);
|
||||
DECLARE_WRITE8_MEMBER(set_volume);
|
||||
|
||||
protected:
|
||||
// device-level overrides
|
||||
virtual void device_start();
|
||||
virtual void device_reset();
|
||||
virtual void sound_stream_update(sound_stream &stream, stream_sample_t **inputs, stream_sample_t **outputs, int samples);
|
||||
|
||||
private:
|
||||
sound_stream * m_mixer_channel;
|
||||
int m_dai_input[3];
|
||||
UINT8 m_osc_volume[3];
|
||||
UINT8 m_noise_volume;
|
||||
|
||||
static const UINT16 s_osc_volume_table[];
|
||||
static const UINT16 s_noise_volume_table[];
|
||||
};
|
||||
|
||||
extern const device_type DAI_SOUND;
|
||||
|
||||
#endif /* DAI_H_ */
|
@ -7,11 +7,11 @@
|
||||
|
||||
****************************************************************************/
|
||||
|
||||
#include "includes/special.h"
|
||||
#include "specimx_snd.h"
|
||||
|
||||
|
||||
// device type definition
|
||||
const device_type SPECIMX = &device_creator<specimx_sound_device>;
|
||||
const device_type SPECIMX_SND = &device_creator<specimx_sound_device>;
|
||||
|
||||
|
||||
//**************************************************************************
|
||||
@ -23,7 +23,7 @@ const device_type SPECIMX = &device_creator<specimx_sound_device>;
|
||||
//-------------------------------------------------
|
||||
|
||||
specimx_sound_device::specimx_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
|
||||
: device_t(mconfig, SPECIMX, "Specialist MX Audio Custom", tag, owner, clock, "specimx_sound", __FILE__),
|
||||
: device_t(mconfig, SPECIMX_SND, "Specialist MX Audio Custom", tag, owner, clock, "specimx_sound", __FILE__),
|
||||
device_sound_interface(mconfig, *this),
|
||||
m_mixer_channel(NULL)
|
||||
{
|
37
src/mess/audio/specimx_snd.h
Normal file
37
src/mess/audio/specimx_snd.h
Normal file
@ -0,0 +1,37 @@
|
||||
/*****************************************************************************
|
||||
*
|
||||
* specimx_snd.h
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef SPECIAL_SND_H_
|
||||
#define SPECIAL_SND_H_
|
||||
|
||||
#include "emu.h"
|
||||
|
||||
class specimx_sound_device : public device_t,
|
||||
public device_sound_interface
|
||||
{
|
||||
public:
|
||||
specimx_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
|
||||
~specimx_sound_device() { }
|
||||
|
||||
DECLARE_WRITE_LINE_MEMBER(set_input_ch0);
|
||||
DECLARE_WRITE_LINE_MEMBER(set_input_ch1);
|
||||
DECLARE_WRITE_LINE_MEMBER(set_input_ch2);
|
||||
|
||||
protected:
|
||||
// device-level overrides
|
||||
virtual void device_start();
|
||||
|
||||
// sound stream update overrides
|
||||
virtual void sound_stream_update(sound_stream &stream, stream_sample_t **inputs, stream_sample_t **outputs, int samples);
|
||||
|
||||
private:
|
||||
sound_stream *m_mixer_channel;
|
||||
int m_specimx_input[3];
|
||||
};
|
||||
|
||||
extern const device_type SPECIMX_SND;
|
||||
|
||||
#endif /* SPECIAL_SND_H_ */
|
@ -433,7 +433,7 @@ static MACHINE_CONFIG_DERIVED( specimx, special )
|
||||
MCFG_PALETTE_INIT_OWNER(special_state, specimx )
|
||||
|
||||
/* audio hardware */
|
||||
MCFG_SOUND_ADD("custom", SPECIMX, 0)
|
||||
MCFG_SOUND_ADD("custom", SPECIMX_SND, 0)
|
||||
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.00)
|
||||
|
||||
/* Devices */
|
||||
|
@ -8,6 +8,7 @@
|
||||
#define DAI_H_
|
||||
|
||||
#include "cpu/i8085/i8085.h"
|
||||
#include "audio/dai_snd.h"
|
||||
#include "machine/i8255.h"
|
||||
#include "machine/pit8253.h"
|
||||
#include "machine/ram.h"
|
||||
@ -16,38 +17,6 @@
|
||||
#include "sound/wave.h"
|
||||
|
||||
|
||||
// ======================> dai_sound_device
|
||||
|
||||
class dai_sound_device : public device_t,
|
||||
public device_sound_interface
|
||||
{
|
||||
public:
|
||||
// construction/destruction
|
||||
dai_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
|
||||
|
||||
DECLARE_WRITE_LINE_MEMBER(set_input_ch0);
|
||||
DECLARE_WRITE_LINE_MEMBER(set_input_ch1);
|
||||
DECLARE_WRITE_LINE_MEMBER(set_input_ch2);
|
||||
DECLARE_WRITE8_MEMBER(set_volume);
|
||||
|
||||
protected:
|
||||
// device-level overrides
|
||||
virtual void device_start();
|
||||
virtual void device_reset();
|
||||
virtual void sound_stream_update(sound_stream &stream, stream_sample_t **inputs, stream_sample_t **outputs, int samples);
|
||||
|
||||
private:
|
||||
sound_stream * m_mixer_channel;
|
||||
int m_dai_input[3];
|
||||
UINT8 m_osc_volume[3];
|
||||
UINT8 m_noise_volume;
|
||||
|
||||
static const UINT16 s_osc_volume_table[];
|
||||
static const UINT16 s_noise_volume_table[];
|
||||
};
|
||||
|
||||
|
||||
|
||||
class dai_state : public driver_device
|
||||
{
|
||||
public:
|
||||
@ -107,8 +76,4 @@ protected:
|
||||
extern const unsigned char dai_palette[16*3];
|
||||
|
||||
|
||||
/*----------- defined in audio/dai.c -----------*/
|
||||
|
||||
extern const device_type DAI_SOUND;
|
||||
|
||||
#endif /* DAI_H_ */
|
||||
|
@ -10,6 +10,7 @@
|
||||
#include "emu.h"
|
||||
#include "cpu/z80/z80.h"
|
||||
#include "cpu/i8085/i8085.h"
|
||||
#include "audio/specimx_snd.h"
|
||||
#include "sound/dac.h"
|
||||
#include "sound/wave.h"
|
||||
#include "machine/i8255.h"
|
||||
@ -21,8 +22,6 @@
|
||||
#include "machine/ram.h"
|
||||
|
||||
|
||||
class specimx_sound_device; // defined below
|
||||
|
||||
class special_state : public driver_device
|
||||
{
|
||||
public:
|
||||
@ -154,31 +153,4 @@ protected:
|
||||
extern const rgb_t specimx_palette[16];
|
||||
|
||||
|
||||
/*----------- defined in audio/special.c -----------*/
|
||||
|
||||
class specimx_sound_device : public device_t,
|
||||
public device_sound_interface
|
||||
{
|
||||
public:
|
||||
specimx_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
|
||||
~specimx_sound_device() { }
|
||||
|
||||
DECLARE_WRITE_LINE_MEMBER(set_input_ch0);
|
||||
DECLARE_WRITE_LINE_MEMBER(set_input_ch1);
|
||||
DECLARE_WRITE_LINE_MEMBER(set_input_ch2);
|
||||
|
||||
protected:
|
||||
// device-level overrides
|
||||
virtual void device_start();
|
||||
|
||||
// sound stream update overrides
|
||||
virtual void sound_stream_update(sound_stream &stream, stream_sample_t **inputs, stream_sample_t **outputs, int samples);
|
||||
|
||||
private:
|
||||
sound_stream *m_mixer_channel;
|
||||
int m_specimx_input[3];
|
||||
};
|
||||
|
||||
extern const device_type SPECIMX;
|
||||
|
||||
#endif /* SPECIAL_H_ */
|
||||
|
@ -1123,7 +1123,7 @@ $(MESSOBJ)/cybiko.a: \
|
||||
$(MESS_DRIVERS)/cybiko.o $(MESS_MACHINE)/cybiko.o \
|
||||
|
||||
$(MESSOBJ)/dai.a: \
|
||||
$(MESS_DRIVERS)/dai.o $(MESS_AUDIO)/dai.o $(MESS_MACHINE)/dai.o $(MESS_VIDEO)/dai.o \
|
||||
$(MESS_DRIVERS)/dai.o $(MESS_AUDIO)/dai_snd.o $(MESS_MACHINE)/dai.o $(MESS_VIDEO)/dai.o \
|
||||
|
||||
$(MESSOBJ)/ddr.a: \
|
||||
$(MESS_DRIVERS)/ac1.o $(MESS_MACHINE)/ac1.o $(MESS_VIDEO)/ac1.o \
|
||||
@ -1628,7 +1628,7 @@ $(MESSOBJ)/sord.a: \
|
||||
$(MESS_DRIVERS)/m5.o \
|
||||
|
||||
$(MESSOBJ)/special.a: \
|
||||
$(MESS_DRIVERS)/special.o $(MESS_AUDIO)/special.o $(MESS_MACHINE)/special.o $(MESS_VIDEO)/special.o \
|
||||
$(MESS_DRIVERS)/special.o $(MESS_AUDIO)/specimx_snd.o $(MESS_MACHINE)/special.o $(MESS_VIDEO)/special.o \
|
||||
|
||||
$(MESSOBJ)/sun.a: \
|
||||
$(MESS_DRIVERS)/sun1.o \
|
||||
|
Loading…
Reference in New Issue
Block a user