diff options
Diffstat (limited to 'src/devices/sound/namco.cpp')
-rw-r--r-- | src/devices/sound/namco.cpp | 46 |
1 files changed, 23 insertions, 23 deletions
diff --git a/src/devices/sound/namco.cpp b/src/devices/sound/namco.cpp index 9bddba97783..6bf7eba166a 100644 --- a/src/devices/sound/namco.cpp +++ b/src/devices/sound/namco.cpp @@ -35,7 +35,7 @@ const device_type NAMCO = &device_creator<namco_device>; const device_type NAMCO_15XX = &device_creator<namco_15xx_device>; const device_type NAMCO_CUS30 = &device_creator<namco_cus30_device>; -namco_audio_device::namco_audio_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source) +namco_audio_device::namco_audio_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, uint32_t clock, const char *shortname, const char *source) : device_t(mconfig, type, name, tag, owner, clock, shortname, __FILE__) , device_sound_interface(mconfig, *this) , m_wave_ptr(*this, DEVICE_SELF) @@ -53,17 +53,17 @@ namco_audio_device::namco_audio_device(const machine_config &mconfig, device_typ { } -namco_device::namco_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) +namco_device::namco_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : namco_audio_device(mconfig, NAMCO, "Namco", tag, owner, clock, "namco", __FILE__) { } -namco_15xx_device::namco_15xx_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) +namco_15xx_device::namco_15xx_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) :namco_audio_device(mconfig, NAMCO_15XX, "Namco 15XX", tag, owner, clock, "namco_15xx", __FILE__) { } -namco_cus30_device::namco_cus30_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) +namco_cus30_device::namco_cus30_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : namco_audio_device(mconfig, NAMCO_CUS30, "Namco CUS30", tag, owner, clock, "namco_cus30", __FILE__) { } @@ -81,7 +81,7 @@ void namco_audio_device::device_start() /* extract globals from the interface */ m_last_channel = m_channel_list + m_voices; - m_soundregs = auto_alloc_array_clear(machine(), UINT8, 0x400); + m_soundregs = auto_alloc_array_clear(machine(), uint8_t, 0x400); /* adjust internal clock */ m_namco_clock = clock(); @@ -148,11 +148,11 @@ void namco_audio_device::device_start() /* update the decoded waveform data */ -void namco_audio_device::update_namco_waveform(int offset, UINT8 data) +void namco_audio_device::update_namco_waveform(int offset, uint8_t data) { if (m_wave_size == 1) { - INT16 wdata; + int16_t wdata; int v; /* use full byte, first 4 high bits, then low 4 bits */ @@ -176,14 +176,14 @@ void namco_audio_device::update_namco_waveform(int offset, UINT8 data) /* build the decoded waveform table */ -void namco_audio_device::build_decoded_waveform(UINT8 *rgnbase) +void namco_audio_device::build_decoded_waveform(uint8_t *rgnbase) { - INT16 *p; + int16_t *p; int size; int offset; int v; - m_wavedata = (rgnbase != nullptr) ? rgnbase : auto_alloc_array_clear(machine(), UINT8, 0x400); + m_wavedata = (rgnbase != nullptr) ? rgnbase : auto_alloc_array_clear(machine(), uint8_t, 0x400); /* 20pacgal has waves in RAM but old sound system */ if (rgnbase == nullptr && m_voices != 3) @@ -197,7 +197,7 @@ void namco_audio_device::build_decoded_waveform(UINT8 *rgnbase) size = 32 * 8; /* 32 samples, 8 waveforms */ } - p = auto_alloc_array(machine(), INT16, size * MAX_VOLUME); + p = auto_alloc_array(machine(), int16_t, size * MAX_VOLUME); for (v = 0; v < MAX_VOLUME; v++) { @@ -215,7 +215,7 @@ void namco_audio_device::build_decoded_waveform(UINT8 *rgnbase) /* generate sound by oversampling */ -UINT32 namco_audio_device::namco_update_one(stream_sample_t *buffer, int length, const INT16 *wave, UINT32 counter, UINT32 freq) +uint32_t namco_audio_device::namco_update_one(stream_sample_t *buffer, int length, const int16_t *wave, uint32_t counter, uint32_t freq) { while (length-- > 0) { @@ -677,10 +677,10 @@ void namco_audio_device::sound_stream_update(sound_stream &stream, stream_sample { int hold_time = 1 << (m_f_fracbits - 16); int hold = voice->noise_hold; - UINT32 delta = f << 4; - UINT32 c = voice->noise_counter; - INT16 l_noise_data = OUTPUT_LEVEL(0x07 * (lv >> 1)); - INT16 r_noise_data = OUTPUT_LEVEL(0x07 * (rv >> 1)); + uint32_t delta = f << 4; + uint32_t c = voice->noise_counter; + int16_t l_noise_data = OUTPUT_LEVEL(0x07 * (lv >> 1)); + int16_t r_noise_data = OUTPUT_LEVEL(0x07 * (rv >> 1)); int i; /* add our contribution */ @@ -729,12 +729,12 @@ void namco_audio_device::sound_stream_update(sound_stream &stream, stream_sample if (voice->frequency) { /* save the counter for this voice */ - UINT32 c = voice->counter; + uint32_t c = voice->counter; /* only update if we have non-zero left volume */ if (lv) { - const INT16 *lw = &m_waveform[lv][voice->waveform_select * 32]; + const int16_t *lw = &m_waveform[lv][voice->waveform_select * 32]; /* generate sound into the buffer */ c = namco_update_one(lmix, samples, lw, voice->counter, voice->frequency); @@ -743,7 +743,7 @@ void namco_audio_device::sound_stream_update(sound_stream &stream, stream_sample /* only update if we have non-zero right volume */ if (rv) { - const INT16 *rw = &m_waveform[rv][voice->waveform_select * 32]; + const int16_t *rw = &m_waveform[rv][voice->waveform_select * 32]; /* generate sound into the buffer */ c = namco_update_one(rmix, samples, rw, voice->counter, voice->frequency); @@ -781,9 +781,9 @@ void namco_audio_device::sound_stream_update(sound_stream &stream, stream_sample { int hold_time = 1 << (m_f_fracbits - 16); int hold = voice->noise_hold; - UINT32 delta = f << 4; - UINT32 c = voice->noise_counter; - INT16 noise_data = OUTPUT_LEVEL(0x07 * (v >> 1)); + uint32_t delta = f << 4; + uint32_t c = voice->noise_counter; + int16_t noise_data = OUTPUT_LEVEL(0x07 * (v >> 1)); int i; /* add our contribution */ @@ -825,7 +825,7 @@ void namco_audio_device::sound_stream_update(sound_stream &stream, stream_sample /* only update if we have non-zero volume and frequency */ if (v && voice->frequency) { - const INT16 *w = &m_waveform[v][voice->waveform_select * 32]; + const int16_t *w = &m_waveform[v][voice->waveform_select * 32]; /* generate sound into buffer and update the counter for this voice */ voice->counter = namco_update_one(mix, samples, w, voice->counter, voice->frequency); |