mirror of
https://github.com/holub/mame
synced 2025-04-21 07:52:35 +03:00
given to a couple of sound devices their own include. nw.
This commit is contained in:
parent
5e5708da2a
commit
4ebee5fd3f
6
.gitattributes
vendored
6
.gitattributes
vendored
@ -8054,8 +8054,10 @@ src/mess/audio/upd1771.c svneol=native#text/plain
|
||||
src/mess/audio/upd1771.h svneol=native#text/plain
|
||||
src/mess/audio/vboy.c svneol=native#text/plain
|
||||
src/mess/audio/vboy.h svneol=native#text/plain
|
||||
src/mess/audio/vc4000.c svneol=native#text/plain
|
||||
src/mess/audio/wswan.c svneol=native#text/plain
|
||||
src/mess/audio/vc4000snd.c svneol=native#text/plain
|
||||
src/mess/audio/vc4000snd.h svneol=native#text/plain
|
||||
src/mess/audio/wswan_snd.c svneol=native#text/plain
|
||||
src/mess/audio/wswan_snd.h svneol=native#text/plain
|
||||
src/mess/drivers/4004clk.c svneol=native#text/plain
|
||||
src/mess/drivers/68ksbc.c svneol=native#text/plain
|
||||
src/mess/drivers/a2600.c svneol=native#text/plain
|
||||
|
@ -5,13 +5,13 @@
|
||||
|
||||
***************************************************************************/
|
||||
|
||||
#include "includes/vc4000.h"
|
||||
#include "vc4000snd.h"
|
||||
|
||||
|
||||
const device_type VC4000 = &device_creator<vc4000_sound_device>;
|
||||
const device_type VC4000_SND = &device_creator<vc4000_sound_device>;
|
||||
|
||||
vc4000_sound_device::vc4000_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
|
||||
: device_t(mconfig, VC4000, "Intertion Electronic VC 4000 Audio Custom", tag, owner, clock, "vc4000_sound", __FILE__),
|
||||
: device_t(mconfig, VC4000_SND, "Intertion Electronic VC 4000 Audio Custom", tag, owner, clock, "vc4000_sound", __FILE__),
|
||||
device_sound_interface(mconfig, *this),
|
||||
m_channel(NULL),
|
||||
m_size(0),
|
45
src/mess/audio/vc4000snd.h
Normal file
45
src/mess/audio/vc4000snd.h
Normal file
@ -0,0 +1,45 @@
|
||||
/*****************************************************************************
|
||||
*
|
||||
* includes/vc4000snd.h
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef _VC4000SND_H_
|
||||
#define _VC4000SND_H_
|
||||
|
||||
#include "emu.h"
|
||||
|
||||
//**************************************************************************
|
||||
// TYPE DEFINITIONS
|
||||
//**************************************************************************
|
||||
|
||||
// ======================> vc4000_sound_device
|
||||
|
||||
class vc4000_sound_device : public device_t,
|
||||
public device_sound_interface
|
||||
{
|
||||
public:
|
||||
vc4000_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
|
||||
~vc4000_sound_device() { }
|
||||
|
||||
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);
|
||||
|
||||
public:
|
||||
void soundport_w(int mode, int data);
|
||||
|
||||
private:
|
||||
sound_stream *m_channel;
|
||||
UINT8 m_reg[1];
|
||||
int m_size;
|
||||
int m_pos;
|
||||
unsigned m_level;
|
||||
};
|
||||
|
||||
extern const device_type VC4000_SND;
|
||||
|
||||
#endif /* _VC4000SND_H_ */
|
@ -11,11 +11,11 @@ The noise taps and behavior are the same as the Virtual Boy.
|
||||
|
||||
**************************************************************************************/
|
||||
|
||||
#include "includes/wswan.h"
|
||||
#include "wswan_snd.h"
|
||||
|
||||
|
||||
// device type definition
|
||||
const device_type WSWAN = &device_creator<wswan_sound_device>;
|
||||
const device_type WSWAN_SND = &device_creator<wswan_sound_device>;
|
||||
|
||||
|
||||
//**************************************************************************
|
||||
@ -27,7 +27,7 @@ const device_type WSWAN = &device_creator<wswan_sound_device>;
|
||||
//-------------------------------------------------
|
||||
|
||||
wswan_sound_device::wswan_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
|
||||
: device_t(mconfig, WSWAN, "WonderSwan Audio Custom", tag, owner, clock, "wswan_sound", __FILE__),
|
||||
: device_t(mconfig, WSWAN_SND, "WonderSwan Audio Custom", tag, owner, clock, "wswan_sound", __FILE__),
|
||||
device_sound_interface(mconfig, *this),
|
||||
m_channel(NULL),
|
||||
m_sweep_step(0),
|
89
src/mess/audio/wswan_snd.h
Normal file
89
src/mess/audio/wswan_snd.h
Normal file
@ -0,0 +1,89 @@
|
||||
/*****************************************************************************
|
||||
*
|
||||
* includes/wswan_snd.h
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
#pragma once
|
||||
|
||||
#ifndef _WSWAN_SND_H_
|
||||
#define _WSWAN_SND_H_
|
||||
|
||||
#include "emu.h"
|
||||
|
||||
//**************************************************************************
|
||||
// TYPE DEFINITIONS
|
||||
//**************************************************************************
|
||||
|
||||
struct CHAN
|
||||
{
|
||||
CHAN() :
|
||||
freq(0),
|
||||
period(0),
|
||||
pos(0),
|
||||
vol_left(0),
|
||||
vol_right(0),
|
||||
on(0),
|
||||
signal(0) { }
|
||||
|
||||
UINT16 freq; /* frequency */
|
||||
UINT32 period; /* period */
|
||||
UINT32 pos; /* position */
|
||||
UINT8 vol_left; /* volume left */
|
||||
UINT8 vol_right; /* volume right */
|
||||
UINT8 on; /* on/off */
|
||||
INT8 signal; /* signal */
|
||||
};
|
||||
|
||||
|
||||
// ======================> wswan_sound_device
|
||||
|
||||
class wswan_sound_device : public device_t,
|
||||
public device_sound_interface
|
||||
{
|
||||
public:
|
||||
wswan_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
|
||||
~wswan_sound_device() { }
|
||||
|
||||
protected:
|
||||
// device-level overrides
|
||||
virtual void device_start();
|
||||
virtual void device_reset();
|
||||
|
||||
// sound stream update overrides
|
||||
virtual void sound_stream_update(sound_stream &stream, stream_sample_t **inputs, stream_sample_t **outputs, int samples);
|
||||
|
||||
public:
|
||||
DECLARE_WRITE8_MEMBER( port_w );
|
||||
|
||||
private:
|
||||
void wswan_ch_set_freq( CHAN *ch, UINT16 freq );
|
||||
|
||||
private:
|
||||
sound_stream *m_channel;
|
||||
CHAN m_audio1; /* Audio channel 1 */
|
||||
CHAN m_audio2; /* Audio channel 2 */
|
||||
CHAN m_audio3; /* Audio channel 3 */
|
||||
CHAN m_audio4; /* Audio channel 4 */
|
||||
INT8 m_sweep_step; /* Sweep step */
|
||||
UINT32 m_sweep_time; /* Sweep time */
|
||||
UINT32 m_sweep_count; /* Sweep counter */
|
||||
UINT8 m_noise_type; /* Noise generator type */
|
||||
UINT8 m_noise_reset; /* Noise reset */
|
||||
UINT8 m_noise_enable; /* Noise enable */
|
||||
UINT16 m_sample_address; /* Sample address */
|
||||
UINT8 m_audio2_voice; /* Audio 2 voice */
|
||||
UINT8 m_audio3_sweep; /* Audio 3 sweep */
|
||||
UINT8 m_audio4_noise; /* Audio 4 noise */
|
||||
UINT8 m_mono; /* mono */
|
||||
UINT8 m_voice_data; /* voice data */
|
||||
UINT8 m_output_volume; /* output volume */
|
||||
UINT8 m_external_stereo; /* external stereo */
|
||||
UINT8 m_external_speaker; /* external speaker */
|
||||
UINT16 m_noise_shift; /* Noise counter shift register */
|
||||
UINT8 m_master_volume; /* Master volume */
|
||||
};
|
||||
|
||||
extern const device_type WSWAN_SND;
|
||||
|
||||
#endif
|
@ -539,7 +539,7 @@ static MACHINE_CONFIG_START( vc4000, vc4000_state )
|
||||
|
||||
/* sound hardware */
|
||||
MCFG_SPEAKER_STANDARD_MONO("mono")
|
||||
MCFG_SOUND_ADD("custom", VC4000, 0)
|
||||
MCFG_SOUND_ADD("custom", VC4000_SND, 0)
|
||||
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
|
||||
|
||||
/* quickload */
|
||||
|
@ -126,7 +126,7 @@ static MACHINE_CONFIG_START( wswan, wswan_state )
|
||||
|
||||
/* sound hardware */
|
||||
MCFG_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker")
|
||||
MCFG_SOUND_ADD("custom", WSWAN, 0)
|
||||
MCFG_SOUND_ADD("custom", WSWAN_SND, 0)
|
||||
MCFG_SOUND_ROUTE(0, "lspeaker", 0.50)
|
||||
MCFG_SOUND_ROUTE(1, "rspeaker", 0.50)
|
||||
|
||||
|
@ -8,6 +8,7 @@
|
||||
#define VC4000_H_
|
||||
|
||||
#include "emu.h"
|
||||
#include "audio/vc4000snd.h"
|
||||
#include "cpu/s2650/s2650.h"
|
||||
#include "imagedev/snapquik.h"
|
||||
#include "imagedev/cassette.h"
|
||||
@ -148,39 +149,4 @@ protected:
|
||||
inline void vc4000_draw_grid(UINT8 *collision);
|
||||
};
|
||||
|
||||
/*----------- defined in audio/vc4000.c -----------*/
|
||||
|
||||
//**************************************************************************
|
||||
// TYPE DEFINITIONS
|
||||
//**************************************************************************
|
||||
|
||||
// ======================> vc4000_sound_device
|
||||
|
||||
class vc4000_sound_device : public device_t,
|
||||
public device_sound_interface
|
||||
{
|
||||
public:
|
||||
vc4000_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
|
||||
~vc4000_sound_device() { }
|
||||
|
||||
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);
|
||||
|
||||
public:
|
||||
void soundport_w(int mode, int data);
|
||||
|
||||
private:
|
||||
sound_stream *m_channel;
|
||||
UINT8 m_reg[1];
|
||||
int m_size;
|
||||
int m_pos;
|
||||
unsigned m_level;
|
||||
};
|
||||
|
||||
extern const device_type VC4000;
|
||||
|
||||
#endif /* VC4000_H_ */
|
||||
|
@ -17,6 +17,7 @@
|
||||
|
||||
#include "emu.h"
|
||||
#include "cpu/v30mz/v30mz.h"
|
||||
#include "audio/wswan_snd.h"
|
||||
#include "machine/nvram.h"
|
||||
#include "bus/wswan/slot.h"
|
||||
#include "bus/wswan/rom.h"
|
||||
@ -75,8 +76,6 @@ struct VDP
|
||||
emu_timer *timer;
|
||||
};
|
||||
|
||||
class wswan_sound_device;
|
||||
|
||||
|
||||
class wswan_state : public driver_device
|
||||
{
|
||||
@ -161,82 +160,4 @@ protected:
|
||||
};
|
||||
|
||||
|
||||
/*----------- defined in audio/wswan.c -----------*/
|
||||
|
||||
//**************************************************************************
|
||||
// TYPE DEFINITIONS
|
||||
//**************************************************************************
|
||||
|
||||
struct CHAN
|
||||
{
|
||||
CHAN() :
|
||||
freq(0),
|
||||
period(0),
|
||||
pos(0),
|
||||
vol_left(0),
|
||||
vol_right(0),
|
||||
on(0),
|
||||
signal(0) { }
|
||||
|
||||
UINT16 freq; /* frequency */
|
||||
UINT32 period; /* period */
|
||||
UINT32 pos; /* position */
|
||||
UINT8 vol_left; /* volume left */
|
||||
UINT8 vol_right; /* volume right */
|
||||
UINT8 on; /* on/off */
|
||||
INT8 signal; /* signal */
|
||||
};
|
||||
|
||||
|
||||
// ======================> wswan_sound_device
|
||||
|
||||
class wswan_sound_device : public device_t,
|
||||
public device_sound_interface
|
||||
{
|
||||
public:
|
||||
wswan_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
|
||||
~wswan_sound_device() { }
|
||||
|
||||
protected:
|
||||
// device-level overrides
|
||||
virtual void device_start();
|
||||
virtual void device_reset();
|
||||
|
||||
// sound stream update overrides
|
||||
virtual void sound_stream_update(sound_stream &stream, stream_sample_t **inputs, stream_sample_t **outputs, int samples);
|
||||
|
||||
public:
|
||||
DECLARE_WRITE8_MEMBER( port_w );
|
||||
|
||||
private:
|
||||
void wswan_ch_set_freq( CHAN *ch, UINT16 freq );
|
||||
|
||||
private:
|
||||
sound_stream *m_channel;
|
||||
CHAN m_audio1; /* Audio channel 1 */
|
||||
CHAN m_audio2; /* Audio channel 2 */
|
||||
CHAN m_audio3; /* Audio channel 3 */
|
||||
CHAN m_audio4; /* Audio channel 4 */
|
||||
INT8 m_sweep_step; /* Sweep step */
|
||||
UINT32 m_sweep_time; /* Sweep time */
|
||||
UINT32 m_sweep_count; /* Sweep counter */
|
||||
UINT8 m_noise_type; /* Noise generator type */
|
||||
UINT8 m_noise_reset; /* Noise reset */
|
||||
UINT8 m_noise_enable; /* Noise enable */
|
||||
UINT16 m_sample_address; /* Sample address */
|
||||
UINT8 m_audio2_voice; /* Audio 2 voice */
|
||||
UINT8 m_audio3_sweep; /* Audio 3 sweep */
|
||||
UINT8 m_audio4_noise; /* Audio 4 noise */
|
||||
UINT8 m_mono; /* mono */
|
||||
UINT8 m_voice_data; /* voice data */
|
||||
UINT8 m_output_volume; /* output volume */
|
||||
UINT8 m_external_stereo; /* external stereo */
|
||||
UINT8 m_external_speaker; /* external speaker */
|
||||
UINT16 m_noise_shift; /* Noise counter shift register */
|
||||
UINT8 m_master_volume; /* Master volume */
|
||||
};
|
||||
|
||||
extern const device_type WSWAN;
|
||||
|
||||
|
||||
#endif /* WSWAN_H_ */
|
||||
|
@ -1026,7 +1026,7 @@ $(MESSOBJ)/bally.a: \
|
||||
$(MESSOBJ)/bandai.a: \
|
||||
$(MESS_DRIVERS)/sv8000.o \
|
||||
$(MESS_DRIVERS)/rx78.o \
|
||||
$(MESS_DRIVERS)/wswan.o $(MESS_AUDIO)/wswan.o $(MESS_MACHINE)/wswan.o $(MESS_VIDEO)/wswan.o \
|
||||
$(MESS_DRIVERS)/wswan.o $(MESS_AUDIO)/wswan_snd.o $(MESS_MACHINE)/wswan.o $(MESS_VIDEO)/wswan.o \
|
||||
|
||||
$(MESSOBJ)/be.a: \
|
||||
$(MESS_DRIVERS)/bebox.o $(MESS_MACHINE)/bebox.o \
|
||||
@ -1308,7 +1308,7 @@ $(MESSOBJ)/imp.a: \
|
||||
$(MESS_DRIVERS)/tim100.o \
|
||||
|
||||
$(MESSOBJ)/interton.a: \
|
||||
$(MESS_DRIVERS)/vc4000.o $(MESS_AUDIO)/vc4000.o $(MESS_VIDEO)/vc4000.o \
|
||||
$(MESS_DRIVERS)/vc4000.o $(MESS_AUDIO)/vc4000snd.o $(MESS_VIDEO)/vc4000.o \
|
||||
|
||||
$(MESSOBJ)/intv.a: \
|
||||
$(MESS_DRIVERS)/intv.o $(MESS_MACHINE)/intv.o $(MESS_VIDEO)/intv.o $(MESS_VIDEO)/stic.o \
|
||||
|
Loading…
Reference in New Issue
Block a user