mirror of
https://github.com/holub/mame
synced 2025-06-07 21:33:45 +03:00
zsg2: update stream before reading,
tms57002: fix input sample overflow
This commit is contained in:
parent
c56135a7f3
commit
71fe25f95b
@ -925,7 +925,7 @@ void tms57002_device::sound_stream_update(sound_stream &stream, std::vector<read
|
|||||||
assert(inputs[0].samples() == 1);
|
assert(inputs[0].samples() == 1);
|
||||||
assert(outputs[0].samples() == 1);
|
assert(outputs[0].samples() == 1);
|
||||||
|
|
||||||
stream_buffer::sample_t in_scale = 32768.0 * ((st0 & ST0_SIM) ? 256.0 : 1.0);
|
stream_buffer::sample_t in_scale = 32767.0 * ((st0 & ST0_SIM) ? 256.0 : 1.0);
|
||||||
si[0] = s32(inputs[0].get(0) * in_scale) & 0xffffff;
|
si[0] = s32(inputs[0].get(0) * in_scale) & 0xffffff;
|
||||||
si[1] = s32(inputs[1].get(0) * in_scale) & 0xffffff;
|
si[1] = s32(inputs[1].get(0) * in_scale) & 0xffffff;
|
||||||
si[2] = s32(inputs[2].get(0) * in_scale) & 0xffffff;
|
si[2] = s32(inputs[2].get(0) * in_scale) & 0xffffff;
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
// license:BSD-3-Clause
|
// license:BSD-3-Clause
|
||||||
// copyright-holders:Olivier Galibert, R. Belmont, hap, superctr
|
// copyright-holders:Olivier Galibert, R. Belmont, hap, superctr
|
||||||
/*
|
/*
|
||||||
|
|
||||||
ZOOM ZSG-2 custom wavetable synthesizer
|
ZOOM ZSG-2 custom wavetable synthesizer
|
||||||
|
|
||||||
Written by Olivier Galibert
|
Written by Olivier Galibert
|
||||||
@ -85,7 +86,8 @@
|
|||||||
|
|
||||||
TODO:
|
TODO:
|
||||||
- Filter and ramping behavior might not be perfect.
|
- Filter and ramping behavior might not be perfect.
|
||||||
- clicking / popping noises in gdarius, raystorm: maybe the sample ROMs are bad dumps?
|
- clicking / popping noises in gdarius, raystorm: maybe the sample ROMs
|
||||||
|
are bad dumps?
|
||||||
- memory reads out of range sometimes
|
- memory reads out of range sometimes
|
||||||
|
|
||||||
*/
|
*/
|
||||||
@ -639,6 +641,8 @@ uint16_t zsg2_device::read(offs_t offset, uint16_t mem_mask)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
m_stream->update();
|
||||||
|
|
||||||
if (offset < 0x300)
|
if (offset < 0x300)
|
||||||
{
|
{
|
||||||
int chan = offset >> 4;
|
int chan = offset >> 4;
|
||||||
|
@ -58,12 +58,9 @@ private:
|
|||||||
int16_t output_cutoff_delta;
|
int16_t output_cutoff_delta;
|
||||||
|
|
||||||
int32_t emphasis_filter_state;
|
int32_t emphasis_filter_state;
|
||||||
|
|
||||||
int32_t output_filter_state;
|
int32_t output_filter_state;
|
||||||
|
|
||||||
// Attenuation for output channels
|
uint8_t output_gain[4]; // Attenuation for output channels
|
||||||
uint8_t output_gain[4];
|
|
||||||
|
|
||||||
int16_t samples[5]; // +1 history
|
int16_t samples[5]; // +1 history
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user