Commit Graph

1756 Commits

Author SHA1 Message Date
npwoods
536990e77b Overhaul to how MAME handles options (#2260)
This is an overhaul to how MAME handles options to provide a better foundation for what MAME is already doing in practice. Previously, core_options was designed to provide an input/output facility for reading options from the command line and INI files. However, the current needs (image/slot/get_default_card_software calculus and MewUI) go way beyond that.

Broadly, this PR makes the following changes:
* core_options now has an extensibility mechanism, so one can register options that behave dramatically differently
* With that foundation, emu_options now encapsulates all of the funky image/slot/get_default_card_software calculus that were previously handled by static methods in mameopts.cpp. Changes to emu_options should not automatically cascade in such a way so that it stays in a consistent state
* emu_options no longer provides direct access to the slot_options/image_options maps; there are simpler API functions that control these capabilities
* Many core_options functions that expose internal data structures (e.g. - priority) that were only really needed because of previous (now obsolete) techniques have been removed.
* core_options is now exception based (rather than dumping text to an std::string). The burden is on the caller to catch these, and discern between warnings and errors as needed.

Obviously this is a risky change; that's why this is being submitted at the start of the dev cycle.
2017-05-05 16:17:49 +10:00
Vas Crabb
69d47f3841 Fix off-by-one error (nw)
The +1 was previously needed becasue std::string::assign(char *) expects
the string to be NUL-terminated.  The final NUL is not part of the
result.  It's not needed when adjusting the length of the string
directly.  Can people please be careful when refactoring, and alo when
reviewing pull requests?  This stood out immediately.
2017-05-05 01:12:33 +10:00
Nathan Woods
eb8e8426dd Minor improvement to CHD metadata loading
Writing into an std::string is now legal with C++11
2017-05-04 07:58:27 -04:00
Vas Crabb
d6cd22c5e3 stupid MSVC (nw) 2017-04-24 00:04:20 +10:00
Vas Crabb
dac6dc4f62 srcclean (nw) 2017-04-23 12:27:42 +10:00
Nigel Barnes
29a7778ae7 atom: Added csw cassette format
csw_cas: Fixed Coverity CID 136200 Logically dead code (nw)
2017-04-17 18:49:42 +01:00
Nigel Barnes
79e60cfae2 jfd_dsk: Fix Coverity CID 161175 Uninitialized scalar variable (nw) 2017-04-17 18:49:42 +01:00
Nathan Woods
85b0d8bb04 Pruned out some cruft in src/lib/util/options.[cpp|h] 2017-04-17 08:17:04 -04:00
Nathan Woods
c108986639 More options refactoring
This should address outstanding concerns with PR#2231.  I'm trying to turn emu_options into a self contained structure that encapsulates behaviors related to options, including the gymnastics pertaining to image/slot loading and interactions with get_default_card_software() and "just works".

When the MAME 0.186 development cycle starts up, I hope to take this further.  I want to make core_options::entry an abstract base class so that the entries associated with image options and slot options can derive from it.  This will eliminate the current need for emu_options to directly expose maps for image and slot options.

For now, I'm in stabilization mode, and I hope to get things working for a stable 0.185 release.
2017-04-16 13:08:57 -04:00
npwoods
02ea4fd43c Fixes issues specifying image/slot options fron INI files (reported by Robbbert) (#2231)
This fix really doesn't go far enough.  I added hooks so that options specified at the command line can also be responded to when parsed from INI files, but in the long run much of the logic that is currently in mame_options should go into emu_options so that when an option is specified, all of the wacko logic around slot/image specification "just works" because it is encapsulated within emu_options.

We have a release 11 days away; I want to be in stabilization mode.
2017-04-15 22:32:12 +02:00
Antoine Miné
fee8cc7135 [thomson] fix regressions to (legacy) floppy support (#2224)
* [thomson] fix legacy floppy support

* [thomson] more (legacy) floppy fixes
2017-04-13 10:38:28 +10:00
cracyc
7c9b346ade cdrom: translate from 2336 to 2048 (nw) 2017-04-10 13:59:26 -05:00
couriersud
41b915c712 Minor optimization. (nw) 2017-04-09 23:00:03 +02:00
couriersud
f011567c77 Parametrized device activation in truthtables. (nw) 2017-04-09 23:00:02 +02:00
couriersud
a55419d485 Fix VS2015 build. (nw) 2017-04-09 04:25:49 +02:00
couriersud
5a24cab445 More work on 9316. (nw) 2017-04-09 04:25:09 +02:00
couriersud
6e9637196d Refactored 74715 to one device layout. Removed subdevice. (nw) 2017-04-09 02:42:38 +02:00
couriersud
49d50c3045 Netlist code refactoring:
- 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]
2017-04-09 00:04:10 +02:00
npwoods
f809f0e08d Introduced an 'util::arbitrary_clock' template class, to represent a clock that "knows" when the epoch starts (#2010)
* Introduced an 'util::arbitrary_clock' template class, to represent a clock that "knows" when the epoch starts

Also:
  - Converted the NTFS filetime code to use util::arbitrary_clock
  - Converted the Mac datetime code to use util::atribrary_clock

This is in preparation for a bigger change to Imgtool where I eliminate usage of time_t
2017-04-06 11:39:00 +10:00
couriersud
58aa97913f pstring, pdynlib, pfmtlog refactoring :
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)
2017-04-04 02:02:56 +02:00
Nathan Woods
44c04cd97a Fixed issue that could cause bogus arguments to be reported incorrectly
Examples:  'mame -whatever nes' would previously be reported as "Unrecognized argument: nes"
2017-04-02 19:41:40 -04:00
couriersud
0c1b6430d0 Fix pedantic clang warnings. (nw) 2017-03-30 23:24:48 +02:00
couriersud
aacee827fe Use char32_t were appropriate. (nw) 2017-03-30 23:17:11 +02:00
couriersud
ac13946ffb Change pstring to use std::string as storage container.
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)
2017-03-30 22:06:03 +02:00
Vas Crabb
5e8fefbb12 Turn psring iterator into a real forward iterator that works with standard 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.
2017-03-30 15:51:14 +11:00
Vas Crabb
6cb38b0771 srcclean (nw) 2017-03-26 12:57:49 +11:00
Nigel Barnes
f224898523 archimedes: Added JFD floppy format as used by JASPP (Archimedes Software Preservation Project) 2017-03-23 20:47:26 +00:00
Nigel Barnes
d0d342d76c apd_dsk: added notes (nw) 2017-03-23 20:47:26 +00:00
couriersud
6e8b88136d Fix openmp compile. (nw) 2017-03-20 18:42:11 +01:00
Miodrag Milanovic
ad2bedf06b Refactored HTTP handling to be easier to extend and use (nw) 2017-03-19 18:35:05 +01:00
Sergey Svishchev
7d4d6382e7 hp_ipc: de-skeletonize. 2017-03-16 22:26:49 +03:00
R. Belmont
77155c2657 Merge pull request #2138 from shattered/_47be08c
eurocom2, waveterm: new skeleton drivers (Eltec EurocomII SBC, PPG Wa…
2017-03-14 20:56:26 -04:00
Justin Kerk
8b0fae308e New working software list additions
-----------------------------------
ibm5150: EDITEXTE, Label Magic, Multitexte, PrintMaster Plus, Bivouac, Chuck Yeager's Advanced Flight Trainer,
  Double Dragon (5.25", older), Indianapolis 500: The Simulation (3.5", newer), Licence to Kill, Pick'n Pile, Prehistorik,
  Rockford, Skweek [breiztiger]

New NOT_WORKING software list additions
---------------------------------------
ibm5150: Ikari Warriors (alt), First Samurai, JetFighter I: The Adventure, Turbo Driver [breiztiger]
2017-03-12 13:40:02 -07:00
Sergey Svishchev
8fd315da7e eurocom2, waveterm: new skeleton drivers (Eltec EurocomII SBC, PPG Waveterm A) 2017-03-12 17:17:06 +03:00
Sergey Svishchev
58f2def862 formats/cbm_tap: fix CID: 138003 "Dereference before null check" 2017-03-11 02:21:54 +03:00
couriersud
d23cecc86b Fix clang warnings in netlist code.
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)
2017-03-05 21:59:52 +01:00
Couriersud
3c49610274 More cppcheck fixes. (nw) 2017-03-05 16:19:59 +01:00
Couriersud
c933d239f5 Fix some cppcheck warnings. (nw) 2017-03-05 16:19:58 +01:00
Vas Crabb
28596c7161 fix crash on excessive command-line options, clean up some tabulation, remove long-dead option 2017-03-03 14:18:58 +11:00
Sergey Svishchev
7fb8176ac6 apply clang-format, remove obsolete comments. no code changes. 2017-03-02 01:24:43 +11:00
Nathan Woods
239dcd4449 Fixed regression pertaining to specification of empty strings as slot names
e.g. - 'next -scsibus:1 "" -listdevices'
2017-02-27 01:14:11 +11:00
couriersud
1a2f928403 Netlist refactoring
- align timed_queue closer to std::priority_queue
- use uint8_t in extended clock for better memory usage.
- minor changes to nl_breakout.cpp (nw)
2017-02-25 10:44:04 +01:00
couriersud
454938dad4 Fix clang-5.0 warning .. Maximum of unsigned X and 0 is always X. (nw) 2017-02-24 14:58:34 +01:00
couriersud
7c1ba76f3b Fix netlist stats collection. Code refactoring:
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)
2017-02-24 14:55:45 +01:00
couriersud
acd0382d90 Added a heap priority queue to the netlist source.
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)
2017-02-24 14:49:12 +01:00
Vas Crabb
759933ded7 Fixed an issue where device options (e.g. -cart) were reported as unknown when they actually worked (#2081)
Conflicts:
	src/frontend/mame/clifront.cpp
2017-02-24 09:34:15 +11:00
Nathan Woods
41c2350266 Vas feedback 2017-02-23 09:23:41 -05:00
Nathan Woods
8c53c1438e Fixed an issue where device options (e.g. -cart) were reported as unknown when they actually worked
This change also changes around how command line arguments are passed around; specifically I changed argc/argv to be std::vector<std::string>

Note this is not passed around 'const', the reason being that the command line processing will now "eat" the vector
2017-02-22 23:13:41 -05:00
npwoods
709c330a1f Softlist cleanup (#2075)
* Eliminates the need for emu_options::update_cached_options() by providing a hook for when option values change

* This is a preliminary fix to the issue identified in PR#2065

* More softlist related refactoring:
  - We now only parse the command line (with core_options::parse_command_line()) once
  - Options that are set up during slot and image setup go through a 'value_specifier' function
  - Eliminated the command line postprocessing
2017-02-22 23:16:23 +11:00
couriersud
85d915f5cd Fix VS2015 compile. (nw) 2017-02-22 02:04:02 +01:00
couriersud
a82ca2d244 Improve readability. Add more c++11 noexcept and swap semantics.
Also fixed clang-5 warnings. (nw)
2017-02-22 02:04:02 +01:00
couriersud
5c4b7cfef8 Clean up net_t interface and increase readability. (nw) 2017-02-22 02:04:01 +01:00
couriersud
0bdffa7e97 Slightly improve event timing if state changes.
Also introduce a push_force call to reschedule already pending events if
the state will not change. (nw)
2017-02-19 16:55:30 +01:00
Vas Crabb
8f15315a52 srcclean (nw) 2017-02-19 11:40:55 +11:00
couriersud
2acad1f854 Add prodigy to mamenl build. Fix clang5 warnings. (nw) 2017-02-19 01:00:48 +01:00
couriersud
65806114b0 More truthtable rework and clean up. (nw) 2017-02-19 01:00:48 +01:00
couriersud
2ade578dc0 Fix nltool logging. (nw) 2017-02-19 00:59:31 +01:00
R. Belmont
7b193346a8 Merge pull request #2068 from JoakimLarsson/prodigy_display
Prodigy display
2017-02-17 21:59:51 -05:00
couriersud
8536d065e2 Fix mingw 32 bit build. (nw) 2017-02-17 20:10:15 +01:00
couriersud
0716d96514 Reworked truthtables a bit.
- 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.
2017-02-17 20:10:15 +01:00
Curt Coder
044d08a6c3 abc800_dsk: Fixed sector interleave. [Curt Coder] 2017-02-17 13:14:40 +02:00
Joakim Larsson Edstrom
f9f149a579 new netlist device: 74164 - 8bit parallel output serial shift register 2017-02-17 09:05:30 +01:00
couriersud
73b4115c19 Optimized 7493 device. Gives some 5 to 10% improvement to pong.
7493 also is an example on how to use multiple handlers on a device
makes design easier. (nw)
2017-02-16 20:31:42 +01:00
couriersud
32aca6c398 Move from <cstring> to std::copy and friends. (nw) 2017-02-16 20:31:42 +01:00
Olivier Galibert
c1e0a6344a Revert "wd177x_dsk, upd765_dsk: Fixed sector interleaving. [Curt Coder]"
This reverts commit 16f79382aa.
2017-02-16 14:46:45 +01:00
Curt Coder
16f79382aa wd177x_dsk, upd765_dsk: Fixed sector interleaving. [Curt Coder] 2017-02-16 14:10:36 +02:00
R. Belmont
1835b25d6d Merge pull request #2062 from shattered/_fb4f4dd
ms0515.cpp -- hook up keyboard and floppy, improve video emulation etc. (take 2)
2017-02-15 21:58:06 -05:00
Vas Crabb
fb087b6c92 Cherry-pick some features from self-registering drivers PoC:
* Use size_t for sizes and <algorithm> for algorithms
* Fix up some files that were getting linked into multiple libs
* Add missing virtual method to sh2 peripheral class
* Put shortname in driver struct for locality
* Use shared pointers in config LRU cache for safety
2017-02-16 12:20:35 +11:00
couriersud
cc39da9c83 Added state saving and loading to nltool.
First step towards regression and unit tests. (nw)
2017-02-15 01:01:51 +01:00
couriersud
74e690d654 Move inline constructors from header to cpp. (nw) 2017-02-15 01:01:50 +01:00
Sergey Svishchev
a783bb3de4 dsk_dsk format: propagate CRC error flags 2017-02-13 19:33:08 +00:00
Sergey Svishchev
1837531d2d ms0515.cpp -- hook up keyboard and floppy, improve video emulation etc. 2017-02-13 22:09:31 +03:00
couriersud
3c60882f93 Start adding save state support to nltool.
Save states are needed for regression tests going forward. (nw)
2017-02-13 00:54:51 +01:00
couriersud
3e42594830 Add standalone VC2015 build file in src/lib/netlist/build
This was the last platform without standalone compile. Sure needs more
attention, grateful for any help. (nw)
2017-02-13 00:54:40 +01:00
couriersud
290185cf00 Remove duplicate save states / Save state simplification. (nw) 2017-02-13 00:51:41 +01:00
couriersud
f2c3b51553 Separate custom save states. (nw) 2017-02-12 23:48:53 +01:00
couriersud
d7f420ccf7 Optimize queue save state. (nw) 2017-02-12 23:48:52 +01:00
Olivier Galibert
a2557f1b02 Remove emu.h from headers (nw)
Per Vas' request.  If the compile fails for you (i'm thinking osx and
windows native debuggers here in particular), add '#include "emu.h"'
as first include of the cpp files that fail.

Due to our use of precompilation and forced inclusion, emu.h must be
included as the very first non-comment thing we do if we want to be
sure msvc compiles are identical to gcc/clang ones.  Doing it directly
instead of through an include increases the correctness probability by
a magnitude.
2017-02-11 18:31:20 +01:00
couriersud
572ca8100f Reorder include order to comply with best practices. (nw) 2017-02-10 21:53:02 +01:00
couriersud
9a71daa2e0 Make windows builds of nltool and nlwav understand unicode.
nltool and nlwav now use wmain, i.e. UNICODE main on windows. (nw)
2017-02-10 21:53:01 +01:00
couriersud
ab17457707 Make sure netlist includes are not found directly on include path.
Instead, they have to be prefixed by "netlist/". Removed unneeded link
librariers for nltool and nlwav along the way. (nw)
2017-02-10 21:52:09 +01:00
Miodrag Milanovic
90c14be174 Sync with upstream (nw) 2017-02-05 18:32:46 +01:00
couriersud
70051f6c1f Netlist: It is now possible to have multiple handlers per device ...
... 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]
2017-02-05 17:19:53 +01:00
couriersud
427cf984db Fix 9322. (nw) 2017-02-05 17:19:52 +01:00
couriersud
ced71c2b58 Add constexpr add noexcept. (nw) 2017-02-05 17:19:51 +01:00
couriersud
6a770d7086 Doxygen work. How the heck can one enforce a consistent device
documentation? (nw)
2017-02-05 17:19:51 +01:00
couriersud
f61e1f2123 Fix a bug in pstring.cpp causing crash if moved object is reused. (nw) 2017-02-05 17:19:50 +01:00
couriersud
ee8fed61c2 Some documentation work.
Along the way, set default models for devices missing them. 
Fix standalone makefile to work in mingw environment. (nw)
2017-02-05 17:19:49 +01:00
Vas Crabb
4db6e43971 Avoid conflict with Apple C++ runtime header nl_types.h 2017-02-04 12:29:23 +11:00
Vas Crabb
9568b26c35 fix chd build (nw) 2017-02-02 14:36:48 +11:00
Vas Crabb
38a6ab02e4 yo sup dawg (nw) 2017-02-02 14:17:40 +11:00
Nigel Barnes
d5bba41ed6 zx81: added tzx cassette format 2017-02-01 19:40:29 +00:00
Nigel Barnes
51992a75ec apd_dsk: improved identify and simplified load (nw) 2017-02-01 19:40:29 +00:00
Lord-Nightmare
7d05b65840 build fix (nw) 2017-01-31 18:24:49 -05:00
couriersud
e02d8cad2b Fixed a number of issues:
- 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]
2017-01-31 22:37:25 +01:00
couriersud
c713f9ed1d Separate include file usage for netlist.
Device implementations (all cpp files in netlist/devices) now should
only include nl_base.h. 
Netlist implementation sources should only include "net_lib.h". 
Refactored netlist.h and netlist.cpp to avoid namespace congestion in
netlist.h.
Fixed VC2015 build. (nw)
2017-01-29 15:47:12 +01:00
couriersud
2720512e31 Solver stuff:
Rewrote mat_cr_t to include data as well. 
Fixed some bitrot in other parts.
Simplified solver creation. (nw)
2017-01-29 15:45:50 +01:00
couriersud
fe8e2a7732 Logging enhancement for Joakim.
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]
2017-01-28 03:54:59 +01:00
couriersud
4eee6b09a9 Fix a hidden bug in the GMRES solver and more optimization. (nw) 2017-01-28 03:54:58 +01:00
couriersud
bd20222866 Fix bug which caused hazl1500 to crash. (nw) 2017-01-28 03:52:42 +01:00
couriersud
cb16de91c6 Minor refactoring. (nw) 2017-01-27 18:38:01 +01:00
couriersud
2e5d1c6cb3 Remove macro to avoid copying and replace with a struct. (nw) 2017-01-27 15:22:19 +01:00
couriersud
6d2354264a Do not derive other classes from std::vector. More cleanup. (nw) 2017-01-27 15:22:18 +01:00
couriersud
5c88873a87 Cleanup of includes. (nw) 2017-01-27 15:22:17 +01:00
smf-
1756a54c74 fix for visual studio (nw) 2017-01-26 12:35:48 +00:00
couriersud
716361fd6a Hopefully fix compile on some unknown compiler. (nw) 2017-01-26 11:03:19 +01:00
couriersud
c4dbd26730 Fix netlist code generation. (nw) 2017-01-26 11:03:18 +01:00
Julian Sikorski
c50ddac28b Fixed building using system utf8proc 2017-01-26 09:28:21 +11:00
couriersud
ba03118b09 More netlist refactoring:
- Remove virtual from some destructors and make them protected. 
- Various cleanups.
- Small performance improvement. 
- Fixed some inconsistencies. 
- More c++ refactoring. (nw)
2017-01-25 22:17:48 +01:00
couriersud
25152bd69a Netlist refactoring:
- Refactored netlist pmf code.
- Small optimization for diode calculations. 
- Minor refactoring across the board. (nw)
2017-01-25 22:17:47 +01:00
couriersud
093bda0193 Added infix notation parsing to the function parser. (nw) 2017-01-25 22:17:46 +01:00
Stiletto
9db7b63e9a Updates "2016" strings to "2017 where relevant.
Updates "2016" strings to "2017 where relevant.
2017-01-24 17:29:49 -05:00
Vas Crabb
edf64df1db srcclean (nw) 2017-01-22 15:37:37 +11:00
couriersud
4d15501a30 Netlist: code refactoring
Make streams provide binary access only. Use putf8_reader and
putf8_writer to actually access streams. Replace some char * parameters
with pstring where appropriate. Minor code refactoring and move
functionality were it belongs. (nw)
2017-01-20 22:29:23 +01:00
couriersud
1ae3e29ea3 Assume string literals are UTF8 in netlist code.
At the same time, any char pointer has to be explicitly converted to
pstring by specifying an encoding. Not yet optimal, but certainly better
than what was there before. 
Removed unneeded methods from pstring. (nw)
2017-01-20 22:20:36 +01:00
couriersud
d0b6742563 Default argument on plib::environment now optional. (nw) 2017-01-20 22:20:35 +01:00
couriersud
167d8405ec Converted warnings and fatal log messages to constants.
Also refactored some code to ease the exercise. (nw)
2017-01-20 22:20:35 +01:00
couriersud
ca11021d73 Netlist:
- refactored reverse polish notation evaluator into own source files.
- added function parameter to current and voltage sources VS and CS.
  You can now use those to e.g. produce a sine wave.
