summaryrefslogtreecommitdiffstatshomepage
path: root/src/emu/diimage.cpp
Commit message (Collapse)AuthorAgeFilesLines
* (nw) Clean up the mess on master Vas Crabb2019-03-261-0/+4
| | | | | | | | | | | | | This effectively reverts b380514764cf857469bae61c11143a19f79a74c5 and c24473ddff715ecec2e258a6eb38960cf8c8e98e, restoring the state at 598cd5227223c3b04ca31f0dbc1981256d9ea3ff. Before pushing, please check that what you're about to push is sane. Check your local commit log and ensure there isn't anything out-of-place before pushing to mainline. When things like this happen, it wastes everyone's time. I really don't need this in a week when real work™ is busting my balls and I'm behind where I want to be with preparing for MAME release.
* Revert "conflict resolution (nw)" andreasnaive2019-03-251-4/+0
| | | | | This reverts commit c24473ddff715ecec2e258a6eb38960cf8c8e98e, reversing changes made to 009cba4fb8102102168ef32870892438327f3705.
* Make -nonvram_save also inhibit saving of "battery" NVRAM for image devices AJR2019-02-191-0/+4
|
* Move ROM loading macros to romentry.h and remove romload.h from emu.h (nw) AJR2018-06-241-0/+1
|
* move some not-directly-emulation-related helpers to lib/util, further ↵ Vas Crabb2018-04-011-16/+16
| | | | extricate emu.h from tools (nw)
* Fix issue 2468 Olivier Galibert2017-07-131-8/+12
|
* Fixed issue loading reset_on_load() images (#2414) Nathan Woods2017-06-271-1/+5
|
* Overhaul to how MAME handles options, take two (#2341) npwoods2017-06-251-5/+6
|
* srcclean (nw) Vas Crabb2017-05-281-1/+1
|
* Fixed issue when the hash length is zero (#2314) npwoods2017-05-281-61/+57
| | | | | | | | | | * Fixed issue when the hash length is zero The following is illegal, even if no elements in the pointer are accessed: std::vector<my_struct> my_vec(0); // create an empty std::vector my_struct *ptr = &my_vec[0]; While this is a degenerate scenario, this should be fixed
* general cleanup: Vas Crabb2017-05-231-2/+2
| | | | | | | | | | | * move rarely-used output and pty interfaces out of emu.h * consolidate and de-duplicate forward declarations, also remove some obsolete ones * clean up more #include guard macros * scope down a few more things (nw) Everyone, please keep forward declarations for src/emu in src/emu/emufwd.h - this will make it far easier to keep them in sync with declarations than having them scattered through all the other files.
* Copy longname, manufacturer, year, filetype, etc. for image info in all ↵ AJR2017-05-101-22/+17
| | | | softlisted cases
* Revert "Overhaul to how MAME handles options (#2260)" Vas Crabb2017-05-071-6/+5
| | | | | | | | | | | | 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-5/+6
| | | | | | | | | | | | 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.
* Fixed an issue that could cause problems when loading reset_on_load devices ↵ Nathan Woods2017-04-301-7/+7
| | | | | | (like cartridges) from softlists at runtime This was not guaranteed to cause a problem; the specific issue here was reported by mr_gw in the context of the CoCo, and the proximate issue (hanging) was in CoCo-specific code. That said, this could cause problems elsewhere.
* srcclean (nw) Vas Crabb2017-04-231-3/+3
|
* Changes to make get_default_card_software() less stupid Nathan Woods2017-04-101-43/+22
| | | | | | | | | | The goals with this change is to make get_default_card_software() a bit more standalone by making it a const method that does not mutate the state of the device_image_interface. This is done by passing in a small structure that encapsulates the minimum of information that get_default_card_software() needs. This also eliminates the need for device_image_interface::open_image_file() I agree with Sarayan that get_default_card_software() is terrible and needs to ultimately go away. This is a small step in that direction. Lastly, I don't care for the name of get_default_card_software_hook (or get_default_card_software() for that matter). If anybody has better ideas, let me know.
* Fixed some regressions introduced in my recent refactoring related to ↵ npwoods2017-04-081-20/+17
| | | | | | | | | | software lists (#2217) This fixes crashes invoked by the following command lines mame nes zelda mame gamate cubeup These had two independent causes. The first crash was a consequence of open_image_file() doing something inappropriate required by implementations of get_default_card_software(). The second crash was a failure to access image options moved outside the core_options structure.
* Refactoring in response to MT#6531 Nathan Woods2017-04-061-60/+63
| | | | | | | | | | 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.
* Rename the write-only -printer image instance type to -printout. The former ↵ AJR2017-03-311-1/+1
| | | | option name conflicts with RS232 printer ports in several drivers.
* Changed a few more 'const char *' ==> 'const std::string &' (#2111) npwoods2017-03-041-2/+2
|
* Make device_image_interface::update_names a private method called ↵ AJR2017-03-031-0/+15
| | | | automatically at config_complete time (nw)
* Image instance name refactoring and bug fixing (nw) AJR2017-03-021-8/+14
| | | | | - update_names no longer takes arguments; the device type can be obtained easily, and the custom instance names are now overrides. Devices might not need to explicitly call update_names in the future. - Fix the frontend crash/assert failure resulting from instance names not being generated properly.
* Self-registering devices. Vas Crabb2017-03-031-2/+2
| | | | | | * MAME now walks all devices when generating -lx output irrespective of whether they're actually instantiated anywhere or not. * -lx is at least 30% faster than previous implementation. * Only possible drawback is that filtering drivers no longer filters devices.
* device_image_interface cleanups (nw) AJR2017-02-271-36/+40
| | | | | | | - Replace comparisons of software_entry() or part_entry() with nullptr with loaded_through_softlist() predicate. - Eliminate the superfluous m_software_info_ptr member. The software_entry() accessor is still provided, but now rarely used. - Eliminate two of the three arguments to load_software_part. - Remove some unnecessary auto-typing in ui/inifile.cpp.
* Revert "Make "requirement" field in softlists actually work (MT 6464)" Vas Crabb2017-02-191-32/+15
| | | | This reverts commit 17af0f9c661e0855607703faf66c1e807e888d82.
* Make "requirement" field in softlists actually work (MT 6464) AJR2017-01-111-15/+32
| | | | (nw) MAME's architecture for software loading remains gruesomely overcomplicated, and this makes it even less efficient than it already was. However, I think more invasive cleanups would best be left until later.
* Introduce u8/u16/u32/u64/s8/s16/s32/s64 Vas Crabb2016-11-191-20/+20
| | | | | | | | | | | | * 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
* Revert "Added IS_ENABLED, so we have compiler check for non used part, it is ↵ Miodrag Milanovic2016-11-121-2/+2
| | | | | | checked but not compiled in (nw)" This reverts commit c0407f073bf7afe26407c4add5cfeaf7104913c9.
* Added IS_ENABLED, so we have compiler check for non used part, it is checked ↵ Miodrag Milanovic2016-11-111-2/+2
| | | | | | but not compiled in (nw) false and true now used instead of integer where used as bool
* NOTICE (TYPE NAME CONSOLIDATION) Miodrag Milanovic2016-10-221-20/+20
| | | | | 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
* dynamic_buffer is just std::vector<UINT8> (nw) Miodrag Milanovic2016-10-211-1/+1
|
* Added swpath. Allows users to specify location of loose software. Robbbert2016-10-121-4/+22
|
* srcclean (nw) Vas Crabb2016-09-261-2/+2
|
* Merge pull request #1332 from npwoods/option_guide_and_imgtool Vas Crabb2016-09-101-0/+12
|\ | | | | option_guide C++-ification, touched up imgtool
| * Worked around the OPTION_GUIDE_EXTERN issue by using a crazy trick involving ↵ Nathan Woods2016-09-031-1/+1
| | | | | | | | | | | | | | | | namespaces Caveats: 1. Because of how this trick works, it is no longer possible to declare an option guide as static, so I had to make a bunch of changes 2. I'm going to want the hardcore C++ guys (i.e. - Vas) to review this with a fine toothed comb
| * Attempting to make option_guide and option_guide::entry POD types; need to ↵ Nathan Woods2016-09-021-1/+2
| | | | | | | | figure out a better way to do OPTION_GUIDE_EXTERN
| * Moving null_option_guide to global scope to avoid thread safety issues Nathan Woods2016-09-011-1/+2
| |
| * option_guide C++-ification, touched up imgtool Nathan Woods2016-08-271-0/+10
| | | | | | | | | | | | The main point of this change is to C++-ify option_guide. It was changed from a struct array to a class, namespaced etc, with the ultimate hope of incorporating an in-emulation image creation UI. Imgtool got hit with a number of changes; I'll probably have to bring that off of the backburner and touch that up too
* | Merge pull request #1290 from npwoods/set_filetype_for_softlist_images Vas Crabb2016-09-091-1/+3
|\ \ | | | | | | Now setting m_filetype for images loaded from softlists
| * | Changed the "extension as filetype" behavior for software list images to be ↵ Nathan Woods2016-08-251-1/+1
| | | | | | | | | | | | | | | | | | opt in behavior It sounds like whether it is up in the air whether softlist file types should be derived from file extensions. Fair enough. This patch alters the earlier proposal so this at the very least becomes opt in behavior so that an ugly hack does not have to be replicated in client code in a potentially inconsistent and buggy fashion.
| * | Now setting m_filetype for images loaded from softlists Nathan Woods2016-08-221-1/+3
| | |
* | | Allows devices to indicate whether image creation should be supported at the ↵ Nathan Woods2016-09-061-0/+38
| | | | | | | | | | | | | | | | | | | | | | | | 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.
* | | srcclean and translation regeneration Vas Crabb2016-08-291-1/+1
| |/ |/|
* | Minor cleanups to device_image_interface::find_software_item() Nathan Woods2016-08-201-4/+4
| |
* | Standardized some names for softlist concepts Nathan Woods2016-08-201-15/+15
|/ | | | | | | - "identifier" for a potentially fully qualified way to reference a software item (e.g. - apple2gs:3stooges:flop1) - "list_name" for the name of a list (e.g. - apple2gs or a800_flop) - "software_name" for the name of a software item (e.g. - 3stooges) - "part_name" for the name of a part (e.g. - flop1)
* Changing device_image_interface::determine_open_plan() to not support ↵ Nathan Woods2016-08-191-15/+13
| | | | | | creating an image unless device_image_interface::create() is used I'm somewhat surprised that this has not bit us until now. The implication of how it used to work is that device_image_interface::load() could actually create images; it is hard to eliminate the possibility that something might be incorrectly relying on this behavior. I've determined that this isn't the case for imgcntrl.cpp and floppycntrl.cpp
* Merge pull request #1222 from npwoods/move_software_name_parsing Vas Crabb2016-08-131-48/+2
|\ | | | | device_image_interface::software_name_split() ==> softlist.cpp:software_name_parse()
| * device_image_interface::software_name_split() ==> ↵ Nathan Woods2016-08-101-49/+3
| | | | | | | | | | | | 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
* | Converted more softlist code to use std::string Nathan Woods2016-08-101-4/+4
|/