| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This change introduces the ability to save arbitrary structures. To
make a structure eligible for saving, it must implement a new method
register_save(save_registrar &). Structs can then save their members
directly via the provided save_registrar. Nested structs and arrays of
structs are supported in this manner.
Note that state registration is not done via a virtual method or mix-in
interface because doing so would convert lightweight structures away
from being POD, and lightweight structures are one of the most common
situations where this system can be leveraged in MAME.
As a first example, the attotime struct has been changed to support
this mechanism for saving, allowing us to remove the special cases for
attotimes currently in save_manager.
(It would be tempting to do the same for bitmap_t, but bitmaps are
defined in lib/util and can't take a dependency on save.h so those
special cases will remain.)
This is a prologue to full hierarchical save state support, which I am
working on in another branch. The save_registrar class name and reg()
signatures match current work on that branch, so any changes made to
existing code to leverage struct saving in this way will port over
cleanly.
|
| |
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
| |
bwidow is still broken, all other games seem to work.
|
| | |
|
| |
|
|
| |
array on 32-bit Linux targets that align u64 on 32-bit boundaries
|
| |
|
|
| |
to make purpose more obvious.
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
| |
* luaengine: save state to/from binary string buffer
* account for error
* luaL_error makes it exit immediately, but explicit return is required by compiler. actual return is nil if it fails.
|
| | |
|
| | |
|
| |
|
|
|
| |
* Examples in YM2612 family and MultiPCM
* Also used STRUCT_MEMBER to reduce clutter in diexec save state registration
|
| |
|
|
| |
members themselves are n-dimensional arrays - see qsoundhle.cpp for an example of loops disappearing. This can greatly reduce the number of save state registrations in some cases. Obviously I want to know if save states are broken in something by this.
|
| |
|
|
| |
easier debugging. nw
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In file included from /usr/include/X11/extensions/XInput.h:53:0,
from ../../../../../src/osd/modules/input/input_x11.cpp:18:
../../../../../src/emu/save.h:95:32: error: expected unqualified-id before numeric constant
static constexpr std::size_t COUNT = 1U;
^
../../../../../src/emu/save.h:102:32: error: expected unqualified-id before numeric constant
static constexpr std::size_t COUNT = N * array_unwrap<T>::COUNT;
^
../../../../../src/emu/save.h:109:32: error: expected unqualified-id before numeric constant
static constexpr std::size_t COUNT = N * array_unwrap<T>::COUNT;
^
../../../../../src/emu/save.h: In member function ‘void save_manager::save_item(device_t*, const char*, const char*, int, ItemType&, const char*)’:
../../../../../src/emu/save.h:154:142: error: expected unqualified-id before numeric constant
save_memory(device, module, tag, index, valname, array_unwrap<ItemType>::ptr(value), array_unwrap<ItemType>::SIZE, array_unwrap<ItemType>::COUNT);
^
../../../../../src/emu/save.h: In member function ‘void save_manager::save_pointer(device_t*, const char*, const char*, int, ItemType*, const char*, u32)’:
../../../../../src/emu/save.h:163:145: error: expected unqualified-id before numeric constant
save_memory(device, module, tag, index, valname, array_unwrap<ItemType>::ptr(value[0]), array_unwrap<ItemType>::SIZE, array_unwrap<ItemType>::COUNT * count);
^
../../../../../src/emu/save.h: In member function ‘void save_manager::save_pointer(device_t*, const char*, const char*, int, std::unique_ptr<_Tp []>&, const char*, u32)’:
../../../../../src/emu/save.h:172:145: error: expected unqualified-id before numeric constant
save_memory(device, module, tag, index, valname, array_unwrap<ItemType>::ptr(value[0]), array_unwrap<ItemType>::SIZE, array_unwrap<ItemType>::COUNT * count);
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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.
|
| |
|
|
| |
now-superfluous .get() in many drivers/devices (nw)
|
| | |
|
| |
|
|
| |
debugger: Show save state items in alphabetical order in the debugger view. [Curt Coder]
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
- reset scheduler savestate to what it was for years before rewind
-- changing saved variables should be done after thorough testing. right now, adding some vars breaks some machines, adding other vars breaks others
- switch to megabyte-wise capacity
-- savestate size greatly differs between machines, relying on state count is unstable
- switch to internal indexing
-- no longer depends on inaccurate machine time
- rewind accelerator key in debugger (Ctrl+F11)
- report capacity hit (once), with some useful info
- make error reports saner
- mention rewind and rewind_capacity in the docs
|
| |
|
|
| |
This reverts commit 54155441e9ba9941e85d80c4834a66376a11e791.
|
| |
|
|
|
| |
This reverts commit f537428e5a40ba6dde8ca9bf0fe9ae6b1f189ac4, reversing
changes made to 0d70d798107d4e4e8fb9f230410aeb1e888d65c5.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
This starts the work requested in #2398.
How RAM states work.
Implemented using util::vectorstream. Instead of dumping m_save.m_entry_list to file, it writes them as binary to vectorstream. Compression is not used, as it would slow down the process. The header is written as usual, also in binary. When a state is loaded, the savestate data gets binary-read from vectorstream.
How rewind works.
Rewind is optional, it can be turned off through MAME GUI while not running. Rewind capacity is available there too. Rewind step hotkey is available from the standard hotkey menu. In the debugger you have the "rewind" command ("rw" shortcut) that works the same as the hotkey.
Every time you advance a frame (pause step), rewinder captures a RAM savestate of the frame you were at. It does the same when you do step into/over/out in the debugger. Every time it captures a new state (and when you unpause), it marks as invalid all its states that go after the current machine time, because input might change, so they are not relevant anymore. It keeps their buffers allocated though, for future use. When rewinder runs out of allowed amount of savestates it can have, it invalidates the first state in the list and tosses its unique_ptr to the end of the list, then it uses its buffer to capture a new state. When you hit the rewind step key, or use "rewind" command in the debugger, it loads a state that is immediately before the current machine time. Invalid states between valid ones are not allowed to appear, as that breaks rewinder integrity and causes problems. Rewinder keeps its own set of ram states as a vector of unique_ptr's. All rewinder operations and errors get reported using machine().popmessage().
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
* 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
|
| | |
|
| |
|
|
|
| |
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
|
| | |
|
| | |
|
| |
|
|
|
|
|
| |
SHA-1: 1f90ceab075c4869298e963bf0a14a0aac2f1caa
* tags are now strings (nw)
fix start project for custom builds in Visual Studio (nw)
|
| |
|
|
| |
This reverts commit caba131d844ade3f2b30d6be24ea6cf46b2949d7.
|
| | |
|
| |
|
|
| |
fix start project for custom builds in Visual Studio (nw)
|
| | |
|
| | |
|
| |
|
|
|
|
|
| |
m_. Rewrote code accessing members to use seconds() and attoseconds().
The changes were triggered by a test how gcc __int128_t would perform as
the internal representation. This test revealed that the current
implementation is still faster. (nw)
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
| |
std::string (nw)
|
| | |
|
| | |
|
| |
|
|
| |
Signed-off-by: Luca Bruno <lucab@debian.org>
|
| |
|
|
|
| |
to save the indirection arrays properly when indirect color count is
provided up front.
|
| |
|
| |
note: Aaron please give more descriptive text for release log I have no more strength :)
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
as follows:
MAKE_RGB(r,g,b) == rgb_t(r,g,b)
MAKE_ARGB(a,r,g,b) == rgb_t(a,r,g,b)
RGB_ALPHA(data) == data.a()
RGB_RED(data) == data.r()
RGB_GREEN(data) == data.g()
RGB_BLUE(data) == data.b()
RGB_BLACK == rgb_t::black
RGB_WHITE == rgb_t::white
Implicit conversions to/from UINT32 are built in as well as simple
addition, subtraction, and scaling (with clamping).
As a result of being a class, some stricter typing was needed in
a few places but overall not too much.
|