- Changed code to allow devices to optionally be treated as dynamic or 
  timestepping devices.
[Couriersud]
2017-01-17 01:35:16 +01:00
Nigel Barnes
2188df0263 apd_dsk: new floppy format 'Archimedes Protected Disk' 2017-01-16 20:44:43 +00:00
couriersud
7bf2939fd8 Register all devices using NETLIB_DEVICE_IMPL. Fix encoding issue. (nw) 2017-01-16 19:49:45 +01:00
couriersud
969e6ed6a0 Keep track were registry elements are created. (nw) 2017-01-16 19:49:44 +01:00
couriersud
10a4ab4af1 Preparation work for automatically generated include file for devices.
nltool now is able to create all defines from the factory definitions.
This will reduce the number of places needed to touch when adding
devices and always ensure that the parser and statically compiled
netlist code use the same syntax. This will enable us to delete most
device include files, e.g. nld_74107.h. 

Netlist usage to create this header file:
./nltool -c header > src/lib/netlist/devices/nld_devinc.h

This is not yet used in production. It will be enabled after additional
tests.

[Couriersud]
2017-01-16 19:49:43 +01:00
couriersud
c612391f8e Move analog devices into "netlist::analog" namespace. Added
documentation to opamp model. (nw)
2017-01-15 17:56:47 +01:00
couriersud
fd59a10f92 Added more documentation to diode and bjt model. (nw) 2017-01-15 17:56:46 +01:00
couriersud
3cfe098bb2 Introduce a more structured approach to models. (nw) 2017-01-15 17:56:45 +01:00
R. Belmont
72cf75f937 Merge pull request #1974 from shattered/_55d0495
minor floppy internals improvements
2017-01-14 23:41:24 -05:00
Sergey Svishchev
89b7801ebe formats/wd177x_dsk: allow override of build_sector_description, like nec765_dsk 2017-01-15 02:24:48 +03:00
couriersud
674077f89f Prepare source for consistent error message usage. (nw) 2017-01-14 16:35:57 +01:00
couriersud
bce5c521a2 Add code to remove devices connected only to rail terminals. 2017-01-14 16:35:56 +01:00
couriersud
ef8b7ccb6b Core refactoring
- connect_late ==> connect
- register nets where they are created
2017-01-14 16:35:55 +01:00
couriersud
5cd17c361f Fix seldom used conditional build options.
- Fixed OPENMP compile
  For congo bongo, using Solver.PARALLEL=1 significantly increases
  performance from 270% to 380%. However, this has to be taken
  with a grain of salt. Enabling this on predominantly logic netlists
  can severly kill performance.
