summaryrefslogtreecommitdiffstatshomepage
path: root/src/lib/util/options.h
Commit message (Collapse)AuthorAgeFilesLines
* -options: Restored erroneously-removed game-specific INI option reversion ↵ mooglyguy2018-10-051-0/+3
| | | | between runs. Fixes MT#06171. [Ryan Holtz]
* more srcclean (nw) Vas Crabb2017-06-251-1/+1
|
* Overhaul to how MAME handles options, take two (#2341) npwoods2017-06-251-117/+181
|
* srcclean (nw) Vas Crabb2017-05-281-1/+1
|
* Bug fix to -romident and aux verb cleanup (take two) (#2299) npwoods2017-05-131-0/+2
| | | | | | | | | | * Resurrected auxverb_cleanup_and_romident_bugfix * Changed usage for -romident and minor cleanups * Supporting auxverbs in any order The previous patch was supporting 'mame64 -listsource pacman' but not 'mame64 pacman -listsource'
* Revert "Bug fix to -romident and aux verb cleanup (#2288)" Vas Crabb2017-05-121-2/+0
| | | | This reverts commit 78bf804192f38d69fc9299dc7da724fb6a537f94.
* Bug fix to -romident and aux verb cleanup (#2288) npwoods2017-05-121-0/+2
| | | | | | | | | | | | | | | | | | | | * Bug fix to -romident and aux verb cleanup Made the following changes: 1. Fixed a bug where resolved slot/image options would choke -romident (reproducible in MAME 0.185 with 'mame64 -romident coco.zip') 2. 'mame64 -romident' no longer crashes (though it doesn't do anything useful) 3. Changed the aux verb functions to take 'const std::string &' * Further cleanups to auxillary verb code, as per Vas Specifically: 1. The commands themselves now take 'const std::vector<std::string> &' for their argument lists 2. util::core_options now collects command arguments into a separate vector rather than treating them as unadorned arguments * Vas Crabb feedback * Now only using trim_spaces_and_quotes() when parsing INIs Vas pointed out that it is inappropriate to trim spaces and quotes when parsing command line options
* Changed 'int ignore_warnings' parameter on core_options::parse_ini_file() to ↵ Nathan Woods2017-05-101-1/+1
| | | | be 'bool ignore_unknown_options'
* Revert "Overhaul to how MAME handles options (#2260)" Vas Crabb2017-05-071-177/+117
| | | | | | | | | | | | This reverts commit 536990e77b49ccc50ef275bfbf1018cc29c16154. 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.
* Overhaul to how MAME handles options (#2260) npwoods2017-05-051-117/+177
| | | | | | | | | | | | 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.
* Pruned out some cruft in src/lib/util/options.[cpp|h] Nathan Woods2017-04-171-8/+4
|
* More options refactoring Nathan Woods2017-04-161-1/+10
| | | | | | | | 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.
* Fixes issues specifying image/slot options fron INI files (reported by ↵ npwoods2017-04-151-0/+2
| | | | | | | 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.
* fix crash on excessive command-line options, clean up some tabulation, ↵ Vas Crabb2017-03-031-1/+1
| | | | remove long-dead option
* Fixed regression pertaining to specification of empty strings as slot names Nathan Woods2017-02-271-1/+1
| | | | e.g. - 'next -scsibus:1 "" -listdevices'
* Fixed an issue where device options (e.g. -cart) were reported as unknown ↵ Nathan Woods2017-02-221-3/+3
| | | | | | | | when they actually worked This change also changes around how command line arguments are passed around; specifically I changed argc/argv to be std::vector<std::string> Note this is not passed around 'const', the reason being that the command line processing will now "eat" the vector
* Softlist cleanup (#2075) npwoods2017-02-221-0/+4
| | | | | | | | | | * 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
* Reverting part of changes from previous commits as described in mail on list ↵ Miodrag Milanovic2016-10-231-1/+1
| | | | (nw)
* there you go (nw) Miodrag Milanovic2016-10-221-1/+1
|
* NOTICE (TYPE NAME CONSOLIDATION) Miodrag Milanovic2016-10-221-12/+12
| | | | | 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
* some bool <-> int not needed conversions, also cleaned drivenum.* was using ↵ Miodrag Milanovic2016-10-211-1/+1
| | | | memset for clearing vector (nw)
* std::min and std:max instead of MIN and MAX, also some more macros converted ↵ Miodrag Milanovic2016-07-311-1/+1
| | | | to inline functions (nw)
* Various cleanups suggested by static analyzer (nw) Miodrag Milanovic2016-04-241-1/+0
|
* Revert software-installed slot/image options when changing software AJR2016-04-041-2/+2
| | | | | - 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.
* Small changes. (nw) dankan18902016-04-031-1/+1
|
* refactor miscmenu and add adv menu (nw) Jeffrey Clark2016-04-031-0/+1
|
* Avoid auto return types; silence some unused variable warnings (nw) AJR2016-03-311-2/+3
|
* Iterate over core classes C++11 style AJR2016-03-311-0/+4
| | | | | | | | 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).
* Turn core_file into a proper class that gets cleaned up safely using unique_ptr Vas Crabb2016-03-061-1/+1
| | | | Subverted somewhat by chd_file class
* Cleanups and version bump Miodrag Milanovic2016-02-241-1/+1
|
* MAME related settings are saved on request only (nw) Miodrag Milanovic2016-02-061-0/+5
|
* Return std::string objects by value rather than pass by reference AJR2016-01-101-2/+2
| | | | | | - strprintf is unaltered, but strformat now takes one fewer argument - state_string_export still fills a buffer, but has been made const - get_default_card_software now takes no arguments but returns a string
* tagmap_t to std::unordered_map or std::unordered_set where applicable (nw) Miodrag Milanovic2015-12-091-2/+2
|
* clang-modernize part 1 (nw) Miodrag Milanovic2015-12-031-4/+4
|
* moved all to std::string (nw) Miodrag Milanovic2015-04-221-14/+14
|
* removed bool conversion and implicit empty check (nw) Miodrag Milanovic2015-04-191-2/+2
|
* There is no implicit conversion to char* in std::string (nw) Miodrag Milanovic2015-04-121-5/+5
|
* cstr() - > c_str() as preparation for move to std::string (nw) Miodrag Milanovic2015-04-111-1/+1
|
* Changed osd_font to struct osd_font and removed unnecessary osdepend.h couriersud2015-01-171-1/+0
| | | includes.
* -Reorganized OSD, handling more sound output systems and debuggers, defaults ↵ Miodrag Milanovic2014-05-081-0/+3
| | | | | | left same as before [Miodrag Milanovic] -Created osd_options as base option class for non-system specific options
* Cleanups and version bumpmame0153 Miodrag Milanovic2014-04-071-1/+1
|
* Moved core template container classes up from emutempl.h to coretmpl.h: Aaron Giles2014-03-111-6/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | [Aaron Giles] * these classes now no longer take a resource_pool; everything is managed globally -- this means that objects added to lists must be allocated with global_alloc * added new auto_pointer<> template which wraps a pointer and auto-frees it upon destruction; it also defaults to NULL so it doesn't need to be explicitly initialized * moved tagged_list template to tagmap.h Redo of the low-level memory tracking system: [Aaron Giles] * moved low-level tracking out of emu\emualloc into lib\util\corealloc so it can be shared among all components and used by core libraries * global_alloc and friends no longer use a resource pool to track allocations; turns out this was a wholly redundant system that wasted a lot of memory * removed global_resource_pool entirely * added global_free_array to delete arrays allocated with global_alloc_array * added tracking of object versus array allocation; we will now error if you use global_free on an array, or global_free_array on an object Added new utility helper const_string_pool which can be used to efficiently accumulate strings that are not intended to be modified. Used by updated makelist and software list code. [Aaron Giles] Updated png2bdc and makelist tools to not leak memory and use more modern techniques (no more MAX_DRIVERS in makelist, for example). [Aaron Giles] Deprecated auto_strdup and removed all uses by way of caller-managed astrings and the software list rewrite. [Aaron Giles] Rewrote software list management: [Aaron Giles] * removed the notion of a software_list that is separate from a software_list_device; they are one and the same now * moved several functions into device_image_interface since they really didn't belong in the core software list class * lots of simplification as a result of the above changes Additional notes (no whatsnew): Moved definition of FPTR to osdcomm.h. Some changes happened in the OSD code to fix issues, especially regarding freeing arrays. SDL folks may need to fix up some of these. The following devices still are using tokens and should be modernized (I found them because they kept their token as void * and tried to delete it, which you can't): namco_52xx_device (mame/audio/namco52.c) namco_54xx_device (mame/audio/namco54.c) namco_06xx_device (mame/machine/namco06.c) namco_50xx_device (mame/machine/namco50.c) namco_51xx_device (mame/machine/namco51.c) namco_53xx_device (mame/machine/namco53.c) voodoo_device (emu/video/voodoo.c) mos6581_device (emu/sound/mos6581.c) aica_device (emu/sound/aica.c) scsp_device (emu/sound/scsp.c) dmadac_sound_device (emu/sound/dmadac.c) s3c2440_device (emu/machine/s3c2440.c) wd1770_device (emu/machine/wd17xx.c) latch8_device (emu/machine/latch8.c) duart68681_device (emu/machine/68681.c) s3c2400_device (emu/machine/s3c2400.c) s3c2410_device (emu/machine/s3c2410.c) strataflash_device (mess/machine/strata.c) hd63450_device (mess/machine/hd63450.c) tap_990_device (mess/machine/ti99/990_tap.c) omti8621_device (mess/machine/omti8621.c) vdt911_device (mess/video/911_vdt.c) apollo_graphics_15i (mess/video/apollo.c) asr733_device (mess/video/733_asr.c)
* Bulk convert files that already had standard BSD license in my name Aaron Giles2013-10-161-31/+2
| | | | to new license tagged form.
* (MESS) Be a bit more fine-grained in when to mark slot options as internal. (nw) Wilbert Pol2013-02-271-0/+2
|
* Don't save out internally determined settings to .ini files. (nw) Wilbert Pol2013-02-211-0/+2
|
* Cleanups and version bumpmame0148 Miodrag Milanovic2013-01-111-33/+33
|
* Made cmd line parameter parsing going into unlimited levels (no whatsnew) Miodrag Milanovic2012-09-041-1/+1
|
* Added support for fixed slots (used for MAME) and ability to create internal ↵ Miodrag Milanovic2012-05-231-0/+2
| | | | only slot options (for MESS) (no whatsnew)
* Added support for multi level slot devices [Miodrag Milanovic] Miodrag Milanovic2011-06-271-0/+1
| | | | Now it is possible to attach slot device to other slot device, also containing multiple image devices under it.
* Cleanups and version bump.mame0141u4 Aaron Giles2011-03-251-7/+7
|