| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
| |
|
| |
|
| |
|
|
|
|
|
| |
* emu/machine.cpp, emu/render.cpp: Catch exceptions by const reference.
* Various spacing and #include order cleanup.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
util/bitmap.cpp, util/palette.cpp: Marked lots of things constexpr.
Bitmaps don't throw exceptions on allocation failure, they just become
invalid. Almost nothing in MAME actually checks for this.
emu/profiler.cpp: Abort if the profile stack overflows rather than
throwing an exception. This is a developer feature and if it overflows,
the code is broken. Calling a noreturn noexcept function generates less
code than throwing an exception, which adds up.
util/strformat.cpp: Traded away some unnecessary flexibility for more
compact code. The stream objects must derive from std::basic_ostream
now - they can't just be any old objects with the expected operators.
|
|
|
|
|
|
|
|
|
| |
* This lets you use emu.wait(...) directly without mucking around creating coroutines.
* Allow emu.wait to accept an attotime argument.
* Added a couple more wait helper functions.
-emu/profiler.h: Actually use scope-based profiling helpers.
* This makes the comment at the top of emu/profile.h less dishonest, and makes it easier to write exception-safe code.
* Got rid of some do { ... } while (0) loops that only existed so break could be used like a goto.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Functionally, the only difference between the system definitions is that
GAMEL lets you specify an additional internal layout and SYST lets you
specify a compatible system. COMP and CONS are just aliases for SYST -
the aliases can be phased out.
Removed arcade.flt and mess.flt altogether - opinion seems to be split
between misinterpreting them as fully supported and considering them
unnecessary. They were marginally useful as a performance test for
makedep.py, but that isn't important. We still have nl.flt as an
example .flt file (although it doesn't use "-" exclude directives).
Moved the UI active flag from the machine to the UI manager. Nothing
else uses it anyway (it's still accessible to scripts).
|
|
|
|
| |
-ui/ui.cpp: Honour UI enable for machines without keyboards.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
osd: Supply OSD object to modules on initialisation. Encapsulated some
event handling in the OSD objects rather than leaving it in free
functions. Put various stuff in namespaces.
osd/modules/input: Enabled dinput, xinput and winhybrid modules for
Windows SDL builds, and enabled background input for dinput and xinput
(and by extension winhybrid) modules. Also fixed some COM and X11
resource leaks.
osd/modules/input/input_sdl.cpp: Flipped SDL mouse button order to match
Windows, and exposed vertical and horizontal scroll as Z and rZ axes.
Moved SDL UI event handling out of input devices into OSD object.
osd/modules/input_rawinput.cpp: Changed lightgun Z axis token so it's
correctly identified as a relative axis (it maps to the scroll wheel
equivalent).
osd: Added an option to choose the network provider module. Mostly
useful if you build with both TUN/TAP and pcap support included, or if
you want to disable emulated networking completely.
emu/input.cpp: Use a better strategy for assembling input code names
that uses fewer temporary strings and doesn't require use of the
non-Unicode-aware space trimming function (fixes MT08552).
osd/modules/input_dinput.cpp: Improved polling logic.
osd: Made various parts of the input code less dependent on concrete emu
objects, and reduced inappropriately passing around the machine object.
Made input modules less dependent on OSD implementation. Encapsulated
some stuff and got rid of some vestigial newui and SDL1 support code.
Cleaned up some interfaces. Moved OSD options classes to their own
files.
Prepare to remove main.h from emu.h - it's mostly used to get the
application name, which the vast majority of emulated devices don't need
to do.
|
|
|
|
| |
saving) from nvram_can_save
|
|
|
|
| |
inhibit NVRAM saving
|
|
|
|
| |
and save methods, and have these return false on I/O errors
|
|
|
|
|
|
|
|
| |
* emu/machine.cpp: Organised #included headers by module.
* formats/jvc_dsk.cpp: Don't hide diagnostics behind compile-time
switch.
* util/ioprocsfilter.h: Added doxygen comments so one doesn't need to
read the source to work semantics.
|
| |
|
| |
|
|
|
|
| |
callbacks
|
|
|
|
|
|
|
|
|
| |
* Remove http related header polution
* remove now invalid message
* fixed issued detected by clang
* Fixed CR at EOF
|
|
|
|
|
|
|
|
|
| |
-emu/machine.cpp: Got rid of an outdated and hence misleading comment.
-Got rid of a few more uses of UNUSED_FUNCTION.
-Tidied up more slot machine layouts, and fixed VFDs in debug views that
had inadvertently been broken.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Optimised generation of late bind helper functions. The late bind
helper function doesn't depend on the delegate signature - only on the
late bind base class and function target class. Having it inside the
delegate base class means it needs to be instantiated for every
combination of late bind base class, function target class and delegate
signature. In a typical driver file, there is only one late bind base
class (delegate_late_bind), and there will be delegates with multiple
signatures bound to function members of the same class (e.g. read and
write handlers, possibly of different widths, bound to members of the
driver state class). By moving the late bind helper out of the delegate
base class, the number of required instantiations can be reduced. By
moving the body out of the enclosing class declaration, the compiler can
be encouraged to coalese instantiations across translation units. While
this won't give a further reduction in compile time, it should at least
reduce the output binary size by reducing duplication for devices that
frequently have handlers installed in memory maps.
Added an additional template parameter to delegates allowing the late
bind base class to be changed if desired.
Moved the MSVC implementation "this" pointer optimisation out-of-line
and added logging. Also cleaned up the Itanium "this" pointer
adjustment and code pointer resolution implementation to reduce
duplication and conditional compilation.
Made binding_type_exception give a more meaningful what() message than
"std::exception".
Added extensive validity tests for delegate functionality. Pointers to
member functions are tested, including multiple inheritance, virtual and
non-virtual member functions, and checking for generational loss across
copying/assigning delegates. This should properly exercise "this"
pointer adjustment for the Itanium and MSVC implementations, and vtable
lookup for the Itanium implementation. So-called late binding
functionality is tested, including exceptions on failure. Functoids are
tested, although given the encapsulation it's not possible to check that
an apator isn't generated when it shouldn't be.
|
|
|
|
|
|
|
|
|
| |
Added more modern generic I/O interfaces with implementation backed by stdio, osd_file and core_file, replacing io_generic. Also replaced core_file's build-in zlib compression with a filter.
unzip.cpp, un7z.cpp: Added option to supply abstract I/O interface rather than filename.
Converted osd_file, core_file, archive_file, chd_file and device_image_interface to use std::error_condition rather than their own error enums.
Allow mounting TI-99 RPK from inside archives.
|
| |
|
|
|
|
|
|
| |
before the initial soft reset) by using the normal "Config Menu" UI input
Note that the minor code shuffling in machine.cpp is necessary to prevent emulation from getting confused if "Select New Game" happens to be selected.
|
|
|
|
| |
devices (e.g. %d_cart or %d_flop1) while allowing for more general non-alphanumeric separators, so that for instance %d_cart_%i correctly produces a name with the software name, followed by an underscore and an index, rather than failing to be recognized and defaulting back to %g/%i.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Remove corestr.h from emu.h; update a few source files to not use it at all
- Change strtrimspace, strtrimrightspace and core_filename_extract_* to be pure functions taking a std::string_view by value and returning the same type
- Change strmakeupper and strmakelower to be pure functions taking a std::string_view and constructing a std::string
- Remove the string-modifying version of zippath_parent
- Change tag-based lookup functions in device_t to take std::string_view instead of const std::string & or const char *
- Remove the subdevice tag cache from device_t (since device finders are now recommended) and replace it with a map covering directly owned subdevices only
- Move the working directory setup method out of device_image_interface (only the UI seems to actually use the full version of this)
- Change output_manager to use std::string_view for output name arguments
- Change core_options to accept std::string_view for most name and value arguments (return values are still C strings for now)
- Change miscellaneous other functions to accept std::string_view arguments
- Remove a few string accessor macros from romload.h
- Remove many unnecessary c_str() calls from logging/error messages
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The things that were previously called device iterators are not
iterators in the C++ sense of the word. This is confusing for
newcomers. These have been renamed to be device enumerators.
Several Lua methods and properties that previously returned tables now
return lightweight wrappers for the underlying objects. This means
creating them is a lot faster, but you can't modify them, and the
performance characteristics of different operations varies.
The render manager's target list uses 1-based indexing to be more like
idiomatic Lua.
It's now possible to create a device enumerator on any device, and then
get subdevices (or sibling devices) using a relative tag.
Much more render/layout functionality has been exposed to Lua. Layout
scripts now have access to the layout file and can directly set the
state of an item with no bindings, or register callbacks to obtain
state. Some things that were previously methods are now read-only
properties.
Layout files are no longer required to supply a "name". This was
problematic because the same layout file could be loaded for multiple
instances of the same device, and each instance of the layout file
should use the correct inputs (and in the future outputs) for the device
instance it's associated with.
This should also fix video output with MSVC builds by avoiding delegates
that return things that don't fit in a register.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When this option is specified, all console output is echoed to a log
file.
Some caveats/limitations:
- The file-open process was copied from -log, so it has the same limits
- Filename is hard-coded (debug.log)
- File is overwritten if it exists
- File is opened during emulation initialization
- Thus, the file is cleared if you invoke the "Hard Reset"
debugger command
- Probably some other details I don't know about
- Logging works as such: When a string is appended to the scrollback
buffer, it is also written to the log file.
Some commands forcibly wrap their output (e.g. `help` to 80 columns.)
Because this wrapping is done inside the scrollback buffer, the text
written to the file is not wrapped.
This can be seen with `help execution`.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Initial refactor of AVI/MNG movie recording, consolidation of copy and paste
code, hiding of AVI/MNG behind interfaces
* Extracted recording specific code out of src/emu/video.cpp and put into
src/emu/recording.cpp
* Took the opportunity to move slightly more logic out of video.cpp into
recording.cpp
* Bug fix
* Consolidated frame counting logic
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* fixed some readability-static-accessed-through-instance clang-tidy warnings (nw)
* fixed some readability-redundant-string-cstr clang-tidy warnings (nw)
* fixed some readability-redundant-control-flow clang-tidy warnings (nw)
* fixed some modernize-use-nullptr 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 performance-unnecessary-value-param clang-tidy warnings (nw)
|
|\
| |
| | |
use C++ library includes (nw)
|
| | |
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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)
|
|
|
|
|
|
| |
dozen output().set_value(...) calls in favour of output finders. (nw)
This has the detrimental effect that outputs used in layouts will get the default value from the last element in the last view that uses them _after_ devices are started. If drivers/devices set initial output values on start rather than reset this could cause a problem.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Changed emu_fatalerror to use util::string_format semantics
* Fixed some incorrectly marked up stuff in build scripts
* Make internal layout compression type a scoped enum (only zlib is supported still, but at least the values aren't magic numbers now)
* Fixed memory leaks in Xbox USB
* There can only be one "perfect quantum" device - enforce that only the root machine can set it, as allowing subdevices to will cause weird issues with slot cards overiding it
* Allow multiple devices to set maximum quantum and use the most restrictive one (it's maximum quantum, it would be minimum interleave)
* Got rid of device_slot_card_interface as it wasn't providing value
* Added a helper template to reduce certain kinds of boilerplate in slots/buses
* Cleaned up some particularly bad slot code (plenty more of that to do), and made some slots more idiomatic
|
|
|
|
|
|
| |
MAME was setting up AVI before devices have properly launched, so default 60fps was used, which resulted in skipped frames in the video if machine's framerate is above 60 (btoads), and presumably duplicate frames for machines below 60fps (haven't tested).
Now every frame that is generated is also present in the video.
|
|
|
|
| |
what this thing is supposed to do
|
| |
|