diff options
author | 2019-03-05 21:08:38 +0100 | |
---|---|---|
committer | 2019-03-07 15:04:44 +0100 | |
commit | 9a32c9c0f89dbc2f72dd0d0482c70825f3bfc541 (patch) | |
tree | fcb7a466846dc2d4e59acbeea2d853ff76250140 /src | |
parent | 51d6c61e1473b5542b12c2222c7204364617e1d2 (diff) |
pokey_device::step_pot: remove operations with no effect
* 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 <schnitzeltony@gmail.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/devices/sound/pokey.cpp | 9 |
1 files 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]<m_pot_counter) || (m_pot_counter == 228)) @@ -551,7 +548,9 @@ void pokey_device::step_pot() /* latching is emulated in read */ } } - synchronize(SYNC_POT, upd); + // some pots latched? + if (upd != 0) + synchronize(SYNC_POT, upd); } /* |