summaryrefslogtreecommitdiffstatshomepage
path: root/src/emu/image.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Include option and file names in fatal error message for failure to load image AJR2018-03-221-2/+4
|
* Revert "(nw) Fixed random crashing when swapping one slot device with another." Vas Crabb2017-08-061-1/+1
| | | | | | | | This reverts commit 9968fc71b08b2a27e930d02333cb813977a37cbd. 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.
* (nw) Fixed random crashing when swapping one slot device with another. Robbbert2017-08-061-1/+1
|
* Cleanup/bulletproofing to the issue Wizz just found Nathan Woods2017-07-241-8/+5
|
* (nw) Save partname to inifile, so that the correct part is loaded next time. Robbbert2017-07-241-0/+5
|
* never hurts to srcclean (nw) Vas Crabb2017-07-091-2/+2
|
* Fixed sorcerer unmount issue reported by Robert Nathan Woods2017-06-301-2/+3
| | | | | | Report from Robert: Start mame sorcerer, then enter the slots menu, empty the rs232 slot, then choose Reset. It crashes with an access violation.
* Fixed issue loading reset_on_load() images (#2414) Nathan Woods2017-06-271-2/+5
|
* more srcclean (nw) Vas Crabb2017-06-251-4/+4
|
* Overhaul to how MAME handles options, take two (#2341) npwoods2017-06-251-32/+13
|
* Fixed 2 bugs Robbbert2017-05-251-3/+8
| | | | | 1. If either a multipart softlist item was loaded, or a single-part item loaded into a system with more than one of the same media slot, then a reset would cause a fatal error. 2. If a non-existing image was listed in the ini, it would fatal error at start and there was no way to fix it except by hand-editing the ini file. This restores the previous behaviour of ejecting the bad image with the first error.
* Revert "Overhaul to how MAME handles options (#2260)" Vas Crabb2017-05-071-3/+28
| | | | | | | | | | | | 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-28/+3
| | | | | | | | | | | | 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.
* Workaround for issue where the cannonical instance_name for a device was ↵ npwoods2017-04-211-1/+27
| | | | | lost (#2248) This is a hack; details are in the source code. I felt that it was too late in the 0.185 release cycle to do anything intrusive. I intend to fix this "for real" when image/slot option morphing is encapsulated within emu_options.
* Fixed an issue where reset_on_load images would not properly persist across ↵ npwoods2017-04-191-10/+15
| | | | emulation sessions (#2244)
* More options refactoring Nathan Woods2017-04-161-15/+15
| | | | | | | | 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.
* Refactoring in response to MT#6531 Nathan Woods2017-04-061-12/+9
| | | | | | | | | | 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.
* Changed a few more 'const char *' ==> 'const std::string &' (#2111) npwoods2017-03-041-4/+4
|
* XML refactoring: Vas Crabb2016-12-111-18/+12
| | | | | | | * move stuff to namespace util::xml * scope down some enums * split config load/save delegate types * make config load take const so it can't mangle data
* Turn xmlfile API into something that looks like C++ Vas Crabb2016-11-171-7/+7
| | | | It's still a bit quirky but it's far better encapsulated before, and it plays nice with const (nw)
* Do not use FUNC in delegate where applicable (nw) Miodrag Milanovic2016-11-061-2/+2
|
* Allows devices to indicate whether image creation should be supported at the ↵ Nathan Woods2016-09-061-0/+4
| | | | | | | | command line This addresses MT bug #6372. The prior issue is that creating serial and/or printer output relied on how image_load() would create images that were not there. This behavior was not universally desirable (the consensus was that it was wrong for disk images, up in the air for cassettes etc). This change makes it possible for devices to control this behavior. Currently I have it associated with image_type(); this might not be the ideal fix.
* device_image_interface::software_name_split() ==> ↵ Nathan Woods2016-08-101-8/+2
| | | | | | softlist.cpp:software_name_parse() Also consolidated with code that performed a quick pass to identify whether a piece of text is a software name
* UI-related cleanup (nw) AJR2016-08-091-17/+0
| | | | - Create class ui::machine_info for holding calculated machine info and generating descriptive strings for the UI. This absorbs a number of unimportant core functions that existed only for the UI's convenience.
* More conversion of 'const char *' --> std::string in diimage Nathan Woods2016-08-041-1/+1
|
* Fixed issue that prevented softlist items specified on devices from loading Nathan Woods2016-08-011-7/+8
| | | | | | | | | | The issue is that I expected any softlist items passed to devices to be fully qualified (e.g. - apple2e:flop1:agentusa) when in reality, they might not be. Therefore, I changed the regex that identifies softlist items passed to devices from: \\w+\\:\\w+\\:\\w+ to: \\w+(\\:\\w+\\:\\w+)?
* Changed device_image_interface::load() to take 'const std::string &' Nathan Woods2016-08-011-1/+1
|
* Turn image init/validate into scoped enums to avoid accidental casts to/from ↵ Vas Crabb2016-08-011-4/+4
| | | | | | integer and boolean types The image error should also be turned into a scoped enum - the menus were assuming it was the same thing as an init result
* Changed device_image_interface::load() so that it is no longer responsible ↵ Nathan Woods2016-07-301-13/+29
| | | | | | for both loading images and softlist items; now the latter is done through a new method - device_image_interface::load_software()
* Split UI and frontend part from core [Miodrag Milanovic] Miodrag Milanovic2016-04-231-2/+2
|
* Iterate over devices C++11 style AJR2016-04-181-45/+35
| | | | | | 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.
* diimage.cpp: Allow image devices to be configured with a fixed etabeta782016-04-121-0/+4
| | | | | | | | | (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]
* Make osd_file a polymorphic class that's held with smart pointers Vas Crabb2016-03-141-2/+2
| | | | | | | | | | | | | | | 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
* Cleanups and version bumpmame0170 Miodrag Milanovic2016-01-271-2/+1
|
* Revert "rest of device parameters to std::string (nw)" Miodrag Milanovic2016-01-201-2/+2
| | | | This reverts commit caba131d844ade3f2b30d6be24ea6cf46b2949d7.
* rest of device parameters to std::string (nw) Miodrag Milanovic2016-01-161-2/+2
|
* Fix image unload (nw) Miodrag Milanovic2016-01-141-2/+11
|
* image_manager modernized and move some things around (nw) Miodrag Milanovic2016-01-111-205/+70
|
* Merge pull request #561 from ajrhacker/strings Miodrag Milanović2016-01-111-2/+1
|\ | | | | Return std::string objects by value rather than pass by reference [ajrhacker]
| * Return std::string objects by value rather than pass by reference AJR2016-01-101-2/+1
| | | | | | | | | | | | - 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
* | modernized configuration_manager (nw) Miodrag Milanovic2016-01-101-5/+5
|/
* clang-modernize part 1 (nw) Miodrag Milanovic2015-12-031-19/+19
|
* Rename *.c -> *.cpp in our source (nw) Miodrag Milanovic2015-11-081-0/+373