summaryrefslogtreecommitdiffstatshomepage
path: root/src/emu/diimage.h
Commit message (Collapse)AuthorAgeFilesLines
* modernized 990_hd, moved some code into ti990_10.c, and simplified ↵ Miodrag Milanovic2014-03-231-7/+0
| | | | harddriv.c and remove some legacy leftovers (nw)
* fixed GCC/clang compilation / fixed some forward declarations (nw) Oliver Stöneberg2014-03-111-2/+2
|
* Moved core template container classes up from emutempl.h to coretmpl.h: Aaron Giles2014-03-111-12/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | [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)
* rest of ATTR_PRINTF review (nw) Oliver Stöneberg2014-02-251-1/+1
|
* fix for MSVC "warning C4717: 'device_image_interface::fread' : recursive on ↵ smf-2013-12-211-1/+1
| | | | all control paths, function will cause runtime stack overflow" (nw)
* diimage: Added load_software_region() function that loads a software list ↵ Curt Coder2013-12-201-0/+3
| | | | region into a shared_ptr. [Curt Coder]
* Added license tags to a few more files. Also converted many of OG's Aaron Giles2013-10-161-31/+2
| | | | | BSD licenses to tags since when he copied & pasted them he forgot to remove one instance of my name, which I caught while searching. ;-)
* Cleanups and version bumpmame0148u1 Miodrag Milanovic2013-02-111-2/+2
|
* Getting rid of DEVICE_IMAGE_START (nw) Wilbert Pol2013-02-061-7/+0
|
* Started moving DEVICE_IMAGE_ functions into driver_device classes. (nw) Wilbert Pol2013-02-051-6/+29
|
* MIDI core updates: [R. Belmont] R. Belmont2013-01-131-1/+3
| | | | | | | | | | - Add MIDI in and out ports as image device types - Add OSD calls to check for and read MIDI input - Add MIDI in image device which reads input and converts it to a serial bitstream nw section: Note that the MIDI In device uses the new image device override to prevent the core from attempting to fopen() the "file" name and instead it handles open/close itself in call_load/call_unload. This allows greater flexibilty than the hack used for sockets/ptys/named pipes where the OSD file layer has to know about them.
* diimage: allow image devices to skip core fopen() of the image's filename ↵ R. Belmont2013-01-121-0/+1
| | | | and handle themselves in call_load() [R. Belmont]
* Cleanups and version bumpmame0148 Miodrag Milanovic2013-01-111-50/+50
|
* Added device image type for individual ROM images (as used in some Amstrad ↵ mahlemiut2012-05-071-1/+2
| | | | CPC applications) (no whatsnew)
* Removed legacy image devices and related code (no whatsnew) Miodrag Milanovic2012-03-061-19/+0
|
* Sync with MESS (no whatsnew) Miodrag Milanovic2012-03-061-1/+1
|
* Give more proper name and disabled loading of soflist items in ↵ Miodrag Milanovic2012-02-211-1/+1
| | | | open_image_file call (no whatsnew)
* Added helpers for loading file for slot determination (no whatsnew) Miodrag Milanovic2012-02-211-1/+2
|
* Fix regression on softload item load using menus (no whatsnew) Miodrag Milanovic2012-01-301-0/+2
|
* Clean-ups and version bumpmame0144u7 Angelo Salese2012-01-291-1/+1
|
* Move devices into a proper hierarchy and handle naming Aaron Giles2012-01-241-4/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | and paths consistently for devices, I/O ports, memory regions, memory banks, and memory shares. [Aaron Giles] NOTE: there are likely regressions lurking here, mostly due to devices not being properly found. I have temporarily added more logging to -verbose to help understand what's going on. Please let me know ASAP if anything that is being actively worked on got broken. As before, the driver device is the root device and all other devices are owned by it. Previously all devices were kept in a single master list, and the hierarchy was purely logical. With this change, each device owns its own list of subdevices, and the hierarchy is explicitly manifest. This means when a device is removed, all of its subdevices are automatically removed as well. A side effect of this is that walking the device list is no longer simple. To address this, a new set of iterator classes is provided, which walks the device tree in a depth first manner. There is a general device_iterator class for walking all devices, plus templates for a device_type_iterator and a device_interface_iterator which are used to build iterators for identifying only devices of a given type or with a given interface. Typedefs for commonly-used cases (e.g., screen_device_iterator, memory_interface_iterator) are provided. Iterators can also provide counts, and can perform indexed lookups. All device name lookups are now done relative to another device. The maching_config and running_machine classes now have a root_device() method to get the root of the hierarchy. The existing machine->device("name") is now equivalent to machine->root_device().subdevice("name"). A proper and normalized device path structure is now supported. Device names that start with a colon are treated as absolute paths from the root device. Device names can also use a caret (^) to refer to the owning device. Querying the device's tag() returns the device's full path from the root. A new method basetag() returns just the final tag. The new pathing system is built on top of the device_t::subtag() method, so anyone using that will automatically support the new pathing rules. Each device has its own internal map to cache successful lookups so that subsequent lookups should be very fast. Updated every place I could find that referenced devices, memory regions, I/O ports, memory banks and memory shares to leverage subtag/subdevice (or siblingtag/siblingdevice which are built on top). Removed the device_list class, as it doesn't apply any more. Moved some of its methods into running_machine instead. Simplified the device callback system since the new pathing can describe all of the special-case devices that were previously handled manually. Changed the core output function callbacks to be delegates. Completely rewrote the validity checking mechanism. The validity checker is now a proper C++ class, and temporarily takes over the error and warning outputs. All errors and warnings are collected during a session, and then output in a consistent manner, with an explicit driver and source file listed for each one, as well as additional device and/or I/O port contexts where appropriate. Validity checkers should no longer explicitly output this information, just the error, assuming that the context is provided. Rewrote the software_list_device as a modern device, getting rid of the software_list_config abstraction and simplifying things. Changed the way FLAC compiles so that it works like other external libraries, and also compiles successfully for MSVC builds.
* floppy: Do specific UI handling [O. Galibert] Olivier Galibert2012-01-231-1/+33
|
* uiimage/diimage: Dumbify the menus and add a control layer [O. Galibert] Olivier Galibert2012-01-071-0/+2
|
* Removed not used legacy call (no whatsnew) Miodrag Milanovic2011-11-261-1/+0
|
* Cleanups and version bumpmame0142u6 Angelo Salese2011-06-191-8/+8
|
* Harddisk image device is now modern device (no whatsnew) Miodrag Milanovic2011-06-161-1/+1
|
* Converted printer image device to modern (no whatsnew) Miodrag Milanovic2011-06-141-9/+10
|
* Cleanup of image device base classes and prepare for rewrite (no whatsnew) Miodrag Milanovic2011-06-101-33/+47
|
* Removed memory allocation calls from image device (no whatsnew) Miodrag Milanovic2011-05-251-9/+0
|
* Renamed one image interface call till I am aware what is what (no whatsnew) Miodrag Milanovic2011-05-041-1/+1
|
* Fixed problem with image devices due to same name in interface and device ↵ Miodrag Milanovic2011-05-041-3/+3
| | | | class (no whatsnew)
* Collapsed device_config and device_t into one class. Updated all Aaron Giles2011-04-271-33/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | existing modern devices and the legacy wrappers to work in this environment. This in general greatly simplifies writing a modern device. [Aaron Giles] General notes: * some more cleanup probably needs to happen behind this change, but I needed to get it in before the next device modernization or import from MESS :) * new template function device_creator which automatically defines the static function that creates the device; use this instead of creating a static_alloc_device_config function * added device_stop() method which is called at around the time the previous device_t's destructor was called; if you auto_free anything, do it here because the machine is gone when the destructor is called * changed the static_set_* calls to pass a device_t & instead of a device_config * * for many devices, the static config structure member names over- lapped the device's names for devcb_* functions; in these cases the members in the interface were renamed to have a _cb suffix * changed the driver_enumerator to only cache 100 machine_configs because caching them all took a ton of memory; fortunately this implementation detail is completely hidden behind the driver_enumerator interface * got rid of the macros for creating derived classes; doing it manually is now clean enough that it isn't worth hiding the details in a macro
* moved call_display_info() to finish_load(), so that it can exploit variables ↵ Fabio Priuli2011-04-081-0/+1
| | | | | | | set at init time. updated megadrive compatibility check to use the new mechanism instead of the original proof of concept implementation. no whatsnew.
* cartslot.c/chd_cd.c: added support for a callback function to test softlist ↵ Fabio Priuli2011-04-071-0/+5
| | | | | sharedfeat (e.g. 'compatibility') and display a warning message accordingly. updated cdi.c as an example [Fabio Priuli] support for floppy and tapes is in progress, but I have to discuss with Micko first :)
* Removed hashfile and dependencies (no whatsnew) Miodrag Milanovic2011-02-141-6/+3
|
* Hash generation and general cleanup. New class hash_collection holds Aaron Giles2011-02-141-4/+4
| | | | | | | | | | | and manages a collection of hashes, and can be built from an internal format string which is stored with each ROM. All core instances are cleaned up to use the new interfaces, but it's likely that hashfile code in MESS will need an update. Also compacted the form of the hash strings used for ROMs, and fixed verification/hashing of non-ZIPped files.
* mame_file is now emu_file and is a class. It is required Aaron Giles2011-02-121-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | to pass a core_options object to the constructor, along with a search path. This required pushing either a running_machine or a core_options through some code that wasn't previously ready to handle it. emu_files can be reused over multiple open/close sessions, and a lot of core code cleaned up nicely as things were converted to them. Also created a file_enumerator class for iterating over files in a searchpath. This replaces the old mame_openpath functions. Changed machine->options() to return a reference. Removed public nvram_open() and fixed jchan/kaneko16 to stop directly saving NVRAM. Removed most of the mame_options() calls; this will soon go away entirely, so don't add any more. Added core_options to device_validity_check() so they can be used to validate things.
* Improved the way software names are displayed by the Internal File Manager ↵ Fabio Priuli2011-01-141-0/+1
| | | | when loading from software list and fixed wrong displayed name when loading with shortname:part. No whatsnew needed (being MESS-specific)
* Swap: (astring.len() != 0) -> astring Aaron Giles2010-08-211-5/+5
| | | | Swap: (astring.len() == 0) -> !astring
* Fixed image based cheat file loading (no whatsnew) Miodrag Milanovic2010-07-281-1/+1
|
* Adding ability to support other types of software lists, so floppies, ↵ Miodrag Milanovic2010-07-081-0/+2
| | | | cassettes, cd-roms are now possible to be used [Miodrag Milanovic]
* Added per-device image softlist loading routine [Miodrag Milanovic] Miodrag Milanovic2010-07-071-2/+5
| | | Renamed feof to image_feof (in device_image_interface) in order to compile on FreeBSD [El Barto]
* Cleanups and version bump.mame0138u3 Aaron Giles2010-07-061-29/+29
|
* Added new static call in diimage and added call to initialize subdevices for ↵ Miodrag Milanovic2010-06-291-1/+2
| | | | image device (no whatsnew)
* - Fixed compile Miodrag Milanovic2010-06-271-0/+5
| | | | | - Moved some defines from MESS to MAME - Cleaned MESS side and therefore removed some includes (no whatsnew)
* Changed device name from an overridable function to a parameter passed to Aaron Giles2010-06-251-1/+0
| | | | | | the device_config constructor. In situations where the proper name is not known at construction time, a generic name can be specified and then overridden later once the configuration is complete.
* Implemented hash file and battery support and did some cleanup (no whatsnew) Miodrag Milanovic2010-06-241-5/+12
|
* - Moved ioproc implementation from MESS [Miodrag Milanovic] Miodrag Milanovic2010-06-231-8/+22
| | | - Implemented more image device calls, and did some cleanup (no whatsnew)
* - Moved softlist implementation from MESS [Miodrag Milanovic] Miodrag Milanovic2010-06-201-6/+52
| | | | | - Moved image related UI from MESS to emu core - Reimplemented filename related image device calls
* Removed not needed parameter (no whatsnew) Miodrag Milanovic2010-06-181-1/+1
|