summaryrefslogtreecommitdiffstatshomepage
path: root/src/lib/netlist/plib (follow)
Commit message (Collapse)AuthorAgeFilesLines
* (nw) fix lots of inadverently mutable static pointers Vas Crabb2018-09-201-2/+2
|
* srcclean and other cleanup (nw) Vas Crabb2018-06-245-0/+0
|
* Fixed issue causing drivers using netlists to fail on the Emscripten target. ↵ Justin Kerk2018-03-061-0/+4
| | | | [Justin Kerk]
* srcclean (nw) Vas Crabb2018-02-251-1/+1
|
* thanks hap (nw) smf-2018-01-291-1/+0
|
* fix is_set() when generic_function is an int array (nw) smf-2018-01-291-1/+14
|
* fix assertion when debugging in visual studio (nw) smf-2018-01-291-20/+16
|
* Fix state saving for pfunction lfsr. (nw) couriersud2017-05-282-1/+17
|
* srcclean (nw) Vas Crabb2017-05-281-4/+4
|
* Fix issues identified by Vas and LordKale4: couriersud2017-05-272-2/+13
| | | | | | - made local netlists in Cheeky Mouse static - replace stdlib rand by 16 bit galois lfsr (nw)
* Add rand() function to pfunction expression parser. Use this to simulate couriersud2017-05-272-0/+8
| | | E-B noise in Cheeky Mouse and fix the "cheese" choose. [Couriersud]
* Netlist refactoring: couriersud2017-05-271-0/+60
| | | | | | - OPENMP refactored. All OPENMP operations are now templatized in pomp.h - We don't need thread-safe priority queue. Event code updating analog outputs now runs outside the parallel code. (nw)
* Changed Solver.PARALLEL parameter logic: couriersud2017-05-271-1/+1
| | | | | | | | | | | 0: Parallel processing of solvers disabled 1: One processor parallel processing. Can be used to measure OPENMP overhead >1: Solve n analog subnets in parallel. Previously, all available processors were used which caused performance to degrade on hyperthreading. [Couriersud]
* Forgot this one for GCC 7.1 (nw) Miodrag Milanovic2017-05-151-0/+4
|
* Move static data out of devices into the device types. This is a ↵ Vas Crabb2017-05-141-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | significant change, so please pay attention. The core changes are: * Short name, full name and source file are no longer members of device_t, they are part of the device type * MACHINE_COFIG_START no longer needs a driver class * MACHINE_CONFIG_DERIVED_CLASS is no longer necessary * Specify the state class you want in the GAME/COMP/CONS line * The compiler will work out the base class where the driver init member is declared * There is one static device type object per driver rather than one per machine configuration Use DECLARE_DEVICE_TYPE or DECLARE_DEVICE_TYPE_NS to declare device type. * DECLARE_DEVICE_TYPE forward-declares teh device type and class, and declares extern object finders. * DECLARE_DEVICE_TYPE_NS is for devices classes in namespaces - it doesn't forward-declare the device type. Use DEFINE_DEVICE_TYPE or DEFINE_DEVICE_TYPE_NS to define device types. * These macros declare storage for the static data, and instantiate the device type and device finder templates. The rest of the changes are mostly just moving stuff out of headers that shouldn't be there, renaming stuff for consistency, and scoping stuff down where appropriate. Things I've actually messed with substantially: * More descriptive names for a lot of devices * Untangled the fantasy sound from the driver state, which necessitates breaking up sound/flip writes * Changed DECO BSMT2000 ready callback into a device delegate * Untangled Microprose 3D noise from driver state * Used object finders for CoCo multipak, KC85 D002, and Irem sound subdevices * Started to get TI-99 stuff out of the TI-990 directory and arrange bus devices properly * Started to break out common parts of Samsung ARM SoC devices * Turned some of FM, SID, SCSP DSP, EPIC12 and Voodoo cores into something resmbling C++ * Tried to make Z180 table allocation/setup a bit safer * Converted generic keyboard/terminal to not use WRITE8 - space/offset aren't relevant * Dynamically allocate generic terminal buffer so derived devices (e.g. teleprinter) can specify size * Imporved encapsulation of Z80DART channels * Refactored the SPC7110 bit table generator loop to make it more readable * Added wrappers for SNES PPU operations so members can be made protected * Factored out some boilerplate for YM chips with PSG * toaplan2 gfx * stic/intv resolution * Video System video * Out Run/Y-board sprite alignment * GIC video hookup * Amstrad CPC ROM box members * IQ151 ROM cart region * MSX cart IRQ callback resolution time * SMS passthrough control devices starting subslots I've smoke-tested several drivers, but I've probably missed something. Things I've missed will likely blow up spectacularly with failure to bind errors and the like. Let me know if there's more subtle breakage (could have happened in FM or Voodoo). And can everyone please, please try to keep stuff clean. In particular, please stop polluting the global namespace. Keep things out of headers that don't need to be there, and use things that can be scoped down rather than macros. It feels like an uphill battle trying to get this stuff under control while more of it's added.
* stupid MSVC (nw) Vas Crabb2017-04-241-0/+2
|
* srcclean (nw) Vas Crabb2017-04-231-41/+41
|
* Fix VS2015 build. (nw) couriersud2017-04-091-0/+7
|
* Netlist code refactoring: couriersud2017-04-098-90/+108
| | | | | | | | | | | | | | | | | | | - more use of c++ features - some CRTP in pfmtlog - demangled code for truthtables - use more constexpr - rewrite main loop - use default constructors and assignment operators were applicable. - optimized 7448 and 9316 All of this has decreased startup time by approx. 25% to 30%. Complex netlists like pong or kidniki are parsed, analyzed and constructed in around 15 ms. Run performance has increased by about 5%. All in all not to bad. A game like pong uses a clock of 7 MHz (after division by 2). Thats 14 MHz clock invocations. Running at over 200%, 28 MHz. On a 3.9 GHz Machine about 140 cycles/clock change. [Couriersud]
* pstring, pdynlib, pfmtlog refactoring : couriersud2017-04-0410-287/+519
| | | | | | | | | | | | | | | | | | | | | pstring: - added support for UTF16LE to pstring. - renamed size() to mem_t_size() - renmaed len() to length() - added size() == length() - added empty() - added simple compare() pfmtlog: - Simplified pfmtlog, added more c++ pdynlib: - add a dynproc type to dynlib to wrap dynamic library calls. various: - fix two coverty scan issue. - various clang warnings fixed. (nw)
* Fix pedantic clang warnings. (nw) couriersud2017-03-302-3/+3
|
* Use char32_t were appropriate. (nw) couriersud2017-03-301-3/+3
|
* Change pstring to use std::string as storage container. couriersud2017-03-3010-586/+206
| | | | | | | | This removes all allocation code from pstring. const_iterator is consequently now based on pstring::const_iterator. Removed pstring_buffer. This was class wasn't a good idea. Vas was right: This change did not impact runtime performance. Startup performance (string intensive) increased. (nw)
* Turn psring iterator into a real forward iterator that works with standard ↵ Vas Crabb2017-03-305-44/+76
| | | | | | | | | | | | | | | | | | | | algorithms. There are a few changes to achieve this: * Rename to const_iterator since it's immutable * Typedef iterator to const_iterator for now as there's no mutable iterator * Add default constrcutor and operator-> required by concept, const-qualify operators * Remove operator+ and operator+= since it's not a random-access iterator (use std::next and std::advance instead) * Return reference/pointer to a proxy rather than a code_t value from opertator*/operator-> The final change is required to meet the requirement that operator* for two equivalent forward iterators return an equivalent reference. The pstring doesn't actually contain a sequence of code_t, so there's no way to return a reference to code_t directly. Instead, a reference to a proxy object aliased on the string storage is returned. The proxy is implicitly convertible to code_t. The most noticeable side effect is that auto c = *s.begin() or for (auto c : s) won't work. You need to do for (auto &c : s) or for (code_t c : s) instead.
* Fix clang warnings in netlist code. couriersud2017-03-053-15/+15
| | | | | | Fixed -Winconsistent-missing-destructor-override warnings. Made some constructors of template classes and classes with virtual .. = 0 methods protected. Fixed src/lib/netlist/build/makefile (nw)
* More cppcheck fixes. (nw) Couriersud2017-03-0517-56/+57
|
* Fix some cppcheck warnings. (nw) Couriersud2017-03-052-5/+5
|
* Fix netlist stats collection. Code refactoring: couriersud2017-02-241-1/+1
| | | | | | | Small improvement for 7493. Convert 9316 from subdevice to delegate. Convert 74107 from subdevice style to delegate. Also refactored inconsistencies in other parts of the code. (nw)
* Added a heap priority queue to the netlist source. couriersud2017-02-241-3/+5
| | | | | This is currently not used since performance drops by about 40%. The typical use case would be circuits a lot more complex than those we currently emulate where the 2*log(n) advantage really applies. (nw)
* Improve readability. Add more c++11 noexcept and swap semantics. couriersud2017-02-223-11/+22
| | | Also fixed clang-5 warnings. (nw)
* srcclean (nw) Vas Crabb2017-02-192-8/+8
|
* More truthtable rework and clean up. (nw) couriersud2017-02-191-1/+14
|
* Fix mingw 32 bit build. (nw) couriersud2017-02-172-1/+7
|
* Reworked truthtables a bit. couriersud2017-02-174-8/+8
| | | | | - Moved 9312 and 74279 to ttl macro library. - Renamed TTL_9312_* to DM9312. This is more appropriate. - Fixed a number of warnings from latest ubuntu clang-5.0.
* Optimized 7493 device. Gives some 5 to 10% improvement to pong. couriersud2017-02-161-0/+1
| | | | 7493 also is an example on how to use multiple handlers on a device makes design easier. (nw)
* Move from <cstring> to std::copy and friends. (nw) couriersud2017-02-165-40/+51
|
* Added state saving and loading to nltool. couriersud2017-02-153-13/+107
| | | First step towards regression and unit tests. (nw)
* Remove duplicate save states / Save state simplification. (nw) couriersud2017-02-131-22/+5
|
* Separate custom save states. (nw) couriersud2017-02-122-7/+15
|
* Reorder include order to comply with best practices. (nw) couriersud2017-02-1017-39/+41
|
* Make windows builds of nltool and nlwav understand unicode. couriersud2017-02-105-5/+180
| | | nltool and nlwav now use wmain, i.e. UNICODE main on windows. (nw)
* Make sure netlist includes are not found directly on include path. couriersud2017-02-102-7/+14
| | | | Instead, they have to be prefixed by "netlist/". Removed unneeded link librariers for nltool and nlwav along the way. (nw)
* Netlist: It is now possible to have multiple handlers per device ... couriersud2017-02-054-35/+105
| | | | | | | | | | | | | ... for updates. This will make device implementation more flexible and faster. A nice side-effect is that there was some minor (<5%) performance increase already. Each input is now assigned a notification handler. Currently this is update, but going forward this may be a custom handler. In addition - fixed MEMPOOL on OSX - removed dead code - avoid bit-rot - added delegate support for emscripten and arm processors - added delegate support for VS 2015 x64 [Couriersud]
* Add constexpr add noexcept. (nw) couriersud2017-02-051-12/+20
|
* Fix a bug in pstring.cpp causing crash if moved object is reused. (nw) couriersud2017-02-051-7/+10
|
* Fixed a number of issues: couriersud2017-01-314-6/+39
| | | | | | | | | | - Fixed crashes on terminals without nets (i.e. connected to a rail) - Reviewed "FIXMEs" and corrected some minor ones. - Made m_cur_analog protected. - Fixed pmf delegates to work with msvc. - More optimizations to the solver code. - Started work on a better signal pipeline in nlwav - Only generate documentation for entities which are documented. [Couriersud]
* Solver stuff: couriersud2017-01-291-1/+1
| | | | | | Rewrote mat_cr_t to include data as well. Fixed some bitrot in other parts. Simplified solver creation. (nw)
* Logging enhancement for Joakim. couriersud2017-01-281-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | For netlist device debugging one can now use #define LOG(...) log().info(__VA_ARGS__) to use debugging and the known #define LOG(...) do {} while (0) do disable debugging on device level. To avoid bitrot one could as well use #define LOG(...) log().info.log<true>(__VA_ARGS__) and #define LOG(...) log().info.log<false>(__VA_ARGS__) The later disables debugging. If the compiler can assume that there are no side effects from e.g. using foo(a/b), 'LOG("abc {1:04x}", foo(a/b));' should be completely optimized away. Log channels available are info, verbose, warning, error and fatal. Don't use debug, it is enabled only on specific debug builds. Use would be e.g. LOG("abc {1:04x}", 2); The format specifier in the string are enclosed in "{}". "{2}" is the second parameter after the format string. Types are determined automatically. "{3:04x}" would format a number as a hexadecimal with 4 leading zeros. [Couriersud]
* Fix bug which caused hazl1500 to crash. (nw) couriersud2017-01-281-0/+1
|
* Minor refactoring. (nw) couriersud2017-01-274-45/+36
|