From fbacff0aceaf768e7b2565957fe95dbab00cddd7 Mon Sep 17 00:00:00 2001 From: Lord-Nightmare Date: Sun, 30 Aug 2015 16:36:38 -0400 Subject: [PATCH] TMS5110: Add same FAST_START_HACK as in tms5220, makes snmath word delay closer to hardware. [Lord Nightmare] --- src/emu/sound/tms5110.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/emu/sound/tms5110.c b/src/emu/sound/tms5110.c index 0ff39a00fed..54d075d8e9d 100644 --- a/src/emu/sound/tms5110.c +++ b/src/emu/sound/tms5110.c @@ -78,10 +78,14 @@ static INT16 clip_analog(INT16 cliptemp); //define INTERP_SHIFT / (1<interp_coeff[m_IP]) /* Other hacks */ -/* HACK?: if defined, outputs the low 4 bits of the lattice filter to the i/o +/* HACK: if defined, outputs the low 4 bits of the lattice filter to the i/o * or clip logic, even though the real hardware doesn't do this, partially verified by decap */ #undef ALLOW_4_LSB +/* forces m_TALK active instantly whenever m_SPEN would be activated, causing speech delay to be reduced by up to one frame time */ +/* for some reason, this hack makes snmath behave marginally more accurate to hardware, though it does not match the patent */ +#define FAST_START_HACK 1 + /* *****configuration of chip connection stuff***** */ /* must be defined; if 0, output the waveform as if it was tapped on the speaker pin as usual, if 1, output the waveform as if it was tapped on the i/o pin (volume is much lower in the latter case) */ @@ -851,6 +855,9 @@ void tms5110_device::PDC_set(int data) #endif perform_dummy_read(); m_SPEN = 1; /* start immediately */ +#ifdef FAST_START_HACK + m_TALK = 1; +#endif /* clear out variables before speaking */ m_zpar = 1; // zero all the parameters m_uv_zpar = 1; // zero k4-k10 as well @@ -886,6 +893,9 @@ void tms5110_device::PDC_set(int data) #endif perform_dummy_read(); m_SPEN = 1; /* start immediately */ +#ifdef FAST_START_HACK + m_TALK = 1; +#endif /* clear out variables before speaking */ m_zpar = 1; // zero all the parameters m_uv_zpar = 1; // zero k4-k10 as well