Commit Graph

70 Commits

Author SHA1 Message Date
npwoods
87640fcc1c Workaround for scenarios where both the command line and an INI specify an image option (#2245)
This is a hack; see commentary within the code.  I intend to fix this "for real" when emu_options become more self contained
2017-04-19 14:19:26 +02: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
63e3f48775 Added initial HTTP/HTTPS webserver/websocket server support (nw) 2017-01-04 16:15:57 +01:00
Robbbert
32c554f8da Fixed spelling error (nw) 2016-11-13 11:09:19 +11: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
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
89c5e1f681 Various cleanups suggested by static analyzer (nw) 2016-04-24 12:58:31 +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
Miodrag Milanović
2ee3949169 Merge pull request #823 from ajrhacker/deviter
Iterate over devices C++11 style [AJR]
2016-04-20 09:19:08 +02:00
dankan1890
8b490a9fad Forced reset in order to properly apply some options. (nw) 2016-04-20 05:12:40 +02:00
AJR
084d3654ca Iterate over devices C++11 style
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.
2016-04-18 18:53:28 -04: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
etabeta78
c1600cafd9 diimage.cpp: Allow image devices to be configured with a fixed
(not user selectable) piece of software and updated a few options
and menu to acknowledge such possibility. [Fabio Priuli]

macs.cpp: Converted to use generic cartslot with fixed software
configuration. Cleaned up loading and banking systems in the driver
as a result. [Fabio Priuli]
2016-04-12 14:37:22 +02:00
Antonio Giner
cf830e71da Make overscan on integer scaled targets optional (add option -intoverscan). 2016-04-05 23:30:06 +02:00
AJR
ee12b7d2f7 Revert software-installed slot/image options when changing software
- Remove emu.h's stealth include of emuopts.h through mconfig.h; reduce dependency on emuopts.h in other headers and source files.
- MCFG_CPU_FORCE_NO_DRC is now a CPU configuration parameter rather than a global one; it still works to override the -drc option setting.
2016-04-04 23:46:44 -04:00
Jeffrey Clark
ca3e65e35f refactor miscmenu and add adv menu (nw) 2016-04-03 07:02:38 +00:00
AJR
a7e393b36b Iterate over core classes C++11 style
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).
2016-03-31 09:43:53 -04:00
Scott Stone
28c9be35ea Change INIPATH default to cover new HLSL presets (ini/presets) (nw) 2016-03-30 00:38:08 -04: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
Miodrag Milanovic
e3988ad65e using same check as in clifront, just to check if string is empty (nw) 2016-03-28 08:24:22 +02:00
AJR
beb8dbe1d2 Avoid dereferencing null pointers in set_system_name (nw) 2016-03-27 02:18:33 -04:00
AJR
dee9b2d34a Remember to load software when the system name doesn't change (nw) 2016-03-26 01:43:37 -04:00
AJR
96c6dd3344 Allow software selected from UI to install slot defaults
Prevent clang warning about unused variable in BGFX target_manager (nw)
2016-03-26 01:17:01 -04: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
Vas Crabb
42fbb9c396 Make osd_file a polymorphic class that's held with smart pointers
Make avi_file a class that's held with smart pointers, encapsulate various AVI I/O structures
Make zip_file and _7z_file classes rather than having free functions everywhere
Hide zip/7z class implementation behind an interface, no longer need to call close() to send back to the cache
Don't dump as much crap in global namespace
Add solaris PTY implementation
Improve variable expansion for SDL OSD - supports ~/$FOO/${BAR} syntax
Rearrange stuff so the same things are in file module for all OSDs
Move file stuff into its own module

7z/zip open and destruct are still not thread-safe due to lack of interlocks around cache access
Directory functions still need to be moved to file module
SDL OSD may not initialise WinSock on Windows
2016-03-14 18:55:00 +11:00
Scott Stone
de94132b26 Change default value of autoboot_delay to 0. The LUA scripts themselves can use wait() to delay. (nw) 2016-03-12 04:18:02 -05:00
AJR
2acc33d8a7 Let slot_default in softlists override INIs (but not the command line) 2016-03-09 19:59:25 -05:00
Vas Crabb
73b44c9429 Turn core_file into a proper class that gets cleaned up safely using unique_ptr
Subverted somewhat by chd_file class
2016-03-06 21:49:56 +11:00
Vas Crabb
a830ea7627 * Support *n conversion in stream_format/string_format
* 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
2016-03-01 06:52:36 +11:00
Vas Crabb
aec01e7407 Replace strformat, strprintf and strcatprintf with type-safe steam_format 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
2016-02-28 13:36:19 +11: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