Commit Graph

2787 Commits

Author SHA1 Message Date
couriersud
fe47fcf9f1 netlist: more clang lint fixes. 2020-10-02 19:58:30 +02:00
couriersud
1dcedeee9d netlist: Add parse optimization to pfunction.
* "(1 + 2)*a" now during parse step will be rewritten to "3*a".
2020-10-02 19:58:29 +02:00
couriersud
58b4e89c0c netlist: rename more files to lower case. 2020-10-02 19:58:28 +02:00
Vas Crabb
4f05917494 Got rid of global_alloc/global_free.
The global_alloc/global_free functions have outlived their usefulness.
They don't allow consistently overriding the default memory allocation
behaviour because they aren't used consistently, and we don't have
standard library allocator wrappers for them that we'd need to use them
consistently with all the standard library containers we're using.  If
you need to change the default allocator behaviour, you can override the
new/delete operators, and there are ways to get more fine-grained
control that way.  We're already doing that to pre-fill memory in debug
builds.

Code was already starting to depend on global_alloc/global_free wrapping
new/delete.  For example some parts of the code (including the UI and
Windows debugger) was putting the result of global_alloc in a
std::unique_ptr wrappers without custom deleters, and the SPU sound
device was assuming it could use global_free to release memory allocated
with operator new.  There was also code misunderstanding the behaviour
of global_alloc, for example the GROM port cartridge code was checking
for nullptr when a failure will actually throw std::bad_alloc.

As well as substituting new/delete, I've made several things use smart
pointers to reduce the chance of leaks, and fixed a couple of leaks,
too.
2020-10-03 03:00:24 +10:00
Vas Crabb
d32834f1f7 formats/cassimg.cpp: Finish encapsulation of cassette_image class. 2020-10-02 14:01:03 +10:00
Vas Crabb
54048b3407 -imagedev/cassimg.cpp: Make the interface look something like C++.
-sound/tiasound.cpp: Use some vaguely C++-like code internally.
2020-10-02 02:42:28 +10:00
couriersud
3a95d1e4fd netlist: Convert driver filenames to lower case. 2020-09-30 08:38:06 +02:00
couriersud
91ca668d14 netlist: Fix a net splitting issue with four term devices.
* Under cirtum circumstances the splitter would create "ghost" solvers
    consisting of terminals already used in another and complete
    solver. This may impact all netlist which use opamps and thus
    is committed early in the cycle.
* This commit adds functionality to instruct the splitter code to
    include terminals which will not create matrix elements into
    the parsing of net groups for solvers.
2020-09-30 08:37:42 +02:00
couriersud
d838120e37 netlist: Rewrote frontier documentation.
* Also includes a small optimization for FP signal code.
2020-09-30 08:37:18 +02:00
couriersud
9a08e63fd3 netlist: applied some clang tidy recommendations 2020-09-30 08:36:53 +02:00
couriersud
2f73dca6e6 netlist: implement stricter validation.
* Devices like BJTs and FETs which are defined but not used will now
cause an error.
* An unused device will create an additional solver with a singular
matrix.
- This is adding unnecessary performance overhead.
- It complicates debugging because the unused device will cause an
arithmetic signal if used with --fperr (nltool).
* Fixed all validation errors.
2020-09-28 22:00:34 +02:00
couriersud
c93702f9a3 netlist: Remove "extended validation mode"
* No longer added value.
2020-09-28 22:00:16 +02:00
couriersud
81c484197b netlist: Fix astro blaster sonar sound
* Also fix two singular matrices being created.
2020-09-27 13:21:32 +02:00
Vas Crabb
a1d35e5abf Cleaned up bitmap API.
Made const-qualified pixel accessors (pix, pixt, raw_pixptr) return
const-qualified references/pointers to pixesl, and added non-const
versions.  This makes bitmap more like standard library containers where
const protects the content as well as the dimensions.

Made the templated pixt accessor protected - having it public makes it
too easy to inadvertently get a pointer to the wrong location.

Removed the pix(8|16|32|64) accessors from the specific bitmaps.  You
could only use the "correct" one anyway, and having the "incorrect" ones
available prevented explicit instantiations of the class template
because the static assertions would fail.  You can still see the pixel
type in the bitmap class names, and you can't assign the result of
&pix(y, x) to the wrong kind of pointer without a cast.

Added fill member functions to the specific bitmap template, and added
a explicit instantiations.  This allows the bitmap size check to be
skipped on most bitmap fills, although the clipping check is still
there.  Also fixed a couple of places that were trying to fill an
indexed 16-bit bitmap with rgb_t::black() exposed by this (replaced with
zero to get the same net effect).  The explicit template instantiations
in the .cpp file mean the compiler can inline the function if necessary,
but don't need to generate a local out-of-line body if it chooses not
to.

Extended the size of the fill value parameter in the base bitmap class
to 64 bits so it works correctly for 64-bit bitmaps.

Fixed places where IE15 and VGM visualiser weren't accounting for row
bytes potentially being larger than width.

Fixed an off-by-one in an HP-DIO card where it was treating the Topcat
cursor right edge as exclusive.