- Increased readability of timed queue code.
2017-01-12 23:20:23 +01:00
couriersud
b1c3586789 Improve readability and remove some trampolines. (nw) 2017-01-12 23:20:23 +01:00
couriersud
c8c7e9a770 Fix timing issue in CD4538. Add "pow" (power) to the function model.
Minor documentation updates. Slight improvement of gorilla sound. (nw)
2017-01-12 23:20:22 +01:00
couriersud
5b4026d13f - setup_t is owned by netlist_t. Stop being complicated.
- Remove gnd() method. 
- Further simplification.
- Fix potential reset and initialization issues. (nw)
2017-01-12 23:20:21 +01:00
R. Belmont
d7dba2bd78 Merge pull request #1950 from shattered/_3aa32de
misc. fixes exposed by Displaywriter WIP
2017-01-09 21:35:37 -05:00
Sergey Svishchev
4add62a083 TeleDisk loader: accept images produced from 8" SSSD disks 2017-01-10 00:31:25 +03:00
Sergey Svishchev
1fda75a0e2 ImageDisk loader: don't crash on tracks with no data 2017-01-10 00:31:24 +03:00
couriersud
9d3d07b771 Move netlists into macro folder. (nw) 2017-01-09 00:28:31 +01:00
couriersud
9e88fd79ea nlwav now accepts stdin and stdout. (nw)
cat log_RO.1.log | ./nlwav | play -
2017-01-09 00:28:30 +01:00
couriersud
5220572228 Reduce memory footprint for parameters. (nw) 2017-01-08 17:31:29 +01:00
couriersud
233b0b7dbe Decrease memory footprint. (nw) 2017-01-08 17:31:28 +01:00
couriersud
f425f2b997 No need for a virtual stop which is needed only by the solver. (nw) 2017-01-08 17:31:27 +01:00
couriersud
1950ff149a Make stop be called again. Fix METHOD parameter. (nw) 2017-01-08 17:31:26 +01:00
couriersud
e26e327ef9 Rename misleading solver parameters. (nw) 2017-01-08 17:31:25 +01:00
couriersud
d790daa2a7 Remove parameter GS_THRESHOLD. It is now outdated. (nw) 2017-01-08 17:31:24 +01:00
couriersud
ff820d6fa9 Fix regression. (nw) 2017-01-08 17:31:23 +01:00
Justin Kerk
57ac19beee pc_dsk: Handle 1.44MB images with 1,024-byte footer, which have turned up in a couple places (nw) 2017-01-08 01:59:46 -08:00
Justin Kerk
7a8d5118b5 pc_dsk: Assume a smaller gap size to allow 400K disk images to load. Fixes e.g. ikari and marble from the ibm5150 softlist. [Justin Kerk] 2017-01-07 22:28:19 -08:00
couriersud
a841ff553e Fix some clang pedantic warnings. (nw) 2017-01-07 17:29:45 +01:00
couriersud
4dfd26b248 Minor refactoring with focus on a bit more readability. (nw) 2017-01-07 17:29:44 +01:00