summaryrefslogtreecommitdiffstatshomepage
path: root/src/emu/devimage.c
Commit message (Collapse)AuthorAgeFilesLines
* Removed legacy image devices and related code (no whatsnew) Miodrag Milanovic2012-03-061-176/+0
|
* Removed not used legacy call (no whatsnew) Miodrag Milanovic2011-11-261-5/+0
|
* Cleanups and version bumpmame0142u6 Angelo Salese2011-06-191-2/+2
|
* Converted printer image device to modern (no whatsnew) Miodrag Milanovic2011-06-141-19/+2
|
* Cleanup of image device base classes and prepare for rewrite (no whatsnew) Miodrag Milanovic2011-06-101-500/+14
|
* Fix for image device unmount (no whatsnew) Miodrag Milanovic2011-05-101-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-82/+72
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Switch from m_machine to machine() everywhere. In some cases this Aaron Giles2011-04-181-10/+10
| | | | | | | | | | | meant adding a machine() accessor but it's worth it for consistency. This will allow future changes from reference to pointer to happen transparently for devices. [Aaron Giles] Simple S&R: m_machine( *[^ (!=;]) machine()\1
* moved call_display_info() to finish_load(), so that it can exploit variables ↵ Fabio Priuli2011-04-081-2/+6
| | | | | | | 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-1/+8
| | | | | 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 :)
* BIG update. Aaron Giles2011-03-291-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove redundant machine items from address_space and device_t. Neither machine nor m_machine are directly accessible anymore. Instead a new getter machine() is available which returns a machine reference. So: space->machine->xxx ==> space->machine().xxx device->machine->yyy ==> device->machine().yyy Globally changed all running_machine pointers to running_machine references. Any function/method that takes a running_machine takes it as a required parameter (1 or 2 exceptions). Being consistent here gets rid of a lot of odd &machine or *machine, but it does mean a very large bulk change across the project. Structs which have a running_machine * now have that variable renamed to m_machine, and now have a shiny new machine() method that works like the space and device methods above. Since most of these are things that should eventually be devices anyway, consider this a step in that direction. 98% of the update was done with regex searches. The changes are architected such that the compiler will catch the remaining errors: // find things that use an embedded machine directly and replace // with a machine() getter call S: ->machine-> R: ->machine\(\)\. // do the same if via a reference S: \.machine-> R: \.machine\(\)\. // convert function parameters to running_machine & S: running_machine \*machine([^;]) R: running_machine \&machine\1 // replace machine-> with machine. S: machine-> R: machine\. // replace &machine() with machine() S: \&([()->a-z0-9_]+machine\(\)) R: \1 // sanity check: look for this used as a cast (running_machine &) // and change to this: *(running_machine *)
* Removed hashfile and dependencies (no whatsnew) Miodrag Milanovic2011-02-141-3/+0
|
* Hash generation and general cleanup. New class hash_collection holds Aaron Giles2011-02-141-5/+2
| | | | | | | | | | | 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-10/+10
| | | | | | | | | | | | | | | | | | | | | | | | 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.
* Fix build break from last checkin. Aaron Giles2011-02-061-1/+1
| | | | | | | | | | | | | | | | | Also replace timer_get_time() with machine->time() 1. Main conversion timer_get_time( *)\( *([^)]+) *\) \2->time\1() 2. Cleanup #1 &machine->time machine.time 3. Cleanup #2 &m_machine->time m_machine.time
* Converted attotime to a class, with proper operators. Removed old Aaron Giles2011-02-031-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | global functions which are now superceded by the operators and methods on the class. [Aaron Giles] Required mappings are: attotime_make(a,b) => attotime(a,b) attotime_to_double(t) => t.as_double() double_to_attotime(d) => attotime::from_double(d) attotime_to_attoseconds(t) => t.as_attoseconds() attotime_to_ticks(t,f) => t.as_ticks(f) ticks_to_attotime(t,f) => attotime::from_ticks(t,f) attotime_add(a,b) => a + b attotime_add_attoseconds(a,b) => a + attotime(0, b) attotime_sub(a,b) => a - b attotime_sub_attoseconds(a,b) => a - attotime(0, b) attotime_compare(a,b) == 0 => a == b attotime_compare(a,b) != 0 => a != b attotime_compare(a,b) < 0 => a < b attotime_compare(a,b) <= 0 => a <= b attotime_compare(a,b) > 0 => a > b attotime_compare(a,b) >= 0 => a >= b attotime_mul(a,f) => a * f attotime_div(a,f) => a / f attotime_min(a,b) => min(a,b) attotime_max(a,b) => max(a,b) attotime_is_never(t) => t.is_never() attotime_string(t,p) => t.as_string(p) In addition, some existing #defines still exist but will go away: attotime_zero => attotime::zero attotime_never => attotime::never ATTOTIME_IN_SEC(s) => attotime::from_seconds(s) ATTOTIME_IN_MSEC(m) => attotime::from_msec(m) ATTOTIME_IN_USEC(u) => attotime::from_usec(u) ATTOTIME_IN_NSEC(n) => attotime::from_nsec(n) ATTOTIME_IN_HZ(h) => attotime::from_hz(h)
* Cleanups and version bump.mame0141u1 Aaron Giles2011-01-241-1/+1
|
* Fixed a stupid segfault introduced by pretending the emu can set the ↵ Fabio Priuli2011-01-151-1/+1
| | | | | filename of the loaded image also when loading has failed :( No whatsnew.
* Improved the way software names are displayed by the Internal File Manager ↵ Fabio Priuli2011-01-141-0/+7
| | | | when loading from software list and fixed wrong displayed name when loading with shortname:part. No whatsnew needed (being MESS-specific)
* softlists: added WARNING if loading a software with supported="partial" or ↵ Fabio Priuli2011-01-141-0/+6
| | | | "no" [Fabio Priuli]
* allow software lists to look for files in the rompath too [Fabio Priuli] Fabio Priuli2011-01-131-17/+35
| | | | | out of whatsnew 1. summing up, you can now load roms through softwarelists from: listname/romset, listname/parent + now also romset & parent (like MAME) 2. there is a lot of repeated code, but I still haven't found a satisfactory way to handle the both loading processes in a single function. I'll keep looking into it!
* devimage.c: added support for split set to softlist for cass and flop too ↵ Fabio Priuli2011-01-131-13/+8
| | | | [Fabio Priuli]
* romload.c: added support for split set to softlist (for cart, cd and hd) ↵ Fabio Priuli2011-01-131-6/+54
| | | | | | | | | | | | | [Fabio Priuli] out of whatsnew: to avoid too much duplicate code, I implemented this as follow: for parent, we pass a location tag "list/parentname" to search for the roms (no changes in this case); for clones, we pass a composed location tag "list/clonename%list/parentname" (notice the '%' separator) and then it is open_rom_file to split it, if it finds a %, before searching for the rom. out of whatsnew, 2: I also added the same support for cassettes and floppies (in devimage.c), but it is still commented out because I had only a few files for testing. as soon as I'm sure nothing gets broken, I'll enable it.
* fixed bogus creation of empty file when loading through softlists. no whatsnew. Fabio Priuli2011-01-131-2/+8
|
* - Fixed issue with image empty slot [Miodrag Milanovic] Miodrag Milanovic2010-11-261-0/+1
| | | | | - Default for writeconfig is now 0 for MESS since it is not needed anymore - Fixed handling of mounted devices on hard reset - Unified some emuopts code, and removed ifdefs
* Cleanups and version bump.mame0139u1 Aaron Giles2010-08-121-1/+1
|
* Newline at end of devimage.c (no whatsnew) Miodrag Milanovic2010-08-041-1/+1
|
* Fixed image device error handling [ShimaPong, Miodrag Milanovic] Miodrag Milanovic2010-08-041-12/+11
|
* Cleanups and version bump.mame0138u4 Aaron Giles2010-07-221-5/+5
|
* Fixed image unload and creation [Sandro Ronco, Miodrag Milanovic] Miodrag Milanovic2010-07-121-1/+5
|
* Adding ability to support other types of software lists, so floppies, ↵ Miodrag Milanovic2010-07-081-7/+60
| | | | cassettes, cd-roms are now possible to be used [Miodrag Milanovic]
* Added per-device image softlist loading routine [Miodrag Milanovic] Miodrag Milanovic2010-07-071-3/+14
| | | 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-11/+11
|
* Split mame.c into mame.c and machine.c, the latter containing the Aaron Giles2010-06-301-3/+3
| | | | | | | | | | | | | | | | | | | running_machine definition and implementation. Moved global machine-level operations and accessors into methods on the running_machine class. For the most part, this doesn't affect drivers except for a few occasional bits: mame_get_phase() == machine->phase() add_reset_callback() == machine->add_notifier(MACHINE_NOTIFY_RESET, ...) add_exit_callback() == machine->add_notifier(MACHINE_NOTIFY_EXIT, ...) mame_get_base_datetime() == machine->base_datetime() mame_get_current_datetime() == machine->current_datetime() Cleaned up the region_info class, removing most global region accessors except for memory_region() and memory_region_length(). Again, this doesn't generally affect drivers.
* Made the machine_config a proper object. Added detokenize method to Aaron Giles2010-06-281-1/+1
| | | | | | | | | | | | this object which can be called multiple times to append new devices after the initial machine configuration is set up. Updated member variables to match new naming convention. Changed the running_machine to take a constructed machine_config object in the constructor, instead of creating one itself, for consistency. Also added machine->total_colors() as a shortcut to machine->config->m_total_colors.
* - Fixed compile Miodrag Milanovic2010-06-271-2/+2
| | | | | - Moved some defines from MESS to MAME - Cleaned MESS side and therefore removed some includes (no whatsnew)
* Implemented hash file and battery support and did some cleanup (no whatsnew) Miodrag Milanovic2010-06-241-5/+11
|
* - Moved ioproc implementation from MESS [Miodrag Milanovic] Miodrag Milanovic2010-06-231-11/+52
| | | - Implemented more image device calls, and did some cleanup (no whatsnew)
* - Moved softlist implementation from MESS [Miodrag Milanovic] Miodrag Milanovic2010-06-201-93/+26
| | | | | - Moved image related UI from MESS to emu core - Reimplemented filename related image device calls
* Prevent some overrides of exiting variables, implementation will be updated ↵ Miodrag Milanovic2010-06-181-1/+1
| | | | later (no whatsnew)
* Changed callback function parameter types for image device (no whatsnew) Miodrag Milanovic2010-06-181-2/+2
|
* Implemented most of calls for image device (no whatsnew) Miodrag Milanovic2010-06-181-17/+100
|
* - removed MESS dependency from config.c Miodrag Milanovic2010-06-171-0/+478
- moved image legacy device implementation to devimage.c - created image.c implementation with initialization of devices/configuration for image devices, used those calls from mame.c - some minor cleanup of legacy device and initial implementation of some calls (no whatsnew for now, this is just for log,will put more info on final commit)