summaryrefslogtreecommitdiffstatshomepage
path: root/src/emu/diimage.h
Commit message (Collapse)AuthorAgeFilesLines
* emumem: Simplify memory management. [O. Galibert] Olivier Galibert2020-11-021-3/+3
| | | | | | | | | | | | | | | | | | | | API impact: - install_ram/rom/writeonly now requires a non-null pointer. If you want automatically managed ram, add it to a memory map, not in machine_start - install_*_bank now requires a memory_bank *, not a string - one can create memory banks outside of memory maps with memory_bank_creator - one can create memory shares outside of memory maps with memory_share_creator Memory maps impact: - ram ranges with overlapping addresses are not shared anymore. Use .share() - ram ranges touching each other are not merged anymore. Stay in your range Extra note: - there is no need to create a bank just to dynamically map some memory/rom. Just use install_rom/ram/writeonly
* start putting noexcept on things that have no business throwing exceptions, ↵ Vas Crabb2019-11-101-40/+40
| | | | starting with diimage. also fix a slight bug in the interface matching function for software list parts. (nw)
* -avivideo.cpp: Added an image device to provide looping uncompressed AVI ↵ mooglyguy2019-09-231-1/+2
| | | | | | 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-1/+1
| | | | | * 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/.
* Use canonical spelling of "canonical" (nw) AJR2019-08-021-1/+1
|
* diimage.h: Fix typo (nw) AJR2019-08-021-1/+1
|
* srcclean (nw) Vas Crabb2019-07-281-4/+4
|
* -core: Removed almost all MCFG defines, and removed all remaining ↵ MooglyGuy2019-07-021-3/+0
| | | | MACHINE_CONFIG_START/END uses. [Ryan Holtz]
* -imagedev/harddriv: Removed MCFG macros. [Ryan Holtz] mooglyguy2019-06-301-14/+7
| | | | -generic/slot: Removed MCFG macros. [Ryan Holtz]
* move some not-directly-emulation-related helpers to lib/util, further ↵ Vas Crabb2018-04-011-1/+1
| | | | extricate emu.h from tools (nw)
* destaticify initializations (nw) (#3289) wilbertpol2018-03-041-8/+2
| | | | | | * destaticify initializations (nw) * fix this->set_screen (nw)
* Fixed issue loading reset_on_load() images (#2414) Nathan Woods2017-06-271-0/+3
|
* Overhaul to how MAME handles options, take two (#2341) npwoods2017-06-251-2/+4
|
* Fixed issue when the hash length is zero (#2314) npwoods2017-05-281-7/+3
| | | | | | | | | | * 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-8/+0
| | | | | | | | | | | * 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.
* Revert "Overhaul to how MAME handles options (#2260)" Vas Crabb2017-05-071-4/+2
| | | | | | | | | | | | 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-2/+4
| | | | | | | | | | | | 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-1/+1
| | | | | | (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-1/+1
|
* Made a number of device_image_interface members private (#2227) npwoods2017-04-171-1/+1
| | | | | | | | * Made a number of device_image_interface members private This also fixes a number of get_default_card_software() implementations that were accessing m_file incorrectly * Remove duplicate prototype
* More options refactoring Nathan Woods2017-04-161-0/+1
| | | | | | | | 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.
* Changes to make get_default_card_software() less stupid Nathan Woods2017-04-101-3/+3
| | | | | | | | | | 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.
* Refactoring in response to MT#6531 Nathan Woods2017-04-061-5/+8
| | | | | | | | | | 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.
* Fixed regression when loading multipart softlists Nathan Woods2017-03-201-1/+1
| | | | Pernod found a regression introduced in the 0.183 softlist refactoring whereby multi-part softlist items would not distribute to multiple slots. The problem was that the old code was relying on the image slots being loaded into the core. This is not the way the new system works, so I've added a hook into software_list_device::find_mountable_image() that allows the new approach to work.
* 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-1/+4
| | | | automatically at config_complete time (nw)
* Image instance name refactoring and bug fixing (nw) AJR2017-03-021-1/+3
| | | | | - 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 prep: Vas Crabb2017-02-271-1/+1
| | | | | | | | | | | | | | * Make device_creator a variable template and get rid of the ampersands * Remove screen.h and speaker.h from emu.h and add where necessary * Centralise instantiations of screen and speaker finder templates * Add/standardise #include guards in many hearers * Remove many redundant #includes * Order #includesr to help catch headers that can't be #included alone (nw) This changes #include order to be prefix, unit header if applicable then other stuff roughly in order from most dependent to least dependent library. This helps catch headers that don't #include things that they use.
* device_image_interface cleanups (nw) AJR2017-02-271-4/+3
| | | | | | | - 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.
* Introduce u8/u16/u32/u64/s8/s16/s32/s64 Vas Crabb2016-11-191-19/+19
| | | | | | | | | | | | * 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
* Do not use FUNC in delegate where applicable (nw) Miodrag Milanovic2016-11-061-2/+2
|
* NOTICE (TYPE NAME CONSOLIDATION) Miodrag Milanovic2016-10-221-16/+16
| | | | | 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
* Merge pull request #1332 from npwoods/option_guide_and_imgtool Vas Crabb2016-09-101-2/+2
|\ | | | | option_guide C++-ification, touched up imgtool
| * option_guide C++-ification, touched up imgtool Nathan Woods2016-08-271-2/+2
| | | | | | | | | | | | 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-0/+1
|\ \ | | | | | | 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-0/+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.
* | | Allows devices to indicate whether image creation should be supported at the ↵ Nathan Woods2016-09-061-0/+2
| |/ |/| | | | | | | | | | | | | 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.
* | Merge pull request #1279 from npwoods/yet_more_softlist_cleanups R. Belmont2016-08-261-3/+3
|\ \ | |/ |/| Yet more softlist cleanups
| * Standardized some names for softlist concepts Nathan Woods2016-08-201-3/+3
| | | | | | | | | | | | | | - "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)
* | Fixed regression with cassette code that caused hangs to happen when loading ↵ Nathan Woods2016-08-201-0/+2
|/ | | | | | cassette image formats that lacked read/write support This entailed reintroducing device_image_interface::make_readonly(); I also reimplemented the feature in the cassette code in a less hacky way.
* Changing device_image_interface::determine_open_plan() to not support ↵ Nathan Woods2016-08-191-1/+1
| | | | | | 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
* device_image_interface::software_name_split() ==> ↵ Nathan Woods2016-08-101-1/+0
| | | | | | 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
* Eliminated device_image_interface::make_readonly() Nathan Woods2016-08-091-1/+0
| | | | | | Take note that I eliminated make_readonly(); here is why I think the calls were unnecessary: 1. All image loads through softlists are done through common_process_file(), and thus going to be readonly anyways 2. The cassette.cpp call to make_readonly() seems to be a residual hack, if a failure occurs the image will be unloaded anyways
* More softlist-related conversions of strings to std::string Nathan Woods2016-08-081-3/+3
|
* Merge pull request #1180 from npwoods/split_softlist_code_redo Miodrag Milanović2016-08-081-5/+4
|\ | | | | Redo of split of src/emu/softlist.[cpp|h]
| * Redo of split of src/emu/softlist.[cpp|h] Nathan Woods2016-08-021-5/+4
| | | | | | | | | | | | | | | | This is a redo of the split first submitted in #137, with the following differences: * The newly refactored rom_entry data structure is used * I've kept the refactored softlist code in src/emu, in order to defer the mechanical process of moving it * I've kept includes of softlist[_dev].h out of diimage.h, so that changes to either do not trigger an emu.h recompilation * Obviously, this goes against the latest master
* | More conversion of 'const char *' --> std::string in diimage Nathan Woods2016-08-041-4/+4
|/
* Converted more stuff in diimage to use std::string instead of 'const char *' Nathan Woods2016-08-011-3/+3
|
* Changed device_image_interface::load() to take 'const std::string &' Nathan Woods2016-08-011-1/+1
|