Commit Graph

2787 Commits

Author SHA1 Message Date
AJR
29e96c84a8 zippath.cpp: Checkpoint
- Adopt std::string_view as the input parameter type for most functions. (This necessitates some explicit copying to std::string since other APIs have not been updated yet.)
- Remove zippath_parent_basename, whose implementation was utterly broken and fortunately unused.
2021-01-06 15:17:44 -05:00
AJR
87d8079cac options.h: Be more honest about #including prerequisites 2021-01-02 16:35:51 -05:00
AJR
e2e01f7fec vbiparse.cpp: Add missing #include 2021-01-02 16:07:22 -05:00
AJR
c0933daa5a disasmintf.h: Attempt at fixing build on other compilers 2021-01-02 15:53:07 -05:00
AJR
60e518cc50 Low-level #include overhaul
- vecstream.h: Revert changes made in aa29519528. The std::string_view conversion has been made a non-member function (util::buf_to_string_view) and moved to coretmpl.h.
- strformat.h: Remove the using declaration importing util::string_format into the global namespace. It has been moved to emucore.h and a few tool sources; other references have been qualified.
- osdcore.h: Split out file, directory and path classes and methods to a new header (osdfile.h), Doxygenizing the documentation comments.
- Disaggregate many #includes that were including other standard or custom headers. emu.h now includes basically the same things that it did, but other headers have been streamlined; for instance, emucore.h no longer stealth-includes osdcore.h several ways.
2021-01-02 15:18:15 -05:00
AJR
78f93a270c palette.cpp: Use std::fill instead of memset for dirty vector; add range check 2021-01-02 15:08:44 -05:00
AJR
0a5148e05a Cassette image processing cleanup
- Add cassette_image::image_read_byte method for reading one byte at a time
- coco_cas.cpp: Eliminate dependency on emucore.h
- thom_cas.cpp: Declare some temporary variables much closer to where they are used
- tvc_cas.cpp: Read and write entire sectors at a time
2021-01-01 19:15:51 -05:00
AJR
aa29519528 Further additions of std::string_view
- corefile.cpp, fileio.cpp: Change puts to take a std::string_view parameter
- rendlay.cpp: Use std::string_view instead of bare pointers in various functions
- vecstream.h: Add std::string_view conversion operator to obtain output buffer without needing to make it a C string with explicit null termination
- xmlfile.cpp: Add get_attribute_string_ptr method that distinguishes between empty strings and absent attributes without falling back to C strings
2021-01-01 12:22:17 -05:00
AJR
21fd983545 hash.cpp, hashing.cpp: Change string processing to use std::string_view parameters; add sum16 type 2021-01-01 12:16:05 -05:00
AJR
505860225c util/xmlfile.cpp: C++ comment conversion 2020-12-31 15:26:21 -05:00
Vas Crabb
43f569e58f srcclean for 0.227 2020-12-27 05:35:56 +11:00
Vas Crabb
fb911eb6be util/wavwrite.cpp: Hopefully fix build with clang libc++. 2020-12-27 01:59:19 +11:00
Vas Crabb
9e36b6a6d9 More Lua interface cleanup - it's simpler with cleaner underlyng APIs.
Made the sound manager mute controls readable, and got rid of system
enable since it just controls system mute anyway.  This was causing
confusion: phantom2 was trying to use both independentlyt casuing the
mute bit to be ignored.

THe Lua interface changes are mostly changing methods to properties,
some renames to make things clearer, and some additional properties for
better control over snapshots.
2020-12-27 01:32:37 +11:00
AJR
735e7d5b2a util/png: Use std::string_view internally in another function 2020-12-22 08:18:47 -05:00
AJR
2194589656 util/png: Update add_text to take std::string_view for arguments 2020-12-21 23:07:50 -05:00
Vas Crabb
ed872d1bd2 Fix some oversights and emergent behaviour with view selection.
Exposed the "native snapview" option on the video manager.  Trying to
use presence of a single view is a poor proxy that breaks with
multi-screen systems.

Allow rotation to be changed for native snapshot views, and disable the
zoom to screen area control when it has no effect on the selected view.

Treat an empty string identically to "auto" for view selectction.
Previously this was being used for prefix matching so it would force the
first view.  (This caused the bad snapshot view selection.  It had been
relying on "internal" not being a common view name prefix so it fell
through to automatic selection, but when changed to an empty string it
forced the first view.)

Documented "auto" as well as "native" for the -snapview option and
changed the default to auto rather than an empty string for consistency
with the -viewN options.

Added [w]string_view handlers to the stuff that's instantiated in
strformat.cpp since we'll be increasingly using them.

Cleaned up and updated some documentation.
2020-12-20 15:28:27 +11:00
Vas Crabb
1df245cb99 More Lua engine clean-up and documentation, resulting in core cleanup.
More Lua interface cleanup, additional properties and methods, and
documentation migration/expansion.

