mirror of
https://github.com/holub/mame
synced 2025-05-24 06:30:04 +03:00
Updated sound devices not cover with previous patches (used only by MESS) (no whatsnew)
This commit is contained in:
parent
420e1e0ad5
commit
e4dbd5dc83
@ -533,4 +533,4 @@ void adpcm_state::compute_tables()
|
||||
}
|
||||
}
|
||||
|
||||
const device_type SOUND_OKIM6295 = okim6295_device_config::static_alloc_device_config;
|
||||
const device_type OKIM6295 = okim6295_device_config::static_alloc_device_config;
|
||||
|
@ -32,11 +32,11 @@ enum
|
||||
//**************************************************************************
|
||||
|
||||
#define MDRV_OKIM6295_ADD(_tag, _clock, _pin7) \
|
||||
MDRV_DEVICE_ADD(_tag, SOUND_OKIM6295, _clock) \
|
||||
MDRV_DEVICE_ADD(_tag, OKIM6295, _clock) \
|
||||
MDRV_OKIM6295_PIN7(_pin7)
|
||||
|
||||
#define MDRV_OKIM6295_REPLACE(_tag, _clock, _pin7) \
|
||||
MDRV_DEVICE_REPLACE(_tag, SOUND_OKIM6295, _clock) \
|
||||
MDRV_DEVICE_REPLACE(_tag, OKIM6295, _clock) \
|
||||
MDRV_OKIM6295_PIN7(_pin7)
|
||||
|
||||
#define MDRV_OKIM6295_PIN7(_pin7) \
|
||||
@ -167,7 +167,7 @@ protected:
|
||||
|
||||
|
||||
// device type definition
|
||||
extern const device_type SOUND_OKIM6295;
|
||||
extern const device_type OKIM6295;
|
||||
|
||||
|
||||
|
||||
|
@ -53,7 +53,7 @@ static void MixerInit(int threeVoiceAmplify)
|
||||
}
|
||||
|
||||
|
||||
INLINE void syncEm(SID6581 *This)
|
||||
INLINE void syncEm(_SID6581 *This)
|
||||
{
|
||||
int sync1 = (This->optr1.modulator->cycleLenCount <= 0);
|
||||
int sync2 = (This->optr2.modulator->cycleLenCount <= 0);
|
||||
@ -96,7 +96,7 @@ INLINE void syncEm(SID6581 *This)
|
||||
}
|
||||
|
||||
|
||||
void sidEmuFillBuffer(SID6581 *This, stream_sample_t *buffer, UINT32 bufferLen )
|
||||
void sidEmuFillBuffer(_SID6581 *This, stream_sample_t *buffer, UINT32 bufferLen )
|
||||
{
|
||||
//void* fill16bitMono( SID6581 *This, void* buffer, UINT32 numberOfSamples )
|
||||
|
||||
@ -121,7 +121,7 @@ void sidEmuFillBuffer(SID6581 *This, stream_sample_t *buffer, UINT32 bufferLen )
|
||||
|
||||
/* Reset. */
|
||||
|
||||
int sidEmuReset(SID6581 *This)
|
||||
int sidEmuReset(_SID6581 *This)
|
||||
{
|
||||
sidClearOperator( &This->optr1 );
|
||||
enveEmuResetOperator( &This->optr1 );
|
||||
@ -208,7 +208,7 @@ static void filterTableInit(running_machine *machine)
|
||||
filterResTable[15] = resDyMax;
|
||||
}
|
||||
|
||||
void sid6581_init (SID6581 *This)
|
||||
void sid6581_init (_SID6581 *This)
|
||||
{
|
||||
This->optr1.sid=This;
|
||||
This->optr2.sid=This;
|
||||
@ -245,7 +245,7 @@ void sid6581_init (SID6581 *This)
|
||||
sidEmuReset(This);
|
||||
}
|
||||
|
||||
void sid6581_port_w (SID6581 *This, int offset, int data)
|
||||
void sid6581_port_w (_SID6581 *This, int offset, int data)
|
||||
{
|
||||
offset &= 0x1f;
|
||||
|
||||
@ -323,7 +323,7 @@ void sid6581_port_w (SID6581 *This, int offset, int data)
|
||||
}
|
||||
}
|
||||
|
||||
int sid6581_port_r (running_machine *machine, SID6581 *This, int offset)
|
||||
int sid6581_port_r (running_machine *machine, _SID6581 *This, int offset)
|
||||
{
|
||||
int data;
|
||||
/* SIDPLAY reads last written at a sid address value */
|
||||
|
@ -13,7 +13,7 @@
|
||||
#include "streams.h"
|
||||
|
||||
/* private area */
|
||||
typedef struct _SID6581
|
||||
typedef struct __SID6581
|
||||
{
|
||||
running_device *device;
|
||||
sound_stream *mixer_channel; // mame stream/ mixer channel
|
||||
@ -53,15 +53,15 @@ typedef struct _SID6581
|
||||
|
||||
sidOperator optr1, optr2, optr3;
|
||||
int optr3_outputmask;
|
||||
} SID6581;
|
||||
} _SID6581;
|
||||
|
||||
void sid6581_init (SID6581 *This);
|
||||
void sid6581_init (_SID6581 *This);
|
||||
|
||||
int sidEmuReset(SID6581 *This);
|
||||
int sidEmuReset(_SID6581 *This);
|
||||
|
||||
int sid6581_port_r (running_machine *machine, SID6581 *This, int offset);
|
||||
void sid6581_port_w (SID6581 *This, int offset, int data);
|
||||
int sid6581_port_r (running_machine *machine, _SID6581 *This, int offset);
|
||||
void sid6581_port_w (_SID6581 *This, int offset, int data);
|
||||
|
||||
void sidEmuFillBuffer(SID6581 *This, stream_sample_t *buffer, UINT32 bufferLen );
|
||||
void sidEmuFillBuffer(_SID6581 *This, stream_sample_t *buffer, UINT32 bufferLen );
|
||||
|
||||
#endif /* __SID_H__ */
|
||||
|
@ -12,18 +12,18 @@
|
||||
|
||||
|
||||
|
||||
static SID6581 *get_sid(running_device *device)
|
||||
static _SID6581 *get_sid(running_device *device)
|
||||
{
|
||||
assert(device != NULL);
|
||||
assert((device->type() == SID6581) || (device->type() == SID8580));
|
||||
return (SID6581 *) downcast<legacy_device_base *>(device)->token();
|
||||
return (_SID6581 *) downcast<legacy_device_base *>(device)->token();
|
||||
}
|
||||
|
||||
|
||||
|
||||
static STREAM_UPDATE( sid_update )
|
||||
{
|
||||
SID6581 *sid = (SID6581 *) param;
|
||||
_SID6581 *sid = (_SID6581 *) param;
|
||||
sidEmuFillBuffer(sid, outputs[0], samples);
|
||||
}
|
||||
|
||||
@ -31,7 +31,7 @@ static STREAM_UPDATE( sid_update )
|
||||
|
||||
static void sid_start(running_device *device, SIDTYPE sidtype)
|
||||
{
|
||||
SID6581 *sid = get_sid(device);
|
||||
_SID6581 *sid = get_sid(device);
|
||||
const sid6581_interface *iface = (const sid6581_interface*) device->baseconfig().static_config();
|
||||
|
||||
sid->device = device;
|
||||
@ -49,7 +49,7 @@ static void sid_start(running_device *device, SIDTYPE sidtype)
|
||||
|
||||
static DEVICE_RESET( sid )
|
||||
{
|
||||
SID6581 *sid = get_sid(device);
|
||||
_SID6581 *sid = get_sid(device);
|
||||
sidEmuReset(sid);
|
||||
}
|
||||
|
||||
@ -91,7 +91,7 @@ DEVICE_GET_INFO( sid6581 )
|
||||
switch (state)
|
||||
{
|
||||
/* --- the following bits of info are returned as 64-bit signed integers --- */
|
||||
case DEVINFO_INT_TOKEN_BYTES: info->i = sizeof(SID6581); break;
|
||||
case DEVINFO_INT_TOKEN_BYTES: info->i = sizeof(_SID6581); break;
|
||||
|
||||
/* --- the following bits of info are returned as pointers to data or functions --- */
|
||||
case DEVINFO_FCT_START: info->start = DEVICE_START_NAME( sid6581 ); break;
|
||||
|
@ -21,11 +21,11 @@ struct sw_storage
|
||||
#endif
|
||||
};
|
||||
|
||||
struct _SID6581;
|
||||
struct __SID6581;
|
||||
|
||||
typedef struct _sidOperator
|
||||
{
|
||||
struct _SID6581 *sid;
|
||||
struct __SID6581 *sid;
|
||||
UINT8 reg[7];
|
||||
UINT32 SIDfreq;
|
||||
UINT16 SIDpulseWidth;
|
||||
|
Loading…
Reference in New Issue
Block a user