* Move DIPs for 82S16, 82S115, and 2102A devices into nlm_proms
* Moved 7448 DIP to a macro. Replaced 7442 with truthtable and macro.
* Moved 74LS629 DIP into macro.
* Expand truthtable to handle 10 outputs.
Add legacy floppy image support which is currently required for the
mc6843 FDC emulator and used by the EXORset which run XDOS a variant
of MDOS.
Add support for 5.25 inch XDOS floppy drive formats as used by the
EXORset.
Make some of the identity tests more permissive to work with observer
disks. The date day and month are reversed on some disks, and the boot
rib cluster is lower.
* Example: PARAM(Solver.Solver_0.METHOD, "GMRES")
* Will use the GMRES solver instead of the default MAT_CR solver.
* Same applies to all Solver parameters.
* Please use with care. If you change your netlist (e.g. using
frontiers) the allocation of nets to solvers and the number of solvers
may change. Thus this type of tweaking should only be used after the
netlist completely works.
* The GMRES solver for larger matrices (>>100) can outperform Gaussian
elimination. Including it so it gets wider attention.
* As far as I know netlist is the only SPICE-like circuit simulation
providing a GMRES solver.
* All solver scheduling is now handled by nld_solver.
* Previously, for dynamic timestepping the sub solvers would be
responsible for their scheduling themselves.
- This prevented any attemps to use parallel execution of solvers.
* Now the route is free towards experiments to use parallel execution of
solvers.
* Uses ptimed_queue_linear in solver scheduling
* Improved netlist queue implementation (template now)
* Added const delegates.
* Added subsolver stats
* Removed dead code.
mw8080bw: improvements to 280zzzap netlist audio
* 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.
* Added netlist simulations for the following games: Space War, Barrier, Star Hawk, Speed Freak, Star Castle, War of the Worlds, Sundance, Tail Gunner, Rip Off, Armor Attack, Warrior, Solar Quest, Boxing Bugs. Removed previous samples-based sound. [Aaron Giles, Couriersud]
* Added built-in minimal artwork for Warrior. [Aaron Giles]
* Changed speaker maximum sample tracking to be based on new compile-time define SPEAKER_TRACK_MAX_SAMPLE instead of MAME_DEBUG. [Aaron Giles]
* Modernized 74164 and 74393 netlist TTL devices. [Aaron Giles]
* Removed update and NETLIB_UPDATE completely.
* Startup initialization order may change.
* This may cause regression tests to trigger. This is expected. Logic
TTL devices do not have a defined power-up state. That's why reset
circuits exist which create a reset signal *after* all power supply
lines are stable.
Model for transistors adjusted, replacing default NPN transistor
model with a high-gain NPN transistor type that more closely
resembles those used by the real Gun Fight sound circuits. This
has a quite obvious effect on the shot sounds, and it seems the
circuits were designed for this effect.
Made all volume potentiometers user-adjustable; previously fixed
at 50%.
Replaced abstract model of noise generator with component-level
one, including a model of the generator's zener diode. Zener
noise is provided by an associated Gaussian white noise source
running off a 48 kHz clock. Both the zener diode and Gaussian
white noise source are component models recently added to the
netlist library.
Supply voltage to amplifying transistors tweaked downward from
16.5 volts to 16 volts, determined by properly analyzing power
supply circuit and confirmed with a documented reference.
Much more commentary describing the sound circuits' function and
modeling issues.
If TRIG and TRESH are connected overshoot compensation will be enabled.
The approach is raw but delivers results (at 5 to 10 steps per
discharge/charge) within a couple of percent. Please take into account
that any datasheet formulas are idealistic. Neither capacitor, resistor,
internal resistor tolerances are taken into account. Nor are ambient
temperature and chip temperature.
* Currently devices use the "update" function if no handler is given for
an input.
* For this to work the update function has to be virtual. This will
cause issues on shared execution schemes like CPU/GPU using nvcc.
* This is the first batch of changes to ensure that handler resolution
is static.
* For truthtable cmos devices the power pin names will now be set
according to the logic family.
* Fix some issues for CD4538
* Change "already connected" warning to info level. Some ICs (CD4538)
connect pins internally to GND and the schematics again externally. This
will cause this info to be printed. The warning now is a lot more
verbose.
* No changes for well-behaved netlists.
* Netlists reporting "newton loops exceeded" messages should now report
a lot less of these messages.
* In case newton-raphson does not converge, netlist will reset the state
back to the beginning of the timestep. It will than use a number of very
small timesteps to hopefully deal with the non-convergence due to a too
big timesteps. Afterwards solving continues using dynamic timestepping
until the time-slice is complete.
* This is a lot better than the previous approach.
* This is meant as a performance optimization helper. Ideally, your
netlists never produce "newton loops exceeded" messages.
* Any events for connected analog and digital inputs will happen after
the timeslice is complete. Thus this approach - as the previous one -
are not suited for high-frequency (such as video outputs) situations. In
these case, only dynamic timestepping or reducing the fixed timestep are
a suitable solution.
* Electronic circuits and base components like resistors or capacitors
do not have a reset line. You can use them to create reset circuits.
There is thus no point to support soft reset, the equivalent to pressing
the reset button.
* Fixed some bugs around reset and start up logic.
* This also fixes the "scramble F3" crash.
* Add google test syntax compatible unit testing support. This is a very
limited subset of the google test framework and not intended ever to be
a replacement. Adding a dependency to google test for the functionality
required was considered to be an overkill.
* nltool -c tests runs unit tests if linked in. This is *not* the case
for the version of nltool compiled with TOOLS=1.
* Added unit tests for plib::pfunction.
Comparison operators evaluate either into 0.0 or 1.0. Thus they can be
used like "(a==1)*(b==2)" which will only result in 1.0 if a equal 1 and
b equal 1. From the yet to be released test code:
* PFUNCEXPECT("1==1", 1.0)
* PFUNCEXPECT("1 *0 == 2-1-1", 1.0)
* PFUNCEXPECT("0!=1", 1.0)
* PFUNCEXPECT("0<1", 1.0)
* PFUNCEXPECT("1>0", 1.0)
* PFUNCEXPECT("0<=1", 1.0)
* PFUNCEXPECT("1>=0", 1.0)
* PFUNCEXPECT("1<=1", 1.0)
* PFUNCEXPECT("1>=1", 1.0)
* PFUNCEXPECT("if(1>0, 2, 0)", 2.0)
* PFUNCEXPECT("if(0>1, 2, 3)", 3.0)
* PFUNCEXPECT("if(sin(1)>0, 2, 3)", 3.0) // fail
A single missing sector was causing it to give up on an images,
as incompatible. Being a little more permissive here helps working
with some old recovered disk images with some lost sectors.
* palloc.h/pmatrix2d.h: Fix static_assert warnings at the origin.
* Rework hints to broaden their use and fix NC hint.
* 74377: use NC hint
* plists.h: Fix debugging in MSVC
* Include cleanup: Move everything not needed by netlists from
nl_setup.h into core/setup.h
* Fix some clang tidy warnings
* srcclean
* Logic and analogue outputs can now be flagged as "NC" (not connected).
* Example: "HINT(IC13.4, NC)".
* This will suppress info messages to be logged.
* The HINT must apply to an existing terminal. HINTs for non-existing
terminals are treated as fatal errors.
* Terminals and logic inputs not connected are still treated as
warnings. These need though and a proper fix.
The purpose of this ongoing exercise is to remove unnecessary
dependencies in header files. netlist implementations should only have
access to what they need. The same applies to device implementations.
Core stuff will be moved to the core subdirectory going forward.
Kidniki now achieves up to 910% when run with static solvers and with
nltool. That is significant better than the 860% we have seen
previously.
This increase is driven by using a global memory pool in the solver
code.
In addition the following refactoring and code maintenance work is
included. Please excuse the large commit, some of this took interfered
with other work and the detail development steps were ugly.
- gsl support: This commit adds pgsl.h which implements a very limited
number of the functionality of the gsl header described in the c++ core
guidelines.
- clang-tidy fixes
- A significant refactoring of palloc.h. Aligned hints were removed,
they added complexity without a significant performance gain. Vector
operations should better be done on special spans/views.
The code has been tested on linux with g++-7, g++-9, clang-11.
On Windows mingw-10 and VS2019, OSX clang-11.
Move towards a pure c++ constexpr solution to derive the optimal
pointer to member function solution.
All the macro madness is centralized to a compile_info struct with
static members.
For the time being the evaluation result is compared against the
previous approach. Going forward this will be dropped as well as the
support for MINGW with GCC <= 4.6
- more c++14, use enable_if_t instead of enable_if
- cleaned up the use of memory allocation arenas
- reduce MACRO usage, use std::conditional where possible
Factory elements can now pass additional parameters to device
constructors. This makes the design of interface objects like analog
callbacks easier.
The change also allowed to remove some "deep" calls into the core from
the MAME interface in netlist.h
* mw8080bw: update 280zzzap audio API in preparation for netlist audio
This is only API changes, following the pattern used by cuavas within the
past year to update other games in mw8080bw.
* mw8080bw: new netlist audio implementation for 280zzzap
New netlist-based audio implementation for 280zzzap (280-ZZZAP, 1976),
derived from Midway game logic board schematic. The sound generally
matches that heard in videos of the machine, though the real machine
seems to have more bass and less treble. This may be a cabinet effect
or something else, such as a difference in component values.
Due to the number of complex components being emulated and the nature
of the circuits, this netlist adds a lot of overhead, but it's still
fast enough to run at greater than real speed on modern hardware.
With minor changes, this implementation should also support lagunar
(Laguna Racer, 1977); with somewhat more substantial changes, it
would also support sspeedr (Super Speed Race, 1979). Both of these
games use sound circuits based on those for 280-ZZZAP.
plists.h was splitted into plists.h, pmulti_threading.h and
ptimed_queue.h. In addition removed plists.h from a number of files it
wasn't used in.
Certain minor adjustment needed to be made for cuda toolkit 10.1 and
10.2.
pongf now peaks at 589% compared to 570% before.
Amongst a number of improvements in nl_base.h, the 7493 was touched.
Also has some code cleanup and hopefully faster compilation due to
extern template declarations.
For reasons unknown to me compile optimizations do not behave for
template code. If the implementation is in separate compile units, the
code compiles and performs.
This needs more attention since for certain compilers there is a
considerable performance degregation. It looks like this is only
triggered if too many variants are declared in one cpp file and the
compiler stops inlining.
Rom and prom devices now properly support tristate outputs. Native OC
output still on the todo list.
In addition this commit fixes a number of bugs around dealing with macro
level parameters and improves documentation by adding a parameter table.
Also srcclean.
This change will make it a lot easier to add enhanced functionality to
the factory infrastructure.
Using integral constants also improves linking stability.
During object creation netlist tracks the source files which provide
object creation. This is later used e.g. by nltool to create
documentation from source.
These tristate buffers natively support tristate outputs. For use cases
with fixed enable inputs the devices support a parameter
FORCE_TRISTATE_LOGIC which if being set to 1 makes the device behave
like a logic output.
Added additional syntax and consistency checks for tristate outputs.
Updated the example and added dip implementations including
documentation.
Thanks to Aaron Giles who made me think about a different approach.
This is a rewrite from scratch for rom devices. It uses a generic
template to implement rom devices which is used together with a
description struct to define a rom device. This leads to highly
efficient code since all information is available at compile time.
This is also a step forward to support tristate outputs. All rom devices
covered by this approach have tristate or open collector outputs and
thus all code changes to support tristate outputs can now be made
consistently in one file.
Code cleanup to better separate the following stages:
- parsing
- setup
- run
In addition preliminary native tristate support was added. Not yet
production ready, please don't use it.
- working macro level parameters
- simplified code significantly
- fixed a number of hidden issue
- dead code removal
It is now possible to define netlist level parameters using:
static NETLIST_START(chip)
DEFPARAM(parameter, 123)
RES(R1, $(@.parameter))
....
NETLIST_END()
NETLIST_START(main)
chip(X1)
PARAM(X1.parameter, 1000)
...
NETLIST_END()
This will pass on 1000 to R1 as a parameter.
"@." will resolve to the current namespace. In this case it is X1, thus
"X1.parameter. This is during parsing. During evalution, i.e. device
creation, $(X1.parameter) is evaluated to 1000.
This also means, that global parameters are possible and accessible ...
DEFPARAM(P, 234)
...
RES(R1, $(P))
or going forward
RES(R1, 1000)
CAP(C1, 1.0 / $(R1.R))
This opens up the path to more possibilities ...
static NETLIST_START(DM9456_DIP)
DEFPARAM(MODEL, "74XX")
DM9456_GATE(X1)
DM9456_GATE(X2)
PARAM(X1.MODEL, $(@.MODEL))
PARAM(X2.MODEL, $(@.MODEL))
...
NETLIST_END()
NETLIST_START(main)
DM9456_DIP(X1)
PARAM(X1.MODEL, "LS74XX")
...
NETLIST_END()
The code also has been prepared to allow something along the lines of
LIBENTRY_MODEL(DM74LS00_DIP, DM7400_DIP, "LS74XX")
to define a LS version on top of an DM7400_DIP bare TTL implementation.
This however will need more efforts to existing devices to honour some
timing adjustment in the model definition. It will already honour
different output specifications between LS series and bare TTL if
connected to analog components.
This a big forward to allow reuse of code. Still a longer way to go
but the foundation there.
Also brings quite a number of simplifications and dead code removal.
- removed family_setter
- naming alignment, family becomes model.
- architecture cleanups.)
- reviewed reset logic.
- pass truthtable family as string to factory.
This is another set of changes on the path to align logic families and
models. As a side effect, the object model now makes a clear
distinction between analog models and logic models.
The number of macros in nl_base.h has decreased significantly due to
these changes.
Reduce the usage of NETLIB_CONSTRUCTOR_DERIVED to implement
dip package objects. This aligns the programmatic approach
with the approach used in the macro folder, i.e. using netlists.
Untangle model definition and interpretation as well.
This changes are a first step in aligning models and families and thus
simplify the source further.
nlwav now supports 16 and 32 bit integer format (wav16s, wav32s)
as well as 32 bit float format (wav32f).
The "wav" format is no longer supported.
Added support for high and low pass filtering the wav output.
Dynamic volume adjustment (use "-a 0")
--hpboost can suppress spikes at the beginning of the file (<10ms)
The addition of the float format simplifies debugging significantly
since it covers the whole dynamic format.
Added nlwav to the local VS 2019 build.
This change makes state saving contract based. Objects which need to
save state need to have the following template member:
template <typename ST>
void save_state(ST &st)
{
/* Example */
st.save_item(m_p, "m_p");
st.save_item(m_buf, "m_buf");
}
This member function is called when the object is passed to the
state manager save function.
The two sources act as voltage sources, though noise may also be
injected as conductivy or current noise.
SYS_NOISE_MT_U: Mersenne Twister uniform noise
SYS_NOISE_MT_N: Mersenne Twister normal noise
nld_sys_noise is templated:
using NETLIB_NAME(sys_noise_mt_u) =
NETLIB_NAME(sys_noise)<plib::mt19937_64,
plib::uniform_distribution_t>;
Thus the approach is scalable. The implementation is state save aware,
and thus reproducible results are guaranteed.
An example use case is provided as well, see examples/noise.cpp.
The model is driven by three additional model parameters: NBV, IBV, BV.
Example code how to define a typical 7.5V Zener diode:
ZDIODE(ZD, "D(BV=7.5 IBV=0.01 NBV=3)")
or
NET_MODEL("A1234 D(BV=7.5 IBV=0.01 NBV=3)")
ZDIODE(ZD, "A1234")
The device can be found in nlm_other.cpp.
Removed nld_ne566.*
Added SYS_SW, SYS_SW2 and SYS_COMP. These are single switch,
alternating switch and a analog comparator with digital outputs.
Renamed RES_SWITCH to SYS_SW.
Added example ne566.cpp in netlist/examples.
Documentation should be created on Windows using
make mingw PARAMS=doc
Admittedly this is ugly and the makefile needs to be changed to
use something like "make HOSTOS=windows doc".
Make some calls private which were public before.
Eliminate functions which would be executed only once.
Make terminal reference functions in twoterm.h return const.
Clearly identify the use cases which need a non-const ref
to terminals.
Calls to the solver used different paths. These changes unify these
calls and provide a common call for discontinuous state changes on
analog components (change_state).
"Edge cases" are compiles were the floting point type used for the core
may be different from the one used by solvers, e.g. double/float.
This does not happen in MAME, here currently this is always
double/double. Since floats are better suited for GPUs whose double
performance is limited it was time to review the code.
This commit fixes warnings about type conversions and precision loss.
In addition there is better support for INT128 and FLOAT128.
The MAT solver has seen some minor performance increases.
Added a define NL_USE_ACADEMIC_SOLVERS and disabled it in the build.
This will not compile in solvers which are either illustrative or only
perform for large sparse matrices like GMRES.
This commit simplifies the creation of static solvers. For this to
happen the following changes were made:
- nltool does no longer support the "-f netlist_file.cpp" option.
All parts of netlist which used the option now expect the file
to be specified after all other options.
Before: nltool -t 10 -f somenetlist.cpp
Now : nltool -t 10 somenetlist.cpp
- The static compile command now supports an "--output" option
to specify the file to be created and accepts multiple input
files. To be create the static solver file for MAME use the
script provided or:
./nltool --cmd static
--output=src/lib/netlist/generated/static_solvers.cpp
src/mame/audio/nl_*.cpp src/mame/machine/nl_*.cpp
- Updated documentation and examples provided by nltool --help
The CD4016 is an analog switch IC. Document an experimental approach
to implement the analog switch as a 3 terminal element which is
completely being dealt with as part as the linear system.
The intention was to improve convergence when the switch is in a
feedback loop. One example are two-opamp tridiagonal wave generators.
Unfortunately the approach did not work out and in addition was
performing far worse than the net-separating original code.
Also updated comment in nld_generic_models.h.
This commit introduces precompiled static solver code. Due to
additional optimizations the compiler can use because the detail
calculation steps for the solution are known e.g. the kidniki netlist
sees a 100% speed increase.
In all environments (windows/*nix/osx) the source for the static
solver code can be created using
bash src/lib/netlist/nl_create_mame_solvers.sh
This will create src/lib/netlist/generated/static_solvers.cpp which is
compiled into the mame binary.
The script is just a temporary workaround. The intention is that nltool
whill be able to create this file with one call.
There are other improvements in this commit speeding up the processing
of timestep and dynamic calculations.
The only link dependency left is emu_fatalerror. The format handlers
really shouldn't be throwing fatal errors at all - they should just
fail to load an image they can't handle. Maybe the interface should
be enhanced to allow better propagation of errors up from the format
handlers so they can be displayed in a UI rather than just logged.
The only other two dependencies are on logmacro.h (pure macros) and
the PAIR type from emucore.h (possibly worth moving to util).
../../../../../src/lib/formats/apridisk.cpp: In member function 'virtual bool apridisk_format::load(io_generic*, uint32_t, floppy_image*)':
../../../../../src/lib/formats/apridisk.cpp:99:7: error: 'fatalerror' was not declared in this scope; did you mean 'strerror'?
Document linearized diode model in the range exceeding maximum
dissipation. The intention is to have a faster convergence but this yet
not really is observable.
* Add doxygen comments for bit manipulation functions
* Add an overload of BIT that works like the AArch64 UBFX instruction
* Kill off some of the silly concatenating overloads for emu_file::open
* Make searchpath acually useful for devices
This is a checkpoint - I'm planning to improve ROM loading behaviour at
least a little.
Change color levels for williams2 hardware to better color display.
Output levels are computed in netlist. These levels are aligned to
LTspice modelling I did.
Also improved the modelling to do what the actual hardware for mysticm
did: Color decoding depends on W13..W11. These are actually flip screen
versions of V13..V11. Fixed treatment on Bit0 although not used by the
game code.
Added R,G,B gain and offset sliders for the williams2 hardware. MAME
only supports one setting for all channels. This is not good enough
to come close to video recordings found on youtube.
Minor changes to nltool to better measure time taken to run a
simulation.
This example shows how the netlist tools can be used to derive
RGB tables from a schematic. All steps are given in
serc/lib/netlist/examples/turkey_shoot.cpp
Using this output format nlwav will pick point samples at regular
intervals from log files. This can be used to e.g. calculate
RGB output levels with netlist.
- Use initializer_list in object_array_t.
- Added constructor which accepts a format string for object names.
- Started work on logic_input8 which provides 8 logic outputs.
(nw) I've triple-checked the code and it looks sane, but I'm still a bit nervous about changing
such a fundamental part of MAME. If integer formatting appears to have changed after this, let
me know ASAP. Also removed a workaround for older versions of GNU libstdc++ with incomplete
C++14 support.
It is necessary to return a higher score on success, higher than
returned by the default method, in order for a general 'identify' to
succeed over competitive matches.
Add a get_track_format() method that can be overridden to supply format
variations for any track and head. The code is generalised to account for such
variations. The default method returns the passed format, so this change is
neutral for existing formats.
Simplify the FLEX DSK format code. There are now simply format variation
descriptions for the second track that have the sector ID continuing in
sequence from the first track, rather than specialized code.
Extend the FLEX format to support variations in the sectors ID of the first
two sectors. The FLEX 6800 boot sectors have IDs based at zero rather than
one. Extend the FLEX format to support variations for which the first track,
on both sides, is single density on an otherwise double density disk which was
historically a common format.
Extend the OS9 disk format to support variations for which the first track, on
only the first side, is single density on an otherwise double density
disk. OS9 for the SWTPC and Gimix typically used such formats.
Extend the OS9 disk format to support variations with a base sector ID of zero
in contrast to the existing COCO OS9 format which uses a based sector ID of
one. The OS9 format identification code is extended to rely on the optional
information stored in the OS9 LSN0 header to identify COCO format disks, and
all COCO format disks appear to have this optional information in a regular
enough format.
Parameters are now passed to the netlist core as strings. During netlist
creation they are evaluated as functions. This opens the path to
parameters on subdevice level.
Examples:
PARAM(device.XY, (1+2*0.005))
RES(R1, 2.05*RES_K(1)+1)
In addition the commit contains dead code removal.
- Fixed some clang lint warnings
- Removed dead code
- Experimental parser code to allow calculations in parameter value.
This already works for compiled netlists. These changes are
currently disabled. Updated pong netlist (and CRC/SHA) to work
with this new code.
"./nltool -c convert -f UA741.mod" now runs without errors. UA741.mod is
the official TI SPICE subckt for the 741 opamp.
This commit fixes a number of issues and adds linear POLY support for
E/F SPICE models.
This commit fixes an issue with parsing netlists. To cut a long story
short: The separation of nets into independant groups of nets failed
under some circumstances for four terminal devices (controlled
voltage/current devices). Everything worked as long as an external
feedback loop existed. Without external feedback loop, the separation
would either fail or create "false" separated nets.
This fix also highlighted an issue with cmos switches (4066/4016).
There is a slight chance that other bugs may surface due to this change.
- add CD4006 and CD4070 devices
- add TL084 opamp model
- Clock now supports proxies, i.e. can be connected to
analog devices.
- Fixed netlists using CLOCK
- added some comments
- removed a forgotten header file.
- remove pthrow trampline as proposed by Vas.
- identify throwing code by adding noexcept(false)
- move "connected term" information to setup code.
- srcclean
The APPLE2_TRACK_COUNT macro was not being expanded here, at least on gcc8.
This resulted in the string "APPLE2_TRACK_COUNT" being within the specification
and that in turn broke option_resolution::lookup_in_specification leading to
an assertion fail with the debug checks enabled. So bake in the numeric
constant to at least get things working again.
Increase the time resolution from 1 nano second to 100 pico seconds.
Make sure that icount and netlist internal time are better synched by
tracking the remainder of the division.
Fixed the netlist sound device. There is a one sample overflow every 13
seconds at 48000 Hz due to integer truncation which is now ignored.
Added more doxygen documentation.
Long story: The diode model uses log-stepping as proposed in "Circuit
Simulation" (Farid N. Najm) page 183. If the previous voltage was
sufficiently negative the new voltage after a log step could not have
increased enough to alter matrix and rhs vector.
This bug surfaced in stuntcyc video signal mixing which uses a diode for
the composite signal.
Introduce an additional absolute time type netlist_time_ext to identify
whether absolute or relative time is used in the netlist code.
Extend ptime code to allow operations between ptime derived types with
different internal types.
In addition rewrote main queue serve loops. Adds a very small
performance increase.
Added netlist version information. This is used to enforce the
invalidation of save states when the major/minor netlist version
changes.
This catches edge cases for which neither the size or names of saved
items changes during releases.