Commit Graph

2787 Commits

Author SHA1 Message Date
couriersud
13f6e92cec netlist: Add the NE566 as a macro device. [Couriersud]
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.
2020-05-01 10:04:22 +02:00
couriersud
c782a0ef33 netlist: add NE566 to netlist.lua. (nw) 2020-04-29 14:38:58 +02:00
Aaron Giles
a46108ce5a Stub implementation of 566 VCO 2020-04-29 12:24:33 +02:00
Aaron Giles
09c19bd622 Added some missing infrastructure. Now TL081 shows up in device list. 2020-04-29 12:22:34 +02:00
Aaron Giles
302223432b Some initial changes. 2020-04-29 12:21:31 +02:00
couriersud
e192f94e75 netlist: Fix some edge cases in static compile. (nw)
Comes with a new version of static_solvers.cpp
2020-04-28 22:39:19 +02:00
couriersud
026123beb2 netlist: Fix documentation build on windows in makefile. (nw)
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".
2020-04-28 21:08:07 +02:00
couriersud
3f95aebfb5 netlist: Fix "--cmd=listdevices". [Couriersud]
Broken for quite a while this is now working again.
2020-04-28 21:08:06 +02:00
couriersud
77da7b11ae netlist: more code maintenance. (nw)
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.
2020-04-28 21:08:06 +02:00
couriersud
14e4c4bb3f netlist: improve const-awareness and tidy changes. (nw)
Identified a number of code locations which could accept const
arguments.
2020-04-28 21:08:05 +02:00
couriersud
097c736f79 Netlist: Added 74163 to netlist. [Couriersud] 2020-04-28 21:08:04 +02:00
couriersud
da8cfd878f netlist: fix some windows build issues in build/makefile. (nw) 2020-04-28 21:08:04 +02:00
couriersud
62c3f75221 netlist: More clang-tidy fixes. (nw) 2020-04-28 21:08:03 +02:00
couriersud
14850cbb02 netlist: More clang-tidy fixes. (nw) 2020-04-28 21:08:02 +02:00
couriersud
420f4909be netlist: Fix clang-tidy warnings. (nw) 2020-04-28 21:08:02 +02:00
couriersud
0cf99a5310 netlist: rename some macros. (nw)
Rename COPYASSIGN* and friends to PCOPYASSIGN*.
2020-04-26 01:35:31 +02:00
couriersud
00bff3e703 netlist: clang tidy fixes and srcclean. (nw) 2020-04-25 18:10:18 +02:00
couriersud
d3ee7e21c6 netlist: unify solver calls. (nw)
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).
2020-04-25 18:08:04 +02:00
couriersud
f5fad035de netlist: improve readability. (nw)
The purpose here is to make clear what is actually done and to reduce
usage of calls to update.
2020-04-25 13:01:16 +02:00
couriersud
455b8fce2d netlist: document trapezoidal capacitor integration. (nw) 2020-04-23 23:03:58 +02:00
couriersud
b63cbebb17 netlist: Documentation update. (nw) 2020-04-22 21:59:18 +02:00
couriersud
00303795fd netlist: Fix a segfault happening only under for certain netlists.
This seems to be a compiler/standard library issues.
2020-04-22 15:44:08 +02:00
couriersud
3243efee70 netlist: code maintenance and edge case fixes. (nw)
"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.
2020-04-20 20:52:21 +02:00
couriersud
104090ae0e netlist: rename some camel case names. (nw) 2020-04-19 19:04:33 +02:00
couriersud
20748b5093 netlist: simplify object structure a bit. (nw) 2020-04-19 17:21:02 +02:00
couriersud
0054862e3c netlist: compile time improvement and code maintenance. (nw)
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.
2020-04-19 16:08:43 +02:00
couriersud
44220a8d39 netlist: code maintenance on pfunction. (nw) 2020-04-19 13:03:44 +02:00
couriersud
6d35a38bf2 netlist: clang-tidy, srcclean and pedantic warnings fixed. (nw) 2020-04-18 22:23:32 +02:00
couriersud
39d7e8063a netlist: remove code duplication. (nw) 2020-04-18 22:04:04 +02:00
couriersud
16bde11adb netlist: nltool usage and static compile changes. [Couriersud]
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
2020-04-18 16:38:55 +02:00
couriersud
2ce8b83fea netlist: Fix alternative LM3900 implementations. (nw) 2020-04-18 16:38:54 +02:00
couriersud
6cbd3e7764 netlist: Fix a macro expansion bug. (nw) 2020-04-18 16:38:53 +02:00
couriersud
d324eb18fe netlist: Move macros where they belong. (nw) 2020-04-18 16:38:52 +02:00
couriersud
eb7a0a545b netlist: basename function now accepts a suffix to remove. (nw) 2020-04-18 15:44:42 +02:00
couriersud
d8fbec6ab4 netlist: add parameter to split_paragraphs ... (nw)
to allow passing in a custom line end string.
2020-04-18 15:43:06 +02:00
couriersud
855c37d58a netlib: remove a fixme in pmain.cpp. (nw) 2020-04-18 15:41:40 +02:00
couriersud
1af4b9f870 netlist: Document alternative approach to CD4016. (nw)
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.
2020-04-17 23:08:31 +02:00
couriersud
591442fb37 netlist-doc: Fix typo. (nw) 2020-04-14 15:11:15 +02:00
couriersud
dcf2109120 netlist: fix standalone build and doxygen mainpage. (nw) 2020-04-14 00:09:49 +02:00
couriersud
5b6013caea netlist: improve performance up to 65% on audio netlists. [Couriersud]
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.
2020-04-13 21:32:00 +02:00
Vas Crabb
5fba95ff40 formats: permission from Nigel Barnes to relicense Acorn and AFS disk handlers as BSD-3-Clause (nw) 2020-04-13 21:13:18 +10:00
Vas Crabb
de72f97b90 (nw) formats: reduce dependencies on libemu
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).
2020-04-13 19:14:36 +10:00
Ivan Vangelista
404e7321a6 formats/apridisk.cpp: fixed compile
../../../../../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'?
2020-04-13 07:56:21 +02:00
Vas Crabb
d10ba2b97a With permission from Dirk Best, apply 3-clause BSD license to common devices and image handling (nw)
Note that this does not apply to machine drivers or device implementations for a single machine family (e.g. Amiga chips or VTech expansion bus)
2020-04-13 15:01:40 +10:00
Vas Crabb
2add7c158c split was using sha1.h directly - fix that (nw) 2020-04-13 06:48:15 +10:00
Vas Crabb
af82c0eca8 util: re-implement SHA-1 and get rid of the two third-party implementations (nw) 2020-04-13 06:16:03 +10:00
couriersud
2453c5b077 netlist: minor code maintenance. (nw) 2020-04-11 14:43:26 +02:00
couriersud
e655aacb4e netlist: performance improvement. (nw) 2020-04-10 20:50:30 +02:00
couriersud
4af78838ad netlist: Reduce memory allocation calls in non-core code. (nw) 2020-04-10 15:01:05 +02:00
Oliver Stöneberg
e9f6bd8d01
Revert "fixed some modernize-use-equals-default clang-tidy warnings (… (#6360)
* Revert "fixed some modernize-use-equals-default clang-tidy warnings (nw)"

This reverts commit 54486ab9

