Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mw8080bw: improvements to 280zzzap netlist audio #6984

Merged

Conversation

@colinhowell
Copy link
Contributor

@colinhowell colinhowell commented Jul 22, 2020

Noise-based sound effects corrected. The original strength of the
zener noise voltage was about three orders of magnitude too low
for the current being passed through a zener of this type. This
prevented the noise generator from working as designed and made
the noise far too weak for the noise-based sound effects to work
properly. Those effects now sound much closer to the real hardware.

Implemented faster high-level emulation version of noise generator.
(Credit to couriersud for suggesting this.) The corrected noise
voltage made the component-level emulation of the noise generator
much too demanding on the minimum timestep needed to produce
accurate results without unrealistic voltage spikes, and so will
not run accurately at reasonable emulation speeds. But by replacing
it with a simple but effective AFUNC()-based comparator, we get a
functionally similar noise signal generator that produces
effectively identical output while still being able to run with
48 kHz static timestepping. So we get both decent emulation speed
and correct-sounding noise effects.

Added output voltage clipping on post-crash sound to remove
voltage spikes, resulting in a smoother, more accurate sound.
(Credit to Aaron Giles for suggesting this clipping method.)

Changed output to be taken from second LM3900 output opamp
(inverted signal) for smoother waveform and better tone quality.

Added master volume potentiometer which can be user-set, set to
midpoint by default. Adjusted output scaling and offset to match.

Various explanatory comments expanded or corrected.

Noise-based sound effects corrected. The original strength of the
zener noise voltage was about three orders of magnitude too low
for the current being passed through a zener of this type. This
prevented the noise generator from working as designed and made
the noise far too weak for the noise-based sound effects to work
properly. Those effects now sound much closer to the real hardware.

Implemented faster high-level emulation version of noise generator.
(Credit to couriersud for suggesting this.) The corrected noise
voltage made the component-level emulation of the noise generator
much too demanding on the minimum timestep needed to produce
accurate results without unrealistic voltage spikes, and so will
not run accurately at reasonable emulation speeds. But by replacing
it with a simple but effective AFUNC()-based comparator, we get a
functionally similar noise signal generator that produces
effectively identical output while still being able to run with
48 kHz static timestepping. So we get both decent emulation speed
and correct-sounding noise effects.

Added output voltage clipping on post-crash sound to remove
voltage spikes, resulting in a smoother, more accurate sound.
(Credit to Aaron Giles for suggesting this clipping method.)

Changed output to be taken from second LM3900 output opamp
(inverted signal) for smoother waveform and better tone quality.

Added master volume potentiometer which can be user-set, set to
midpoint by default. Adjusted output scaling and offset to match.

Various explanatory comments expanded or corrected.
@colinhowell
Copy link
Contributor Author

@colinhowell colinhowell commented Jul 22, 2020

Update for 280-ZZZAP sound, correcting several flaws in my first version. Still runs at a decent speed, with
unthrottled speedup of about 2 x on my 2014 MacBook Pro.

@rb6502
Copy link
Contributor

@rb6502 rb6502 commented Jul 23, 2020

Colin, can you fix the conflict with Aaron's static solvers update so this can be applied? Thanks!

@colinhowell
Copy link
Contributor Author

@colinhowell colinhowell commented Jul 23, 2020

Colin, can you fix the conflict with Aaron's static solvers update so this can be applied? Thanks!

Suggestions on the simplest way to get git to do this cleanly? My git inexperience is showing here. What needs to be done is to simply ignore src/lib/netlist/generated/static_solvers.cpp and then regenerate it using "sh src/lib/netlist/nl_create_mame_solvers.sh", because src/lib/netlist/generated/static_solvers.cpp is machine-generated anyway, from the source netlists.

Wish I'd waited to submit this until after Aaron's changes were merged.

@aaronsgiles
Copy link
Contributor

@aaronsgiles aaronsgiles commented Jul 23, 2020

colinhowell added 2 commits Jul 23, 2020
Aaron's recent netlist changes changed the static solvers, so now they
conflict with this branch. Merge those changes into this branch so the
static solvers can be regenerated; then the updated solvers can be
merged into upstream master without conflicts.
@colinhowell
Copy link
Contributor Author

@colinhowell colinhowell commented Jul 23, 2020

Thanks, Aaron and RB. Hope this worked...

@rb6502 rb6502 merged commit ca46132 into mamedev:master Jul 23, 2020
0 of 2 checks passed
0 of 2 checks passed
continuous-integration/appveyor/pr Waiting for AppVeyor build to complete
Details
continuous-integration/travis-ci/pr The Travis CI build is in progress
Details
@rb6502
Copy link
Contributor

@rb6502 rb6502 commented Jul 23, 2020

Thanks Colin, looks good and sounds even better!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants
You can’t perform that action at this time.