mirror of
https://github.com/holub/mame
synced 2025-05-23 14:19:01 +03:00
A bottle of champaign to the person who explains
the speed improvement in dkong from 1230% to 1470% due to this change (setting context->data to 0 in reset). Actually, it will avoid the first stream_update of buffer_stream when after approx. 11 samples the dac is written. Without setting data to 0, stream_update(buffer_stream) is called before stream_update(discrete_stream) is called. With the patch, the order is of the stream_updates is determined by streams.c. What makes this interesting is, that the startup order of the stream_updates determines the whole run-time of the game. When profiling, NODE_73 (Sallen-Key-Filter) needs 1066 cycles without the patch and under 135 with the patch, although it is the 4th node after DISCRETE_INPUT_BUFFER. All in all this looks like a caching issue, however I am currently clueless what in the end is causing it.
This commit is contained in:
parent
04bad0addc
commit
b971b59287
@ -34,9 +34,9 @@ struct dss_adjustment_context
|
|||||||
struct dss_input_context
|
struct dss_input_context
|
||||||
{
|
{
|
||||||
stream_sample_t *ptr; /* current in ptr for stream */
|
stream_sample_t *ptr; /* current in ptr for stream */
|
||||||
UINT8 data; /* data written */
|
|
||||||
double gain; /* node gain */
|
double gain; /* node gain */
|
||||||
double offset; /* node offset */
|
double offset; /* node offset */
|
||||||
|
UINT8 data; /* data written */
|
||||||
UINT8 is_stream;
|
UINT8 is_stream;
|
||||||
UINT8 is_buffered;
|
UINT8 is_buffered;
|
||||||
UINT32 stream_in_number;
|
UINT32 stream_in_number;
|
||||||
@ -302,7 +302,7 @@ static DISCRETE_RESET(dss_input_stream)
|
|||||||
struct dss_input_context *context = (struct dss_input_context *)node->context;
|
struct dss_input_context *context = (struct dss_input_context *)node->context;
|
||||||
|
|
||||||
context->ptr = NULL;
|
context->ptr = NULL;
|
||||||
//context->data = 0;
|
context->data = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static DISCRETE_START(dss_input_stream)
|
static DISCRETE_START(dss_input_stream)
|
||||||
|
Loading…
Reference in New Issue
Block a user