* fixed merge error
2020-04-08 11:10:21 -04:00
Vas Crabb
8a4e16d968 centralise instantiation of more of the util::strformat engine 2020-04-08 22:00:14 +10:00
Robbbert
b5e08ae5e8 H8: added support for H8T tapes. 2020-04-06 01:37:05 +10:00
couriersud
5075448278 netlist: Fix some clang-tidy-10 warnings. (nw) 2020-04-05 16:28:01 +02:00
Vas Crabb
92d6e163a8 srcclean (nw) 2020-03-22 14:33:57 +11:00
couriersud
e160240f6a netlist: Document alternative opamp output stage. (nw) 2020-03-21 15:42:45 +01:00
couriersud
840a9c640f netlist: Change MB3614 outout impedance. (nw) 2020-03-21 15:42:44 +01:00
couriersud
8a87993201 netlist: document linearized diode model above max. dissip. [Couriersud]
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.
2020-03-21 15:42:43 +01:00
Vas Crabb
9c600695f0 (nw) Cleanup on the way:
* 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.
2020-03-10 18:21:10 +11:00
couriersud
354c9c363b williams.cpp: Improve williams2 color display. [Couriersud]
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.
2020-03-05 22:22:58 +01:00
R. Belmont
3d5a9dbc4f
Merge pull request #6385 from shattered/_ad71766bb26
ibmxdf_dsk: IBM Extended Density Format support (nw)
2020-03-02 14:57:30 -05:00
couriersud
ddf0865642 netlist: Fix inductor. (nw)
Fix inductor calculation. Updated turkey shoot example to skip start-up
swinging of L1/C60 LC circuit. Recording now starts at 1ms.
2020-03-02 18:45:45 +01:00
Sergey Svishchev
c155d424ac ibmxdf_dsk: IBM Extended Disk Format support (nw) 2020-03-02 20:21:04 +03:00
couriersud
cf2d6a8393 Use netlist to calculate RGB values for Turkey Shoot. [Couriersud]
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
2020-03-02 18:17:52 +01:00
couriersud
fde057ba00 nlwav: add sampled output format. [Couriersud]
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.
2020-03-02 18:15:22 +01:00
couriersud
eac1218d59 netlist: use initializer_list. (nw)
- 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.
2020-03-02 14:23:32 +01:00
Vas Crabb
f7dbca3527 srcclean and manual adjustments (nw) 2020-02-23 13:20:34 +11:00
couriersud
8b3a65302b netlist: updated VS files for standalone build. (nw) 2020-02-17 22:45:11 +01:00
couriersud
9214347334 netlist: fix log file option in nltool. (nw) 2020-02-17 22:43:49 +01:00
couriersud
10ee674282 netlist: change output impedance to more realistic values. (nw) 2020-02-17 22:11:35 +01:00
couriersud
fbd9055a90 Turn off alignas to please -Wattributes on arm. (nw) 2020-02-17 22:08:56 +01:00
couriersud
9ea6b12ccb netlist: added min and max to pfunction. (nw) 2020-02-16 19:17:32 +01:00
couriersud
acaea048e1 netlist: Add support for pots to spice conversion. [Couriersud] 2020-02-16 19:16:20 +01:00
couriersud
a2dd2a1c76 Document current state of congo bongo development. (nw) 2020-02-16 19:13:49 +01:00
couriersud
9142c69f03 Fix issue #6293. (nw) 2020-02-11 22:18:03 +01:00
ajrhacker
abc5492c17 Merge pull request #6280 from 68bit/flex-dsk-identify-needed
flex_dsk: include an identify() method.
2020-02-08 23:24:53 -05:00
Vas Crabb
fead8792cc util/strformat.h: future-proof for C++20 (GitHub #6275)
(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.
2020-02-09 13:44:35 +11:00
68bit
17f30b20f2 flex_dsk: include an identify() method.
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.
2020-02-09 11:45:52 +11:00
68bit
a87c3b6f7a wd177x_dsk: generalize to allow custom track format variations
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.
2020-02-08 00:12:05 +11:00
R. Belmont
3f972f86c7
Merge pull request #6245 from shattered/_27394e2f097
aim_dsk: use splice position recorded in the image, if available (nw)
2020-02-05 13:42:04 -05:00
couriersud
e204d878f8 netlist: Fix VC compile. (nw) 2020-02-04 23:24:46 +01:00
couriersud
636315be5f netlist: code maintenance. (nw)
Remove dead code, fix lint warnings, make spice netlist conversion more
flexible, implement changes to controlled sources.
2020-02-03 20:21:40 +01:00
couriersud
7480c9fe09 netlist: align nltool -c convert with mame/discrete/README.md (nw) 2020-02-02 19:30:25 +01:00
couriersud
4c7e687f5e netlist: spice-to-netlis conversion sync with mame/discrete. (nw)
This is work in progress. The aim is to remove all hacks in netlist
conversion going forward.
2020-02-02 02:23:16 +01:00
Vas Crabb
753dd79442 Merge branch 'release0218' into mainline-master 2020-02-02 04:19:17 +11:00
Vas Crabb
9e0b03710d more debug logging left on, few small cleanups (nw) 2020-02-02 01:43:27 +11:00
Sergey Svishchev
c12f5eecda aim_dsk: use splice position recorded in the image, if available (nw) 2020-01-31 22:53:34 +03:00
couriersud
7f419fa1b3 netlist: Document Congo Bongo progress and fix devices. 2020-01-31 20:25:15 +01:00
couriersud
84e3eb1deb netlist: Code symplification and bugfixes. (nw)
- Fixes performance regression and net_splitter struct.
- Fixes nltool time measurements
- pstream simplification
2020-01-31 20:23:40 +01:00
couriersud
72f86082aa netlist: clang lint fixes. (nw) 2020-01-31 20:20:53 +01:00
Vas Crabb
bddfe1030c
Revert "Alfaskop improvements" 2020-01-31 20:05:02 +11:00
Joakim Larsson Edström
7d5c59f6e5
Merge pull request #6068 from JoakimLarsson/alfaskop_pla
Alfaskop improvements
2020-01-31 09:50:18 +01:00
Vas Crabb
3536bbdd71 there are reasons for things being the way they were (nw) 2020-01-31 14:53:46 +11:00
Oliver Stöneberg
dfaf9dd5bc
fixed some modernize-use-auto clang-tidy warnings (nw) (#6238) 2020-01-30 21:46:27 -05:00
Oliver Stöneberg
4a10205777
fixed some modernize-use-equals-default clang-tidy warnings (nw) (#6237) 2020-01-30 21:45:34 -05:00
Oliver Stöneberg
059243f68e
fixed some clang-tidy warnings (nw) (#6236)
* fixed some modernize-redundant-void-arg clang-tidy warnings (nw)

* fixed some modernize-use-bool-literals clang-tidy warnings (nw)

* fixed some modernize-use-emplace clang-tidy warnings (nw)

* fixed some performance-move-const-arg clang-tidy warnings (nw)

* fixed some readability-redundant-control-flow clang-tidy warnings (nw)

* fixed some readability-redundant-string-cstr clang-tidy warnings (nw)

* fixed some performance-unnecessary-value-param clang-tidy warnings (nw)
2020-01-30 20:01:48 -05:00
couriersud
0ff9acb5f5 ptime: change operators to align with c++ textbooks. (nw) 2020-01-29 19:02:16 +01:00
couriersud
fceee50c8b netlist: Parameters evaluated when netlist is created. [Couriersud]
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.
2020-01-29 19:00:10 +01:00
couriersud
d7fd89afe1 netlist: fix parameter update recalculation. (nw) 2020-01-29 18:53:06 +01:00
couriersud
2742727a0b netlist: Fix crash in infix function evaluation. (nw) 2020-01-29 18:51:26 +01:00
couriersud
2b7c6af9ef netlist: make gain parameter mandatory for controoled sources. (nw) 2020-01-29 18:50:27 +01:00
couriersud
f7d8a10da5 netlist: Code maintenance. (nw)
- 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.
2020-01-27 21:47:41 +01:00
couriersud
f6a04074f6 netlist: Fix/extend SPICE format conversion. [Couriersud]
"./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.
2020-01-26 21:28:48 +01:00
couriersud
fa27a02b0d netlist: add current controlled voltage source (CCVS). [Couriersud] 2020-01-26 21:25:33 +01:00
couriersud
d980e7d6ab netlist: Fix issue in inactive code-path. (nw) 2020-01-26 21:23:20 +01:00
couriersud
636894b02f netlist: MAJOR bug fix. Expect other bugs to surface. [Couriersud]
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.
2020-01-26 21:22:13 +01:00
couriersud
6874b1f7ac netlist: clang lint readability fixes. (nw) 2020-01-25 21:13:21 +01:00
couriersud
9431ee68e7 netlist: clang lint fixes, srcclean and nlwav fix. (nw) 2020-01-25 21:12:01 +01:00
couriersud
42d351a4eb netlist: New devices and some fixes. [Couriersud]
- 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.
2020-01-25 15:26:59 +01:00
R. Belmont
1a5b900759
Merge pull request #6195 from firewave/includes
use C++ library includes (nw)
2020-01-22 22:04:35 -05:00
R. Belmont
db157a165b
Merge pull request #6187 from 68bit/apple2-floppy-options-track-count
apply2 floppy format: bake in the track count
2020-01-22 22:04:18 -05:00
Oliver Stöneberg
7c3aea8928 fixed some clang-tidy warnings (nw) (#6197)
* fixed some bugprone-throw-keyword-missing clang-tidy warnings (nw)

* fixed some modernize-use-nullptr clang-tidy warnings (nw)

* fixed some readability-delete-null-pointer clang-tidy warnings (nw)

* fixed some performance-faster-string-find clang-tidy warnings (nw)

* fixed some performance-for-range-copy clang-tidy warnings (nw)

* fixed some readability-redundant-string-cstr clang-tidy warnings (nw)
2020-01-22 22:03:35 -05:00
firewave
399515c7a7 use C++ library includes (nw) 2020-01-22 13:31:52 +01:00
couriersud
9e272e4b55 netlist: code maintenance. (nw)
- remove pthrow trampline as proposed by Vas.
- identify throwing code by adding noexcept(false)
- move "connected term" information to setup code.
- srcclean
2020-01-20 21:15:22 +01:00
68bit
7fc7f5850e apply2 floppy format: bake in the track count
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.
2020-01-20 13:32:17 +11:00
couriersud
0f69abe4dc netlist: clang tidy fixes. (nw) 2020-01-19 20:56:53 +01:00
couriersud
b4e8244827 netlist: Fix 741 opamp representation. (nw) 2020-01-19 20:54:19 +01:00
AJR
35f45085fe Eliminate simple_list_wrapper and replace its only use (nw)
The replacement of append with emplace_front alters the sequence, but that should cause no difference in behavior here.
2020-01-18 23:08:04 -05:00
couriersud
f6a7a6fe88 netlist: Code maintenance. (nw)
Checked and fixed conditional compile paths.
Simplified memory allocation.
Generalized signal handling.
2020-01-18 16:39:49 +01:00
couriersud
eb92f5900c netlist: 7493, minor edit. (nw) 2020-01-16 22:43:59 +01:00
couriersud
09f03c4b05 netlist: Fix building with 128bit integers. (nw) 2020-01-16 22:43:23 +01:00
couriersud
83713b0b5d netlist: Increase resolution to 100 pico seconds. [Couriersud]
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.
2020-01-15 21:41:57 +01:00
couriersud
d070d8ebe6 netlist: move some functions to pmath. (nw) 2020-01-15 21:13:38 +01:00
couriersud
e13f1516fc netlist: Make sure diodes step enough ... [Couriersud]
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.
2020-01-15 21:09:04 +01:00
couriersud
08d576e181 Fix clang build. (nw) 2020-01-12 17:48:54 +01:00
couriersud
9d7cbcaa40 netlist: Code maintenance. (nw)
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.
2020-01-12 17:16:25 +01:00
couriersud
e4b4899682 netlist: dead code removal. (nw) 2020-01-11 22:53:19 +01:00
couriersud
7b695dac59 netlist: fix github issue #6106. [Couriersud, Firewave]
Workaround for a bug in msvc. __VA_ARGS__ are expanded to a single token
in msvc, all other compilers expand to a list of tokens.
2020-01-08 21:32:34 +01:00
fulivi
0d16f8cc53 imds2: implemented save in IMG disk format (#6140)
* imds2: implemented save in IMG disk format

* imds2: try to fix CI failure again, this time by removing LOGs
2020-01-07 11:15:41 -05:00
Nigel Barnes
ec751fc8c6 acorn_dsk: Added support for HADFS floppy images. 2020-01-07 12:39:15 +00:00
fulivi
2ec25ca6d5 Emulation of isbc202 floppy disk controller (#6119)
* imds2: isbc202 floppy disk controller added

* imds2: attempt to fix problems with CI checks
2020-01-04 16:11:48 -05:00
Stiletto
88909dc0d0
Happy New Year 2020 (nw) (#6128)
Happy New Year 2020 (nw) (#6128)
2020-01-04 01:13:50 -05:00
couriersud
018830967a netlist: Force invalidation of save states. [Couriersud]
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.
2019-12-30 16:50:32 +01:00
Joakim Larsson Edstrom
e8e5664d6f alfaskop41xx.cpp, jedparse.h, mc6844.cpp : addressed PR feedback 2019-12-27 00:32:57 +01:00
Vas Crabb
826db8a22b srcclean (nw) 2019-12-21 15:15:32 +11:00
Vas Crabb
825cd42639 add missing return statement for LRU cache assignment operator (nw) 2019-12-20 13:24:09 +11:00
Vas Crabb
6ce8e37748 coretmpl.h: different approach to member initialisation - hopefully work around issue with move constructor; also stop using names that start with underscore followed by capital letter as they're reserved (nw) 2019-12-20 13:21:45 +11:00
Joakim Larsson Edstrom
88b532d28a pla.cpp, jedparse, jedutil: Added recognition and some support for alternative PLA binary format DataIO 2019-12-18 12:45:01 +01:00
couriersud
6c181d7adb netlist: Change visibility to private for some members. [Couriersud]
Interesting observation to note: since MAME 208 bench 30 results for
pongf increased from 450% to 580%.
2019-11-26 00:47:05 +01:00
couriersud
c50bf9a698 netlist: move nl_examples to src/lib/netlist/examples. (nw)
One folder less in the top-level.
2019-11-25 22:28:41 +01:00
AJR
bb54cd8d23 Fix clang error: cannot initialize a parameter of type 'void *' with an lvalue of type 'volatile unsigned char *' (nw) 2019-11-24 12:04:30 -05:00
Vas Crabb
8c4f10d3aa apparently 3AM is not the time to code (nw) 2019-11-25 03:29:33 +11:00
Vas Crabb
9525108f78 helps to git add before git commit (nw) 2019-11-25 03:24:12 +11:00
Vas Crabb
d2f3d02908 pre-fill things allocated with operator new with 0xcd in debug builds (value can be changed by setting global g_mame_new_prefill_byte with a debugger) - this is gonna hurt performance, but it will help catch issues exposed when we remove pre-clearing before constructing devices 2019-11-25 03:20:08 +11:00
Vas Crabb
e64edf6c71 srcclean and indentation cleanup (nw) 2019-11-24 13:52:11 +11:00
couriersud
35f1086ba2 netlist: clang lint fixes and standalone build fix. (nw) 2019-11-24 03:47:36 +01:00
mooglyguy
4fe4965d4f -netlist: Add new devices to net_lib.cpp, nw 2019-11-23 17:38:40 +01:00
MooglyGuy
71ac1a1f1b -netlist: Fixed typo on 7442 diagram, nw 2019-11-23 15:01:20 +01:00
MooglyGuy
6d9e191488 -netlist: Added 7442 4-Line BCD to 10-Line Decimal Decoder. [Ryan Holtz] 2019-11-23 13:52:24 +01:00
MooglyGuy
881040610e -netlist: Fix typo, nw 2019-11-23 13:31:53 +01:00
MooglyGuy
2aa304ebc7 -netlist: Added 7492 Divide-by-12 Counter. [Ryan Holtz] 2019-11-23 12:43:30 +01:00
arbee
5c45fa678f apple2: fix recognition of .NIB images on the old diskii controller (MT #7496) [R. Belmont] 2019-11-22 20:45:08 -05:00
Vas Crabb
e09f2e49a6 util/options.cpp: fix locale issues and a const correctness issue 2019-11-23 11:30:07 +11:00
Tom
b400364824 new working ZX Spectrum slot devices: DISCiPLE and +D disk interfaces (#5931)
* plusd working (rom patch)

* plusd done

* added disciple, not working

* disciple working

* wd_fdc fix

* final tidy-up

* ready for pr

* Pernod70 changes

* cuavas changes #1

* combine devices + files

* sort out side_effects
2019-11-22 02:52:10 +11:00
Vas Crabb
88ce545cdd misc cleanup:
* Got rid of some more simple_list in core debugger code
* Fixed a buffer overrun in wavwrite (buffer half requried size)
* Slightly reduced dependencies and overhead in wavwrite
* Made new disassembly windows in Qt debugger default to current CPU
2019-11-18 05:08:36 +11:00
couriersud
67dc264e22 netlist: more code maintenance. (nw)
- refactor error messages.
- Fix some drivers to cope with outputted added my the mame driver
  for video and sound.
- Fix validation.
2019-11-16 16:09:04 +01:00
couriersud
bcfa9eae6f netlist: maintenance and bug fixes, remove DUMMY_INPUT. [Couriersud]
- Removed DUMMY_INPUT. NC (not connected) pins should now use NC_PIN.
  If a NC_PIN is actually connected, an error will be logged and
  validation will fail.
- Enabled "extended" validation. This will catch now if power terminals
  are not connected.
- Added const and noexcept where appropriate.
- Removed dead code.
- Fixed the 7414 Schmitt-Trigger device to use nld_power_pins
2019-11-15 22:16:37 +01:00
couriersud
dc4fa04201 netlist: Proxy and power terminal hack removal. [Couriersud]
- Devices ttlhigh and ttlhow are no longer automatically created.
- All logic input devices (e.g. TTL_INPUT, LOGIC_INPUT) now need to have
  their power terminals (VCC, GND) connected. This opens the route
  for more appropriate proxy devices but comes at a cost. If the
  connections are omitted your circuit will not work as expected.
  Example:
      LOGIC_INPUT(I_SD0, 1, "AY8910PORT")
      NET_C(VCC, I_SD0.VCC)
      NET_C(GND, I_SD0.GND)
- Updated all netlists.
- Removed proxy information from terminal objects. This was replaced by
  a lookup hash whose life-span does not exceed netlest setup.

These changes enable the removal of a number of hacks from the
source going forward.
2019-11-14 22:59:07 +01:00
couriersud
43637964a2 netlist: bug fix, code maintenance and performance improvement. (nw)
- fixed a code in the netlist creation which caused multiple proxies
  to be created for output->terminal connections. A nice side effect of
  this fix is a performance increase ~9% for kidniki and ~4% for pong.
  Speaking about pong ... maximum is 490%. Dice is running at
  280 FPS/60 FPS = 466%, however without any analog emulation.
- Replaced NL_NOEXCEPT with noexcept. assert is now exception-free.
- cppcheck and lint fixes.
2019-11-13 19:29:51 +01:00
couriersud
f4cf0cc86a netlist: code maintenance. (nw)
- move memory pool to netlist_state_t removing one static allocation.
- add memory allocation stats to verbose output
- nl_assert no longer throws, first step to remove NL_EXCEPT macro.
2019-11-13 07:41:20 +01:00
couriersud
63561e2c2c netlist: maintenance. (nw)
- Fix automatic header generation
- clang lint fixes.
- srcclean
- remove dead code
2019-11-11 15:04:21 +01:00
couriersud
b8c43342d5 netlist: first steps on the way to calculated parameters. [Couriersud]
This commit is a first step towards using formulas in parameters, i.e.

MAINCLOCK(clock, 20 * 30)

The intention is to improve readability and scalability.
Since device registration already provides all necessary information
about parameters, the code to create an include file for all
devices has been improved. Long term, this will remove the need for
device specific header files.

In addition going forward devices will accept either no connections or
all specified connections, i.e.

TTL_7400_NAND(name, chip1.2, chip2.3)

or

TTL_7400_NAND(name)
NET_C(...)
NET_C(...)

This will allow to remove all duplicate definitions which are currently
necessary, i.e. TTL_7400_NAND/TTL_7400_GATE
2019-11-10 19:54:26 +01:00
couriersud
f60ed79ed6 netlist: code maintenance. (nw)
- more doxygen \file annotations
- moved MAINCLOCK back to nl_base.h
- remove some const from simple function parameters
2019-11-10 01:18:57 +01:00
couriersud
88f702b416 netlist: code maintenance and bug fixes. (nw)
- comment style migration continues.
- Fixed a two bugs in the truthtable ignore inputs code
- refactored the truthtable code a bit for better readability.
- updated netlist specific gitignore.
2019-11-08 23:52:14 +01:00
couriersud
bbbd1c0e8e netlist: maintenance. (nw)
- switch to VS 2019 community and fix standalone build.
- more migration to C++ comment style.
- add some more doxygen markup.
2019-11-08 12:56:05 +01:00
couriersud
ae2cad64f4 netlist: code and documentation maintenance fixes. [Couriersud]
-	"nltool -c docheader" now scans sources and creates
    usage focussed doxy documentation for devices. Very early
    stage, but works. For an example, please see ne555 source.
-	Started migrating to pure C++, i.e. "//" comments.
-   Various documentation fixes.
-   Added cppcheck configuration to netlist/build
-   Some smaller code changes.
2019-11-07 20:25:51 +01:00
couriersud
a970ef42f1 netlist: Minor optimizations. (nw) 2019-11-05 17:17:32 +01:00
couriersud
22e07506cc netlist: more consistent exception handling. (nw)
Still not optimal, but better than what we had previously. No exception
logging comes closer.
2019-11-05 00:08:52 +01:00
couriersud
2cf61b2e4c netlist: code maintenance. (nw)
- more const
- explicitly raise exceptions instead of leaving this to log.fatal()
- correct a number of cppcheck findings.
- dead code removal
- clang lint corrections, e.g. include order
2019-11-04 22:04:11 +01:00
Vas Crabb
4ac111da3c misc cleanup (nw) 2019-11-05 01:04:31 +11:00
npwoods
66f7e4fe0c Fix invalid std::vector<> lookup in aviio.cpp
This fixes a case where:
* m_soundbuf_samples == processedsamples
* processedsamples > 0
* processedsamples * stream->channels() == m_soundbuf.size()

In this scenario, the std::memmove() would do nothing (moving zero
bytes), but the operator[] on the second parameter to std::memmove()
overflows the array.  This can be benign in optimized builds (because
the third parameter to std::memmove() is 0), but on debugging builds
this can cause an assert.
2019-11-04 13:32:22 +11:00
couriersud
e896b3914e netlist: code maintenance. (nw)
- leave a note that cstdlib is needed for getenv.
- Remove commented out includes
- make sure all headers are self - contained, i.e. compile
2019-11-04 00:32:47 +01:00
AJR
db15a9f46e Fix clang error: no member named 'getenv' in namespace 'std' (nw)
Library differences are the culprit once again.
2019-11-03 17:32:50 -05:00
couriersud
60379b658a netlist: code maintenance. (nw)
- Separate code out into pmath.h and pstonum.h.
- Fix VC build error
- optimize pfmtlog.h a bit
2019-11-03 23:19:52 +01:00
couriersud
5383dd355c netlist: remove pragma once. (nw)
Only used inconsistently in the code. May as well go.
2019-11-03 15:26:37 +01:00
couriersud
34ccb11c53 netlist: Completed __float128 support. [Couriersud]
Both compiling the core and the shaders with __float128 now work.
The support was added to be ready to deal with academic edge cases.

Performance drops to 10% of double - thus disabled by default.
2019-11-03 15:25:01 +01:00
couriersud
cabfd7188a netlist: fix regression, preliminary __float128 support. (nw)
__float128 is a gnu extension delivering true 128 bit floating point
support. Currently not supported by clang. In addition, the quadmath
library needs to be linked. For the time being therefore disabled.
2019-11-03 01:33:48 +01:00
couriersud
db0dbeaea5 netlist: improve readability. (nw)
Renamed cast member of the constants struct to magic to clearly identify
magic numbers.

Introduced nlconst struct inheriting from plib::constants<nl_fptype> to
make code better understandable.
2019-11-02 23:39:24 +01:00
couriersud
77ea61bac7 netlist: add RELTOL/VNTOL solver parameters. Type safety. [Couriersud]
The newly added RELTOL and VNTOL parameters implement Newton convergence
checks comparable following other SPICE implementations.
The ACCURACY solver parameter now is only used for convergence checks in
iterative solvers.

In addition, type safety was significantly improved and a lot of "magic"
numbers are identifiable now.
2019-11-02 22:25:11 +01:00
couriersud
6573037934 netlist: Support for float, double and long double solvers. [Couriersud]
- Added new solver parameter FPTYPE. This determines in which floating
  point domain the linear system is solved. May be one of "FLOAT",
  "DOUBLE" or "LONGDOUBLE"
- Added option "--fperr" to nltool. This enables floating point
  exceptions. This helps debugging the code under gdb.

The purpose of this going forward is to have more choice in
optimization. Non-dynamic systems should be just fine in the float
domain. Dynamic systems (i.e. diodes, bjts, mosfets) should in general
work with double. Certain edge cases may require long double resolution.
2019-11-02 12:25:50 +01:00
couriersud
5f1427ab0f netlist: code maintenance and bugfixes. (nw)
- fixed a bug in the parray constructor
- replaced NL_NOEXCEPT with noexcept where appropriate
2019-11-01 18:49:22 +01:00
couriersud
a9d7e55ac2 netlist: convert constexpr constants into constexpr inline funcs. (nw) 2019-11-01 01:50:33 +01:00
couriersud
47d938b149 netlist: further solver refactoring. (nw) 2019-11-01 01:21:43 +01:00
AJR
e37b9b7b88 It's C++14 where constexpr variables still aren't inlined, making ridiculous workarounds like this necessary to fix builds (nw) 2019-10-31 19:46:14 -04:00
couriersud
9fe2af2be1 netlist: fix clang warnings & srcclean. (nw) 2019-10-31 22:07:50 +01:00
couriersud
c6b281685d netlist: Compile with float/double floating point. [Couriersud]
Added ability to compile using float instead of double. Specifically the
the solver as well as the infrastructure now can have their own floating
point type. Currently this is only an academic exercise since
numerically demanding circuits like kidniki only work with double/double
support. Using float here is pushing numerical stability over the
limits.

The long term design goal is too have the matrix type (double/float)
being a parameter.
2019-10-31 21:53:50 +01:00
couriersud
6c075e602c netlist: maintenance and simplifcation. (nw)
- solver: align matrix population along the various solvers
- solver: delete dead code
- renamed nl_double to nl_fptype and use nl_fptype where previously
  double has been used.
- renamed param_double_t to param_fp_t
2019-10-31 18:39:09 +01:00
couriersud
65fb297023 netlist: move solver stuff into separate namespace. (nw)
- new namespace "solver"
- minor ptime modifications
2019-10-31 01:15:43 +01:00
couriersud
7c6fdaf499 netlist solvers: fix some bad design. (nw) 2019-10-30 20:42:49 +01:00
couriersud
beab34006a netlist: code maintenance. (nw)
Simplification, remove some trampolines.
2019-10-30 19:10:40 +01:00
couriersud
470c416cc3 netlist: Hopefully fix MSVC compile. (nw) 2019-10-30 11:35:03 +01:00
couriersud
cebd828fcd netlist: improve localized storage. (nw) 2019-10-29 22:05:45 +01:00
couriersud
cac86fb1b4 netlist: code maintenance. (nw)
- Removed code no longer used
- Add noexcept where appropriate
- split pparser.[c|h] into ppreprocessor and ptokenizer
- smaller optimizations, e.g. use of std::size_t
- fix lint warnings
2019-10-29 19:55:53 +01:00
couriersud
97129cece5 netlist: Preprocessor enhancements. [Couriersud]
The builtin preprocessor now behaves closer to cpp:

- supports macro parameters, i.e. define x(a) a
- supports stringification, i.e. define x(a) #a
- supports concatenation, i.e. define x(a) a ## _ext

In addition, error reporting now provides a source context including the
include history.
2019-10-28 13:44:26 +01:00
Vas Crabb
f81fbdb8d4 Make devdelegate more like devcb for configuration. This is a
fundamental change to show device delegates are configured.

Device delegates are now aware of the current device during
configuration and will resolve string tags relative to it.  This means
that device delegates need a device to be supplied on construction so
they can find the machine configuration object.  There's a
one-dimensional array helper to make it easier to construct arrays of
device delegates with the same owner.  (I didn't make an n-dimensional
one because I didn't hit a use case, but it would be a simple addition.)

There's no more bind_relative_to member - just call resolve() like you
would for a devcb.  There's also no need to cast nullptr when creating a
late bind device delegate.  The flip side is that for an overloaded or
non-capturing lambda you'll need to cast to the desired type.

There is one less conditional branch in the hot path for calls for
delegates bound to a function pointer of member function pointer.  This
comes at the cost of one additional unconditional branch in the hot
path for calls to delegates bound to functoids (lambdas, functions that
don't take an object reference, other callable objects).  This applies
to all delegates, not just device delegates.

Address spaces will now print an error message if a late bind error is
encountered while installing a handler.  This will give the range and
address range, hopefully making it easier to guess which memory map is
faulty.

For the simple case of allowing a device_delegate member to be
configured, use a member like this:

    template <typename... T> void set_foo(T &&...args) { m_foo_cb.set(std::forward<T>(args)...); }

For a case where different delegates need to be used depending on the
function signature, see src/emu/screen.h (the screen update function
setters).

Device delegates now take a target specification and function pointer.
The target may be:
* Target omitted, implying the current device being configured.  This
  can only be used during configuration.  It will work as long as the
  current device is not removed/replaced.
* A tag string relative to the current device being configured.  This
  can only be used during configuration.  It will not be callable until
  .resolve() is called.  It will work as long as the current device is
  not removed/replaced.
* A device finder (required_device/optional_device).  The delegate will
  late bind to the current target of the device finder.  It will not
  be callable until .resolve() is called.  It will work properly if the
  target device is replaced, as long as the device finder's base object
  isn't removed/replaced.
* A reference to an object.  It will be callable immediately.  It will
  work as long as the target object is not removed/replaced.

The target types and restrictions are pretty similar to what you already
have on object finders and devcb, so it shouldn't cause any surprises.
Note that dereferencing a device finder will changes the effect.  To
illustrate this:

    ...
    required_device<some_device> m_dev;
    ...
    m_dev(*this, "dev")
    ...
    // will late bind to "dev" relative to *this
    // will work if "dev" hasn't been created yet or is replaced later
    // won't work if *this is removed/replaced
    // won't be callable until resolve() is called
    cb1.set(m_dev, FUNC(some_device::w));
    ...
    // will bind to current target of m_dev
    // will not work if m_dev is not resolved
    // will not work if "dev" is replaced later
    // will be callable immediately
    cb2.set(*m_dev, FUNC(some_device::w));
    ...

The order of the target and name has been reversed for functoids
(lambdas and other callable objects).  This allows the NAME macro to
be used on lambdas and functoids.  For example:

    foo.set_something(NAME([this] (u8 data) { m_something = data; }));

I realise the diagnostic messages get ugly if you use NAME on a large
lambda.  You can still give a literal name, you just have to place it
after the lambda rather than before.  This is uglier, but it's
intentional.  I'm trying to drive developers away from a certain style.
While it's nice that you can put half the driver code in the memory map,
it detracts from readability.  It's hard to visualise the memory range
mappings if the memory map functions are punctuated by large lambdas.
There's also slightly higher overhead for calling a delegate bound to a
functoid.

If the code is prettier for trivial lambdas but uglier for non-trivial
lambdas in address maps, it will hopefully steer people away from
putting non-trivial lambdas in memory maps.

There were some devices that were converted from using plain delegates
without adding bind_relative_to calls.  I fixed some of them (e.g.
LaserDisc) but I probably missed some.  These will likely crash on
unresolved delegate calls.

There are some devices that reset delegates at configuration complete or
start time, preventing them from being set up during configuration (e.g.
src/devices/video/ppu2c0x.cpp and src/devices/machine/68307.cpp).  This
goes against the design principles of how device delegates should be
used, but I didn't change them because I don't trust myself to find all
the places they're used.

I've definitely broken some stuff with this (I know about asterix), so
report issues and bear with me until I get it all fixed.
2019-10-26 12:47:04 +11:00
Vas Crabb
32868b8e2a srcclean (nw) 2019-10-26 10:40:50 +11:00
Vas Crabb
7c8607e42c (nw) at least try to be const-correct 2019-10-24 01:13:54 +11:00
Zoë Blade
5854f09b4d Fix spelling, tidy whitespace 2019-10-21 19:40:49 +11:00
couriersud
b09fa00cca Netlist: code maintenance and improvements. [Couriersud]
- Added support for line markers to the preprocessor and parser.
- Added support for include processing to the preprocessor.
- Moved sources base type to plib to be used for preprocessor includes.
  This enables to include e.g. from rom memory regions.
- Renamed some defines
2019-10-18 17:57:55 +02:00
couriersud
db318046c4 Netlist: code maintenance and bug fixes. (nw)
- solver now uses dynamic allocation on systems larger than 512x512
- fixed osx build
- moved nl_lists.h classes to plists.h
- fixed netlist makefile clint section
- readability and typos
2019-10-17 10:21:00 +02:00
couriersud
55f1dfafc2 Netlist: pongf update and code maintenance. [Couriersud]
After the recent string of updates pongf performance increased again.
Also includes code maintenance and some fixes for the aligned memory
operations.
2019-10-16 13:57:54 +02:00
Robbbert
68db9fd99a (nw) fixed compile error on gcc 5.3 . Apologies in advance if it breaks other compilers/versions. 2019-10-16 16:10:42 +11:00
couriersud
e5cceda218 Netlist: code maintenance and bug fixes. [Couriersud]
- optimized the core queue dispatching logic. Minor performance
increase.
- fixed a number of bugs in parray. Now parray<double, 0> will be purely
dynamic allocation with the number of elements passed in the
constructor.
- Added noexpr where appropriate.
- Simplified the queue

Checked with gcc-7 (ubuntu), gcc-9, clang-10, macosx clang 10, mingw
cross compile on linux.
2019-10-15 23:36:48 +02:00
couriersud
6daeb4b4d1 netlist: Use unique_ptr where possible. (nw)
Also improve code readability.
2019-10-15 11:30:05 +02:00
couriersud
a89b7d194d netlist: mame netlist reorganization. [Couriersud]
- moved netlists out of driver code into audio/ or machine/ as
nl_xxx.cpp files.
- identified and documented extended validation
- updated arcade, mess and nl targets
2019-10-13 16:45:30 +02:00
couriersud
777f93b083 netlist: fix issues with 1x1 matrix. [Tafoid]
- fixes gamemachine.cpp, breakout.cpp
2019-10-12 21:57:26 +02:00
couriersud
8f83e4392f netlist: code maintenance (nw)
- clang lint and pedantic fixes
- mat_cr.h: separate solving linear systems from underlying matrix
2019-10-12 19:36:50 +02:00
couriersud
161cc143a5 netlist: code maintenance. (nw)
- some readability improvements
- some simplifications
- kidniki uses frontiers again (speed improvement)
2019-10-11 18:36:40 +02:00
couriersud
17ae349ce6 netlist: fix error on compilers having issues with std::pair. (nw) 2019-10-08 00:32:25 +02:00
couriersud
545f8069ef netlist: maintenance and lint fixes. (nw) 2019-10-06 23:50:13 +02:00
couriersud
de6b84a533 netlist: More unique_ptr use. GMRES update, new preconditioner (nw) 2019-10-06 15:58:23 +02:00
couriersud
2de7ed7ddc netlist: more code cleanup. (nw)
- avoid duplication in solver parameter code
- matrix sort type is now a parameter
2019-10-05 01:26:54 +02:00
hap
3bd43b4f49 aviio: increase max size (nw) 2019-10-05 00:15:19 +02:00
couriersud
43cac214a4 netlist: code maintenance (nw)
- Fix SUBMODEL
- move to strongly typed matrix sort constant
- extend maximum matrix size to 512x512
- optionally do parallel processing based on total operations
- templatize GMRES solver loops
2019-10-04 22:34:46 +02:00
Vas Crabb
d8998f5d9b (nw) fix std::array initialisation with GCC5 in nlwav.cpp, stop suppressing -Wterminate now that asserts are really asserts 2019-10-05 00:37:55 +10:00
hap
73e0eb6b4e aviio: dont crash on buffer overflow (nw) 2019-10-04 12:19:01 +02:00
couriersud
9672337a76 netlist: code simplification. (nw) 2019-10-03 15:57:44 +02:00
couriersud
9cefd516a0 netlist: choose the right ostream type. (nw) 2019-09-30 21:13:21 +02:00
couriersud
cc8114f394 netlist: less cpp - more headers (nw)
- move more code in headers - delete some cpp files.
2019-09-29 00:31:30 +02:00
couriersud
545ebe832d netlist: more lint corrections. (nw)
- fixed lint corrections
- added NOLINT where needed
2019-09-28 21:45:59 +02:00
couriersud
1077396473 netlist: Fix more lint warnings/hints (nw) 2019-09-28 12:51:42 +02:00
couriersud
ce612896a8 netlist: Fix a number of minor issues. (nw)
- lint warnings
- remove const on return types
2019-09-27 22:30:33 +02:00
Vas Crabb
9a12ab37af Make osd_printf_* use util/strformat semantics.
(nw) This has been a long time coming but it's here at last.  It should
be easier now that logerror, popmessage and osd_printf_* behave like
string_format and stream_format.  Remember the differences from printf:
* Any object with a stream out operator works with %s
* %d, %i, %o, %x, %X, etc. work out the size by magic
* No sign extending promotion to int for short/char
* No widening/narrowing conversions for characters/strings
* Same rules on all platforms, insulated from C runtime library
* No format warnings from compiler
* Assert in debug builds if number of arguments doesn't match format

(nw) Also removed a pile of redundant c_str and string_format, and some
workarounds for not being able to portably format 64-bit integers or
long long.
2019-09-26 20:53:06 +10:00
Vas Crabb
95ed7c5b5a Merge tag 'mame0214'
MAME 0.214
2019-09-25 20:26:50 +10:00
couriersud
441fb63087 netlist: switch to c++ streams. (nw)
Removed the home-brew implementation pstreams and replaced those with
c++ streams.
2019-09-25 01:10:39 +02:00
npwoods
531633d519 Fixed a compilation bug under clang-cl (#5677)
* Fixed a compiltion bug under clang-cl

Oddly, this problem does not seem to manifest under clang on
gcc.godbolt.org.  I suspect that this might be related to the fact that
sizeof(std::size_t) != sizeof(long) on Windows.

* Couriersud feedback
2019-09-23 20:34:31 -04:00
mooglyguy
1a5bf558cc -avivideo.cpp: Added an image device to provide looping uncompressed AVI frames as input. [Ryan Holtz]
-vino.cpp: Adapted to support both avivideo_image_device and picture_image_device. [Ryan Holtz]
2019-09-23 17:44:05 +02:00
couriersud
8781f5bcc0
Hotfix for nltool.cpp (nw)
Comment out development code.
2019-09-22 19:14:44 +02:00
Vas Crabb
3fefe924a2 fix up srcclean (nw) 2019-09-22 15:11:45 +10:00
Vas Crabb
5036387ab4 srcclean (nw) 2019-09-22 13:34:40 +10:00
couriersud
8734df72ea netlist code maintenance (nw)
- prepare move to c++ streams and later std::string
- fix more lint and clang pedantic warnings/errors
- fix some bugs
2019-09-21 22:15:34 +02:00
arbee
6154ea4c8b ap2_dsk: recognize ProDOS 2.5 boot block (nw) 2019-09-20 07:50:36 -04:00
couriersud
500ca5b8fc netlist code maintenance. (nw)
- remove a lot of c library use and instead use c++
- improved pstring compatibility to std::string
- prepare removal of pstream
2019-09-17 21:05:01 +02:00
AJR
7481f6871a Make bitmap8_t, bitmap16_t, bitmap32_t and bitmap64_t specializations of one class template (nw) 2019-09-16 22:21:29 -04:00
couriersud
29575e4704 Fix SUBTARGET nl and move netlist makefile to gcc-9. (nw) 2019-09-10 21:40:24 +02:00
couriersud
7dea07a3ba netlist: Fix exception on MacOSX [Couriersud]
Some unknown system library seems to force the use of the global locale
on OSX. This is not the case for other *nix or Windows builds. This
commit fixes this by forcing the C locale in pfmt.
2019-09-10 21:37:36 +02:00
fulivi
d4e2fbd306 HP9845: TACO driver re-written (#5601)
* hp9825: fixed a bug in 9825t

* hp9845: TACO driver re-written from scratch, DC100 tape separated into
a new device, various adaptations

* hp9845: "new TACO" renamed to just "TACO"
2019-09-09 16:05:41 -04:00
Vas Crabb
fde41f3fad render.cpp: print a warning and continue on encountering malformed XML in a layout file (nw) 2019-09-08 22:13:02 +10:00
arbee
0dba761f54 apple2: fix regression using 35-track disks with the legacy floppy (nw) 2019-08-25 20:41:32 -04:00
68bit
249f9a78d0 flex_dsk: fix the logging of the disk name extension
It had been printing the disk name again.
2019-08-26 10:14:29 +10:00
Vas Crabb
7031c31c00 srcclean (nw)
I'm assuming atronic.cpp was supposed to be Windows-1252 with Euro currency symbol encoding.  Everyone please use UTF-8 for source files.
2019-08-25 13:39:06 +10:00
smf-
2ff56cd342 fix incorrect format string to allow compilation (nw) 2019-08-15 11:41:01 +01:00
ajrhacker
ad4f17e0eb
Merge pull request #5471 from 68bit/floppy-flex-format-rewrite
flex floppy dsk: rewrite to be based on the wd177x dsk format
2019-08-13 07:01:56 -04:00
68bit
1016319747 flex floppy dsk: rewrite to be based on the wd177x dsk format
This now works with both single density and double density floppy disks, and
dynamically identifies boot sector IDs required for 6800 booting, and supports
writing back to the 'dsk' image files.
2019-08-13 14:38:59 +10:00
68bit
10f480911d swtpc09: add a UniFLEX specific floppy format.
The UniFLEX disk format is not compatible with the Flex format. Significantly it
does not use a mix of single density for booting on some double density disks
which makes it simpler - hardware required a new boot ROM to run UniFLEX.
Further, the UniFLEX sector size is 512 bytes versus 256 for Flex, and the
UniFLEX 'SIR' info sector record is completely different to the info on Flex
disk, and the file system format is also not at all compatible.

Thus the UniFlex format can rely largely on the WD17xx format, with an
overload to handle the sector numbering on the second side continuing from the
first side (one feature in common with the Flex format). This gives a quick
'save' capability and shares code.

Support for 8" disks is included as this was the initial distribution format
and the only one found so far.
2019-08-13 13:42:13 +10:00
arbee
cea22e64e7 ap2_dsk: recognize ProDOS 2.5 boot block (nw) 2019-08-08 20:25:37 -04:00
Justin Kerk
490709a6c1 Fix build in newer Emscripten versions (nw) 2019-08-08 14:23:12 +00:00
Christian Groessler
22f96480b1 add write support for Olivetti M20 floppy images
m20_dsk.cpp: add write support
floptool.cpp: add m20 format support
2019-08-06 00:14:51 +02:00
Dirk Best
b12e24a388 juku: Floppy now (partially) works
The CPU tries to read data in a tight loop, so there must be
some way for it to be halted until data is ready. The current
solution works good enough to boot CP/M.

Also:

- Change FDC to KR1818VG93
- Change disk format from 3.5" to 5.25"
- Add single sided disk format
- Add softlist
2019-08-05 17:25:51 +02:00
AJR
8013c43adf Use canonical spelling of "canonical" (nw) 2019-08-02 12:12:04 -04:00
Dirk Best
8632105397 juku: Floppy support WIP, enable BASIC 2019-08-02 16:15:04 +02:00
arbee
f136e7b0eb harddisk: Support non-CHD harddisk images in raw and 2MG format [R. Belmont] 2019-08-01 21:40:55 -04:00
ajrhacker
1e52450921
Merge pull request #5423 from npwoods/core_options_moves
Enabled default move ctor/assignments in core_options, and changed plugin_options code to use them
2019-08-01 12:40:19 -04:00
hap
23c70e8b60 coreutil: remove single-use (and savestate unsafe) rand_memory function (nw) 2019-08-01 17:53:36 +02:00
npwoods
6a15fe5d73 Enabled default move ctor/assignments in core_options, and changed
plugin_options code to use them
2019-08-01 09:23:39 -04:00
Vas Crabb
ace8e401fc srcclean (nw) 2019-07-28 14:31:16 +10:00
mooglyguy
7dc59ce975 -aviio: Added functionality to read RGB24 and YUV420p uncompressed video frames. [Ryan Holtz] 2019-07-21 09:16:23 +02:00
AmatCoder
ffe2e43d80
tzx_cas.cpp: Fix pulses on Standard Data blocks
Current TZX specification says: "Header blocks have 8063 and data blocks have 3223 pilot pulses"

It also says: "The pilot tone consists in 8063 pulses if the first data byte (flag byte) is < 128, 3223 otherwise"
(unlike tap format that if flag byte is 0 indicates header block and data block otherwise).
2019-07-14 18:25:46 +02:00
R. Belmont
7f6cb86c51
Merge pull request #5316 from AmatCoder/AmatCoder-dsk_dsk-1
dsk_dsk.cpp: Surpass some copy-protected tracks
2019-07-06 08:01:50 -04:00
R. Belmont
7d73194101
Merge pull request #5317 from AmatCoder/AmatCoder-tzx_cas-1
tzx_cas.cpp: Fix memory leak (nw)
2019-07-06 07:59:12 -04:00
AmatCoder
82d603f62c
tzx_cas.cpp: Fix memory leak (nw)
MT 05516
2019-07-06 10:51:21 +02:00
AmatCoder
ab20a16990 dsk_dsk.cpp: Surpass some copy-protected tracks
Fix MT 06716
2019-07-06 10:17:27 +02:00
ajrhacker
5035b85be0
Merge pull request #5303 from shattered/_430d642ac2
agat: basic emulation of agat9 (video, apple compat mode, LLE floppy)
2019-07-04 14:46:16 -04:00
Robbbert
5c3f7a9a6d (nw) uef : added baudrate detection for atom. Needs much more to be done. 2019-07-04 11:28:17 +10:00
Sergey Svishchev
a152d1125f agat: basic emulation of agat9 (video, apple compat mode, LLE floppy)
also included: MX floppy format (nw)
2019-07-02 01:13:38 +03:00
AmatCoder
84f9bd799c
tzx_cass.cpp: Fix loading of Generalized Data blocks 2019-06-30 16:52:10 +02:00
AmatCoder
97c8883832 txz_cass.cpp: Adding 1 ms. pause to ensure that the last edge is properly finished at the end of tape
As discussed in #5255
2019-06-26 12:22:07 +02:00
DavidHaywood
5d0ce0a644 revert tzx_cas changes from 0.202, they break things 2019-06-17 11:47:25 +01:00
arbee
a610524c5f ap2_dsk: only save 40 tracks if the disk originally had that many [R. Belmont] 2019-06-09 12:47:45 -04:00
zzemu-cn
0e524aeb35 Apple II dsk 35 to 40 track
Change Apple II dsk format 35 track to 40 track
2019-06-09 15:11:16 +08:00
Sergey Svishchev
63c0ee96ec imgtool: MT 6693 wip, solves mess_hd issue (nw) 2019-06-02 15:01:26 +03:00
Vas Crabb
0e7b688283 clean up some stuff (nw) 2019-05-30 00:05:33 +10:00
Vas Crabb
626b566fee srcclean (nw) 2019-05-26 13:10:03 +10:00
arbee
bc1c18c746 netlist: GCC 9 fixes (nw) 2019-05-16 19:56:17 -04:00
couriersud
4437d3bbc2 netlist: array -> std::array (nw) 2019-05-12 14:08:16 +02:00
couriersud
1d3ace8cb4 netlist: remove base_dummy class and fix CD4020 VCC/VDD. 2019-05-11 21:24:41 +02:00
couriersud
d0270fa161 netlist: Fix cmos power pins and gcc-9 error.
CMOS 40xx and 4316 power pins fixed.
Also fixed gcc-9 error. clang++ complains about unreachable code in
nl_base.cpp line 480 even if double parantheses are used. Assigning the
define to a local variable and testing this local variable works. Weird.
2019-05-06 18:39:45 +02:00
couriersud
bc36147c95 netlist: improve readability (nw) 2019-05-06 18:39:44 +02:00
couriersud
20f355bfe1 netlist: fix pedantic clang warnings. (nw) 2019-05-01 23:29:56 +02:00
couriersud
c14db5e7ab netlist: add more defines to nltool -v --version output
- breakout: update notes
- 9316: switch to output array
- ppmf: fix a warning
- nlid_system.h: remove useless brackets.
2019-05-01 23:29:55 +02:00
couriersud
98d76709e1 netlist: provide example for state in truthtable.
The truthtable implementation of 74107 (JK-Flipflop) is included
for educational purposes to demonstrate how to implement state
holding devices as truthtables. It will completely nuke
performance for pong and therefore is disabled.
2019-05-01 23:29:55 +02:00
couriersud
68d89ba465 netlist: move things where they belong (nw)
OMP defines belong into pconfig.h since pomp.h - used by netlist -
depends on them.
2019-04-29 20:58:32 +02:00
couriersud
60bf6b5f17 netlist: fix include order and logging queue stats (nw) 2019-04-28 23:55:01 +02:00
couriersud
37bcde4188 netlist: only print queue stats if they are enabled.
Fix breakout SLOW_BUT_ACCURATE mode.
2019-04-28 22:27:37 +02:00
Couriersud
9694ec54c9 netlist: code maintenance
- converted NL_MAX_LINK_RESOLVE_LOOPS into a netlist parameter.
- Reduced potential bit-rot.
- nltool -v --version now displays values of all compile time defines.

There are still far too many compile time defines. However, most of them
ensure and test future scalability.
2019-04-28 20:42:59 +02:00
Joakim Larsson Edstrom
a4773ca224 flopimh.h: uncluttered global name space as per Vas suggestion 2019-04-26 22:54:30 +02:00
tim lindner
8a8fcba120 Fix OS-9 disk writing bug (#4925)
* Start fixing OS9 disk handling

* Got it working, now need to refine and test

* Almost complete. Doing more testing...

* Tested aginst a varient of sotware. Solved bug. Cleaned up tabs.

* Turned on sector interleaving in OS9_DSK and retested.
2019-04-26 12:12:01 -04:00
Vas Crabb
18c0e8de0e plib: don't assume constructors will only throw things derived from std::exception (nw)
funworld.cpp cleanup: (nw)
 * remove revision history - we use version control for a reason
 * don't #define things before inluding the PCH, and don't #define generic names before #including anything
2019-04-24 12:05:56 +10:00
couriersud
a2f8153411 netlist: Fix the 7448 mess.
Moved truth table implementation of 7448 in macro. At the same time
added power terminals and update game netlists accordingly.
2019-04-23 22:20:47 +02:00
couriersud
e669c0c472 netlist: Protect defines with ifdefs ...
Protected defines in nl_config.h with ifdefs. Added a define to disable
queue statistics during compile. This is only needed during development.
Documented performance improvement efforts so I don't try this again.
2019-04-23 22:19:09 +02:00
couriersud
51ed2fc422 netlist: fix validation errors. (nw) 2019-04-23 21:23:43 +02:00
couriersud
5d48ffbb3d netlist: fix exception handling and uninitialized var. (nw) 2019-04-22 22:25:49 +02:00
couriersud
2bff9fa60f Fix clang build. (nw)
Who on earth invented "-Wswitch-bool"?
2019-04-22 22:25:49 +02:00
couriersud
7cc3012c22 netlist/plib: Fix memory leak when exception is thrown in constructor. 2019-04-22 21:08:50 +02:00
couriersud
56f9e77b84 netlist: Fix MT06827.
All pstonum calls now need to specify if they want local locale
or the "classic" "C" locale.
2019-04-22 21:08:49 +02:00
couriersud
7e0524b8a2 netlist: fix some error/warnings. (nw) 2019-04-22 14:49:44 +02:00
couriersud
70c4265970 netlist: minor optimization. (nw) 2019-04-22 14:49:43 +02:00
couriersud
49c05c24a2 netlist: runtime performance statistics on demand.
Runtime performance statistics can now be enabled with nltool
option "-s". To enable those with MAME you need to run

NL_STATS=1 ./mamenl64 -v -oslog game
2019-04-22 14:49:43 +02:00
couriersud
c52b2f7c6f netlist: lint and pedantic warning fixes. (nw) 2019-04-22 14:49:42 +02:00
couriersud
7dfd781e22 netlist: Add more validations and fix issues identified. 2019-04-21 18:28:01 +02:00
R. Belmont
f9f5fc63fe
Merge pull request #4911 from AmatCoder/AmatCoder-tzx_cas-1
tzx_cas.cpp: Apply 1ms pause only on data blocks
2019-04-21 12:11:20 -04:00
AmatCoder
ae3915fd53
tzx_cas.cpp: Apply 1ms pause only on data blocks
Fix MT #07296
2019-04-21 17:37:24 +02:00
couriersud
b806be41b2 netlist: use A,B,C,... for packaged components. 2019-04-21 13:37:15 +02:00
couriersud
7adbce9b66 netlist: bug fixes and nltool validation.
nltool now supports a validate command which acts similar to MAME's
validation.
2019-04-21 12:05:44 +02:00
couriersud
6b96f7ba60 netlist: Add power terminals to most logic devices.
This fixes an over simplification. Logic devices implicitly assumed that
GND/VDD actually is connected to GND(i.e. 0V). There is no immediate
benefit from this change. It is a preparation for the future
scalability. Now all power terminals (typically 7/14, 8/16) have to be
explicitly connected to the supply rails.

Also added a validation mode to the netlist core. This is not
intended for running, but solely to better indentify pins which
are not properly connected.
2019-04-21 12:05:44 +02:00
couriersud
4f71e124d5 netlist: more structure for caches. (nw) 2019-04-21 12:05:43 +02:00
couriersud
e812e77567 netlist: srcclean (nw) 2019-04-18 01:24:36 +02:00
couriersud
6392b345e6 netlist: scalable error messages.
This approach uses functors for logging messages.
2019-04-18 01:18:01 +02:00
couriersud
bfa1dacd17 Fix validation crash. (nw) 2019-04-17 19:58:12 +02:00
couriersud
3afd712637 plib: mempool refactoring. (nw) 2019-04-17 19:58:11 +02:00
couriersud
e7652e14d6 netlist: Improve validation code.
Adjust warning levels and fix a number of topics identified.
2019-04-16 01:49:44 +02:00
couriersud
86f0b315b6 netlist: Add validation support to netlist device.
mame -validate now also checks all netlist devices. It does this
by constructing a temporary netlist.
This commit also fixes some memory leaks and a bad bug which
surfaced in validation.
2019-04-15 21:41:01 +02:00
couriersud
6ed04fe619 plib: fix crash when argument is missing. (nw) 2019-04-13 23:32:47 +02:00
couriersud
808ec55f33 zaccaria: Route speech and DAC through netlist filtering.
Also hook up all potentiometers so they can be adjusted from within the
MAME UI.
2019-04-13 18:30:29 +02:00
couriersud
d1602bd9f1 netlist: bug fixing.
- fix sound route dependency
- add "K" as a valid Kilo multiplier.
- Fix current source parameter update.
2019-04-13 18:30:28 +02:00
couriersud
106990d8c9 netlist: clang lint fixes and pedantic warning fixes. (nw) 2019-04-12 14:00:46 +02:00
couriersud
1c191433ee netlist: improved and fast LM3900 model.
LM3900 model 3 only has half the number of BJTs compared to model 1
but delivers comparable results for Money Money.
Model 3 follows the datasheet.
I left code for Model 0 and 2 in for educational reasons.
2019-04-12 00:44:23 +02:00
couriersud
a2316d063a netlist: Fix handling of current sources when converting SPICE nets. 2019-04-12 00:44:23 +02:00
couriersud
bd365f5eab Adjusted LM3900 model, fixed clipping in zaccaria. 2019-04-12 00:44:22 +02:00
couriersud
a4f59176e4 netlist: Add more SPICE elements to the conversion code. 2019-04-12 00:44:21 +02:00
couriersud
065f52438f netlist: LM3900
- Align LM3900 pin names with other opamps
- Add a better voltage clamping model
- Add high precision model (disabled due to performance)
2019-04-12 00:44:20 +02:00
Joakim Larsson Edstrom
de63141b94 flopimg.h: implemented threshold to accept disk images with a few excess and empty tracks at the end used by HFE and DSK loaders for now 2019-04-11 22:14:30 +02:00
Vas Crabb
f70f31731c (nw) suppress side effects, standardise #include guards 2019-04-12 01:49:57 +10:00
couriersud
c6eebfaa0a netlist: Add LM2902, code refactoring. (nw) 2019-04-07 19:12:51 +02:00
couriersud
58e6383ada netlist: MB3614 again, function controlled VARCLOCK and other
improvements.

- fix MB3614 parameter
- Added VARCLOCK which derives step size from function
- optimized function handling in CS and VS
- fixed a bug in ppreprocessor
- add trunc to pfunction
- added opamp_amplification_curve to derive characteristic
  amplification curve
2019-04-07 19:09:48 +02:00
couriersud
140dc2237e netlist: TYPE=2 opamp model and MB3614 fixes.
- Untie diode code
- Fix some typos
- add TYPE=2 opamp model which omits output voltage limitation
  Useful for determining causes of non-convergence
- Fix MB3614 opamp parameters to match datasheet
2019-04-07 19:08:33 +02:00
couriersud
78bad5c87b netlist: indentation. (nw) 2019-03-31 22:34:08 +02:00
couriersud
db9caf8a9e Netlist: Move generic models into nld_generic_models. (nw) 2019-03-31 22:34:07 +02:00
couriersud
3320ae1f73 netlist: Refactored model code. (nw) 2019-03-31 22:34:06 +02:00
couriersud
980dbcc693 Netlist: Add global parameter to disable semi-conductor capacitance
modelling. [Couriersud]

Added global NETLIST.DEFAULT_MOS_CAPMODEL parameter. Setting this to
zero disables using capitance modelling in mos models.
On a per mos device basis this can be achieved by adding CAPMODEL=0 to
the model definition, e.g. MOSFET(X, "NMOS(CAPMODEL=0)")
Improve MOSFET convergence by using log-stepping.
2019-03-31 22:34:06 +02:00
couriersud
6d17870736 netlist: Timing bug fix. Affects regression tests. [Couriersud]
This fixes a rounding issue in the ptime code. This bug surfaced when I
tested netlist with picosecond resolution in ptime.
This will have a small impact on every driver using netlist. For
breakout, it required to adjust the color overlay.
2019-03-29 19:44:50 +01:00
couriersud
e4ff0d3322 netlist: Improved MOS transistor model. [Couriersud]
This is a significant improvement to the MOS transistor model. It adds
modelling of the Meyer capacitance model.
This is a somewhat academic addition since the effects occur on a
nanosecond time scale and have a huge impact on performance. I plan to
make the capacitance model selectable. Both on a model level as well as
by introducing a global solver parameter.
The model delivers comparable results to LTSpice.
2019-03-29 19:40:39 +01:00
Vas Crabb
97b6717027 (nw) Clean up the mess on master
This effectively reverts b380514764 and
c24473ddff, restoring the state at
598cd52272.

Before pushing, please check that what you're about to push is sane.
Check your local commit log and ensure there isn't anything out-of-place
before pushing to mainline.  When things like this happen, it wastes
everyone's time.  I really don't need this in a week when real work™ is
busting my balls and I'm behind where I want to be with preparing for
MAME release.
2019-03-26 11:13:37 +11:00
andreasnaive
b380514764 Revert "conflict resolution (nw)"
This reverts commit c24473ddff, reversing
changes made to 009cba4fb8.
2019-03-25 23:13:40 +01:00
couriersud
39a7c420b1 netlist: add MOSFET model. [Couriersud]
- added MOSFET model. Currently capacitances are not modelled.
  This is a 3-pin model (Bulk connected to Source) with provisions to
  extend it to 4-pin at a later stage.
- Add a capacitor generic model which is charge conserving.
  Switch netlist to use this model instead of constant capacity model.
- Start putting constants into a central place.

Please expect minor timing differences due to a different numerical
path.
The cmos inverter example illustrates the analog implementation of a
cmos inverter gate. These were used a lot back in the 70s/80s to
generate sinus waves. The model should also be able to better emulate
4066 analog switches.
The addition of a relatively simple capacitor model is planned at a
later stage.
Expect everything from the MOSFET model at the current stage. Wrong
results as well as convergence issues and crashes.
2019-03-25 21:45:37 +01:00
Vas Crabb
30caaa7bef srcclean (nw) 2019-03-24 09:48:58 +11:00
Nigel Barnes
60e30e44b3 spectrum: Added the Opus Discovery disc system, and OPD floppy format. 2019-03-22 19:24:13 +00:00
ajrhacker
9e52e9cede
Merge pull request #4778 from AmatCoder/AmatCoder-dsk_dsk-1
dsk_dsk.cpp: Avoid segfault if double sided DSK image is loaded on si…
2019-03-19 18:08:40 -04:00
AmatCoder
66a4629631
dsk_dsk.cpp: Avoid segfault if double sided DSK image is loaded on simple sided disk device
MAME crashed if user was trying to load a dsk image with more heads or tracks than disk device supports.
Now the error 'Incompatible image format' is raised.
2019-03-19 21:00:13 +01:00
couriersud
deacff7ffa netlist: refactor model code. (nw) 2019-03-18 23:27:36 +01:00
couriersud
76b92133dd Fix indentation. (nw) 2019-03-18 00:10:47 +01:00
couriersud
9534a0233c netlist: improve readability. (nw) 2019-03-18 00:01:41 +01:00
couriersud
46762510c9 netlist: Added B-E and B-C capacitance to EB model. [Couriersud]
Despite the overhead - two devices more per transistor - this addition
significantly reduces computing time on switching conditions by reducing
the needed Newton-Raphson loops dramatically.
2019-03-17 23:42:08 +01:00
couriersud
43c6cad7dd netlist: Add UJT example for 2N6027. 2019-03-17 15:10:15 +01:00
couriersud
ed9c85904e Fix bug. (nw) 2019-03-17 15:10:14 +01:00
couriersud
0882868e11 netlist: Fix formatting bug. (nw) 2019-03-17 03:17:15 +01:00
couriersud
4b9f90c4a9 netlist: add MC1455P as device. (nw) 2019-03-17 00:48:40 +01:00
couriersud
804439399b netlist: Add output resistance to NE555.
This is a first-order approximation of the output driving stage. A logic
output with appropriate family may be better but would add more
complexity.
2019-03-17 00:05:08 +01:00
couriersud
d27b434ca9 netlist: fix bug in LOGIC_INPUT devices. (nw)
Now family parameter is actually used. Also fixed bugs in code using
this device.
gamemachine now creates sound at realistic pitch.
2019-03-16 22:25:12 +01:00
couriersud
a5d6b7c5b8 gamemachine: add netlist audio. [Couriersud] 2019-03-16 19:07:33 +01:00
couriersud
e80276bb23 New working machine
-----------
Rebound [DICE team, Couriersud]
2019-03-12 02:04:28 +01:00
Nigel Barnes
5511ce41e2 mtx: Added expansion bus with SDX floppy controller.
- 80 column card with SDX in CP/M mode.
- ROM/RAM banking fixed for CP/M, and MTX500 now correctly detected.
- Support for Type 03 and Type 07 .mfloppy images.
- Added alternate MTX2 romset (German).
- Keyboard ROM now selected in Configuration.
- Quickload .RUN files.
2019-03-10 17:23:39 +00:00
couriersud
78c9ef697b netlist: fix breakout paddle regression. (nw)
The interesting parts in datasheets are always those which are not
mentioned.
2019-03-10 14:15:14 +01:00
Couriersud
1a2af1a23e netlist: add reverse parameter to 3-pin-potentiometer. (nw) 2019-03-09 00:34:40 +01:00
Couriersud
b346dea279 netlist: fix reset bug in 555 device. (nw) 2019-03-09 00:33:49 +01:00
Couriersud
07485fd7eb netlist: fix bugs in object initialization order. (nw) 2019-03-06 23:45:20 +01:00
couriersud
83a0e93837 netlist: remove printf. (nw) 2019-03-02 13:11:37 +01:00
couriersud
618f33f586 netlist: refactoring. (nw) 2019-03-01 19:52:19 +01:00
couriersud
17fcc38a25 netlist: memory code refactoring. (nw) 2019-03-01 10:30:24 +01:00
couriersud
2b49e6ed11 netlist: clang tidy. (nw) 2019-03-01 07:48:01 +01:00
couriersud
20551e42a7 Netlist: improve readability. (nw) 2019-03-01 07:48:01 +01:00
couriersud
893e676387 netlist: cosmetic changes - mostly indentation. (nw) 2019-03-01 07:48:00 +01:00
couriersud
d00de16b41 netlist: analog readability refactoring. (nw)
Change the sign of go (or in other terms a12 and a21 matrix stencil
elements). This should make further optimization of matrix population
easier.
In addition hopefully improve the readability of the code by sacrifying
overloads for more verbose member names.
2019-02-25 22:11:04 +01:00
couriersud
6a3efe52d6 netlist: fix bugs in the alignment code. (nw) 2019-02-25 21:17:59 +01:00
couriersud
2e055aa97b netlist: tidy changes and better constexpr support for ptime class. (nw) 2019-02-24 18:45:16 +01:00
couriersud
0e07f9ac34 netlist: more alignment related refactoring. (nw) 2019-02-24 18:45:16 +01:00
couriersud
a7a8186283 Move fillmatrix to to matrix solver base class. (nw) 2019-02-24 18:45:15 +01:00
couriersud
89e0f698b6 Prepare further optimization. (nw) 2019-02-24 18:41:42 +01:00
Vas Crabb
0ed2d2684e srcclean (nw) 2019-02-24 14:25:42 +11:00
couriersud
a65390cad5 netlist: Fix relative include paths and a conflict. (nw)
nl_types.h is part of libc++. Any project with a file with the same name
on the include path just fails to compile. Renamed to nltypes.h
2019-02-23 18:54:29 +01:00
couriersud
672f9b092a Move ptime struct into plib namespace and fix relative includes. (nw) 2019-02-23 18:54:27 +01:00
couriersud
0b3787d5f4 netlist: Fix some more exotic compile options. (nw)
128bit integers on kaby lake are not that much slower than 64bit. This
may be an option for MAME's attotime as well.
2019-02-23 16:24:01 +01:00
couriersud
f44bc8108c Fix indentation. (nw) 2019-02-22 22:06:05 +01:00
couriersud
66154af0f2 netlist: fix visibility issues and more issues reported by tidy. (nw) 2019-02-22 21:46:55 +01:00
couriersud
cf73ccc764 netlist: memory management. [Couriersud]
Memory management in plib is now alignment-aware. All allocations
respect c++11 alignas. Selected classes like parray and aligned_vector
also provide hints (__builtin_assume_aligned) to g++ and clang.
The alignment optimizations have little impact on the current use cases.
They only become effective on bigger data processing.
What has a measurable impact is memory pooling. This speeds up netlist
games like breakout and pong by about 5%.

Tested with linux, macosx and windows cross builds. All features are
disabled since I can not rule out they may temporarily break more exotic
builds.
2019-02-22 08:18:01 +01:00
couriersud
064050323e netlist: fix access specifiers. (nw) 2019-02-20 20:53:56 +01:00
couriersud
a5f3787058 netlist: fix a bug and some performance tweaks. (nw) 2019-02-20 20:16:08 +01:00
Vas Crabb
7983685096 (nw) clean up trivial stuff - the device delegate boilerplate is ugly, I will address it ASAP 2019-02-19 20:19:15 +11:00
couriersud
6207d7d2d3 netlist: tick off some issues clang-tidy highlights. (nw) 2019-02-18 20:22:16 +01:00
couriersud
17d784d83b netlist: remove locked-in context from sources. (nw) 2019-02-17 23:52:05 +01:00
couriersud
1fe9f5e2e5 netlist: refactoring startup process and array usage. (nw) 2019-02-17 18:30:34 +01:00
Vas Crabb
01ccbd89c9 (nw) remove some superfluous const, eliminate a superfluous temp, remove superflous semicolons, etc. and also fix a known broken build script change 2019-02-18 00:48:52 +11:00
couriersud
55000018e7 netlist: Separation of duties. (nw)
Make it clearer what is used during parsing a netlist, "compiling" a
netlist and execution of a netlist.
2019-02-16 14:31:59 +01:00
couriersud
b113d0c26d netlist: memory pool now supports aligned storage. (nw)
Set USE_MEMPOOL to 1 to try this (max 5% performance increase).

For mingw, there is no alignment support. This triggers -Wattribute
errors which due to -Werror crash the build.
2019-02-16 00:05:21 +01:00
couriersud
c5a513ca90 netlist: more memory allocation refactoring. (nw) 2019-02-14 01:16:39 +01:00
couriersud
aad01d572a netlist: indent. (nw) 2019-02-13 23:23:14 +01:00
couriersud
fb685c05b9 netlist: memory allocation clean-up. (nw) 2019-02-13 22:37:07 +01:00
couriersud
a905dffd08 netlist: More cpp core guidelines alignment. (nw) 2019-02-11 22:19:08 +01:00
couriersud
83bd138bec netlist: Fix crashes on certain hardware/library combos. (nw)
At least on macosx memory used by an object seems to be invalidated
before the dtor is executed. This of course is deadly for child objects
with references to the parent-in-deletion which may call back into the
parent.
One of the worst issues I had to fix. Ever. Lesson learnt: No tricks in
dtors. Never.
2019-02-09 23:07:27 +01:00
couriersud
9d8cb783e3 netlist: more core guidelines work. (nw) 2019-02-09 23:07:27 +01:00
AJR
50f185042f Fix clang build (nw) 2019-02-08 19:19:47 -05:00
couriersud
bd8bd7c4f1 netlist: added missing noexcept. (nw) 2019-02-09 00:32:31 +01:00
couriersud
5ea6e079f3 netlist: constants are now constexpr functions. (nw) 2019-02-09 00:21:14 +01:00
couriersud
8daa6e0a0d netlist: added parameter STARTUP_STRATEGY to switch between ...
startup strategies. This determines the order of device triggering.
0: Full - trigger all delegates. Next all devices not touched.
1: Backwards - trigger all devices backwards (only update delegate)
2: Forward - trigger all devices forward (only update delegate)
2019-02-08 23:18:48 +01:00
couriersud
8f94739f65 netlist: make constants struct members constexpr const. (nw)
- enable GCC diagnostics in vector ops for GCC 7 again
- Use forwarding in vector_ops
2019-02-08 23:18:47 +01:00
couriersud
f4c0f8c74b netlist: more cpp core guidelines work. (nw) 2019-02-08 23:18:47 +01:00
AJR
9807755a65 Awkward workaround for "undefined symbols" error caused by stupid non-inline constexpr semantics (nw) 2019-02-07 17:49:55 -05:00
couriersud
3b899b86e6 netlist: Refactoring after adding clang-tidy support to netlist makefile
- convert macros to c++ code.
- order of device creation should not depend on std lib.
- some state saving cleanup.
- added support for clang-tidy to makefile.
- modifications triggered by clang-tidy-9.
2019-02-07 21:54:11 +01:00
couriersud
6381ed11ed netlist: Optionally store input values instead of referencing them. (nw)
Useful for debugging purposes in the end - but not performance.

/*! Store input values in logic_terminal_t.
 *
 * Set to 1 to store values in logic_terminal_t instead of
 * accessing them indirectly by pointer from logic_net_t.
 * This approach is stricter and should identify bugs in
 * the netlist core faster.
 * By default it is disabled since it is not as fast as
 * the default approach.
 *
 */
#define USE_COPY_INSTEAD_OF_REFERENCE (0)
2019-02-05 18:31:14 +01:00
couriersud
6a7c3a8079 netlist: align solver calls. (nw) 2019-02-04 23:17:18 +01:00
couriersud
24e192fc86 netlist: Fix regression. (nw) 2019-02-04 20:38:59 +01:00
couriersud
759b7c3c88 netlist: Further simplification and optimization. (nw) 2019-02-04 19:36:02 +01:00
couriersud
c87a487d6d netlist: Refactoring and some functionality enhancements. (nw)
- Removed dead code.
- nltool now adds a define NLTOOL_VERSION. This can be tested in
  netlists. It is used in kidniki to ensure I stop committing
  debug parameters.
- Optimized the proposal for no-deactivate hints.
- Documented in breakout that hints were manually optimized.
- Minor optimizations in the order of 2% enhancement.
2019-02-04 00:27:23 +01:00
couriersud
f9f341f4d6 netlist: fix some issues. (nw) 2019-02-02 14:56:56 +01:00
couriersud
75146fd159 netlist: All devices now specify parameters in factory constructor. (nw)
This previously was part of net_lib.cpp and repeatedly caused bugs.
2019-02-01 22:46:43 +01:00
couriersud
b952577370 netlist: remove trampoline code. (nw) 2019-02-01 08:45:32 +01:00
couriersud
b4ba8dc552 netlist: code maintenance and fixing kidniki ... (nw)
to run at acceptable speed again.
2019-02-01 02:07:48 +01:00
couriersud
a80f10e1cf netlist: type safety for delegates. (nw) 2019-01-31 01:45:34 +01:00
couriersud
1513c777b4 netlist: Refactoring continues ... plus some innovations (nw)
Still some work ahead to separate interface from execution. This is a
preparation to switch to another sparse matrix format easily which may
be better suited for parallel processing.

On the linear algebra side there are some nice additions:

- Two additional sort modes: One tries to obtain a upper left identity
matrix, the other prefers a diagonal band matrix structure. Both deliver
slightly better performance than just sorting.
- Parallel execution analysis for Gaussian elimination and LU solve.
This determines which operations may be done independently.

All of this is not really useful right now. The matrix sizes are below
100 nets. I estimate that we at least need four times more so that CPU
parallel processing overhead pays off. For GPU, add another order. But
it's nice to have code which may scale.
2019-01-31 01:03:35 +01:00
Vas Crabb
76323eb770 srcclean and cleanup (nw) 2019-01-27 14:22:20 +11:00
AJR
212f26f759 Fix clang build (nw)
- src/lib/netlist/solver/mat_cr.h:143:32: error: call to 'abs' is ambiguous
- src/lib/netlist/solver/nld_ms_direct.h:62:19: error: non-type template argument evaluates to 18446744073709551488, which cannot be narrowed to type 'int' [-Wc++11-narrowing]
2019-01-26 18:32:16 -05:00
couriersud
32b0442c73 netlist: refactor code for better scalability and flexibility. (nw)
These changes aim to remove some of the duplication of code in the
various solvers.
Tested with gcc-7 clang-8 and nvcc-9.2
2019-01-27 00:01:51 +01:00
couriersud
26420facff netlist: add comment processing to preprocessor. [couriersud]
Comments are now processed in the preprocessor. Previously directives in
multiline comments were processed.
2019-01-20 22:18:07 +01:00
couriersud
83d558d096 netlist: nlwav now also converts log files to VCD format. [couriersud]
Please refer to nlwav --help for examples. There is also an example how
to create multi-channel wav files.
2019-01-20 18:29:27 +01:00
couriersud
c8e4dab20c netlist: Fix assertion. (nw) 2019-01-19 18:23:31 +01:00
couriersud
17d32e0bd5 netlist: pstream and ppreprocessor (now a pistream) refactoring. (nw) 2019-01-19 18:17:35 +01:00
Vas Crabb
9198c2bd58 More UI stuff:
* Split up the different parts of ICO loading in the menus (locating files, scaling, drawing, etc.)
* Added icon support to software selection menu
* Added support for more ICO file variants, including PNG-in-ICO (new DIB parser is overkill for ICO but I can factor it out for BMP loading at some point)
* Added favourites filter for software menus - includes software that's favourited on any system, so GBC includes DMG favourties and vice versa
* Eliminated unnecessary member variables and O(n) walks in software selection menu
* Made the menus' cached texture structures a bit more efficient
2019-01-19 17:34:43 +11:00
couriersud
30f063cd32 netlist: Remove const on return types and non-necessary ref-by. (nw) 2019-01-19 00:01:17 +01:00
couriersud
0bd20c8d14 netlist: add nvcc support to netlist makefile. (nw)
Also converted some by-ref calls to pass by value.
2019-01-18 10:23:04 +01:00
couriersud
a527525e52 netlist: More run/setup separation. (nw)
Still some distance ahead in properly separating execution and setup.
2019-01-18 00:58:45 +01:00
couriersud
c89439dd23 netlist: refactored netlist creation. (nw)
This is an effort to separate netlist creation from netlist execution.
The primary target is to avoid that code which will only run during
execution is able to call setup code and thus create ugly hacks.
2019-01-15 23:42:16 +01:00
couriersud
28bc5506be netlist: Code refactoring. (nw)
Replaced downcast with static_cast to avoid errors.
2019-01-14 23:32:51 +01:00
AJR
c816ca06f7 Fix clang error (in machine/netlist.cpp): 'netlist::netlist_t' is not polymorphic (nw) 2019-01-13 21:35:24 -05:00
couriersud
509132dd9c netlist: fix depend target. (nw) 2019-01-13 23:19:06 +01:00
couriersud
5a594cf069 netlist: Improve type safety for parameters. (nw) 2019-01-13 23:18:29 +01:00
couriersud
0a17d35c13 netlist: Fix logging during object construction. (nw) 2019-01-13 19:57:39 +01:00
AJR
1532d2078a hpi_dsk.cpp: Resolve unused variable warnings (nw) 2019-01-13 12:00:14 -05:00
R. Belmont
665eb5001c
Merge pull request #4501 from fulivi/hp9825_dev4
hp9825: added HLE of HP9885 floppy drive
2019-01-13 11:18:39 -05:00
Vas Crabb
3d84943f72 Make search not suck as badly (use algorithm derived from Jaro-Winkler similarity to match search strings, match on more useful stuff) 2019-01-14 00:44:46 +11:00
couriersud
9d7b4d0faa netlist: fix bug recently introduced and some refactoring. (nw) 2019-01-13 14:14:22 +01:00
couriersud
b57ceef133 netlist: Added && and || operators to preprocessor expressions. (nw) 2019-01-13 13:59:54 +01:00
couriersud
0a677239d7 Fix bug in GMRES solver. (nw) 2019-01-13 02:16:08 +01:00
couriersud
b04e13d142 Reenable LOG_STATS - issue fixed by smf 12 months ago is gone. (nw) 2019-01-13 01:38:59 +01:00
couriersud
9c7037d6c6 Replace ATTR_UNUSED by c++ template. (nw) 2019-01-13 01:01:43 +01:00
couriersud
633528eb31 Improve dealing ownership in pstreams. (nw)
I am not really happy with this. But I am missing some creativity
currently.
2019-01-13 00:08:47 +01:00
fulivi
c6dff30d7a hp9825: added HLE of HP9885 floppy drive. Extended HPI format to
handle single-sided disks.
2019-01-12 18:57:39 +01:00
couriersud
81af77b482 Move mainclock code from nl_base into header of nlid_system. (nw)
Also move some simple functions from nl_base.cpp into header.
2019-01-12 01:24:05 +01:00
couriersud
b91e3c3a6a Removed most inlines not necessary ... (nw)
On some I wasn't entirely sure :-(
Thanks Vas:
0f0e8853f3 (r31909683)
2019-01-12 00:35:08 +01:00
couriersud
f12f735f54 Fix clang-8 warnings. (nw) 2019-01-11 21:50:43 +01:00
couriersud
7ababd6091 Move NL_KEEP_STATISTICS from netlist_types to the individual use cases.
(nw)
2019-01-11 08:03:27 +01:00
AJR
328b8995a8 Fix clang error: extraneous template parameter list in template specialization [-Werror] (nw) 2019-01-10 17:26:51 -05:00
couriersud
107f4e4c6b Fix reset members. (nw) 2019-01-10 23:19:52 +01:00
couriersud
8611a7da2e Forgot this one. (nw) 2019-01-10 23:18:08 +01:00
couriersud
f73eca0c7f 5% performance improvement for breakout from a single device. (nw) 2019-01-10 23:18:08 +01:00
Stiletto
a5461d9d6b
2018 -> 2019 changes (nw)
* 2018 -> 2019 changes (nw)
2019-01-10 17:01:26 -05:00
couriersud
25390ce8c7 Fix stuntcyc regression. (nw) 2019-01-10 21:42:43 +01:00
couriersud
e8fed7f532 Refactoring and bug fixes. (nw) 2019-01-10 20:55:59 +01:00
couriersud
7079d0f5fe Move information where it belongs ... into the drivers. (nw) 2019-01-10 02:07:14 +01:00
couriersud
4213a396d8 Improve type safety on string->numeric conversions. (nw)
Also fixed an issue with 7497.

./nltool -t 5 -f src/mame/machine/nl_tp1983.cpp -v

now runs again.
2019-01-10 00:30:51 +01:00
couriersud
47347fe43e C++ and minor performance optimizations. (nw) 2019-01-09 18:16:17 +01:00
couriersud
8cc32269be Fixed tp1983 and 7497 and added 7497 dip version. (nw)
The schematic for the tp1983 contains an error. R19 is connected to GND.
This will never work since when Q goes low, the reset pulse will dead
lock Q to low. R19 needs to be connected to VCC (5V). This will generate
the proper, high-pass filtered pulse.

Further fixes for the 7497 as well.
2019-01-09 02:06:44 +01:00
couriersud
4f38e6cc54 Rewrote 7497 device. (nw)
The 7497 device should now work as described in the TI datasheet. This
datasheet contains an internal schematic with details on gates and D
flip flops used.
2019-01-08 02:38:57 +01:00
couriersud
bc732054f6 Fix netlist logs. (nw) 2019-01-08 02:22:24 +01:00
AJR
2a7fbbf7d7 Fix clang build [-Wc++11-narrowing] (nw)
This also adds an explicit type to the enum, so MSVC should be happy with this way as well.
2019-01-07 19:40:14 -05:00
R. Belmont
3b3172fec9
Merge pull request #4482 from peterferrie/master
fix MSVC (llvm toolset) compile (nw)
2019-01-07 16:13:08 -05:00
R. Belmont
43110c956e
Merge pull request #4487 from shattered/_1c5572b0c3
netlist wip: 7474, 7497, test driver
2019-01-07 16:12:35 -05:00
couriersud
0f0dcd161c Fix reset order for nets. (nw) 2019-01-07 22:11:21 +01:00
couriersud
f3d91f4898 Fix reported crash. (nw) 2019-01-07 22:11:21 +01:00
Sergey Svishchev
737093be1e netlist wip: 7474, 7497, test driver 2019-01-07 22:33:54 +03:00
Vas Crabb
ae6185e5f6 add C++ standard library headers for things that are used (nw) 2019-01-07 19:14:21 +11:00
Peter Ferrie
d199ec2657 fix MSVC (llvm toolset) compile (nw)
- conditionally uninitialised variables in PortAudio;
- floats passed to attotime;
- unsigned->signed enums (this one is technically still wrong)
2019-01-06 18:17:35 -08:00
couriersud
0f0e8853f3 Code maintenance and bug fixes. (nw)
Rewrote and simplified tiny bits. Fixed inappropriate use of
netlist_sig_t for non-boolean values.
2019-01-07 01:37:06 +01:00
couriersud
09553c51a4 Code maintenance. (nw) 2019-01-07 01:33:49 +01:00
couriersud
3c6d9ac9a0 Code maintenance and fix for "pure virtual call" error. (nw) 2019-01-06 20:04:39 +01:00
Robbbert
99479f6cd7 (nw) fixed compile error in netlist. 2019-01-07 00:38:34 +11:00
couriersud
1415421fd7 More c++ alignment. pstring now behaves like std::string. (nw)
This change removes all string extensions like trim, rpad, left, right,
... from pstring and replaces them by function templates.
This aligns a lot better with the intentions of the standard library.
2019-01-06 13:17:20 +01:00
couriersud
9a8d3c56ce Add gitignore to src/lib/netlist. (nw)
Also clean up doxygen genereated files in netlist makefile.
2019-01-02 16:26:13 +01:00
mooglyguy
94fbe66092 Fixed a few missing #includes flagged by VS2019 beta, nw 2018-12-30 13:24:16 +01:00
Vas Crabb
8ef80b186b (nw) So we're back to MSVC blowing up on non-trivial templates. Lovely.
Someone needs to get MS QA to put some non-trivial modern C++
compliation tests in the acceptance tests for their C++ compiler.  Maybe
MAME could even be a candidate.  Well, that might be a plan if MS still
had any QA.  At least this makes some lines shorter (at the cost of
needing more lines).
2018-12-30 17:34:49 +11:00
Dirk Best
b49825bf25 einstein: Software list items promoted to working: Theatre Europe
The existing disk image was replaced by a new one created from the
master disk.

dsk_dsk: Increase maximum cell count

This allows for slightly out of spec disk images to run, like Theatre
Europe on the Einstein.

[Lord Sméagol (Carl Lloyd-Parker)]
2018-12-29 00:58:48 +01:00
Vas Crabb
f1f0591f43 Start cleaning up palette configuration:
* Basically, initialisers go in the constructor arguments, and things for setting format go in set_format.
* Initialisation patterns can be specified with an enum discriminator or with a FUNC and optionally a tag.
* Formats can be specified with an enum discriminator or a size and function pointer.
* You must always supply the number of entries when setting the format.
* When initislising with a paletter initialisation member, you can specify the entries and indirecte entries together.
* The palette_device now has a standard constructor, so use .set_entries if you are specifying entry count with no format/initialisation.
* Also killed an overload on delegates that wasn't being useful.
2018-12-29 05:53:50 +11:00
arbee
7914a6083a Fix (unused) 3.5" head calc (nw) 2018-12-25 08:37:44 -05:00
arbee
5f049f185d Fix (currently unused) 3.5" track calc for WOZ2 (nw) 2018-12-24 15:11:59 -05:00
arbee
98050a1c0d apple2: Support the new version 2 .WOZ images [R. Belmont] 2018-12-23 21:07:50 -05:00
Celelibi
2f70f9698e Fix compilation errors with -Og
Signed-off-by: Celelibi <celelibi@gmail.com>
2018-12-11 14:26:30 +01:00
Vas Crabb
c2dc4316bd (nw) fix stuff:
* Add per-language compiler flag options to help with exotic setups
* Get rid of a potention buffer overrun in NuBus image card
* CHAR_WIDTH and LONG_WIDTH are preprocessor macros in limits.h with glibc if __GLIBC_USE (IEC_60559_BFP_EXT) is enabled - avoid using them as names
* Make formats/upd765_dsk.h slightly safer with defualt initialisers for key format members
* Don't rely on random BSS data being zero in imagedev/floppy.cpp
2018-11-29 14:10:27 +11:00
mooglyguy
13247311f6 Renamed flipendian -> swapendian, as I spent minutes trying to find the functions to tell to another person who spent minutes trying to find the functions, and we refer to such functions as swapping just about everywhere else in the codebase, nw 2018-11-05 19:11:18 +01:00
R. Belmont
a1c5fa9c2f
Merge pull request #4225 from AmatCoder/AmatCoder-dsk-patch-2
dsk_dsk.cpp: Avoid to use uninitialized booleans
2018-11-01 12:07:35 -04:00
AmatCoder
c42f784fe5
dsk_dsk.cpp: Avoid to use uninitialized booleans
Fix MameTesters #07134.
Thanks to Klez for testing.
2018-11-01 14:42:04 +01:00
Patrick Mackinlay
ece4404b69 util::fifo.queue_length() (nw)
Not 100% confident about the variable type, and there may still be some debate over the function name (trying to avoid confusion with the length of the container, or with the number of empty slots), so appreciate review/comments.
2018-10-18 17:50:50 +07:00
fulivi
830c3203f5 hp9825: added DC100 tape drive 2018-10-16 17:39:31 +02:00
AJR
fee7039a48 lib/util/options.cpp: Don't try to set the value of a header (nw) 2018-10-04 21:17:23 -04:00
mooglyguy
f522870d8a -options: Restored erroneously-removed game-specific INI option reversion between runs. Fixes MT#06171. [Ryan Holtz] 2018-10-05 01:20:04 +02:00
Vas Crabb
250c06a4d7 srcclean (nw) 2018-09-23 12:22:35 +10:00
Vas Crabb
b98658573b (nw) Fix inadvertently non-const pointers - emu.h edition
This fixes all the non-const pointers with static lifetime I could find
with a cheap grep (in combination with the last commit).  There are
likely more lurking that I didn't find, and things that aren't pointers
that should be made const.

There are still a few mutable static pointers that break the ability to
host multiple drivers but these require refactoring to fix:
src/devices/sound/sidvoice.cpp:static const uint8_t* waveform30;
src/devices/sound/sidvoice.cpp:static const uint8_t* waveform50;
src/devices/sound/sidvoice.cpp:static const uint8_t* waveform60;
src/devices/sound/sidvoice.cpp:static const uint8_t* waveform70;
src/mame/drivers/pockstat.cpp:	static const char *gme_id = "123-456-STD";
src/mame/machine/namco51.cpp:					static const game_driver *namcoio_51XX_driver = nullptr;
2018-09-20 14:32:59 +10:00
Vas Crabb
2993e850bb (nw) fix lots of inadverently mutable static pointers 2018-09-20 11:42:37 +10:00
Robert
7d58fbe09f
Merge pull request #4009 from AmatCoder/AmatCoder-fix-dsk
dsk_dsk.cpp: sectors must be read even if it contains deleted mark
2018-09-19 23:14:05 +10:00
AmatCoder
e07b1b467f
dsk_dsk.cpp: sectors must be read even if it contains Deleted Mark
FDC will read the data if SK bit is not set.

Fixes MameTesters bug #07081
2018-09-19 13:18:09 +02:00
Nigel Barnes
bcad4e9c09 bbcb: Added floppy disc controller options:-
- AMS 3" Microdrive Disc System
- Microware DDFS FDC (not working)
2018-09-17 19:18:38 +01:00
AmatCoder
745e8c0f0f
tzx_cass.cpp: 1ms pause is always required
Not only when pause from block is greater than zero .
Otherwise the last pulse is not terminated properly in some cases.
2018-09-16 07:20:34 +02:00
arbee
9dea8bbd37 chdcd: also accept .toast as a synonym for ISO images (nw) 2018-09-12 23:48:51 -04:00
mooglyguy
bb32d72c7e Fixed pmd85 regression, nw. Also replaced a fail-safe in src/lib/util/palette.cpp with an assert. Expect regressions, so better to get it out of the way now. nw 2018-08-30 23:40:37 +02:00
ajrhacker
d916d00911
Merge pull request #3795 from felipesanches/gtrak10_2018-jul-27
A large portion of the Atari Gran Trak 10 schematics (1974) implemented on MAME using the netlist subsystem.
2018-08-24 11:13:27 -04:00
balr0g
3f1b9ba8e9 imgtool: fix off by one error with leap years (nw) 2018-08-13 00:39:57 -04:00
AJR
ce99fccdb4 ti99_dsk.cpp: Change crc type to uint16_t here, too (nw) 2018-08-04 12:51:32 -04:00
AJR
7907b5afee ti99_dsk.cpp: More appropriate variable type which will hopefully make MSVC happy (nw) 2018-08-04 12:49:29 -04:00
Robbbert
9027827820 (nw) Fixed the build. 2018-08-04 09:02:37 +10:00
Michael Zapf
801935badb ti99: Fixed long-standing TDF bug; added support for 16-sector formats 2018-08-03 22:01:39 +02:00
Peter Ferrie
50830efb2a Merge branch 'master' of https://github.com/mamedev/mame 2018-07-29 21:54:08 -07:00
Peter Ferrie
83c4aa9f1e ap2_dsk.cpp: avoid one type of .woz corruption (nw) 2018-07-29 21:52:11 -07:00
Felipe Corrêa da Silva Sanches
e88ec6a7a5 A large portion of the Atari Gran Trak 10 schematics (1974)
implemented on MAME using the netlist subsystem.
2018-07-28 11:37:12 -03:00
AJR
c5a244d32c flopimg.h: Add debug asserts to help catch geometry errors (nw) 2018-07-28 00:54:54 -04:00
AJR
952bdf962a imd_dsk.cpp: Add some sanity checking on geometry 2018-07-27 23:43:03 -04:00
Vas Crabb
2968620098 make rectangle work better with constexpr, change many things to use designated getters/setters (nw) 2018-07-28 02:27:53 +10:00
Vas Crabb
9db24aa2e9 Better support for screen orientation/geometry:
* Eliminates the need for the horizontal/vertical/LCD/SVG layout files
* Screens can now have orientation and physical aspect ratio specified
* RASTER/VECTOR defaults to 4:3, LCD/SVG defaults to square pixels at config time
* System orientation is applied on top of screen orientation

Automatically generated single-screen views and orientation flags in XML
output now work correctly for systems with multiple screens in different
geometries/orientations, e.g. housemnq, rocnms, stepstag, or netmerc.

The "core rotation options" only interact with system orientation.
Allowing multi-screen systems to work well with one monitor per emulated
screen is a complex topic.  System orientation also affects the GFX
viewer while screen orientation doesn't.  The orientation displayed in
the system selection menu is from the system orientation.

Let me know if I've broken any systems or use cases.

Also, add save state support for std::array/C array nested to any depth.
2018-07-26 23:11:02 +10:00
Vas Crabb
dce955c68d rendlay: allow user variables and repetition in layouts, also add a few more predefined variables 2018-07-22 03:22:31 +10:00
Nigel Barnes
6ab094b76b camplynx_cas: Added support for multiple files (concatenated) in TAP file. 2018-07-16 21:19:55 +01:00
Nigel Barnes
e7da0b3a4b New machines marked as NOT_WORKING
----------------------------------
CMS 6502 Development System
2018-07-10 11:34:37 +01:00
Frank Palazzolo
ebc3f6947f Bug fix for multi-channel reads in cassette_get_samples(). (#3725)
* Bug fix for multi-channel reads in cassette_get_samples().
Use the unused "sample_bytes" arg the same way as cassette_put_samples()
Can be used with multi-channel files now!

* Rename sample_bytes to more descriptive sample_spacing
Add some comments about sample functions and sample_spacing variable
2018-07-09 05:28:18 +10:00
smf-
b747b711bb fix building with clang 6.0.1 (nw) 2018-07-07 11:28:01 +01:00
Olivier Galibert
a704ed7b1b emumem: Backend modernization [O. Galibert] 2018-06-29 20:04:28 +02:00
hap
2ce57abcf9 tzx_cas: no other copyright holders. initial version here:
5a0a43eb8f (diff-26e48bc5e5a1dc7272914d9f9cd3249d)
2018-06-26 13:08:29 +02:00
Vas Crabb
90d7b40e62 srcclean and other cleanup (nw) 2018-06-24 19:04:53 +10:00
Olivier Galibert
2b54bc0e04 Oops (nw) 2018-05-26 23:09:56 +02:00
Olivier Galibert
83a3b78fb3 Forgot the comment (nw) 2018-05-26 22:39:50 +02:00
Olivier Galibert
de919271fe Floppy robustification, better bitstream handling [John Keoni Morris, Peter Ferrie, Olivier Galibert] 2018-05-26 22:06:40 +02:00
Vas Crabb
c15531dddc srcclean (nw) 2018-05-27 04:48:13 +10:00
AJR
1fe4b36065 Fix error in debug build with SMS card options (nw) 2018-05-21 03:01:39 -04:00
balr0g
ea646ca403 Add Schmitt trigger device to standalone netlist Makefile (nw) 2018-05-11 12:06:50 -04:00
Michael Zapf
7a60dec53c Added logmacros to upd765, increased track buffer for hfe format (nw) 2018-05-10 21:01:47 +02:00
Michael Zapf
48dad9990e Fixed bitrate autodetect (nw) 2018-05-09 23:19:27 +02:00
Sergey Svishchev
23045014ac CPC DSK format: also check status bits in SR2 (nw) (#3546) 2018-05-10 01:21:42 +09:00
Michael Zapf
5a8ec54a1e ti99: Fixed disk creation via OSD 2018-05-04 21:59:16 +02:00
arbee
9adf583c47 Final GCC 8 batch for tonight (nw) 2018-05-01 22:52:25 -04:00
arbee
45977d9baa More GCC 8 (nw) 2018-05-01 22:04:06 -04:00
Olivier Galibert
d43d8bcecf apple2: Add WOZ format [O. Galibert] 2018-04-24 20:41:54 +02:00
arbee
b4ff6c970c apple2: recognize another form of DOS 3.3 in ProDOS order [R. Belmont, Peter Ferrie] 2018-04-23 19:53:57 -04:00
Vas Crabb
ac79c90607 srcclean (nw) 2018-04-22 09:24:13 +10:00
Vas Crabb
2c340f490e move some not-directly-emulation-related helpers to lib/util, further extricate emu.h from tools (nw) 2018-04-01 19:10:26 +10:00
Stefano
c959d88ec5 Minimal improvements on the disk handling (#3395)
* Keeping the 35 tracks drive as an option

* Reducing the crashes a bit more.

This helps matching the form_factor and the parameters found in the TeleDisk images, thus exiting before a serious crash.
It is NOT enough to improve the 8" disk image handling, nor it solves all the stability problems, but it is a tiny step forwards.
2018-03-27 10:20:08 +11:00
Vas Crabb
08dde5eb0a srcclean and regenerate localisations (nw) 2018-03-25 02:03:24 +11:00
Nigel Barnes
7ad824c85b New machines marked as NOT_WORKING
----------------------------------
Poly Proteus (Standalone) [Nigel Barnes, Andrew Trotman]
2018-03-21 20:53:11 +00:00
Sergey Svishchev
8b8931fb49 ms0515: unbreak memory maps; update floppy format definition to match one used by OS (nw) 2018-03-16 03:16:33 +03:00
Nigel Barnes
39b9cb0207 jvc_dsk: Added notes (nw) 2018-03-06 17:41:45 +00:00
Justin Kerk
0e77f9c540 Fixed issue causing drivers using netlists to fail on the Emscripten target. [Justin Kerk] 2018-03-06 03:12:21 +00:00
Vas Crabb
8dad4881f6 srcclean (nw) 2018-02-25 01:34:04 +11:00
Julian Sikorski
8cc758355d Enable use of system-wide asio, glm and rapidjson (#3172)
* Fixed building using system utf8proc

* Fixed building using system portaudio

* Allow using system-wide asio headers (1.11.0 or higher required).

* Allow using system-wide glm headers

* Allow using system-wide rapidjson headers
2018-02-08 16:06:25 -05:00
cracyc
649c169c2f i386/i286: fix default cs flags (nw)
d88_dsk: support bad crc (nw)
recreate columns copy protection (nw)
2018-02-02 23:01:40 -06:00
smf-
80ee327f08 disable netlist statistic logging on shutdown, because it triggers a use after free in void device_debug::errorlog_write_line(const char *line) & fixed the copy & pasted comment. (nw) 2018-01-31 11:11:16 +00:00
smf-
e78d6ac9dc thanks hap (nw) 2018-01-29 15:13:07 +00:00
smf-
6f377beb87 fix is_set() when generic_function is an int array (nw) 2018-01-29 12:07:47 +00:00
smf-
6fb696211b fix assertion when debugging in visual studio (nw) 2018-01-29 12:07:46 +00:00
Dirk Best
648af3b4d9 d88_dsk: Add some safety checks to avoid reading beyond the end of file 2018-01-28 01:54:49 +01:00
AJR
57bd62a1fb Eliminate core_strdup (nw) 2018-01-24 21:06:25 -05:00
Oliver Stöneberg
4e64f95721 Fixes for Coverity "Resource leak" warnings (#3089)
* lib/util/chdcd.cpp: fixed Coverity "Resource Leak" warning (nw)

* src/lib/util/chdcd.cpp: fixed more Coverity "Resource Leak" warnings (nw)

* tools/imgtool/modules/mac.cpp: fixed Coverity "Resource Leak" warnings (nw)

* devices/bus/ti99/gromport/cartridges.cpp: fixed Coverity "Resource Leak" warning (nw)
2018-01-21 15:24:51 +11:00
ajrhacker
68af4962e1
Merge pull request #3038 from firewave/ccvf
fixed MT06831 (bogus casting in ccvf_format::file_formats) (nw)
2018-01-10 15:18:06 -05:00
firewave
f2fedf0c8c fixed MT06831 (bogus casting in ccvf_format::file_formats) (nw) 2018-01-10 20:41:35 +01:00
Vas Crabb
d697e8a992 Convert zippath directory to a C++ interface 2018-01-10 18:25:26 +11:00
arbee
4cc0c47387 chdcd: recognize ISO images with 2336 byte sectors. [R. Belmont, Kale] 2018-01-08 09:18:57 -05:00
Jonathan Holt
c25b98226d Updates "2017" strings to "2018" where relevant. 2018-01-06 00:48:05 +11:00
Vas Crabb
bc9d99d58b use C locale for int/float in XML files 2018-01-05 17:12:01 +11:00