Commit Graph

1949 Commits

Author SHA1 Message Date
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