summaryrefslogtreecommitdiffstatshomepage
path: root/src/emu/schedule.cpp
Commit message (Collapse)AuthorAgeFilesLines
* g update: Aaron Giles2021-04-151-3/+4
| | | | | | | | | | | | | | | | | | | * Removed old saving mechanism entirely, including internal lists of items. * Removed old logic saving to streams/buffers/files. * Removed old state item iterator; a new mechanism will need to be created for this. Stubbed out debugger and LUA calls to it for now. * Replaced the streams/buffers saves with the new binary save; these are presumed to be 100% internal, so there is no header checking or other associated logic. * Stubbed in incomplete file handling for JSON-based saves; large arrays are identified and referenced as external, though ZIP writing has not been done yet. * Redid JSON generation using an internal buffer and helpers for speed. * Added sorting and pruning of save items after registration. * Added detection of duplicate entries. * Fixed display of long names in save window. * Moved timers into their own container.
* Remove final cases where people directly registered state data with the core ↵ Aaron Giles2021-04-141-8/+10
| | | | manager. Fixed array stride calculations in registration. Removed old registration mechanism entirely.
* -osd: Clean up inline maths utilities. Vas Crabb2021-01-181-1/+1
| | | | | | | | | | * Removed inline assembly for operations compilers handle well. * Added ARM and AArch64 implementation for a few operations. * Added unsigned integer add with carry out operations. -cpu/drccache.cpp: Detect whether RWX pages are supported. -dynax.cpp: Improved a few hanafuda DIP switch descriptions.
* Fairly significant overhaul of Lua engine and some cleanup. Vas Crabb2020-11-251-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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: correct some file headers (nw) hap2020-06-191-1/+1
|
* save/restore otuput values in save states Vas Crabb2019-12-131-4/+3
|
* schedule: pick some really low-hanging fruit (nw) Vas Crabb2019-11-151-43/+52
|
* assert aborts on failure - abort is not an exception. conditional noexcept ↵ Vas Crabb2019-11-101-3/+3
| | | | is an antipattern, get rid of it. (nw)
* Make many device_execute_interface functions noexcept, including the ↵ AJR2019-11-091-3/+3
| | | | | | | | "information" overrides. This also covers several time-related functions in attotime, running_machine and emu_timer. (nw) m6805: Calculate min_cycles and max_cycles once at device_start time (Nw) attotime: Add as_khz and as_mhz (nw)
* Spring cleaning: Vas Crabb2019-11-011-21/+5
| | | | | | | | | | | | * 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
* don't try to update m_totalcycles on devices with a zero clock, as it will ↵ smf-2018-07-291-1/+5
| | | | crash. (nw)
* Revert part of 20b5f5d0e6f73b9ce6fffa4fc5dbe3f2b83d2a27 smf-2018-07-291-26/+25
|
* Fix setting sample rate back to zero & crash for synchronous streams when ↵ smf-2018-07-291-25/+26
| | | | rate is zero. This fixes all reported bugs. (nw)
* Revert part of 20b5f5d0e6f73b9ce6fffa4fc5dbe3f2b83d2a27 Olivier Galibert2018-07-291-26/+25
| | | | | | | This is damn sensitive code, and generates differences all over the place we don't really explain. The changes should be justified by themselves and tested in collaboration with Tafoid to ensure the differences are not a problem.
* vgmplay: start all clocks at zero and reset all sound chips on a song change ↵ smf-2018-07-271-25/+26
| | | | [smf]
* Kludge some absolute tag lookups in the core that can't really be helped (nw) AJR2018-05-211-1/+1
|
* Reshuffle some stuff: Vas Crabb2018-03-281-2/+2
| | | | | | * Move around the debugger hooks to get a small but measurable performance increase * Remove emucore from external tools * Improve performance of DSP16 interpreter a little by generating six variants of execution loop
* Stop save and load logging timers unless VERBOSE is set. [smf] smf-2017-12-201-2/+6
|
* Fix scheduler overflow when a device executes for more cycles than there are ↵ AJR2017-06-271-1/+9
| | | | in a second
* Retired min/max in attotime.h, in favor of std::[min|max]() Nathan Woods2017-05-251-4/+4
|
* RIP timer_pulse (nw) AJR2017-05-201-12/+0
|
* Check for callback name being a null pointer before sending it to %s. (nw) Ted Green2017-05-051-1/+4
|
* Introduce u8/u16/u32/u64/s8/s16/s32/s64 Vas Crabb2016-11-191-5/+5
| | | | | | | | | | | | * New abbreviated types are in osd and util namespaces, and also in global namespace for things that #include "emu.h" * Get rid of import of cstdint types to global namespace (C99 does this anyway) * Remove the cstdint types from everything in emu * Get rid of U64/S64 macros * Fix a bug in dps16 caused by incorrect use of macro * Fix debugcon not checking for "do " prefix case-insensitively * Fix a lot of messed up tabulation * More constexpr * Fix up many __names
* NOTICE (TYPE NAME CONSOLIDATION) Miodrag Milanovic2016-10-221-5/+5
| | | | | Use standard uint64_t, uint32_t, uint16_t or uint8_t instead of UINT64, UINT32, UINT16 or UINT8 also use standard int64_t, int32_t, int16_t or int8_t instead of INT64, INT32, INT16 or INT8
* std::min and std:max instead of MIN and MAX, also some more macros converted ↵ Miodrag Milanovic2016-07-311-2/+2
| | | | to inline functions (nw)
* - removed FUNC_NULL macro Miodrag Milanovic2016-07-011-3/+8
| | | | | - made emu_timer register_save properly handle timer_expired_delegate() - removed timer_expired_func and calls using it
* Iterate over devices C++11 style AJR2016-04-181-8/+7
| | | | | | Replace the old device_iterator and its specialized versions with functionally equivalent classes that use standard operators to yield references to devices/interfaces rather than pointers. With range-based for loops, they no longer have to be stored in named variables, though they can also be reused concurrently since the iteration state is now maintained by a subclass. Add a few more typical getters to device_t::subdevice_list.
* Iterate over core classes C++11 style AJR2016-03-311-3/+3
| | | | | | | | C++11 range-based for loops can now iterate over simple_list, tagged_list, core_options, device_t::subdevice_list, device_t::interface_list, render_primitive_list and all subclasses of the above, and much code has been refactored to use them. Most core classes that have these lists as members now have methods that return the lists themselves, replacing most of the methods that returned the object at an owned list's head. (A few have been retained due to their use in drivers or OSD.) device_t now manages subdevice and interface lists through subclasses, but has given up the work of adding and removing subdevices to machine_config. memory_manager has its tagged lists exposed, though the old rooted tag lookup methods have been removed (they were privatized already).
* * Support *n conversion in stream_format/string_format Vas Crabb2016-03-011-1/+1
| | | | | | | | | * Make stream_format return characters printed * Add iostreams with std::vector storage * Move to type-safe templates for logerror and popmessage * Remove now-unnecessary I64FMT from calls to logerror/popmessage * Put some lib/util stuff in util:: namespace * Some fixes to Japanese translation
* Replace strformat, strprintf and strcatprintf with type-safe steam_format ↵ Vas Crabb2016-02-281-1/+1
| | | | | | | | | and string_format Update MAME to use new function Instantiate ODR-used static constant members Make some of the UI code more localisable Remove use of retired functions in tools
* reverting: Miodrag Milanovic2016-01-201-4/+4
| | | | | | | SHA-1: 1f90ceab075c4869298e963bf0a14a0aac2f1caa * tags are now strings (nw) fix start project for custom builds in Visual Studio (nw)
* tags are now strings (nw) Miodrag Milanovic2016-01-161-4/+4
| | | | fix start project for custom builds in Visual Studio (nw)
* clang-modernize part 1 (nw) Miodrag Milanovic2015-12-031-58/+58
|
* Some cleanups and init fixes with help of ReSharper C++ (nw) Miodrag Milanovic2015-11-111-3/+3
|
* These are not needed with official tools (nw) Miodrag Milanovic2015-11-101-12/+0
|
* Rename *.c -> *.cpp in our source (nw) Miodrag Milanovic2015-11-081-0/+996