Emulated switch inputs can have "not" codes applied to host input axis
directions.  It works the same way as host switch inputs - push twice
for a "not" prefix.

Input polling helpers no longer need to store state in the input device
items.  There’s less leakage, and less chance of things interfering with
each other.

Allow snapshot view options to be configured through the internal UI via
the video options menu.  Made video options menus place initial focus on
the currently selected view item.  Removed some crud from the menu base
class.

Fixed the description of the "snapview" option.  The value to get raw
screen pixels was changed to "native" a long time ago but the
description was never updated.

Re-arranged the Golden Poker button lamps so that the 6-button layouts
for Jolli Witch and Wild Witch make sense.  In 6-button mode, the hold
buttons double as bonus game and bet buttons, but the lamp outputs don't
change.  The simplest way to deal with this without requiring the user
to switch views or using layout scripting is to place the dedicated
buttons directly below the hold buttons that correspond to them.

Removed some software list data that was redundantly copied into
device_image_interface (m_supported was never even set, so it didn't
even work), and made crc() work better (previously it wasn't
recalculuated after unloading and loading another image).

Made strformat.h and devcb.h play nicer with C++17 and pre-standard
C++20.  Format precision now correctly limits the length of string
views.  Confirmed that strformat.{h,cpp} works with pre-standard C++20
support in GCC 9.

