Commit Graph

2787 Commits

Author SHA1 Message Date
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
Firehawke
9ece34eb21 Revert "Revert "Merge branch 'master' of https://github.com/mamedev/mame""
This reverts commit 54155441e9.
2017-12-13 21:31:27 -07:00
Firehawke
54155441e9 Revert "Merge branch 'master' of https://github.com/mamedev/mame"
This reverts commit f537428e5a, reversing
changes made to 0d70d79810.
2017-12-13 21:01:10 -07:00
Sergey Svishchev
00c9b62a24 agat7: 840KB floppy HLE; minor fixes -> mark WORKING (#2912)
* agat7: add port_char definitions to allow access from Lua, &c (nw)

* agat7: adapt "apple2: Break up handlers for C000-C07F range" (nw)

* agat7: timer and vblank interrupts (nw)

* agat7: HLE of 840KB floppy controller, read-only (nw)

* agat7: memory expansion wip (nw)

* agat7: update todo list, mark partially WORKING
2017-12-08 18:46:23 -05:00
Dirk Best
5676444d8c jvc_dsk: Fix MT #06779 2017-11-29 10:19:03 +01:00
Olivier Galibert
6caef2579a dvdisasm: Overhaul [O. Galibert]
Disassemblers are now independant classes.  Not only the code is
cleaner, but unidasm has access to all the cpu cores again.  The
interface to the disassembly method has changed from byte buffers to
objects that give a result to read methods.  This also adds support
for lfsr and/or paged PCs.
2017-11-26 17:41:27 +01:00
Justin Kerk
b503e9c8c2 pc_dsk: Support images with 41 tracks (Kryoflux dtc produces these for some nominally 40-track disks) (fixes bivouac from ibm5150_flop.xml) (nw) 2017-11-15 20:25:12 -08:00
Dirk Best
b4e8282023 dsk_dsk: Don't segfault on empty tracks (fixes einstein 4game) 2017-10-25 13:13:54 +02:00
Vas Crabb
4c29419cab srcclean (nw) 2017-10-22 12:34:30 +11:00
AJR
ff6a9334e3 Appease MSVC (nw) 2017-10-19 12:29:33 -04:00
npwoods
86f50b0d65 Created a more flexible imgtool::datetime structure for use within Imgtool (#2263)
* Created a more flexible imgtool::datetime structure for use within Imgtool

This is intended to replace most usage of time_t

* Changing the granularity of imgtool_clock from 1ms to 100ns, as per Vas' suggestion

* Created arbitrary_datetime in timeconv.h to facilitate interpretation of datetime info

I concluded that invoking std::mktime on manually assembled std::tm is bad, because it is indeterminate how the std::tm members may be "dominant".  This required that I go further in imgtool, and update a number of drivers and eliminate the parameter of imgtool::datetime that takes std::tm.
2017-10-17 21:18:57 +02:00
Justin Kerk
a55d88393e Fix crash loading 80-track .mfm dumps of 40-track disks on 40-track drives. [Justin Kerk] 2017-10-11 19:13:59 -07:00
Nigel Barnes
72ec5336d0 acorn_dsk: Removed CPN format, now handled with SSD/DSD. 2017-10-11 12:03:01 +01:00
Nigel Barnes
1e1fb0902a acorn_dsk: Improve identifying SSD/DSD by comparing image size with sector counts.
- Fixed DDCPM format to handle correct image of Double Density CP/M.

bbc_flop_z80.xml: Replaced Double Density CP/M with good dump (nw)
2017-10-11 12:03:01 +01:00
Ted Green
7d17b6a569 voodoo: Use table lookup for RGB565 conversion. (nw) 2017-10-01 15:39:53 -06:00
smf-
bcb4be3a5d fix for clang 5 unused lambda capture errors (nw) 2017-09-24 17:49:35 +01:00
Vas Crabb
75fefade26 unzip: defer decoding DOS timestamps (nw) 2017-09-11 10:16:16 +10:00
Vas Crabb
70279ab5a2 that doesn't require an instance (nw) 2017-09-03 12:51:21 +10:00
hap
23d9d21250 png: make verify_header public (nw) 2017-09-02 22:46:14 +02:00
npwoods
d217e1fbec Returning a reference from various corestr.cpp calls to avoid unnecessary string copies (#2613) 2017-09-02 23:09:00 +10:00
Vas Crabb
ec3caa98bd srcclean (nw) 2017-08-27 11:07:21 +10:00
MetalliC
1d4f72b5fe needed for external work (nw) 2017-08-26 05:11:08 +03:00
Nigel Barnes
70b91571ce acorn_dsk: Added OPUS_DDCPM_FORMAT
- Removed ACORN_CPM_FORMAT, same geometry as ACORN_SSD_FORMAT/ACORN_DSD_FORMAT
- Improved find_size/identify for SSD/DSD formats
- ACORN_DOS_FORMAT 640K now handled as ACORN_ADFS_OLD_FORMAT
- Fixed geometry for ACORN_DOS_FORMAT 800K

bbc_acorn8271: Added Amcom DFS A7874

bbc_opus8272: New Opus 8272 FDC device with DDOS 3.00, not yet working.

wd177x_dsk: Apply sector_count and gaps to track description.
2017-08-25 20:03:44 +01:00
fulivi
ac90b9c2ef hp85: fixed a bug in tape gap detection 2017-08-23 19:33:27 +10:00
fulivi
480f865bcf hp9845: re-factored handling of HTI images into a dedicated format module 2017-08-16 10:38:22 +02:00
Vas Crabb
1c4c96a0cf add a not BIOS machine filter (useful in composite filters), support RGB PNG with transparent pen because why not 2017-08-15 18:19:18 +10:00
Vas Crabb
4e7f7f5265 fix indexed transparency (nw) 2017-08-14 14:30:19 +10:00
Vas Crabb
3a258ecf9b PNG: support greyscale with transparent pen, encode/decode text chunks as UTF-8, don't crash on trying to write back a text chunk read from a PNG file, enforce restrictions on keywords 2017-08-14 14:23:08 +10:00
Vas Crabb
61983736e8 png: make it not leak memory by default, and look a but more like C++ 2017-08-13 18:12:54 +10:00
Vas Crabb
44bc3ffa43 png: support 16-bit samples 2017-08-13 15:53:36 +10:00
Vas Crabb
da18b88ba9 PNG: fix unfiltering 2017-08-12 17:53:23 +10:00
Vas Crabb
c179a4e0e9 ui: save/restore images/info selection in right panel 2017-08-12 16:02:52 +10:00
Vas Crabb
71c7cfe525 More PNG handling overhaul:
* Unify code for copying PNG data into bitmap for MAME and pngcmp
* Fix upsampling of monochrome PNGs (need to splat across byte)
* Add support for greyscale+alpha
* Detect more unsupported conditions rather than just behaving badly
2017-08-12 15:38:14 +10:00
Vas Crabb
a7b15fc928 add minimal support for reading Adam7 interlaced PNG
(nw) This is the path of least resistance, and I plan to fix it up
later, I just wanted to get it to actually work first.  Decompression
and unfiltering is fully supported, at least for all the pixel formats
that previously worked.  Expanding 1/2/4bpp to 8bpp should work
properly, too.  Bitmap mapping for Adam7 is only implemented in
rendutil.cpp which is whate everything in MAME uses.  The function in
png.cpp (used by pngcmp) has not been updated.  At some point I'll unify
at least one of the functions in rendutil.cpp with the one in png.cpp
and we can go from three functions that need to do the mapping down to
two at the most.
2017-08-12 02:43:53 +10:00
Nathan Woods
df8bb7f18c Adding #include <cctype> 2017-08-09 07:40:15 -04:00
Christian Brunschen
336a636aed Refactor server_{ws,http}.hpp into separate interface and implementation. (#2548)
Refactor server_{ws,http}.hpp into separate interface and implementation headers.
When shutting down the HTTP server, also explicitly stop the asio::io_context.
2017-08-06 21:25:55 +10:00
Dirk Best
c10471e7ec jvc_dsk: Improve support for headerless OS-9 images 2017-08-03 16:05:08 +02:00
Dirk Best
224cfaeb6a jvc_dsk: Autodetect double sided floppy images without header, fixes #2405 2017-08-03 13:09:52 +02:00
npwoods
aca90520de Imgtool: Merged normalize_filename() into cannonicalize_path(), C++-ification (#2527) 2017-07-30 15:16:45 +10:00
Vas Crabb
ba3d0a88d6 srcclean (nw) 2017-07-23 13:29:00 +10:00
Vas Crabb
d7984c7d0c Add a method for copying part of an XML tree into another tree and use it to fix Cocoa debugger fatal error 2017-07-21 13:03:44 +10:00
Vas Crabb
05e84dccc0 * Make XML file a class of its own managed with smart poitners
* Save/restore a little more of Cocoa debugger state
2017-07-21 11:47:41 +10:00
rfka01
9bff063d9d Corrected ITT3030 70 track drive type and added 35 drive type and format definition. [helwie44 and rfka01] 2017-07-11 00:15:06 +02:00
Vas Crabb
d18aa3e097 never hurts to srcclean (nw) 2017-07-09 03:21:32 +10:00
Christian Brunschen
0206314395 Add an external panel for the Ensoniq VFX family of keyboards, with a websocket interface and an HTML/Javascript implementation that can be served over HTTP. 2017-07-05 17:27:34 +01:00
Olivier Galibert
cbbbd07484 dimemory: Lift the cap on the number of address spaces per device [O. Galibert] 2017-07-03 08:03:57 +02:00
Olivier Galibert
df1b7770ef options: Set the value when setting the default as before [O. Galibert] 2017-06-25 16:50:02 +02:00
Vas Crabb
fb61e98cc5 more srcclean (nw) 2017-06-25 15:21:44 +10:00
Vas Crabb
41e1555242 Merge branch 'release0187'
Conflicts:
	src/mame/drivers/accomm.cpp
2017-06-25 15:19:30 +10:00
Vas Crabb
f31e735053 srcclean (nw) 2017-06-25 15:18:14 +10:00
npwoods
b193e05cd7 Overhaul to how MAME handles options, take two (#2341) 2017-06-25 12:48:56 +10:00
npwoods
2af3233101 Changed a few 'const char *' ==> 'const std::string &' in the MAME debugger (#2170) 2017-06-24 09:46:58 +10:00
Nigel Barnes
fc292683f9 afs_dsk: corrected density (nw) 2017-06-15 18:43:33 +01:00
tim lindner
78614368bf Fixed JVC disk format to correctly recognize 2 sided disks. (#2357) 2017-06-03 17:59:15 +02:00
tim lindner
2c2458bbac Added read support for the disk format SDF used in the CoCoSDC (#2345) 2017-05-31 16:23:49 +10:00
couriersud
7e8a7aeea9 Add Zaccaria to mamenl build. (nw) 2017-05-28 11:10:54 +02:00
couriersud
e9a5e08b41 Fix state saving for pfunction lfsr. (nw) 2017-05-28 09:03:29 +02:00
Vas Crabb
e892661905 srcclean (nw) 2017-05-28 13:40:48 +10:00
couriersud
0a2d4a256d Fix issues identified by Vas and LordKale4:
- made local netlists in Cheeky Mouse static
- replace stdlib rand by 16 bit galois lfsr

(nw)
2017-05-27 22:17:35 +02:00
couriersud
994263eaf9 Add rand() function to pfunction expression parser. Use this to simulate
E-B noise in Cheeky Mouse and fix the "cheese" choose. [Couriersud]
2017-05-27 14:28:53 +02:00
Vas Crabb
2d4ba2471d netlist: add a crude TTL schmitt trigger model and hook up in 1B11142
sound board, completing the tromba circuit

(nw) I'm not sure whether the model works properly or not, but in the
circuit where it's used, I don't think it can work properly with the
current TTL output model.  A capacitor is charged by the Q output of a
74LS74 flipflop (U3A) until the voltage passes the Schmitt trigger's
threshold, causing it to reset the flipflop.  However, the positive
trigger voltage of the Schmitt trigger is 1.6V, but our TTL output model
has a high output voltage of 1.0V (see nl_base.cpp:89).  I realise the
simplified model of TTL logic with high impedance inputs and outputs
behaving as though thery're loaded is convenient and fast to simulate,
but it's not detailed enough for applications like this where
7400-series chips are used in analog circuitry.  This is what held me up
last time I tried adding a netlist for this sound board.
2017-05-27 18:44:23 +10:00
couriersud
6d9da523e3 Fix DEBUG build. (nw) 2017-05-27 00:11:16 +02:00
couriersud
6fd40f98a6 Various code alignments across solvers. (nw) 2017-05-27 00:11:16 +02:00
couriersud
6dfe04c620 Cleanup of solver code. (nw) 2017-05-27 00:11:15 +02:00
couriersud
a27f10c4a7 Reordered members to be more cache friendly. (nw) 2017-05-27 00:11:15 +02:00
couriersud
bc29593982 Netlist refactoring:
- 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)
2017-05-27 00:11:14 +02:00
couriersud
01f8ace296 Changed Solver.PARALLEL parameter logic:
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]
2017-05-27 00:11:14 +02:00
Vas Crabb
2b7d87317b Preliminary netlist sound for the Zaccaria 1B11142 board
* Tromba (trumpet) sound is not working - requires Schmitt trigger device
* Connecting cassa (bass drum) swamps other instruments so it's disconnected for now
* Mixing melody sound with speech/SFX is not done in netlist (should be)
* Relative levels of melody/speech/SFX are probably still wrong

(nw) A good test case for this is the Money Money driver (monymony).
There's a bit of buzzing on this one as well.  The problem with the
cassa could be caused by running into non-ideal characteristics of opams
again (the LM3900 seems to ignore the V+ value supplied to it).  When
the netlist library gets Schmitt trigger support, the tromba can be
completed.  Unfortunately, the tromba is a key part of the
characteristic sound of these boards, so you really notice when it's
lacking.
2017-05-27 03:57:50 +10:00
hap
2d5bb2dc20 New working clone added
----------
Speak & Spell (Spanish, prototype) [hap, Sean Riddle, David Viens]
2017-05-26 17:35:04 +02:00
Vas Crabb
308c2bb72d cheekyms: add preliminary netlist sound based on schematics provided by Sam Grech
(nw) It doesn't work quite right yet.  The "Hammer" and "Pest" sounds
are generated by free-running 555/556 timers and gated with LM324
applifiers.  For whatever reason, the netlist system produces a kind of
buzzing from the "Hammer" circuit when it's supposed to be suppressed,
and it doesn't think the pest sound should be suppressed completely so
you can always hear it at a low level in the background.  The "Cheese"
circuit is a bit weird - either they're using the base-emitter junction
of a 2SC945 as a signal diode, or there's an error in the schematic
(collector is shown unconnected).  Connecting this part of the circuit
causes the netlist system to hang, so R2/R3/C8/Q2 are not connected for
now.
2017-05-26 16:43:29 +10:00
Vas Crabb
75dfd32e71 Support -listroms for devices (e.g. mpu401 or m68705p3)
* Also ~67% improvement of device walk in -verifyroms
2017-05-18 19:34:28 +10:00
smf-
442eddbfed fix MSVC build (nw) 2017-05-16 13:56:52 +01:00
fulivi
e2b9e11da0 Hp9845: Support for HPI floppy format (#2310)
hp9845: Support for HPI floppy format [F. Ulivi, A.Kückes]
2017-05-16 09:52:31 +02:00
Miodrag Milanovic
a4c5e29c2f Forgot this one for GCC 7.1 (nw) 2017-05-15 19:27:56 +02:00
smf-
f7f4b2126e Revert "reordering the #include lets you build this file with latest mingw headers (nw)"
This reverts commit c3b10caf4e.
2017-05-14 16:49:49 +01:00
smf-
c3b10caf4e reordering the #include lets you build this file with latest mingw headers (nw) 2017-05-14 16:09:24 +01:00
Vas Crabb
0f0d39ef81 Move static data out of devices into the device types. This is a 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.
2017-05-14 21:44:11 +10:00
npwoods
baa7178053 Bug fix to -romident and aux verb cleanup (take two) (#2299)
* Resurrected auxverb_cleanup_and_romident_bugfix

* Changed usage for -romident and minor cleanups

* Supporting auxverbs in any order

The previous patch was supporting 'mame64 -listsource pacman' but not 'mame64 pacman -listsource'
2017-05-13 00:53:46 +10:00
Vas Crabb
e88b5e4f9d Revert "Bug fix to -romident and aux verb cleanup (#2288)"
This reverts commit 78bf804192.
2017-05-12 17:24:56 +10:00
npwoods
78bf804192 Bug fix to -romident and aux verb cleanup (#2288)
* Bug fix to -romident and aux verb cleanup

Made the following changes:
 1.  Fixed a bug where resolved slot/image options would choke -romident (reproducible in MAME 0.185 with 'mame64 -romident coco.zip')
 2.  'mame64 -romident' no longer crashes (though it doesn't do anything useful)
 3.  Changed the aux verb functions to take 'const std::string &'

* Further cleanups to auxillary verb code, as per Vas

Specifically:
 1.  The commands themselves now take 'const std::vector<std::string> &' for their argument lists
 2.  util::core_options now collects command arguments into a separate vector rather than treating them as unadorned arguments

* Vas Crabb feedback

* Now only using trim_spaces_and_quotes() when parsing INIs

Vas pointed out that it is inappropriate to trim spaces and quotes when parsing command line options
2017-05-12 09:18:20 +10:00
Nathan Woods
9d4b370354 Changed 'int ignore_warnings' parameter on core_options::parse_ini_file() to be 'bool ignore_unknown_options' 2017-05-10 09:53:15 +10:00
Vas Crabb
a400c011a9 Revert "Overhaul to how MAME handles options (#2260)"
This reverts commit 536990e77b.

Conflicts:
	src/frontend/mame/mame.cpp

Sorry, but this change was half-baked.  It breaks a lot of existing
functionality and clearly hasn't been tested in more than a tiny subset
of use cases.  Please play this work back onto your own branch, and test
it before submitting another PR.
2017-05-07 14:40:12 +10:00
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