* This fixes a regression introduced by [1]
* Could not detect a performance change introduced by this
[1] 308c3c2d04
Signed-off-by: Andreas Müller <schnitzeltony@gmail.com>
* 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>
leapfrog_leappad_cart.xml: LeapPad - Libro Interactivo (Spain), El Rey León (Spain), Disney Princesas - Cuentos de las Princesas (Spain), Fiesta in the House! - ¡Party en la Casa! (Spain), ¡Yo aprendo inglés! - Mis Primeras 500 Palabras en Inglés (Spain) [TeamEurope, ClawGrip]
Also fixed a parent-clone relationship and renamed a set.
* pokey: rename pokey_device::m_output -> pokey_device::m_out_raw
There is a variable pokey_device::pokey_channel::m_output. Two variables with
same name in close context but complete different maning are not exactly
helpful to understand the code.
renaming pokey_device::pokey_channel::m_output was not an option because this
would damage stored machine states - right?
Signed-off-by: Andreas Müller <schnitzeltony@gmail.com>
* pokey: rework for performance enhancements
Profiling with valgrind pointed to the following hotspot:
pokey_device::step_one_clock / line 686-689:
| for (int ch = 0; ch < 4; ch++)
| {
| sum |= (((((m_channel[ch].m_output ^ m_channel[ch].m_filter_sample) || (m_channel[ch].m_AUDC & VOLUME_ONLY)) ? (m_channel[ch].m_AUDC & VOLUME_MASK) : 0 )) << (ch * 4));
| }
First solution was to move bit-shifting to first part of ?-part:
| sum |= (((m_channel[ch].m_output ^ m_channel[ch].m_filter_sample) || (m_channel[ch].m_AUDC & VOLUME_ONLY)) ? ((m_channel[ch].m_AUDC & VOLUME_MASK) << (ch * 4)) : 0);
because shifting 0 does not change value. Performance measurements showed
improvements but they were not satisfying exactly (change is part of this
patch).
So I thought more of what this piece of code is about:
* it is run at high frequency (@starwars: 1.5MHz * 4 pokey instances *
4 channels -> ~6MHz)
=> that is creating the high CPU cycle consumption
* frequency of output change is in a range of (double) audible frequencies (few
kHz).
=> there are long sequences creating identical output
* the sum value calculated depends on few channel input variables: m_output /
m_filter_sample / m_AUDC
This patch suggests a solution which keeps track of possible input variable
change and as long as they don't change there is no need to render output sum.
The following tests were performed:
* mame64 -bench 50 starwars: Average speed increases from ~430 to ~490 on my PC
* on screen profiling shows ~2% idle win
* starwars, missile-command and marble-madness do not show any audible
artefacts
Signed-off-by: Andreas Müller <schnitzeltony@gmail.com>
* pokey: rework prescaler handling
* CLK_1 does not have a prescaler so there is no need to increment and reset
m_clock_cnt[CLK_1]
* Unroll other prescalers: It gives performance win and reading is easier.
Function tests: on missile/starwars
Performance test: mame64 -nothrottle starwars
Before: Average speed: 409.36% (21 seconds)
After: Average speed: 447.37% (21 seconds)
Signed-off-by: Andreas Müller <schnitzeltony@gmail.com>
* new NOT WORKING
---
Spider-Man (JAKKS Pacific TV Game) (older hardare) [Sean Riddle, external donators]
looks like this is SPG110 or similar, die markings to be confirmed, does things a little different to Pinball, so might just be a different mode, or slightly different die, we'll find out later.
* new NOT WORKING machines
---
I Can Play Piano [Sean Riddle, external donators]
new NOT WORKING software list entries
---
icanpian:pianfav Piano Favorites [Sean Riddle, external donators]
* specify unsupported (nw)
* (nw)
* add a known cartridges list to icanpian (nw)
* list some known carts here too (nw)
* (nw)
* visual inspection of die from Sean suggests it's the same (nw)
* (nw)
* add pinout information from Sean for the I Can Play Guitar and Piano carts
* new WORKING machines
---
Geigeki Go Go Shooting (Japan) [Peter Wilhelmsen, Sean Riddle, ShouTime, David Haywood]
new NOT WORKING machines
---
e-kara Mix (Japan) [Peter Wilhelmsen, Sean Riddle, ShouTime, David Haywood]
(e-kara mix is designed to connect to a PC, don't think it displays other than the startup warning message unless you do that, might also require specific carts)
* New NOT_WORKING clone
-----------------------------------------------------
My First LeapPad (World, V1.3) [Sean Riddle, ClawGrip]
Also renamed the existing set to "mfleappadus", as it's the US version, an made the new set the parent, even being older, as it's the World version.
* Add "mfleappadus" (nw)
* New NOT_WORKING clone
------------------------------------------------
LeapPad (Canada) [Sean Riddle, ClawGrip]
* Fix year (nw)
* Add "leappadca" (nw)
----------------------------------
leapfrog_mfleappad_cart.xml: Mi Primer Día de Escuela (SP), Las Princesas Disney (SP), El gran día de Croki [TeamEurope, ClawGrip]
-------------------------------------------
vsmile_cart.xml: My Friends Tigger and Pooh - En Busca de la Miel (SP), Toy Story 2 - El Rescate De Woody (SP), La Cenicienta - Los sueños mágicos de Cenicienta (SP), Dora La Exploradora - La Aventura arregla-todo de Dora (SP), Zayzoo - Mi Amiga del Espacio (SP), Conducción Divertida (SP) [TeamEurope, ClawGrip)
New NOT_WORKING software list additions
-------------------------------------------
vsmile_cart.xml: Scooby-Doo - Misterio en el Parque (SP) [TeamEurope, ClawGrip]
* Also fixed some parent-clone relationships and rename some sets. The Scooby-Doo dump needs to be verified, as it just shows a black screen.
* New NOT_WORKING software list addition
-------------------------------------
vsmileb_cart.xml: Un Día en la Granja (Spa) [TeamEurope, ClawGrip]
Also renamed the german variant so parent and clones follow common name patters and reordered the list.
* Improve notes about romless carts (nw)