Updated everything to work with the API changes, reduced the scope of
many variables, added more const, and replaced a few fill/copy loops
with stuff from <algorithm>.
2020-09-27 14:00:42 +10:00
Vas Crabb
6e807013c5 Disable SOUND_DEBUG for non-debug builds, and srcclean 2020-09-27 11:00:56 +10:00
couriersud
15ea16e149 netlist: minor code cleanup.
* a number of minor fixes leading to an increase of 570% to 588% on
pongf.
* admittedly micro optimization.
* Includes some comments why certain decisions have been taken.
2020-09-25 21:44:54 +02:00
lfantoniosi
206b44fa25
imd_dsk: Fix bug when changing IMD image [lfantoniosi] (#7289)
* Fix bug when changing IMD image

These arrays weren't zeroed when changing a IMD disk for saving.
2020-09-25 12:27:07 -04:00
couriersud
a6fb699b6f netlist: Fixed a couple of issues with various compilers. 2020-09-24 15:22:26 +02:00
couriersud
0acb9992f4 netlist: make pstring length/size use consistent.
* length reports the number of character codes in the string
* size reports the size in memory units
* Reminder: Set PSTRING_USE_STD_STRING to 1 in pstring.h and get
    native std::string
* pstrings are compatible to std::string but only support a limited
    subset of functionality.
* By default (always like this) utf8 is supported and thus length
    reports the number of multi-byte characters.
2020-09-24 15:22:25 +02:00
couriersud
dd5769bea9 netlist: clearly identify void * casts. 2020-09-24 15:22:25 +02:00
couriersud
1fffeb33c0 netlist: Fix 128 bit integer support. 2020-09-24 15:22:24 +02:00
couriersud
5a2f41d1a5 netlist: Improve queue handling documentation in code.
* Document that for performance reasons pushes to queue are
    allowed even if they may not change state and are filtered
    out during process.
* Provide alternative code path. This is currently not used.
2020-09-24 15:22:23 +02:00
couriersud
1bb99466bc netlist: code refactoring
* use default move and copy constructors
* various minor edits like adding noexcept
* removed a lot of inline keywords - you can't beat the compiler
2020-09-24 15:22:22 +02:00
couriersud
356613b82e astrob: significant performance increase
* uses all 4 Sonar oscillators
* uses randomized resistor values (5% range)
* uses frontiers to separate oscillators
* improves performance to 340% locally.
2020-09-20 17:49:02 +02:00
couriersud
63efcfcb85 netlist: code refactoring.
- rename mat_cr.h to pmatrix_cr.h
- Optimization to the gmres solver.
- Simplifcation of vector operation code
2020-09-20 17:34:54 +02:00
Vas Crabb
df27f90958 util/bitmap.cpp: Use std::fill_n to get better code for modern CPUs. 2020-09-20 15:18:23 +10:00
Lord-Nightmare
a5879b9750 Fix a minor error in the CD4076 netlist library device implementation definition. 2020-09-18 11:19:47 -04:00
Lord-Nightmare
bff0710c57 Netlist devices for MCM14524, CD4029, CD4030, CD4042, CD4049, CD4076 [Lord Nightmare] 2020-09-17 22:56:49 -04:00
couriersud
ec742d3eda netlist: emscripten can not use specialization efficiently.
* Consequently prefer to save on compile time and size.
2020-09-17 19:45:24 +02:00
couriersud
e62e2d759b netlist: optimize headers.
* where possible rely on forward declarations to optimiuze compile time.
2020-09-17 19:45:10 +02:00
couriersud
c127811083 netlist: Move ICL8038_DIP and NE556_DIP to core.
* Remove code duplication.
2020-09-17 19:44:51 +02:00
Erwin Jansen
9a0c63f673
Add MDCR support for P2000t (#7215)
This adds support for the mini digital cassette recorder that can be
found inside a P2000t. This implementation is based on documentation
that can be found in https://github.com/p2000t/documentation.

In memory of NPM Jansen, who taught me all the magic of bits and bytes.
2020-09-17 18:39:48 +10:00
couriersud
0f1de1357c netlist: move more models into the core. 2020-09-13 09:29:07 +02:00
couriersud
6726338362 netlist: Move selected NET_MODELS into the core 2020-09-12 23:52:20 +02:00
couriersud
ca31c844cd netlist: move to generated header and link support files files.
* Removed device and macro header files.
* All of those can be generated automatically so going forward there is
no need for these any longer.
* Introduced the modules concept. Modules are netlists for which
automatic lib entries are generated.
* Going forward you just store them in macro/modules and they will be
automatically registered as device elements.
* You need to do a "make generated" is src/lib/netlist/build
* Some_device.cpp still needs to be added to netlist.lua
* Added documentation on how to add devices to netlist.
* Please refer to adding_devices.md for more information.
2020-09-12 23:20:16 +02:00
couriersud
8f48f2d062 netlist: clang tidy fixes. 2020-09-11 23:15:42 +02:00
Couriersud
8c9ac9c4ff netlist: add listmodels command to nltool.
* nltool --help is your friend.
2020-09-09 23:23:53 +02:00
couriersud
4f9ffb7333 netlist: Implement voltage dependent timing for CD4006 2020-09-09 23:23:38 +02:00
couriersud
d16baea163 netlist: Pedantic and clang tidy updates
* also fix an issue with netlist vs build
2020-09-06 19:56:03 +02:00
couriersud
f3b2dd65f5 netlist: fix multi byte string issues. 2020-09-06 13:16:05 +02:00
couriersud
52b1750a7f netlist: Fix a compile issues with mingw. 2020-09-05 23:48:24 +02:00
Couriersud
f3eb632465 netlist: code maintenance and performance optimizations.
* rename some misleading type names
* remove callback_t and replace by better scalable approach
* hide implementations details
* move sources classes from putil.h to psources.h
* reduce code complexity
* improve parsing performance, parsing netlists now is twice as fast.
* fix issues around multi-byte string support
* moved psplit into pstrutil.h
2020-09-05 21:31:49 +02:00
Vas Crabb
ea75c97d6d xmlfile.cpp: Put newline where it’s supposed to go after element content. 2020-09-06 02:33:04 +10:00
Vas Crabb
94601c77cc -util/xmlfile: Escape attribute and element content.
The previous behaviour was unintuitive - parsing an XML file and writing
it out immediately would produce invalid XML if the file contained any
characters that needed escaping.  It makes far more sense to escape on
writing rather than expecting the user to escape input.

-Add preliminary support for visibility toggles to artwork system.

This allows the user to show/hide related elements in a view, with
nesting.  The view can specify whether elements are shown or hidden by
default.  Settings are saved per host window/screen per view.  There is
no way to set the initial visibility state on the command line.  Legacy
"Space Invaders cabinet model" layers are mapped onto visibility
toggles.

This is not stable yet.  In particular, the XML element/attribute names
have not been finalised.  The new features have not been added to
complay.py to prevent them from being used before they're finalised.
2020-09-06 01:41:44 +10:00
Vas Crabb
83ea46d158 Don't ignore config elements with attributes but no child nodes. 2020-09-02 22:10:29 +10:00
Vas Crabb
9445f1d831 frontend: Added option to skip repeated imperfect emulation warnings.
The option is called skip_warnings, and it must be set in ui.ini (it can
be set using the internal UI).  Red warnings cannot be skipped; yellow
warning can be skipped under certain circumstances.

For a yellow warning to be skipped, the system must have been launched
in a way that allows warnings to be displayed, in a configuration with
the same set of devices flagged with unemulated/imperfect features,
within the last seven days, and the warning must have been displayed
within the past 14 days.

Also fixed a bug with display of the MACHINE_NO_COCKTAIL flag in the
internal UI, and increased the size of XML integer attributes to 64
bits.
2020-09-02 17:41:34 +10:00
Sylvain Glaize
66859c1927
VG5000µ updates:
- Add wavfile support for reading/writing tapes, for more accuracy. The currently supported K7 file type misses timing data.
- VG5000µ adds a wait cycle after the second T state of the M1 cycle of the Z80. Because it was not emulated, the timings were off, especially in the sensible cassette read/write routines.
- With wavfile support added and timings fixed, the emulation can now read/write cassette at 1200 and 2400 bauds.
- Still keeping the MACHINE_NOT_WORKING flag, as real hardware tests need to be complete.
2020-08-31 16:14:42 -04:00
Vas Crabb
97a409b2a9 formats/flopimg.cpp: Use appropriate standard exceptions for reporting errors, allowing libemu to be removed from imgtool and floptool. 2020-08-30 17:22:17 +10:00
Vas Crabb
ec88949651 formats: Get rid of more inappropriate use of emu_fatalerror (and fix some spelling issues, etc. while I'm at it) 2020-08-30 17:08:25 +10:00
Justin Kerk
68fecdf7e0 pc_dsk: Ignore 84-byte Disk Copy 4.2 header [Justin Kerk] 2020-08-29 12:48:40 -07:00
Vas Crabb
c44073056f netlist: Remove copyright-infringing descriptions copy/pasted from datasheets.
Certain things are not considered "creative works" under copyright law,
making them ineligible for copyright protection.  This includes pinouts
(facts), descriptions of circuits (utilitarian), integrated circuit
lithography masks (utilitarian, but there's a separate field of IP law
protecting them), and character shapes (utilitarian).

However, many of these descriptions are substantial enough to be treated
creative works.  A number of them include suggested applications.  There
are situations where reproducing the descriptions may be permitted, for
example:

* The publisher may permit reproducing the entire datasheet for
  reference.

* In some jurisdictions, fair use doctrine may allow the description to
  be quoted in its entirety in a larger creative work (e.g. in a
  research paper, patent application, or an original description of a
  circuit utilising the device).

* Some jurisdictions allow reproduction of no more than 50% of a
  creative work for inclusion in teaching materials.

I am not confident that these soure code comments qualify as a situation
where the long-form descriptions can be copied verbatim lawfully,
especially without reproducing copyright notices for them.  If you want
long form plain language descriptions in the comments, you need to write
them yourself.  That way, you will be the copyright holder of the
creative work, and you can make it availble under a permissive or
"copyleft" license.
2020-08-29 01:16:27 +10:00
couriersud
5d3342c837 netlist: Fix processing of TRUTHTABLES for generated files.
* also made nld_devinc.h srcclean friendly.
* nld_devinc.h and lib_entries.hxx are currently not used. You can try
the automated build by changing NL_AUTO_DEVICES in setup.h to 1.
2020-08-28 09:32:24 +02:00
couriersud
e00a6ccf41 netlist: Truth tables are now standalone objects.
* Added TRUTHTABLE_ENTRY to netlist language.
* Please see nlm_ttl74xx for reference implementation.
2020-08-26 22:12:57 +02:00
couriersud
654be7c635 netlist: standalone makefile support for OSX 2020-08-26 22:12:56 +02:00
couriersud
d49f54d3e0 netlist: Change license to CC0 in macro folder.
* Got agreement from contributors over social media.
2020-08-25 22:02:01 +02:00
couriersud
0aa5aea84f netlist: Fix various issues around include directories.
* removed include directory src/lib/netlist from various genie files to
avoid potential issues.
* Code using netlist should use #include "netlist/*".
* Updated includes.
* Fixed standalone makefile depend target to properly deal with relative
paths.
2020-08-25 19:41:32 +02:00
couriersud
f1cb622089 netlist: more standalone makefile changes
* On windows a simple make is now enough to build.
* Devices, macro and tests folders now included with wildcard.
* No more makefile changes if a device is added.
* Moved nld_devinc.h to generated folder
* Added to python scripts to create nld_devinc.h and lib_entries.hxx
* TEST MODE: these two files are created automatically but are not used
currently. Once I get feedback that the python scripts work in different
environments I will remove header files from devices and macro and start
using these files in production.
2020-08-24 22:04:21 +02:00
Aaron Giles
2b82913843 netlist: Add 7417, 7438, 74290/74293 devices. Fix PROM DIPs. 2020-08-24 22:02:20 +02:00
couriersud
b612367b33 netlist: clang tidy include order fixes. 2020-08-24 22:01:58 +02:00
couriersud
8335c1bed5 netlist: build system improvements
* Medium term this will significantly ease adding devices to netlist.
2020-08-24 22:01:38 +02:00
couriersud
1bd446a192 netlist: in devices folder all DIP devices were removed.
* NE555 and MC1455P were the last devices with DIP definitions in
devices.
2020-08-23 20:12:31 +02:00
couriersud
915e4a3171 netlist: References to subdevices should be symbolic.
* Exposing sub-device members is not best practice.
* The need for sub-devices is a clear indication that a netlist language
implementation would be a better solution.
2020-08-23 17:25:18 +02:00
couriersud
d1c74db666 netlist: Fix visibility in some devices.
* private rules.
2020-08-23 17:24:24 +02:00
couriersud
113de38237 netlist: templatize 74107 and code maintenance.
* removed some dead friend declarations
* optimized template times_ns2
2020-08-23 17:24:22 +02:00
couriersud
f7ace42947 netlist: macro dip definition for 8277,am2847,mm5837. 2020-08-23 14:09:11 +02:00
couriersud
86f4a96c4a netlist: Macro DIP definitons for TMS4800, 9314, 9334 2020-08-23 10:57:35 +02:00
Vas Crabb
164ef47ad2 srcclean for 0.224 2020-08-23 11:13:56 +10:00
Vas Crabb
15e71127fb formats: Removed some inappropriate uses of emu_fatalerror and stderr. 2020-08-23 10:55:03 +10:00
couriersud
a594ee4933 netlist: use macro dips for 74175, 74192, 74193, 74194, 74365. 2020-08-22 22:57:37 +02:00
couriersud
4b7eaf67e3 netlist: remove duplicate device definitions. 2020-08-22 21:31:06 +02:00
couriersud
f6049d73b2 netlist: fix clang build. 2020-08-22 16:55:37 +02:00
couriersud
b0e0ac2b24 netlist: Add NETLIB_DELEGATE_NOOP()
* This should be used for inputs which do not need a handler.
* Examples are data inputs which are only accessed on a clock change.
2020-08-22 16:31:22 +02:00
couriersud
9e401f0b3e netlist: Fix some documentation issues. 2020-08-22 16:30:16 +02:00
couriersud
1d723a69db netlist: Fix some pedantic clang warnings. 2020-08-22 16:30:15 +02:00
couriersud
3f50652a5c netlist: Add AN6551 opamp 2020-08-20 18:55:22 +02:00
couriersud
1e74aa6bff netlist: optimized 7416 2020-08-20 18:16:17 +02:00
Tiago Pierezan Camargo
4cc6d5bb7e
palloc: use posix_memalign with android 2020-08-20 09:56:41 -03:00
Aaron Giles
10173161ad Updated static solvers. 2020-08-19 19:42:37 -07:00
Aaron Giles
f7b263de20
Sound and other improvements to Sega G-80 games. (#7103)
Sound and other improvements to Sega G-80 games: [Aaron Giles, couriersud]
* Added netlist-based sound to Eliminator, Zektor, Space Fury, and Astro Blaster.
* Split the Sega Universal Sound Board and Speech Boards into their own separate files.
* Improved Universal Sound Board implementation for better accuracy in Star Trek and Tac/Scan.
* Wrote netlist-based backend for Universal Sound Board; currently disabled due to limitations in the system.
* Wrote netlist-based backend for Speech Board; currently disabled pending future sound system changes.
* Implemented wait states and the vector DRAW flag to help improve timing.

SP0250 Improvements: [Aaron Giles]
* Matched clock divider to real chip measurements.
* Fixed behavior when not fed enough data; addresses "gapping" in speech in Sega games.
* Implemented accurate LFR noise generator according to real chip measurements.
* Added pulse-width modulation DAC output mode for future consumption by netlist.

Netlist additions: [Aaron Giles]
* Added compile-time option to record nltool-compatible CSV files.
* Improved CD4020 implementation.
* Fixed CD4053 behavior.
* Added 74139 device.
* Added TL082 device.

8253 PIT changes: [Aaron Giles]
* Added explicit synchronization to all writes.
* Cleaned up some timing calculations to avoid double<->attotime conversions.
2020-08-19 19:33:13 -07:00
Ryan Holtz
e022ccd040 -tank: Assorted fixes and changes. For some reason, GNE (H4.6) never goes low at the start of the game. 2020-08-18 09:37:27 +02:00
couriersud
da734ea0c9 netlist: fix some pedantic clang warnings. 2020-08-17 22:24:17 +02:00
couriersud
b55747b276 netlist: dead code removal.
* moved dead code into examples/lostfound.cpp
* This work didn't improve performance but still may serve as examples
for complex truth table implementations.
2020-08-17 22:24:17 +02:00
Ryan Holtz
96921ccac9 -netlist: Properly fixed 74165 implementation. Fixed MK28000 address latching. 2020-08-17 16:24:46 +02:00
Ryan Holtz
dd47a15e3a -tank: Commented out CPU-choking motor sound for now. Fixed a transcription error. At least partially fixed screen parameters. 2020-08-17 13:49:13 +02:00
Ryan Holtz
48c847f89a -nld_9321: Fixed Enable input, it should be inverted. 2020-08-17 13:47:27 +02:00
Colin Douglas Howell
f7d786d3d0
sspeedr: new netlist audio implementation (#7081)
* sspeedr: new netlist audio implementation

Netlist-based audio implementation for sspeedr (Super Speed Race, 1979)
derived from Midway audio schematics, and based on that used for
280zzzap (280-ZZZAP) and lagunar (Laguna Racer) in the mw8080bw driver.
The Super Speed Race audio circuits are clearly derived from those games;
the biggest difference is the use of a linear feedback shift register
for noise generation.

* Updated netlist static solvers with recent netlist changes.
2020-08-16 21:32:45 -04:00
couriersud
c44d930015 netlist: Add tank to nl subtarget, update static_solvers. 2020-08-17 01:34:04 +02:00
couriersud
c619fbe40c netlist: increase queue sizes to accomodate nl_tank complexity. 2020-08-17 01:34:03 +02:00
Ryan Holtz
6c5e9d3eff -netlist: Regenerated static solvers, and fixed errors preventing static solvers from generating. 2020-08-16 20:44:00 +02:00
Robbbert
395cf63d30 *atom: cleanup 2020-08-17 04:33:05 +10:00
Ryan Holtz
e2231ddcd2 -atarittl: Added netlist for Tank. currently runs at about 0.005% of full speed, unsure why. 2020-08-16 20:04:34 +02:00
Nigel Barnes
c2a670bda8 acorn_dsk: Added support for Kenda formatted SSD images. 2020-08-16 16:14:07 +01:00
couriersud
75925e1905 netlist: buffered_param_setter refactoring
* Each parameter to set now has a dedicated buffered_param_setter
device.
* This allows different sample times per device
* Updated netlist.cpp for new approach
* buffered_param_setter is a template. The template parameter is a class
which is expected to support the [] operator. The value passed to []
operator is the requested sample number.
2020-08-16 00:21:52 +02:00
couriersud
290ffa74fc netlist: Remove printf debugging.
* also raises error if during parsing a local source is not found.
2020-08-15 22:20:24 +02:00
couriersud
a2248e8e18 netlist: Fix elif processing. 2020-08-15 22:20:23 +02:00
couriersud
6d7f41871c netlist: improve two error messages.
* Provide more detail and rephrase to make them more clear.
2020-08-15 20:12:18 +02:00
Aaron Giles
204818a509 netlist: Add THRESH parameter to AFUNC 2020-08-15 20:01:03 +02:00
couriersud
68b7535dd1 netlist: make streams accept logic parameters as well. 2020-08-15 20:01:00 +02:00
couriersud
9d00d87dac netlist: commit missing files in last commit. 2020-08-12 22:12:20 +02:00
couriersud
87b702b31f netlist: more include untangling.
* nl_base.h now basically only includes files from core.
* all headers in core compile on their own.
2020-08-12 20:17:10 +02:00
couriersud
167da15753 netlist: improve parsing performance
* preparational work for easier device addition.
2020-08-12 20:17:10 +02:00
Colin Douglas Howell
e87939ac9a mw8080bw: add lagunar to 280zzzap netlist audio, other tweaks
Added Laguna Racer to the 280-ZZZAP netlist audio driver, with
conditional changes to the netlist for the circuitry differences
between the two games.

Adjust some netlist components that apparently changed from the
280-ZZZAP schematic to production machines.

Removed the driver's private MC3340 netlist, using the equivalent
one in the netlist library instead.
2020-08-11 16:20:43 -07:00
Ryan Holtz
add6f68bec -destroyr: Added netlist sound. [Ryan Holtz] 2020-08-11 19:48:52 +02:00
Ryan Holtz
461b8338a2 -flyball: Added netlist sound. [Ryan Holtz, Ivan Vangelista] 2020-08-11 05:36:52 +02:00
Ryan Holtz
1c11ecb000 -starfire: Removed MACHINE_IMPERFECT_SOUND flags. Added missing music and Alert sound effect to Fire One netlist and added Star Fire netlist. [Ryan Holtz, Colin Howell, Aaron Giles] 2020-08-10 22:15:53 +02:00
couriersud
9809a7b991 netlist: align naming of files within the macro folder.
* Use a consistent naming scheme. This is a preparational step towards
improved parsing performance.
2020-08-10 18:31:34 +02:00
couriersud
77dbc79547 netlist: fix line-number tracking when at end of line.
* Also remove a semicolon from nlm_opamp.cpp
2020-08-09 12:00:57 +02:00
couriersud
b0b2e1351a netlist: fix creation of static solvers. 2020-08-09 08:04:07 +02:00
couriersud
923de88abb netlist: more header file separation 2020-08-08 20:10:12 +02:00
Ryan Holtz
e404f347c6 -fireone: Committed netlist for couriersud to have a look at. 2020-08-06 20:16:22 +02:00
couriersud
2c799e1160 netlist: add man target to netlist makefile. 2020-08-06 09:46:43 +02:00
couriersud
738e9cc136 netlist: Make new documentation items appear in doxygen output. 2020-08-06 09:46:20 +02:00
Aaron Giles
64db8f054b netlist: Documentation updates for CDxxxx devices 2020-08-06 09:46:08 +02:00
Aaron Giles
7c88d7813f netlist: Rename DM9312 to TTL_9312 for consistency. 2020-08-06 09:45:56 +02:00
Aaron Giles
056426059f netlist: Added documentation for devices in nlm_ttl74xxx.cpp
* Documentation for all devices in nlm_ttl74xxx now is available in the
doxygen documentation.
2020-08-06 09:45:44 +02:00
couriersud
4959fbaa8b netlist: Add CD4013 to net_lib.cpp 2020-08-06 09:45:29 +02:00
couriersud
d524688df1 netlist: Refactored pokenizer.
* Separated tokenizing and reading of tokens.
* This enables caching of parsing results on the token level.
* Implemented caching of token stream.
* Overall this significantly improves parsing performance (~10x)
* Next step towards a bare-bone nltool which does not depend on macro
devices.
2020-08-06 09:44:59 +02:00
Justin Kerk
d2b7643753 netlist: Better fixes for Emscripten (#7031)
Silence indentation warning in 3rdparty/ under Emscripten (#7031)
2020-08-04 23:53:52 -07:00
Justin Kerk
2dd0985999 netlist: Fix build under Emscripten (#7031)
netlist: Fix crash under Emscripten by disabling aligned optimizations
2020-08-05 05:58:14 +00:00
Vas Crabb
93110b8cc4 Revert "mdos dsk: support legacy floppy images, add XDOS support"
This reverts commit 8ada258ec7.

We are not accepting further legacy floppy formats.
2020-08-04 05:51:56 +10:00
Colin Douglas Howell
d35e103b9f
mw8080bw: engine sound tone fix for 280zzzap netlist audio (#7028) 2020-08-02 22:35:58 -04:00
couriersud
8b43aabf0e netlist: add example documentation to SN74LS629_DIP 2020-08-02 21:52:13 +02:00
Ryan Holtz
48be14bade -tankbatt: Added netlist audio. [Ryan Holtz] 2020-08-02 20:53:32 +02:00
couriersud
a68287d6a6 netlist: Move documentation from header to cpp file. Batch 3.
* Header files will disappear and only nld_devinc.h which is can be
created by nltool will stay.
* These commits ensure that the documentation is preserved when the
header files are deleted at some point in the future
2020-08-02 14:47:12 +02:00
couriersud
8c4f283a77 netlist: Move documentation from header to cpp file. Batch 2. 2020-08-02 14:30:49 +02:00
couriersud
759ee29329 netlist: Move documentation from header to cpp file. Batch 1. 2020-08-02 13:43:32 +02:00
Aaron Giles
cfcae647d5 netlist: Minor optimization to remove sqrt from inner loop. 2020-08-02 13:04:59 +02:00
Aaron Giles
d8733b9f25 netlist: Macro-ized 74174 DIPs 2020-08-02 12:49:44 +02:00
Aaron Giles
cdca99f353 netlist: Macro-ized CD4006 DIPs 2020-08-02 12:41:28 +02:00
Aaron Giles
5f991abda1 netlist: Macro-ized 74393 DIPs 2020-08-02 12:41:27 +02:00
Aaron Giles
88c4e1d76a netlist: Macro-ized 74166 DIPs 2020-08-02 12:41:27 +02:00
Aaron Giles
90e4d6410a netlist: Macro-ized 74165 DIPs 2020-08-02 12:41:26 +02:00
Aaron Giles
f40b7e48f1 netlist: Macro-ized 74164 DIPs 2020-08-02 12:41:25 +02:00
Aaron Giles
8fff0b57ab netlist: Macro-ized 74153 DIPs 2020-08-02 12:41:25 +02:00
Aaron Giles
2347096a88 netlist: Macro-ized 74113 DIPs 2020-08-02 12:41:15 +02:00
Aaron Giles
8705fe505e netlist: Macro-ized 74107 DIPs 2020-08-02 12:40:47 +02:00
Aaron Giles
fe8c88862f netlist: Macro-ized 9322 DIPs. 2020-08-02 12:36:28 +02:00
Aaron Giles
bd6cbb17aa netlist: Macro-ized 9310/9316/74161/74163 DIPs 2020-08-02 12:29:07 +02:00
Aaron Giles
daa62d6c32 netlist: Macro-ized 7493/7497 DIPs 2020-08-02 12:29:07 +02:00
Aaron Giles
b2d4b6d887 netlist: Macro-ized 7492 DIP 2020-08-02 12:29:06 +02:00
Aaron Giles
ca10c41883 netlist: Macro-ized 7490 DIP 2020-08-02 12:29:05 +02:00
Aaron Giles
5649ce186f netlist: Macro-ized 7485 DIP 2020-08-02 12:29:05 +02:00
Aaron Giles
ea921a554d netlist: Macro-ized 7483 DIP 2020-08-02 12:29:04 +02:00
couriersud
51d840703d netlist: Fix 7492 and roms include bug. 2020-08-02 09:20:35 +02:00
Aaron Giles
9414a219a9 netlist: Added CD4017/4022 devices.
* Also contains squashed clang signedness fixes
2020-08-01 18:27:21 +02:00
Aaron Giles
2719654114 netlist: Better implementation of CD4053. 2020-08-01 18:27:21 +02:00
Aaron Giles
c06ebeb787 netlist: Fix incorrect sense in warning. 2020-08-01 18:27:20 +02:00
Aaron Giles
0487858692 netlist: More dip macros and device refactoring
* Updated 7450, 7473/7473A, 7474, 7475/7477 devices to use DIP macros
instead of C++ DIPs.
* Reworked 7475/7477 more in the style of 7474, leveraging system signal
activation and edge detection.
2020-08-01 18:27:19 +02:00
couriersud
15172f15ca netlist: Disable dangerous optimization.
* This was an over-aggressive optimization. Now prints an info and
recommends to comment out if appropriate.
2020-08-01 18:27:19 +02:00
couriersud
d876f4cd82 netlist: Fix 74ls629 implementation and some cherry-picking issues. 2020-08-01 18:27:18 +02:00
Aaron Giles
c0ecd68341 netlist: Device refactoring
* 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.
2020-08-01 18:27:17 +02:00
couriersud
bcfc49f5b8 netlist: Fix CD4053 device
* also fix signedness warning (clang) in CD4020
2020-08-01 18:27:17 +02:00
ajrhacker
a7b1347ac3
Merge pull request #7015 from 68bit/mdos_dsk_legacy
mdos dsk: support legacy floppy images, add XDOS support
2020-07-29 10:37:40 -04:00
Ryan Holtz
03c45ffbc7 -starcrus: Added netlist sound. [Ryan Holtz, Colin Howell, Aaron Giles] 2020-07-29 14:23:58 +02:00
68bit
8ada258ec7 mdos dsk: support legacy floppy images, add XDOS support
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.
2020-07-29 14:00:05 +10:00
AJR
ecb1d266c6 nld_4053.cpp: Remove unused lambda capture 2020-07-28 23:59:03 -04:00
couriersud
c7359e0aea netlist: Fix an issue during proxy hookup.
* Add cd4053 to netlist.lua
* Recreated nld_devinc.h
2020-07-28 20:44:07 +02:00
Aaron Giles
179d03ac96 netlist: Convert CD4013 DIP to macro. 2020-07-28 20:43:44 +02:00
couriersud
f761f6f7be netlist: Fix 4011 implementation. 2020-07-28 20:43:19 +02:00
Aaron Giles
44e4ea141d netlist: Add CD4011, CD4024, 7407 and CD4053 devices. 2020-07-28 20:43:03 +02:00
couriersud
0cbbbdc846 netlist: source stream refactoring
* This is an infrastructure change to enable better error reporting
including file/source and line numbers in the future
2020-07-28 20:42:47 +02:00
couriersud
09e987486a netlist: necessary changes towards runtime processing of macro directory 2020-07-28 20:42:30 +02:00
couriersud
c00cbad238 netlist: Add a missing directive to the file parser. 2020-07-28 20:42:13 +02:00
couriersud
45713f390c netlist: fix a bug in preprocessor if and elif parsing. 2020-07-28 20:41:51 +02:00
couriersud
ffb37e9ae8 netlist: further nl_base.h splitting into headers in core subdir. 2020-07-28 20:40:59 +02:00
couriersud
cbba06308f netlist: remove test code 2020-07-28 20:40:37 +02:00
couriersud
38be1d4296 netlist: hopefully fix issue #7006 2020-07-26 10:54:14 +02:00
Vas Crabb
60bd3086cc srcclean for 0.223 2020-07-26 12:56:13 +10:00
couriersud
28ca04dc7e netlist: sub solvers now have their own parameter set.
* 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.
2020-07-25 14:47:26 +02:00
couriersud
89687cc1a4 netlist: Fix scheduling bug. 2020-07-25 14:47:25 +02:00
couriersud
ad1bc7b318 netlist: include GMRES solver in build.
* 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.
2020-07-25 14:47:24 +02:00
couriersud
599f5572e7 netlist: Fix format string in gcr code. 2020-07-25 14:47:24 +02:00
couriersud
6e2e3dab4f netlist: Fix clang unused variable warning. 2020-07-25 14:47:23 +02:00
couriersud
494690081b netlist: separate nl_base.h into separate header files.
* This clean-up exercise will hopefully make it easier to navigate the
core code. Another long term goal is to further straighten the object
model.
2020-07-25 14:47:22 +02:00
couriersud
2231bf8ae0 netlist: Rewrote scheduler scheduling.
* 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.
2020-07-25 14:47:22 +02:00
couriersud
016c636bb3 netlist: add frontier documentation 2020-07-25 14:47:21 +02:00
couriersud
c29a37c393 netlist: fix some clang tidy warnings. 2020-07-25 14:47:20 +02:00
couriersud
3a9ab286c6 netlist: nld_matrix_solver is now owned by nld_solver. 2020-07-25 14:47:19 +02:00
Colin Douglas Howell
ca461323c6
mw8080bw: improvements to 280zzzap netlist audio (#6984)
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.
2020-07-23 13:47:39 -04:00
Aaron Giles
f23db5da38
Added netlist-based audio to early Cinematronics vector games (#6979)
* 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]
2020-07-22 14:07:34 -07:00
couriersud
cfa1cacaf2 netlist: fix logging of final timestamp. 2020-07-19 07:51:54 +02:00
couriersud
a1bb5475cc netlist: include timestamp in newton-raphson loop warnings. 2020-07-18 17:38:52 +02:00
couriersud
94d76c89a4 netlist: Fix 4066 2020-07-17 23:13:04 +02:00
couriersud
f0d012c1f5 netlist: Potential regression trigger.
* 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.
2020-07-17 23:12:24 +02:00
Aaron Giles
976212053c netlist: add 74157 device. 2020-07-17 23:12:04 +02:00
couriersud
5d0786a449 netlist: prepare road towards trapezoidal integration.
* This is a long term transition goal. Documented in source (see
NL_USE_BACKWARD_EULER).
2020-07-17 23:11:39 +02:00
AJR
dd2bf77ba6 nld_4066.cpp: Actually fix build for now 2020-07-16 18:07:09 -04:00
MetalliC
896a982d1b spectrum: implemented Swift Disc and Swift Disc II interfaces 2020-07-17 00:50:06 +03:00
AJR
c92a885a3a nld_4066.cpp: Fix clang error: no matching constructor for initialization of 'analog::nld_twoterm' 2020-07-16 16:33:12 -04:00
couriersud
49ed748401 netlist: avoid ne555 oscillation due to overshoot compensation 2020-07-16 09:56:09 +02:00
couriersud
847d473163 netlist: comment out empty reset and update calls 2020-07-16 09:55:50 +02:00
couriersud
8cd6774cac netlist: code maintenance.
* more handler alignment
* dead code removal
* remove update calls which do nothing
2020-07-16 09:55:15 +02:00
couriersud
0dfa500a4a netlist: Fix Inductor state saving. 2020-07-16 09:34:57 +02:00
Colin Douglas Howell
f2145ce867 mw8080bw: multiple improvements to gunfight netlist audio
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.
2020-07-14 15:57:19 -07:00
MetalliC
06b98bd357 trd_dsk.cpp add more formats, improve image type detection 2020-07-14 19:26:42 +03:00
couriersud
735752cea8 netlist: reduce overshoot impact on NE555 astable frequency.
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.
2020-07-14 05:36:41 +02:00
MetalliC
97042aa7f9 spectrum: add Logitek Proceed 1 C1541 disk interface (not fully working yet) 2020-07-12 22:58:58 +03:00
couriersud
8cf1c1feca netlist: Always take power pin names from logic family.
* Default nmos power pins to VCC and GND.
* MOS uses VDD/VSS - update gamemachine netlist.
2020-07-12 21:48:50 +02:00
couriersud
6328b0e995 netlist: finished input handler refactoring.
* all inputs now explicitly specify a signal handler.
2020-07-12 20:29:04 +02:00
couriersud
54fe9d1678 netlist: and the next batch of non-virtual handlers. 2020-07-12 20:29:03 +02:00