summaryrefslogtreecommitdiffstatshomepage
path: root/src/emu/machine.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Fix merge errors and update new/changed drivers to latest APIs. Aaron Giles2021-09-101-1/+1
|
* Merge branch 'master' into time-experiments2 Aaron Giles2021-09-101-7/+7
|\
| * formats, osd, util: Started refactoring file I/O stuff. (#8456) Vas Crabb2021-08-221-8/+8
| | | | | | | | | | | | | | | | | | 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.
* | Switch to using an exception to escape the inner timeslice loop. Clean up ↵ Aaron Giles2021-08-301-70/+62
| | | | | | | | some no longer necessary bits in the scheduler.
* | Add working support for mid-timeslice saves/loads from the debugger. Aaron Giles2021-08-231-65/+56
| |
* | Fix state loading from the command line Aaron Giles2021-08-231-2/+3
| |
* | Clean up save state handling. Timers are now restored in proper order. ↵ Aaron Giles2021-08-221-1/+1
| | | | | | | | Mid-timeslice saves are supported in theory. Added cleaner mechanism for quick exiting needed upon restore or hard reset/exit.
* | Better fix for wavwrite length. Aaron Giles2021-06-071-0/+1
| |
* | Add back the final snapshot after seconds-to-run. Add logic to nail the ↵ Aaron Giles2021-06-071-2/+6
| | | | | | | | sound updates exactly on the second now that 50Hz doesn't perfectly round anymore.
* | Merge branch 'master' into time-experiments2 Aaron Giles2021-06-041-60/+7
|\|
| * emu/machine.cpp: Get rid of the dummy space device. Vas Crabb2021-05-051-60/+7
| |
* | Clean up debug_flags access. Aaron Giles2021-04-241-2/+2
| |
* | You know, if I'm nice enough to give you an accessor, please use it. Aaron Giles2021-04-241-4/+4
| |
* | Save states working again. Changed to save persistent timers directly, using ↵ Aaron Giles2021-04-131-1/+1
| | | | | | | | the save buffer only for transient timers. Now saving quantum state as well. Switched to using an array for that.
* | Moved 'seconds_to_run' functionality to core machine. Consolidated logic for ↵ Aaron Giles2021-04-121-121/+53
| | | | | | | | handling hard/soft resets and exits. Added hard_stop() to scheduler to force it to exit ASAP.
* | Merge branch 'master' into time-experiments2 Aaron Giles2021-04-081-15/+4
|\|
| * Allow breaking into main menu before the machine fully starts (i.e. just ↵ AJR2021-04-091-2/+2
| | | | | | | | | | | | 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.
| * options: simplified the statename/snapname logic for naming after image ↵ etabeta2021-04-041-13/+2
| | | | | | | | 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.
* | Rename raw_subseconds() to frac(). Create initial cut at new attotime ↵ Aaron Giles2021-04-041-1/+1
| | | | | | | | implementation. Still a couple of functions missing.
* | Switch out attoseconds in favor of more abstract subseconds. Update everyone ↵ Aaron Giles2021-04-021-4/+4
| | | | | | | | to use subseconds abstractly where possible. Builds, and many games work, but some are failing, so there be dragons here.
* | Reorganized diexec fields to be more optimal. Moved execution and suspend ↵ Aaron Giles2021-03-301-16/+10
| | | | | | | | logic into the execute interface. Added minimum duration parameter to the timeslice function. Switched to using delegates to call the various execute paths.
* | Added stricter checks on allocation of device timers. Fixed several places ↵ Aaron Giles2021-03-271-3/+2
| | | | | | | | that were caught by this. Updated all interfaces and core systems to use new timer classes.
* | Split timeslice() into debugging and non-debugging versions to save a ↵ Aaron Giles2021-03-191-4/+8
|/ | | | compare in the inner loop.
* Much more core std::string_view modernization AJR2021-01-201-0/+1
| | | | | | | | | | | | | | | - 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
* natkeyboard: Remove from ioport_manager AJR2020-12-261-0/+4
|
* More Lua interface cleanup - it's simpler with cleaner underlyng APIs. Vas Crabb2020-12-271-0/+4
| | | | | | | | | | | 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.
* Fairly significant overhaul of Lua engine and some cleanup. Vas Crabb2020-11-251-12/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* emu/machine.cpp: Get rid of remaining make_unique_clear on 'manager' objects. Vas Crabb2020-09-301-3/+3
|
* emu: correct some file headers (nw) hap2020-06-191-1/+1
|
* recording: fix frame sync regression (nw) hap2020-06-191-1/+1
|
* finally retired the READ8/16/32/64 and WRITE8/16/32/64 macros (nw) Ivan Vangelista2020-06-181-2/+2
|
* dinvram: rename pre write/save to can write/save (nw) hap2020-06-111-1/+1
|
* nvram: don't save 0byte file (nw) hap2020-06-091-4/+7
|
* Debugger - add `-debuglog` option to log debug console output to file Stephen Oberholtzer2020-05-071-1/+9
| | | | | | | | | | | | | | | | | | | | | | | | 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`.
* Refactoring of AVI/MNG recording code (#6537) npwoods2020-04-221-2/+2
| | | | | | | | | | | | | | * 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 clang-tidy warnings (nw) (#6236) Oliver Stöneberg2020-01-301-1/+1
| | | | | | | | | | | | | | | | * 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 clang-tidy warnings (nw) (#6229) Oliver Stöneberg2020-01-291-2/+2
| | | | | | | | | | | | | | | | * 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)
* Merge pull request #6195 from firewave/includes R. Belmont2020-01-221-1/+1
|\ | | | | use C++ library includes (nw)
| * use C++ library includes (nw) firewave2020-01-221-1/+1
| |
* | fixed some clang-tidy warnings (nw) (#6197) Oliver Stöneberg2020-01-221-2/+2
|/ | | | | | | | | | | | | | * 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)
* Save states should not be break when changing output. Also get rid of a few ↵ Vas Crabb2019-12-131-2/+2
| | | | | | 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.
* save/restore otuput values in save states Vas Crabb2019-12-131-0/+5
|
* Spring cleaning: Vas Crabb2019-11-011-1/+1
| | | | | | | | | | | | * 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
* Fix AVI framerate feos2019-10-031-0/+9
| | | | | | 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.
* (nw) get rid of the rest of assert_always - it's better to be explicit about ↵ Vas Crabb2019-09-201-5/+8
| | | | what this thing is supposed to do
* Remove tilemap.h from emu.h (nw) AJR2019-08-211-0/+1
|
* Miscellaneous LUA functionality npwoods2019-08-181-0/+1
| | | | | | | - Created emu.register_before_load_settings(), to allow LUA scripts to override default input port values before settings are loaded - New ioport_field methods/props ([set_]default_input_seq(), port)
* Fix build in newer Emscripten versions (nw) Justin Kerk2019-08-081-4/+4
|
* Defaulting to empty search path if null npwoods2019-06-161-1/+1
|
* (nw) Clean up the mess on master Vas Crabb2019-03-261-1/+1
| | | | | | | | | | | | | This effectively reverts b380514764cf857469bae61c11143a19f79a74c5 and c24473ddff715ecec2e258a6eb38960cf8c8e98e, restoring the state at 598cd5227223c3b04ca31f0dbc1981256d9ea3ff. 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.