Commit Graph

129 Commits

Author SHA1 Message Date
phulshof
1aaed4a64e Override and fallback options for artwork (#2908)
* Added fallback_artwork and override_artwork as MAME options to allow default artwork to be loaded.

* Removed debug testing code.

* - Allow loading of built-in layouts even if override_artwork is specified.
- Allow loading of fallback_artwork if only default view have been found.
- Fixed order of built-in layouts with regards to fallback_artwork as agreed upon the forums.

* Changed |= true to = true, and changed override artwork so it only checks for default.lay if the <machine name>.lay is not found.
2018-01-07 15:51:02 +11:00
AJR
a72b3e4ae6 Add option to disable saving NVRAM on exit 2017-12-26 14:04:39 -05:00
Firehawke
9ece34eb21 Revert "Revert "Merge branch 'master' of https://github.com/mamedev/mame""
This reverts commit 54155441e9.
2017-12-13 21:31:27 -07:00
Firehawke
54155441e9 Revert "Merge branch 'master' of https://github.com/mamedev/mame"
This reverts commit f537428e5a, reversing
changes made to 0d70d79810.
2017-12-13 21:01:10 -07:00
vadosnaprimer
a66cb36cc7 Rewind feature and RAM savestates.
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().
2017-12-06 19:31:10 +03:00
npwoods
3f144b2861 Fixed an options overhaul regression (#2530)
This crash (discovered by Wizz) had the following symptoms:
1.  Start MAME
2.  Choose "Configure Machine"
3.  Choose "Video Options"
CRASH

This was the result of the options editor not having a fully formed list of options where it was expecting one.  The fix is to change the declaration of emu_options to one that have full OSD options (it is possible that SDLMAME needs something slightly different)

I created a osd_setup_osd_specific_emu_options(emu_options &) function that given an emu_options, will slap on system specific options.  I see this as only marginally less gross, and I have zero opinion on whether this should be changed to return an emu_options (rather than have a reference parameter), be a static method on emu_options, or what have you.
2017-10-06 13:54:10 -04:00
Vas Crabb
6ef4a1452d Revert "(nw) Fixed random crashing when swapping one slot device with another."
This reverts commit 9968fc71b0.

This hides the underlying problem that the options structure is getting
out-of-sync.  It's losing the image option but not the underlying
option.  Masking the problem doesn't fix it.
2017-08-06 21:47:53 +10:00
Robbbert
9968fc71b0 (nw) Fixed random crashing when swapping one slot device with another. 2017-08-06 21:01:11 +10:00
Vas Crabb
fb61e98cc5 more srcclean (nw) 2017-06-25 15:21:44 +10:00
npwoods
b193e05cd7 Overhaul to how MAME handles options, take two (#2341) 2017-06-25 12:48:56 +10:00
Vas Crabb
a400c011a9 Revert "Overhaul to how MAME handles options (#2260)"
This reverts commit 536990e77b.

Conflicts:
	src/frontend/mame/mame.cpp

Sorry, but this change was half-baked.  It breaks a lot of existing
functionality and clearly hasn't been tested in more than a tiny subset
of use cases.  Please play this work back onto your own branch, and test
it before submitting another PR.
2017-05-07 14:40:12 +10:00
npwoods
536990e77b Overhaul to how MAME handles options (#2260)
This is an overhaul to how MAME handles options to provide a better foundation for what MAME is already doing in practice. Previously, core_options was designed to provide an input/output facility for reading options from the command line and INI files. However, the current needs (image/slot/get_default_card_software calculus and MewUI) go way beyond that.

Broadly, this PR makes the following changes:
* core_options now has an extensibility mechanism, so one can register options that behave dramatically differently
* With that foundation, emu_options now encapsulates all of the funky image/slot/get_default_card_software calculus that were previously handled by static methods in mameopts.cpp. Changes to emu_options should not automatically cascade in such a way so that it stays in a consistent state
* emu_options no longer provides direct access to the slot_options/image_options maps; there are simpler API functions that control these capabilities
* Many core_options functions that expose internal data structures (e.g. - priority) that were only really needed because of previous (now obsolete) techniques have been removed.
* core_options is now exception based (rather than dumping text to an std::string). The burden is on the caller to catch these, and discern between warnings and errors as needed.

Obviously this is a risky change; that's why this is being submitted at the start of the dev cycle.
2017-05-05 16:17:49 +10:00
Vas Crabb
dac6dc4f62 srcclean (nw) 2017-04-23 12:27:42 +10:00
Nathan Woods
c108986639 More options refactoring
This should address outstanding concerns with PR#2231.  I'm trying to turn emu_options into a self contained structure that encapsulates behaviors related to options, including the gymnastics pertaining to image/slot loading and interactions with get_default_card_software() and "just works".

When the MAME 0.186 development cycle starts up, I hope to take this further.  I want to make core_options::entry an abstract base class so that the entries associated with image options and slot options can derive from it.  This will eliminate the current need for emu_options to directly expose maps for image and slot options.

For now, I'm in stabilization mode, and I hope to get things working for a stable 0.185 release.
2017-04-16 13:08:57 -04:00
npwoods
02ea4fd43c Fixes issues specifying image/slot options fron INI files (reported by Robbbert) (#2231)
This fix really doesn't go far enough.  I added hooks so that options specified at the command line can also be responded to when parsed from INI files, but in the long run much of the logic that is currently in mame_options should go into emu_options so that when an option is specified, all of the wacko logic around slot/image specification "just works" because it is encapsulated within emu_options.

We have a release 11 days away; I want to be in stabilization mode.
2017-04-15 22:32:12 +02:00
Nathan Woods
fbb7d927d3 Refactoring in response to MT#6531
Prior to this change, options for images and slots were stored in the emu_options collection.  Anything that might restart the emulation (such as slot changes and images that reset on load) had to manipulate the emu_options structure directly.  The dynamic nature of images and slots meant that some elaborate conventions for setting up this collection had to be understood by clients.

After this change, emu_options has two new members (image_options and slot_options) that expose image and slot selections via an std::map.  Anything that changes images or slots in a fashion that needs to persist across sessions needs to modify these data structures.  Additionally, some of the hairly logic (e.g. - get_default_card_software) now records its data here rather than trying to subvert the core_options system.

This is how MT#6531 was fixed; now when diimage.cpp sees an image that resets on load, it just modifies the image_options structure and forces a reset.  This allowed some further cleanups to happen within diimage.

This should be considered a very risky change, and scrutiny/feedback is welcome.  In particular, there seems to be functionality surrounding device bioses that I'm not 100% sure how it works; the syntax seems to imply that it only works on slot devices.
2017-04-06 11:20:45 +10:00
Vas Crabb
28596c7161 fix crash on excessive command-line options, clean up some tabulation, remove long-dead option 2017-03-03 14:18:58 +11:00
npwoods
709c330a1f Softlist cleanup (#2075)
* Eliminates the need for emu_options::update_cached_options() by providing a hook for when option values change

* This is a preliminary fix to the issue identified in PR#2065

* More softlist related refactoring:
  - We now only parse the command line (with core_options::parse_command_line()) once
  - Options that are set up during slot and image setup go through a 'value_specifier' function
  - Eliminated the command line postprocessing
2017-02-22 23:16:23 +11:00
Vas Crabb
edf64df1db srcclean (nw) 2017-01-22 15:37:37 +11:00
Miodrag Milanovic
b5df96fd37 Fix issue enabling/disabling http (nw) 2017-01-04 19:42:13 +01:00
Miodrag Milanovic
63e3f48775 Added initial HTTP/HTTPS webserver/websocket server support (nw) 2017-01-04 16:15:57 +01:00
Miodrag Milanovic
b73126e85a added OPTION_HOMEPATH to point to read/write folder,for now used by LUA scripts (nw)
Copied all needed files so plugins could be started under UWP
2016-11-12 15:27:22 +01:00
Robbbert
e2718c91de Added swpath. Allows users to specify location of loose software. 2016-10-12 19:37:38 +11:00
Antonio Giner
aa326bd8e6 Implement new option -autostretchxy, to automatically apply
-unevenstretchx or -unevenstretchy based on source native orientation.
2016-08-27 22:12:29 +02:00
Antonio Giner
a976bc2a2a Implement new option -unevenstretchy (complementary to -unevenstretchx) 2016-08-27 22:12:29 +02:00
Miodrag Milanovic
63f9a01f8c Cleanup and version bump 2016-06-29 08:34:30 +02:00
ImJezze
6ea15072a7 Procedural texture for vectors in HLSL
* added simple procedural texture for vectors with rounded line ends and beam smoothness
* added optional -vector_beam_smooth option
* removed -antialias option, antialiasing is now always applied, except for plain D3D
2016-06-05 23:50:44 +02:00
Nathan Woods
d134d16d7d Changed the backing representation of OPTION_UI from being a string to an enum 2016-05-29 10:05:21 -04:00
AJR
d5aa280c10 Move system name lookup into frontend (nw) 2016-04-28 17:29:27 -04:00
Miodrag Milanovic
cfee536f22 Cleanups and version bump 2016-04-27 08:13:59 +02:00
Miodrag Milanovic
4c9c6c8c16 Added file for mame depended handling of opts (nw) 2016-04-22 09:09:39 +02:00
Miodrag Milanovic
682bc90764 Created mame_options as 1st step towards creating core independent of MAME implementation (nw) 2016-04-21 20:52:21 +02:00
dankan1890
1e3037baf7 ui: Re-enabled configuration menu for single-machine and added some options.
Adding handler for the right mouse button in the main menu, calls the machine configuration.
2016-04-15 17:48:05 +02:00
Antonio Giner
cf830e71da Make overscan on integer scaled targets optional (add option -intoverscan). 2016-04-05 23:30:06 +02:00
dankan1890
1fb4b520e1 Fixed MT06171: Specialized ini file settings get retained on a second game launch. 2016-04-01 17:28:13 +02:00
Miodrag Milanovic
913ab1e140 Cleanups and version bump 2016-03-30 08:35:21 +02:00
Miodrag Milanovic
8e41d3105b added -plugins / -noplugins (to enable or disable plugins in total) [Miodrag Milanovic]
and -plugin highscore (will enable just that plugin)
and -noplugin highscore (will disable just that plugin)
plugin/noplugin use comma separated list of plugins
2016-03-29 14:40:40 +02:00
Antonio Giner
bb51885229 Move integer scaling implementation to render_target::compute_visible_area
- Add core option -unevenstretch
- Add core option -unevenstretchx
2016-03-20 21:57:38 +01:00
Antonio Giner
da18057256 Implement integer scaling in core renderer [Calamity] 2016-03-15 01:04:37 +01:00
AJR
2acc33d8a7 Let slot_default in softlists override INIs (but not the command line) 2016-03-09 19:59:25 -05:00
Miodrag Milanovic
3abcaee63f Cleanups and version bump 2016-02-24 07:46:57 +01:00
Miodrag Milanovic
b2a230cd15 placing back UI related settings to emu_options on popular demand (nw) 2016-02-22 09:14:49 +01:00
Miodrag Milanovic
0bc4173bd3 Added multi-language support for MAME [Miodrag Milanovic]
Added sample language to show display in cyrillic use
mame -lang "Serbian (Cyrillic)"
2016-02-20 22:31:41 +01:00
Miodrag Milanovic
ccae0382bb Added plugins and boot.lua as startup script [Miodrag Milanovic] 2016-02-14 10:58:18 +01:00
Michele Fochi
f736cd5abc Added new options:
-[no]exit_after_playback (default=no)
 -[no]record_input (default=no)
Added new UI shortcut to save current timecode (default F12)
Translated variable names and comments to english language
2016-02-08 13:25:25 +01:00
Miodrag Milanovic
6fb757d6a6 move some options to ui.ini (nw) 2016-02-05 15:17:51 +01:00
Miodrag Milanovic
d0162765cd Keep ui options separate from emulator ini file. (nw)
TODO: Need fixing saving of some core settings that could be changed by UI
2016-02-05 14:24:17 +01:00
Miodrag Milanovic
9a28da4f73 added UI parameter, option simple gives back old style start screen, features for configuration and in game stays same as with new (nw) 2016-02-05 08:53:00 +01:00
Miodrag Milanovic
52d97f0dfa more mewui -> ui renames (nw) 2016-02-04 15:14:27 +01:00
Dankan1890
701df7fe9e Initial import of MEWUI to MAME [Dankan1890] 2016-02-04 15:14:24 +01:00