From 9a32c9c0f89dbc2f72dd0d0482c70825f3bfc541 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20M=C3=BCller?= Date: Tue, 5 Mar 2019 21:08:38 +0100 Subject: [PATCH] pokey_device::step_pot: remove operations with no effect MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * step_pot is called from step_one_clock only and just in case pokey is not in reset state -> No need to check reset state again * in case there were no bits in 'upd' latched to one, there is no need to call synchronize(SYNC_POT, 0) because m_ALLPOT won't change. Performance results with missile / starwars (no pots): Before: ./mame64 -bench 50 missile -> Average speed: 1171.67% (49 seconds) ./mame64 -bench 50 starwars -> Average speed: 551.66% (49 seconds) After: ./mame64 -bench 50 missile -> Average speed: 1321.16% (49 seconds) ./mame64 -bench 50 starwars -> Average speed: 551.10% (49 seconds) Signed-off-by: Andreas Müller --- src/devices/sound/pokey.cpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/devices/sound/pokey.cpp b/src/devices/sound/pokey.cpp index 231dc01e8bf..5aa797bb543 100644 --- a/src/devices/sound/pokey.cpp +++ b/src/devices/sound/pokey.cpp @@ -538,11 +538,8 @@ void pokey_device::step_keyboard() void pokey_device::step_pot() { - if ((m_SKCTL & SK_RESET) == 0) - return; - - uint8_t upd = 0; m_pot_counter++; + uint8_t upd = 0; for (int pot = 0; pot < 8; pot++) { if ((m_POTx[pot]