diff options
-rw-r--r-- | .gitattributes | 6 | ||||
-rw-r--r-- | src/mess/audio/dai_snd.c (renamed from src/mess/audio/dai.c) | 4 | ||||
-rw-r--r-- | src/mess/audio/dai_snd.h | 44 | ||||
-rw-r--r-- | src/mess/audio/specimx_snd.c (renamed from src/mess/audio/special.c) | 6 | ||||
-rw-r--r-- | src/mess/audio/specimx_snd.h | 37 | ||||
-rw-r--r-- | src/mess/drivers/special.c | 2 | ||||
-rw-r--r-- | src/mess/includes/dai.h | 37 | ||||
-rw-r--r-- | src/mess/includes/special.h | 30 | ||||
-rw-r--r-- | src/mess/mess.mak | 4 |
9 files changed, 95 insertions, 75 deletions
diff --git a/.gitattributes b/.gitattributes index 6727b6c7526..c6e588d4dee 100644 --- a/.gitattributes +++ b/.gitattributes @@ -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 diff --git a/src/mess/audio/dai.c b/src/mess/audio/dai_snd.c index a4a7ae6454e..a1876b12256 100644 --- a/src/mess/audio/dai.c +++ b/src/mess/audio/dai_snd.c @@ -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>; diff --git a/src/mess/audio/dai_snd.h b/src/mess/audio/dai_snd.h new file mode 100644 index 00000000000..65d32185297 --- /dev/null +++ b/src/mess/audio/dai_snd.h @@ -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_ */ diff --git a/src/mess/audio/special.c b/src/mess/audio/specimx_snd.c index e2fabca2451..4b9063064a8 100644 --- a/src/mess/audio/special.c +++ b/src/mess/audio/specimx_snd.c @@ -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) { diff --git a/src/mess/audio/specimx_snd.h b/src/mess/audio/specimx_snd.h new file mode 100644 index 00000000000..1a046ced050 --- /dev/null +++ b/src/mess/audio/specimx_snd.h @@ -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_ */ diff --git a/src/mess/drivers/special.c b/src/mess/drivers/special.c index 50f7cfb05dc..01a5d3fa15e 100644 --- a/src/mess/drivers/special.c +++ b/src/mess/drivers/special.c @@ -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 */ diff --git a/src/mess/includes/dai.h b/src/mess/includes/dai.h index 80de0fbb5d6..0898d1b2c9f 100644 --- a/src/mess/includes/dai.h +++ b/src/mess/includes/dai.h @@ -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_ */ diff --git a/src/mess/includes/special.h b/src/mess/includes/special.h index 7a7729a763f..9b7dc4ac8b8 100644 --- a/src/mess/includes/special.h +++ b/src/mess/includes/special.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_ */ diff --git a/src/mess/mess.mak b/src/mess/mess.mak index 37f2bcf3574..549a7018708 100644 --- a/src/mess/mess.mak +++ b/src/mess/mess.mak @@ -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 \ |