Removed an auto_alloc from cpu/arm7.
2020-12-18 15:54:52 +11:00
nhand42
ccacd0f165
support Redump extended bin/cue format for Dreamcast discs (#7422)
* initial check-in of Redump bin/cue support for Dreamcast GDI

* correctly identifies multi-cue format and sets GDROM flags

* creates a working Crazy Taxi chd from a Redump bin/cue

* disabled debugging code and started tidying up

* simple tool to compare chdman bin/cue and bin/gdi conversions, should be identical

* final tidy up, the testing is going well

* testing failed for Aero Dancing i (Japan), didnt zero last track

* added some comments about .gdi compatibility

* addressing review feedback on pull request #7422

* match TOSEC layout for Pattern I discs (3 tracks)

* initial support for Pattern III discs

* Pattern III discs now work and match TOSEC layout

* reading datasize from wrong track, same result though

* identify the GDI pattern, makes the code clearer

* support for Pattern II and consecutive AUDIO tracks

* use C99 type not POSIX type to build on Windows

* support Redump tracks split across two .bin files
2020-12-17 18:48:47 +02:00
AJR
2ca5f3a386 unicode.h: Updates
- Remove from emu.h (except for UTF8_xxx macros, which have been transplanted to emucore.h since a lot of drivers use them) and osdepend.h
- Add std::string_view overrides for uchar_from_utf8 and normalize_unicode
2020-12-15 13:36:55 -05:00
Miodrag Milanovic
5e23dc37a8 orao103: Support new TAP format and format now done properly 2020-12-06 19:04:05 +01:00
Sandro Ronco
3a4506bd3e cqm_dsk.cpp, ti89.cpp: Fix wrong fallthroughs. 2020-11-18 21:41:13 +01:00
Vas Crabb
612b6472e7 -unidasm: Allow input piped from stdin by specifying a bare hyphen as the filename. [AJR, Vas Crabb]
-netlist: Give devices the C++17 namespace treatment.

-Tidied up compiler warning options for 3rdparty.

-emu/render.cpp: Exposed a few information view item properties.
2020-11-18 00:58:30 +11:00
Vas Crabb
ac270744f3 Fix most implicit fallthrough warnings from clang 2020-11-17 09:18:37 +11:00
Vas Crabb
253e7f1cae Remove some deprecated instantiations of static constexpr members (MSVC complains about them now) 2020-11-15 13:43:36 +11:00
Vas Crabb
4298ce18fb Enable GCC implicit fallthrough warning.
I've guessed whether break or [[fallthrough]] is appropriate.  In cases
where it looked particularly suspicious, I added a FIXME comment.  All
of these changes should be reviewed by someone familiar with the code.
2020-11-15 03:58:54 +11:00
Vas Crabb
55b8ca317a -Switch to building MAME as C++17.
* Updated sol2 to 3.2.2
* Updated pugixml to 1.10
* Increased minimum clang version to 6
* Cleaned up some stuff that can use new features
2020-11-15 03:53:47 +11:00
Vas Crabb
39a42d517d Got rid of a couple of easy auto_alloc_array 2020-11-09 05:09:18 +11:00
Vas Crabb
7dcf0c013f emu/devfind.h: Added missing memory_share_array_creator.
Also some miscellaneous tidying up.
2020-11-08 05:43:57 +11:00
Vas Crabb
87948d7b89 srcclean in preparation for 0.226 release branch 2020-10-25 12:32:15 +11:00
Nigel Barnes
af16e6fbe9 aquarius: Added support for .CAQ cassette images.
- Select 20K RAM as default.
2020-10-19 21:14:54 +01:00
Vas Crabb
d6f7c7febf emu/debug: Removed more macros, added more const, make a couple more things use smart pointers. 2020-10-12 19:06:54 +11:00
Vas Crabb
0590cd598a formats/apridisk.cpp: Don't use megabytes of stack space. 2020-10-10 00:00:42 +11:00
Aaron Giles
1bc64213f0 brdrline: Add frontiers, reduce timestep to improve performance 2020-10-09 01:53:19 -07:00
Nigel Barnes
1a17e59008 csw_cas: Added support for v1.xx format, non-compressed RLE, and removed LegacyWaveFiller. 2020-10-08 18:01:04 +01:00
Aaron Giles
0cd5d5941d frogs: Add AFUNC frontiers to improve performance 2020-10-08 09:22:58 -07:00
Aaron Giles
7fc54760e1 netlist: Add LM348, CD4071, CD4081 devices 2020-10-08 08:26:45 -07:00
Vas Crabb
b90fd35515 Various improvements to image file handling:
Moved MS DIB parser out of ICO file reader and made it available for
artwork and layout images.

Added more efficient I/O and better error checking for JPEG file loading
(MAME will no longer exit immediately on a bad JPEG file).

Made caller responsible for opening files for loading images, to avoid
decompressing images used in ZIP/7z artwork multiple times.

Added support for JPEG and Windows DIB to picture_image_device.

Added support for SVG image files in external artwork.

Added support for using I/O port value for animation state and masking
animation state values.

Made bounds elements more flexible in layouts.

Reworked headers to reduce dependencies.

Updated layout file format documentation.
2020-10-08 02:04:31 +11:00
Aaron Giles
4fb2dfeb69 vicdual: Add frogs netlist. Make sound board interface more general. 2020-10-07 01:06:20 -07:00
beta-tester
288ca11503
brdrline: sound improvements (#7332)
- cleaned some parts of nl_brdrline.cpp (removed test points)
- changed MB4391 function to pow2 to shorten sounds a bit
- changed trigger inputs in vicdual.cpp to fit more to the sounds i remember.
- moved trigger mapping from vicdual to nl_brdrline
2020-10-06 16:45:53 -07:00
Aaron Giles
db3a24507f
Hook up Borderline netlist, provided by 'beta-tester' (#7328) [beta-tester]
* netlist: Explicitly trim connection names.
* Hook up Borderline netlist, provided by 'beta-tester'
* brdrline: Add static solver, using dynamic timestep, update driver flags.
2020-10-05 13:29:05 -04:00
Vas Crabb
f390ea1004 3rdparty/nanosvg: Re-base on latest upstream.
Now based on upstream cc6c08d3a80f1a305021af3d6394cdf1535d02a2.

Among other things, this version is supposed to be less sensitive to the
global locale.
2020-10-05 22:18:22 +11:00
Vas Crabb
0c8938f584 -emu/rendlay.cpp: Allow item animation.
-cgang.cpp: Make internal artwork more fun.
2020-10-05 00:18:33 +11:00
couriersud
7066028be1 netlist: fix VS build. 2020-10-03 14:41:17 +02:00
couriersud
b49a86981c netlist: catch parenthesis count mismatch in formulas. 2020-10-03 14:41:15 +02:00
Vas Crabb
9ac531e2b9 Exception specifications on deleted operators/constructors aren't useful. 2020-10-03 13:56:21 +10:00
AJR
9f7ef9e9c4 pmatrix_cr.h: More logical fix for the nothrow issue 2020-10-02 20:26:48 -04:00
couriersud
467b8f7d09 netlist: Revert changes intended to make the code work on OSX 10.10.
* This is working on all contemporary compilers. If outdated compilers
are to be used it is fine but a suitable compile path should be used.
2020-10-03 02:06:25 +02:00
AJR
d95c5b097a Fix clang error: exception specification of explicitly defaulted move assignment operator does not match the calculated one 2020-10-02 15:48:25 -04:00
couriersud
c0754c36cd netlist: simplify code. 2020-10-02 19:58:32 +02:00
couriersud
c797d55aaf netlist: move core_terms to netlist_state.
* These are used during creation and reset only. No need to
    maintain them on net_t level.
2020-10-02 19:58:31 +02:00
couriersud
fe47fcf9f1 netlist: more clang lint fixes. 2020-10-02 19:58:30 +02:00
couriersud
1dcedeee9d netlist: Add parse optimization to pfunction.
* "(1 + 2)*a" now during parse step will be rewritten to "3*a".
2020-10-02 19:58:29 +02:00
couriersud
58b4e89c0c netlist: rename more files to lower case. 2020-10-02 19:58:28 +02:00
Vas Crabb
4f05917494 Got rid of global_alloc/global_free.
The global_alloc/global_free functions have outlived their usefulness.
They don't allow consistently overriding the default memory allocation
behaviour because they aren't used consistently, and we don't have
standard library allocator wrappers for them that we'd need to use them
consistently with all the standard library containers we're using.  If
you need to change the default allocator behaviour, you can override the
new/delete operators, and there are ways to get more fine-grained
control that way.  We're already doing that to pre-fill memory in debug
builds.

Code was already starting to depend on global_alloc/global_free wrapping
new/delete.  For example some parts of the code (including the UI and
Windows debugger) was putting the result of global_alloc in a
std::unique_ptr wrappers without custom deleters, and the SPU sound
device was assuming it could use global_free to release memory allocated
with operator new.  There was also code misunderstanding the behaviour
of global_alloc, for example the GROM port cartridge code was checking
for nullptr when a failure will actually throw std::bad_alloc.

As well as substituting new/delete, I've made several things use smart
pointers to reduce the chance of leaks, and fixed a couple of leaks,
too.
2020-10-03 03:00:24 +10:00
Vas Crabb
d32834f1f7 formats/cassimg.cpp: Finish encapsulation of cassette_image class. 2020-10-02 14:01:03 +10:00
Vas Crabb
54048b3407 -imagedev/cassimg.cpp: Make the interface look something like C++.
-sound/tiasound.cpp: Use some vaguely C++-like code internally.
2020-10-02 02:42:28 +10:00
couriersud
3a95d1e4fd netlist: Convert driver filenames to lower case. 2020-09-30 08:38:06 +02:00
couriersud
91ca668d14 netlist: Fix a net splitting issue with four term devices.
* Under cirtum circumstances the splitter would create "ghost" solvers
    consisting of terminals already used in another and complete
    solver. This may impact all netlist which use opamps and thus
    is committed early in the cycle.
* This commit adds functionality to instruct the splitter code to
    include terminals which will not create matrix elements into
    the parsing of net groups for solvers.
2020-09-30 08:37:42 +02:00
couriersud
d838120e37 netlist: Rewrote frontier documentation.
* Also includes a small optimization for FP signal code.
2020-09-30 08:37:18 +02:00
couriersud
9a08e63fd3 netlist: applied some clang tidy recommendations 2020-09-30 08:36:53 +02:00
couriersud
2f73dca6e6 netlist: implement stricter validation.
* Devices like BJTs and FETs which are defined but not used will now
cause an error.
* An unused device will create an additional solver with a singular
matrix.
- This is adding unnecessary performance overhead.
- It complicates debugging because the unused device will cause an
arithmetic signal if used with --fperr (nltool).
* Fixed all validation errors.
2020-09-28 22:00:34 +02:00
couriersud
c93702f9a3 netlist: Remove "extended validation mode"
* No longer added value.
2020-09-28 22:00:16 +02:00
couriersud
81c484197b netlist: Fix astro blaster sonar sound
* Also fix two singular matrices being created.
2020-09-27 13:21:32 +02:00
Vas Crabb
a1d35e5abf Cleaned up bitmap API.
Made const-qualified pixel accessors (pix, pixt, raw_pixptr) return
const-qualified references/pointers to pixesl, and added non-const
versions.  This makes bitmap more like standard library containers where
const protects the content as well as the dimensions.

Made the templated pixt accessor protected - having it public makes it
too easy to inadvertently get a pointer to the wrong location.

Removed the pix(8|16|32|64) accessors from the specific bitmaps.  You
could only use the "correct" one anyway, and having the "incorrect" ones
available prevented explicit instantiations of the class template
because the static assertions would fail.  You can still see the pixel
type in the bitmap class names, and you can't assign the result of
&pix(y, x) to the wrong kind of pointer without a cast.

Added fill member functions to the specific bitmap template, and added
a explicit instantiations.  This allows the bitmap size check to be
skipped on most bitmap fills, although the clipping check is still
there.  Also fixed a couple of places that were trying to fill an
indexed 16-bit bitmap with rgb_t::black() exposed by this (replaced with
zero to get the same net effect).  The explicit template instantiations
in the .cpp file mean the compiler can inline the function if necessary,
but don't need to generate a local out-of-line body if it chooses not
to.

Extended the size of the fill value parameter in the base bitmap class
to 64 bits so it works correctly for 64-bit bitmaps.

Fixed places where IE15 and VGM visualiser weren't accounting for row
bytes potentially being larger than width.

Fixed an off-by-one in an HP-DIO card where it was treating the Topcat
cursor right edge as exclusive.

Updated everything to work with the API changes, reduced the scope of
many variables, added more const, and replaced a few fill/copy loops
with stuff from <algorithm>.
2020-09-27 14:00:42 +10:00
Vas Crabb
6e807013c5 Disable SOUND_DEBUG for non-debug builds, and srcclean 2020-09-27 11:00:56 +10:00
couriersud
15ea16e149 netlist: minor code cleanup.
* a number of minor fixes leading to an increase of 570% to 588% on
pongf.
* admittedly micro optimization.
* Includes some comments why certain decisions have been taken.
2020-09-25 21:44:54 +02:00
lfantoniosi
206b44fa25
imd_dsk: Fix bug when changing IMD image [lfantoniosi] (#7289)
* Fix bug when changing IMD image

These arrays weren't zeroed when changing a IMD disk for saving.
2020-09-25 12:27:07 -04:00
couriersud
a6fb699b6f netlist: Fixed a couple of issues with various compilers. 2020-09-24 15:22:26 +02:00
couriersud
0acb9992f4 netlist: make pstring length/size use consistent.
* length reports the number of character codes in the string
* size reports the size in memory units
* Reminder: Set PSTRING_USE_STD_STRING to 1 in pstring.h and get
    native std::string
* pstrings are compatible to std::string but only support a limited
    subset of functionality.
* By default (always like this) utf8 is supported and thus length
    reports the number of multi-byte characters.
2020-09-24 15:22:25 +02:00
couriersud
dd5769bea9 netlist: clearly identify void * casts. 2020-09-24 15:22:25 +02:00
couriersud
1fffeb33c0 netlist: Fix 128 bit integer support. 2020-09-24 15:22:24 +02:00
couriersud
5a2f41d1a5 netlist: Improve queue handling documentation in code.
* Document that for performance reasons pushes to queue are
    allowed even if they may not change state and are filtered
    out during process.
* Provide alternative code path. This is currently not used.
2020-09-24 15:22:23 +02:00
couriersud
1bb99466bc netlist: code refactoring
* use default move and copy constructors
* various minor edits like adding noexcept
* removed a lot of inline keywords - you can't beat the compiler
2020-09-24 15:22:22 +02:00
couriersud
356613b82e astrob: significant performance increase
* uses all 4 Sonar oscillators
* uses randomized resistor values (5% range)
* uses frontiers to separate oscillators
* improves performance to 340% locally.
2020-09-20 17:49:02 +02:00
couriersud
63efcfcb85 netlist: code refactoring.
- rename mat_cr.h to pmatrix_cr.h
- Optimization to the gmres solver.
- Simplifcation of vector operation code
2020-09-20 17:34:54 +02:00
Vas Crabb
df27f90958 util/bitmap.cpp: Use std::fill_n to get better code for modern CPUs. 2020-09-20 15:18:23 +10:00
Lord-Nightmare
a5879b9750 Fix a minor error in the CD4076 netlist library device implementation definition. 2020-09-18 11:19:47 -04:00
Lord-Nightmare
bff0710c57 Netlist devices for MCM14524, CD4029, CD4030, CD4042, CD4049, CD4076 [Lord Nightmare] 2020-09-17 22:56:49 -04:00
couriersud
ec742d3eda netlist: emscripten can not use specialization efficiently.
* Consequently prefer to save on compile time and size.
2020-09-17 19:45:24 +02:00
couriersud
e62e2d759b netlist: optimize headers.
* where possible rely on forward declarations to optimiuze compile time.
2020-09-17 19:45:10 +02:00
couriersud
c127811083 netlist: Move ICL8038_DIP and NE556_DIP to core.
* Remove code duplication.
2020-09-17 19:44:51 +02:00
Erwin Jansen
9a0c63f673
Add MDCR support for P2000t (#7215)
This adds support for the mini digital cassette recorder that can be
found inside a P2000t. This implementation is based on documentation
that can be found in https://github.com/p2000t/documentation.

In memory of NPM Jansen, who taught me all the magic of bits and bytes.
2020-09-17 18:39:48 +10:00
couriersud
0f1de1357c netlist: move more models into the core. 2020-09-13 09:29:07 +02:00
couriersud
6726338362 netlist: Move selected NET_MODELS into the core 2020-09-12 23:52:20 +02:00
couriersud
ca31c844cd netlist: move to generated header and link support files files.
* Removed device and macro header files.
* All of those can be generated automatically so going forward there is
no need for these any longer.
* Introduced the modules concept. Modules are netlists for which
automatic lib entries are generated.
* Going forward you just store them in macro/modules and they will be
automatically registered as device elements.
* You need to do a "make generated" is src/lib/netlist/build
* Some_device.cpp still needs to be added to netlist.lua
* Added documentation on how to add devices to netlist.
* Please refer to adding_devices.md for more information.
2020-09-12 23:20:16 +02:00
couriersud
8f48f2d062 netlist: clang tidy fixes. 2020-09-11 23:15:42 +02:00
Couriersud
8c9ac9c4ff netlist: add listmodels command to nltool.
* nltool --help is your friend.
2020-09-09 23:23:53 +02:00
couriersud
4f9ffb7333 netlist: Implement voltage dependent timing for CD4006 2020-09-09 23:23:38 +02:00
couriersud
d16baea163 netlist: Pedantic and clang tidy updates
* also fix an issue with netlist vs build
2020-09-06 19:56:03 +02:00
couriersud
f3b2dd65f5 netlist: fix multi byte string issues. 2020-09-06 13:16:05 +02:00
couriersud
52b1750a7f netlist: Fix a compile issues with mingw. 2020-09-05 23:48:24 +02:00
Couriersud
f3eb632465 netlist: code maintenance and performance optimizations.
* rename some misleading type names
* remove callback_t and replace by better scalable approach
* hide implementations details
* move sources classes from putil.h to psources.h
* reduce code complexity
* improve parsing performance, parsing netlists now is twice as fast.
* fix issues around multi-byte string support
* moved psplit into pstrutil.h
2020-09-05 21:31:49 +02:00
Vas Crabb
ea75c97d6d xmlfile.cpp: Put newline where it’s supposed to go after element content. 2020-09-06 02:33:04 +10:00
Vas Crabb
94601c77cc -util/xmlfile: Escape attribute and element content.
The previous behaviour was unintuitive - parsing an XML file and writing
it out immediately would produce invalid XML if the file contained any
characters that needed escaping.  It makes far more sense to escape on
writing rather than expecting the user to escape input.

-Add preliminary support for visibility toggles to artwork system.

This allows the user to show/hide related elements in a view, with
nesting.  The view can specify whether elements are shown or hidden by
default.  Settings are saved per host window/screen per view.  There is
no way to set the initial visibility state on the command line.  Legacy
"Space Invaders cabinet model" layers are mapped onto visibility
toggles.

This is not stable yet.  In particular, the XML element/attribute names
have not been finalised.  The new features have not been added to
complay.py to prevent them from being used before they're finalised.
2020-09-06 01:41:44 +10:00
Vas Crabb
83ea46d158 Don't ignore config elements with attributes but no child nodes. 2020-09-02 22:10:29 +10:00
Vas Crabb
9445f1d831 frontend: Added option to skip repeated imperfect emulation warnings.
The option is called skip_warnings, and it must be set in ui.ini (it can
be set using the internal UI).  Red warnings cannot be skipped; yellow
warning can be skipped under certain circumstances.

For a yellow warning to be skipped, the system must have been launched
in a way that allows warnings to be displayed, in a configuration with
the same set of devices flagged with unemulated/imperfect features,
within the last seven days, and the warning must have been displayed
within the past 14 days.

Also fixed a bug with display of the MACHINE_NO_COCKTAIL flag in the
internal UI, and increased the size of XML integer attributes to 64
bits.
2020-09-02 17:41:34 +10:00
Sylvain Glaize
66859c1927
VG5000µ updates:
- Add wavfile support for reading/writing tapes, for more accuracy. The currently supported K7 file type misses timing data.
- VG5000µ adds a wait cycle after the second T state of the M1 cycle of the Z80. Because it was not emulated, the timings were off, especially in the sensible cassette read/write routines.
- With wavfile support added and timings fixed, the emulation can now read/write cassette at 1200 and 2400 bauds.
- Still keeping the MACHINE_NOT_WORKING flag, as real hardware tests need to be complete.
2020-08-31 16:14:42 -04:00
Vas Crabb
97a409b2a9 formats/flopimg.cpp: Use appropriate standard exceptions for reporting errors, allowing libemu to be removed from imgtool and floptool. 2020-08-30 17:22:17 +10:00
Vas Crabb
ec88949651 formats: Get rid of more inappropriate use of emu_fatalerror (and fix some spelling issues, etc. while I'm at it) 2020-08-30 17:08:25 +10:00
Justin Kerk
68fecdf7e0 pc_dsk: Ignore 84-byte Disk Copy 4.2 header [Justin Kerk] 2020-08-29 12:48:40 -07:00
Vas Crabb
c44073056f netlist: Remove copyright-infringing descriptions copy/pasted from datasheets.
Certain things are not considered "creative works" under copyright law,
making them ineligible for copyright protection.  This includes pinouts
(facts), descriptions of circuits (utilitarian), integrated circuit
lithography masks (utilitarian, but there's a separate field of IP law
protecting them), and character shapes (utilitarian).

However, many of these descriptions are substantial enough to be treated
creative works.  A number of them include suggested applications.  There
are situations where reproducing the descriptions may be permitted, for
example:

* The publisher may permit reproducing the entire datasheet for
  reference.

* In some jurisdictions, fair use doctrine may allow the description to
  be quoted in its entirety in a larger creative work (e.g. in a
  research paper, patent application, or an original description of a
  circuit utilising the device).

* Some jurisdictions allow reproduction of no more than 50% of a
  creative work for inclusion in teaching materials.

I am not confident that these soure code comments qualify as a situation
where the long-form descriptions can be copied verbatim lawfully,
especially without reproducing copyright notices for them.  If you want
long form plain language descriptions in the comments, you need to write
them yourself.  That way, you will be the copyright holder of the
creative work, and you can make it availble under a permissive or
"copyleft" license.
2020-08-29 01:16:27 +10:00
couriersud
5d3342c837 netlist: Fix processing of TRUTHTABLES for generated files.
* also made nld_devinc.h srcclean friendly.
* nld_devinc.h and lib_entries.hxx are currently not used. You can try
the automated build by changing NL_AUTO_DEVICES in setup.h to 1.
2020-08-28 09:32:24 +02:00
couriersud
e00a6ccf41 netlist: Truth tables are now standalone objects.
* Added TRUTHTABLE_ENTRY to netlist language.
* Please see nlm_ttl74xx for reference implementation.
2020-08-26 22:12:57 +02:00
couriersud
654be7c635 netlist: standalone makefile support for OSX 2020-08-26 22:12:56 +02:00
couriersud
d49f54d3e0 netlist: Change license to CC0 in macro folder.
* Got agreement from contributors over social media.
2020-08-25 22:02:01 +02:00
couriersud
0aa5aea84f netlist: Fix various issues around include directories.
* removed include directory src/lib/netlist from various genie files to
avoid potential issues.
* Code using netlist should use #include "netlist/*".
* Updated includes.
* Fixed standalone makefile depend target to properly deal with relative
paths.
2020-08-25 19:41:32 +02:00
couriersud
f1cb622089 netlist: more standalone makefile changes
* On windows a simple make is now enough to build.
* Devices, macro and tests folders now included with wildcard.
* No more makefile changes if a device is added.
* Moved nld_devinc.h to generated folder
* Added to python scripts to create nld_devinc.h and lib_entries.hxx
* TEST MODE: these two files are created automatically but are not used
currently. Once I get feedback that the python scripts work in different
environments I will remove header files from devices and macro and start
using these files in production.
2020-08-24 22:04:21 +02:00
Aaron Giles
2b82913843 netlist: Add 7417, 7438, 74290/74293 devices. Fix PROM DIPs. 2020-08-24 22:02:20 +02:00
couriersud
b612367b33 netlist: clang tidy include order fixes. 2020-08-24 22:01:58 +02:00
couriersud
8335c1bed5 netlist: build system improvements
* Medium term this will significantly ease adding devices to netlist.
2020-08-24 22:01:38 +02:00
couriersud
1bd446a192 netlist: in devices folder all DIP devices were removed.
* NE555 and MC1455P were the last devices with DIP definitions in
devices.
2020-08-23 20:12:31 +02:00
couriersud
915e4a3171 netlist: References to subdevices should be symbolic.
* Exposing sub-device members is not best practice.
* The need for sub-devices is a clear indication that a netlist language
implementation would be a better solution.
2020-08-23 17:25:18 +02:00
couriersud
d1c74db666 netlist: Fix visibility in some devices.
* private rules.
2020-08-23 17:24:24 +02:00
couriersud
113de38237 netlist: templatize 74107 and code maintenance.
* removed some dead friend declarations
* optimized template times_ns2
2020-08-23 17:24:22 +02:00
couriersud
f7ace42947 netlist: macro dip definition for 8277,am2847,mm5837. 2020-08-23 14:09:11 +02:00
couriersud
86f4a96c4a netlist: Macro DIP definitons for TMS4800, 9314, 9334 2020-08-23 10:57:35 +02:00
Vas Crabb
164ef47ad2 srcclean for 0.224 2020-08-23 11:13:56 +10:00
Vas Crabb
15e71127fb formats: Removed some inappropriate uses of emu_fatalerror and stderr. 2020-08-23 10:55:03 +10:00
couriersud
a594ee4933 netlist: use macro dips for 74175, 74192, 74193, 74194, 74365. 2020-08-22 22:57:37 +02:00
couriersud
4b7eaf67e3 netlist: remove duplicate device definitions. 2020-08-22 21:31:06 +02:00
couriersud
f6049d73b2 netlist: fix clang build. 2020-08-22 16:55:37 +02:00
couriersud
b0e0ac2b24 netlist: Add NETLIB_DELEGATE_NOOP()
* This should be used for inputs which do not need a handler.
* Examples are data inputs which are only accessed on a clock change.
2020-08-22 16:31:22 +02:00
couriersud
9e401f0b3e netlist: Fix some documentation issues. 2020-08-22 16:30:16 +02:00
couriersud
1d723a69db netlist: Fix some pedantic clang warnings. 2020-08-22 16:30:15 +02:00
couriersud
3f50652a5c netlist: Add AN6551 opamp 2020-08-20 18:55:22 +02:00
couriersud
1e74aa6bff netlist: optimized 7416 2020-08-20 18:16:17 +02:00
Tiago Pierezan Camargo
4cc6d5bb7e
palloc: use posix_memalign with android 2020-08-20 09:56:41 -03:00
Aaron Giles
10173161ad Updated static solvers. 2020-08-19 19:42:37 -07:00
Aaron Giles
f7b263de20
Sound and other improvements to Sega G-80 games. (#7103)
Sound and other improvements to Sega G-80 games: [Aaron Giles, couriersud]
* Added netlist-based sound to Eliminator, Zektor, Space Fury, and Astro Blaster.
* Split the Sega Universal Sound Board and Speech Boards into their own separate files.
* Improved Universal Sound Board implementation for better accuracy in Star Trek and Tac/Scan.
* Wrote netlist-based backend for Universal Sound Board; currently disabled due to limitations in the system.
* Wrote netlist-based backend for Speech Board; currently disabled pending future sound system changes.
* Implemented wait states and the vector DRAW flag to help improve timing.

SP0250 Improvements: [Aaron Giles]
* Matched clock divider to real chip measurements.
* Fixed behavior when not fed enough data; addresses "gapping" in speech in Sega games.
* Implemented accurate LFR noise generator according to real chip measurements.
* Added pulse-width modulation DAC output mode for future consumption by netlist.

Netlist additions: [Aaron Giles]
* Added compile-time option to record nltool-compatible CSV files.
* Improved CD4020 implementation.
* Fixed CD4053 behavior.
* Added 74139 device.
* Added TL082 device.

8253 PIT changes: [Aaron Giles]
* Added explicit synchronization to all writes.
* Cleaned up some timing calculations to avoid double<->attotime conversions.
2020-08-19 19:33:13 -07:00
Ryan Holtz
e022ccd040 -tank: Assorted fixes and changes. For some reason, GNE (H4.6) never goes low at the start of the game. 2020-08-18 09:37:27 +02:00
couriersud
da734ea0c9 netlist: fix some pedantic clang warnings. 2020-08-17 22:24:17 +02:00
couriersud
b55747b276 netlist: dead code removal.
* moved dead code into examples/lostfound.cpp
* This work didn't improve performance but still may serve as examples
for complex truth table implementations.
2020-08-17 22:24:17 +02:00
Ryan Holtz
96921ccac9 -netlist: Properly fixed 74165 implementation. Fixed MK28000 address latching. 2020-08-17 16:24:46 +02:00
Ryan Holtz
dd47a15e3a -tank: Commented out CPU-choking motor sound for now. Fixed a transcription error. At least partially fixed screen parameters. 2020-08-17 13:49:13 +02:00
Ryan Holtz
48c847f89a -nld_9321: Fixed Enable input, it should be inverted. 2020-08-17 13:47:27 +02:00
Colin Douglas Howell
f7d786d3d0
sspeedr: new netlist audio implementation (#7081)
* sspeedr: new netlist audio implementation

Netlist-based audio implementation for sspeedr (Super Speed Race, 1979)
derived from Midway audio schematics, and based on that used for
280zzzap (280-ZZZAP) and lagunar (Laguna Racer) in the mw8080bw driver.
The Super Speed Race audio circuits are clearly derived from those games;
the biggest difference is the use of a linear feedback shift register
for noise generation.

* Updated netlist static solvers with recent netlist changes.
2020-08-16 21:32:45 -04:00
couriersud
c44d930015 netlist: Add tank to nl subtarget, update static_solvers. 2020-08-17 01:34:04 +02:00
couriersud
c619fbe40c netlist: increase queue sizes to accomodate nl_tank complexity. 2020-08-17 01:34:03 +02:00
Ryan Holtz
6c5e9d3eff -netlist: Regenerated static solvers, and fixed errors preventing static solvers from generating. 2020-08-16 20:44:00 +02:00
Robbbert
395cf63d30 *atom: cleanup 2020-08-17 04:33:05 +10:00
Ryan Holtz
e2231ddcd2 -atarittl: Added netlist for Tank. currently runs at about 0.005% of full speed, unsure why. 2020-08-16 20:04:34 +02:00
Nigel Barnes
c2a670bda8 acorn_dsk: Added support for Kenda formatted SSD images. 2020-08-16 16:14:07 +01:00
couriersud
75925e1905 netlist: buffered_param_setter refactoring
* Each parameter to set now has a dedicated buffered_param_setter
device.
* This allows different sample times per device
* Updated netlist.cpp for new approach
* buffered_param_setter is a template. The template parameter is a class
which is expected to support the [] operator. The value passed to []
operator is the requested sample number.
2020-08-16 00:21:52 +02:00
couriersud
290ffa74fc netlist: Remove printf debugging.
* also raises error if during parsing a local source is not found.
2020-08-15 22:20:24 +02:00
couriersud
a2248e8e18 netlist: Fix elif processing. 2020-08-15 22:20:23 +02:00
couriersud
6d7f41871c netlist: improve two error messages.
* Provide more detail and rephrase to make them more clear.
2020-08-15 20:12:18 +02:00
Aaron Giles
204818a509 netlist: Add THRESH parameter to AFUNC 2020-08-15 20:01:03 +02:00
couriersud
68b7535dd1 netlist: make streams accept logic parameters as well. 2020-08-15 20:01:00 +02:00
couriersud
9d00d87dac netlist: commit missing files in last commit. 2020-08-12 22:12:20 +02:00
couriersud
87b702b31f netlist: more include untangling.
* nl_base.h now basically only includes files from core.
* all headers in core compile on their own.
2020-08-12 20:17:10 +02:00