summaryrefslogtreecommitdiffstatshomepage
path: root/src/emu/diimage.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Revert "remove colon as a patch seperator" hap2020-06-191-1/+1
| | | | This reverts commit e07e2c8b017a4f80641a2ae3bbb8566ef51e8a03.
* emu: correct some file headers (nw) hap2020-06-191-1/+1
|
* remove colon as a patch seperator tim lindner2020-05-031-1/+1
|
* softlist_dev.cpp: start adding validation for data areas Vas Crabb2020-04-161-25/+1
| | | | | | | | | | romload.cpp: reduce copy-pasta (nw) (nw) I fixed the errors found by adding validation to software list data areas. Most of them seem to be simple copy-paste errors hidden by the fact that the default device_image_interface loader ignores the data area size (as opposed to the "ROM" loader). There was one C64 cartridge with a missing zero on the data area size that was pretty clearly wrong.
* ROM loading cleanup: Vas Crabb2020-04-151-85/+62
| | | | | | | | | | | | | | * More flexible constructors for path_iterator and emu_file * More straightforward system/device ROM loading and software loading when using ROM loader * Proper parent walk when searching for identical CHDs with different names from software list * Fixed hangs if software item parents form a loop * Fixed layouts being loaded from bogus empty paths Note that there are changes in behaviour: * For software list ROMs/disks, MAME will now search the software path before searching the machine path * The search path for the owner of the software list device is used, which may not be the driver itself * MAME will no longer load loose CHDs from the media path - it's just too unwieldy with the number of supported systems * MAME will no longer search archives above the top level of the media path
* fixed some clang-tidy warnings (nw) (#6229) Oliver Stöneberg2020-01-291-1/+1
| | | | | | | | | | | | | | | | * fixed some readability-static-accessed-through-instance clang-tidy warnings (nw) * fixed some readability-redundant-string-cstr clang-tidy warnings (nw) * fixed some readability-redundant-control-flow clang-tidy warnings (nw) * fixed some modernize-use-nullptr clang-tidy warnings (nw) * fixed some performance-faster-string-find clang-tidy warnings (nw) * fixed some performance-for-range-copy clang-tidy warnings (nw) * fixed some performance-unnecessary-value-param clang-tidy warnings (nw)
* fixed some clang-tidy warnings (nw) (#6197) Oliver Stöneberg2020-01-221-6/+6
| | | | | | | | | | | | | | * fixed some bugprone-throw-keyword-missing clang-tidy warnings (nw) * fixed some modernize-use-nullptr clang-tidy warnings (nw) * fixed some readability-delete-null-pointer clang-tidy warnings (nw) * fixed some performance-faster-string-find clang-tidy warnings (nw) * fixed some performance-for-range-copy clang-tidy warnings (nw) * fixed some readability-redundant-string-cstr clang-tidy warnings (nw)
* start putting noexcept on things that have no business throwing exceptions, ↵ Vas Crabb2019-11-101-7/+8
| | | | starting with diimage. also fix a slight bug in the interface matching function for software list parts. (nw)
* Make osd_printf_* use util/strformat semantics. Vas Crabb2019-09-261-5/+5
| | | | | | | | | | | | | | | | | (nw) This has been a long time coming but it's here at last. It should be easier now that logerror, popmessage and osd_printf_* behave like string_format and stream_format. Remember the differences from printf: * Any object with a stream out operator works with %s * %d, %i, %o, %x, %X, etc. work out the size by magic * No sign extending promotion to int for short/char * No widening/narrowing conversions for characters/strings * Same rules on all platforms, insulated from C runtime library * No format warnings from compiler * Assert in debug builds if number of arguments doesn't match format (nw) Also removed a pile of redundant c_str and string_format, and some workarounds for not being able to portably format 64-bit integers or long long.
* -avivideo.cpp: Added an image device to provide looping uncompressed AVI ↵ mooglyguy2019-09-231-20/+21
| | | | | | frames as input. [Ryan Holtz] -vino.cpp: Adapted to support both avivideo_image_device and picture_image_device. [Ryan Holtz]
* (nw) misc cleanup: Vas Crabb2019-09-201-3/+6
| | | | | * get rid of most assert_always * get rid of a few MCFG_*_OVERRIDE
* Add still-frame PNG image device for use by digitizers/cameras/etc. [R. Belmont] arbee2019-08-091-1/+2
| | | | Other formats can be added, we already have libjpeg in 3rdparty/.
* (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
| |