summaryrefslogtreecommitdiffstatshomepage
path: root/src/emu/machine/i2cmem.c
Commit message (Collapse)AuthorAgeFilesLines
* Touching all the candy again: [Alex Jackson] Alex W. Jackson2014-11-171-4/+3
| | | | | | | | | | | | | | | | Fixed an annoying inconsistency between memory_share and memory_region: the width() method of the former returned the width in bits (8, 16, 32 or 64) while the width() method of the latter returned the width in bytes (1, 2, 4 or 8). Now both classes have a bitwidth() method and a bytewidth() method. Updated all callers to use whichever one was more appropriate. Removed the implicit-cast-to-any-integer-pointer ability of memory_regions, which was rather unsafe (if you weren't careful with your * operators and casts it was easy to accidentally get a pointer to the memory_region object itself instead of to the data, with no warning from the compiler... or at least I kept doing it) Updated all devices and drivers that were accessing regions that way to use a region_ptr_finder when possible, and otherwise to call base() explicitly.
* fixed usage of uninitialized members in i2cmem_device (nw) Oliver Stöneberg2014-05-201-1/+3
|
* Some changes/corrections to device descriptions from MASH and Tafoid (nw) Scott Stone2014-04-171-1/+1
|
* i2cmem.c: Only save m_page for chips that use pages. (nw) Wilbert Pol2014-02-221-1/+4
|
* Another round of auto_alloc_array conversions. Aaron Giles2014-02-201-11/+4
| | | | | Some minor enhancements to dynamic_array, including clearing to specific values and expanding and clearing newly allocated values.
* finished modernising i2cmem [smf] smf-2013-12-011-58/+15
|
* changed rest of devices (except cpu cores) to have shortname and sourcefile (nw) Miodrag Milanovic2013-06-211-1/+1
|
* fixed initialization of i2cmem_device (nw) Oliver Stöneberg2013-02-161-8/+15
|
* Cleanups and version bumpmame0148 Miodrag Milanovic2013-01-111-2/+2
|
* added missing \n to some more fatalerror() calls (no whatsnew) Oliver Stöneberg2012-09-081-2/+2
|
* use device_t.static_set_static_config smf-2012-08-251-22/+7
|
* MAME going modern part 1 (no whatsnew) Miodrag Milanovic2012-03-311-1/+1
| | | | - Added 4th parameter to all address maps - Added missing state classes
* Move devices into a proper hierarchy and handle naming Aaron Giles2012-01-241-3/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* Collapsed device_config and device_t into one class. Updated all Aaron Giles2011-04-271-86/+47
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-5/+5
| | | | | | | | | | | 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
* BIG update. Aaron Giles2011-03-291-7/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 *)
* Created new enum type address_spacenum for specifying an address Aaron Giles2011-03-271-2/+2
| | | | | | | | | | | | space by index. Update functions and methods that accepted an address space index to take an address_spacenum instead. Note that this means you can't use a raw integer in ADDRESS_SPACE macros, so instead of 0 use the enumerated AS_0. Standardized the project on the shortened constants AS_* over the older ADDRESS_SPACE_*. Removed the latter to prevent confusion. Also centralized the location of these definitions to memory.h.
* Converted core_options to a class. Removed a bunch of marginal Aaron Giles2011-03-031-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | functionality in favor of alternate mechanisms. Errors are now reported via an astring rather than via callbacks. Every option must now specify a type (command, integer, float, string, boolean, etc). Command behavior has changed so that only one command is permitted. [Aaron Giles] Changed fileio system to accept just a raw searchpath instead of an options/option name combination. [Aaron Giles] Created emu_options class dervied from core_options which wraps core emulator options. Added mechanisms to cleanly change the system name and add/remove system-specific options, versus the old way using callbacks. Also added read accessors for all the options, to ensure consistency in how parameters are handled. Changed most core systems to access emu_options instead of core_options. Also changed machine->options() to return emu_options. [Aaron Giles] Created cli_options class derived from emu_options which adds the command-line specific options. Updated clifront code to leverage the new class and the new core behaviors. cli_execute() now accepts a cli_options object when called. [Aaron Giles] Updated both SDL and Windows to have their own options classes, derived from cli_options, which add the OSD-specific options on top of everything else. Added accessors for all the options so that queries are strongly typed and simplified. [Aaron Giles] Out of whatsnew: I've surely screwed up some stuff, though I have smoke tested a bunch of things. Let me know if you hit anything odd. Also I know this change will impact the WINUI stuff, please let me know if there are issues. All the functionality necessary should still be present. If it's not obvious, please talk to me before adding stuff to the core_options class.
* mame_file is now emu_file and is a class. It is required Aaron Giles2011-02-121-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | 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.
* Removed short name as parameter from device_config this way it is not ↵ Miodrag Milanovic2011-02-111-1/+1
| | | | | mandatory any more. Most of files is rolled back to previous state. (no whatsnew)
* - Added shortname to devices in order to make ROM loading per device ↵ Miodrag Milanovic2011-02-101-4/+4
| | | | | | possible. [Miodrag Milanovic] - Updated all devices containing ROM regions to have short names and all modern devices too - Created new validation to check existence of short name if device contain ROM region defined
* Get rid of state_save_register_device_* macros in favor of direct Aaron Giles2011-02-091-13/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | calls on the device object. Regex used: state_save_register_device_item( *)\(( *)([^,]+), *([^,]+),( *)([^ )]+)( *)\) \3->save_item\1\(\2NAME\(\6\),\5\4\7\) state_save_register_device_item_array( *)\(( *)([^,]+), *([^,]+),( *)([^ )]+)( *)\) \3->save_item\1\(\2NAME\(\6\),\5\4\7\) state_save_register_device_item_2d_array( *)\(( *)([^,]+), *([^,]+),( *)([^ )]+)( *)\) \3->save_item\1\(\2NAME\(\6\),\5\4\7\) state_save_register_device_item_bitmap( *)\(( *)([^,]+), *([^,]+),( *)([^ )]+)( *)\) \3->save_item\1\(\2NAME\(\*\6\),\5\4\7\) state_save_register_device_item_pointer( *)\(( *)([^,]+), *([^,]+),( *)([^,]+), *([^ )]+)( *)\) \3->save_pointer\1\(\2NAME\(\6\),\5\7,\5\4\8\) this->save_ save_ (save_item[^;]+), *0( *)\); \1\2\); (save_pointer[^;]+), *0( *)\); \1\2\);
* As promised, the bulk update of timer calls: Aaron Giles2011-02-061-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | timer_adjust_oneshot(t,...) => t->adjust(...) timer_adjust_periodic(t,...) => t->adjust(...) timer_reset(t,...) => t->reset(...) timer_enable(t,...) => t->enable(...) timer_enabled(t) => t->enabled() timer_get_param(t) => t->param() timer_get_ptr(t) => t->ptr() timer_set_param(t,...) => t->set_param(...) timer_set_ptr(t) => t->set_ptr(...) timer_timeelapsed(t) => t->elapsed() timer_timeleft(t) => t->remaining() timer_starttime(t) => t->start() timer_firetime(t) => t->expire() Also remove some stray legacy cpuexec* macros that were lurking in schedule.h): cpuexec_describe_context(m) => m->describe_context() cpuexec_boost_interleave(m,...) => m->scheduler().boot_interleave(...) cpuexec_trigger(m,...) => m->scheduler().trigger(...) cpuexec_triggertime(m,...) => m->scheduler().trigger(...) Specific regex'es used: timer_adjust_oneshot( *)\(( *)([^,;]+), * \3->adjust\1\(\2 timer_adjust_periodic( *)\(( *)([^,;]+), * \3->adjust\1\(\2 (->adjust.*), *0( *)\) \1\2\) timer_reset( *)\(( *)([^,;]+), * \3->reset\1\(\2 (->reset *\(.*)attotime::never \1 timer_enable( *)\(( *)([^,;]+), * \3->enable\1\(\2 timer_enabled( *)\(( *)([^,;)]+)\) \3->enabled\1\(\2\) timer_get_param( *)\(( *)([^,;)]+)\) \3->param\1\(\2\) timer_get_ptr( *)\(( *)([^,;)]+)\) \3->ptr\1\(\2\) timer_timeelapsed( *)\(( *)([^,;)]+)\) \3->elapsed\1\(\2\) timer_timeleft( *)\(( *)([^,;)]+)\) \3->remaining\1\(\2\) timer_starttime( *)\(( *)([^,;)]+)\) \3->start\1\(\2\) timer_firetime( *)\(( *)([^,;)]+)\) \3->expire\1\(\2\) timer_set_param( *)\(( *)([^,;]+), * \3->set_param\1\(\2 timer_set_ptr( *)\(( *)([^,;]+), * \3->set_ptr\1\(\2 cpuexec_describe_context( *)\(( *)([^,;)]+)\) \3->describe_context\1\(\2\) \&m_machine->describe_context m_machine.describe_context cpuexec_boost_interleave( *)\(( *)([^,;]+), * \3->scheduler().boost_interleave\1\(\2 cpuexec_trigger( *)\(( *)([^,;]+), * \3->scheduler().trigger\1\(\2 cpuexec_triggertime( *)\(( *)([^,;]+), * \3->scheduler().trigger\1\(\2
* running_device -> device_t Aaron Giles2010-12-311-1/+1
| | | | | They both already existed. No sense in having two names for the same object type.
* Fixed problems with i2cmem. Cubo CD32 games now save and load settings ↵ mariuszw12010-11-091-3/+2
| | | | properly. [Mariusz Wojcieszek]
* Move device definitions out of the bottom of the file. They can be Aaron Giles2010-09-191-2/+1
| | | | declared with other variables at the top.
* Cleanups and version bump.mame0139u2 Aaron Giles2010-08-301-1/+1
|
* De-converted MACHINE_DRIVER from tokens back to constructor functions, regaining Aaron Giles2010-08-261-16/+12
| | | | | | | | | | | type safety. If legacy devices still use inline data, those types are not checked. However, new devices no longer have access to the generic m_inline_data. Instead their MDRV_* macros should map to calls to static functions in the device config class which downcast a generic device_config to the specific device config, and then set the appropriate values. This is not to be done inline in order to prevent further code bloat in the constructors. See eeprom/7474/i2cmem/okim6295 for examples. #ifdef'ed several unused machine driver definitions that weren't referenced.
* i2cmem.c: Removed m_page_size member from i2cmem_device to use m_page_size ↵ Wilbert Pol2010-08-241-8/+8
| | | | from the config.
* Remove memory_read/write_byte/word/dword/qword* variants. Again, this is mostly Aaron Giles2010-08-191-7/+7
| | | | | | | | | | | | | | | | | | bulk search & replace: S: memory_read_([bytewordq]+)_[0-9lbe_maskd]+( *)\(( *)([^,]+)( *),( *) R: \4->read_\1\2\(\3 S: memory_read_([bytewordq]+)( *)\(( *)([^,]+)( *),( *) R: \4->read_\1\2\(\3 S: memory_write_([bytewordq]+)_[0-9lbe_maskd]+( *)\(( *)([^,]+)( *),( *) R: \4->write_\1\2\(\3 S: memory_write_([bytewordq]+)( *)\(( *)([^,]+)( *),( *) R: \4->write_\1\2\(\3 Gets 99% of the cases.
* Made the I2C clock bit to be AA-specific Angelo Salese2010-08-161-15/+0
|
* Implemented I2C accesses to the Acorn Archimedes / Aristocrat MK-5 HW, ↵ Angelo Salese2010-08-161-1/+15
| | | | | | fixing SRAM check [Angelo Salese] Added clock read-back register to the I2C device [Angelo Salese]
* fixed character transposition. smf-2010-07-101-1/+1
|
* turned i2cmem into a c++ device & ditched the unused legacy device. smf-2010-07-071-282/+463
|
* Bulk driver.h -> emu.h switch. Aaron Giles2010-01-101-1/+1
|
* From: Atari Ace [mailto:atari_ace@verizon.net] Aaron Giles2009-06-081-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Sent: Sunday, June 07, 2009 9:54 AM To: submit@mamedev.org Cc: atariace@hotmail.com Subject: [patch] "Regularize" some interfaces in MAME Hi mamedev, This patch adjusts the code in a few places to be more regular in it object approach. It recognizes five idioms. 1. device_configs should be passed const. dsp56k.h took a non-const device_config for no particular reason, necessitating casting where used. A few other places cast to non-const, in most cases unnecessarily. 2. running_machines should be passed non-const. A few places used const in different ways on running_machines, instead of the idiomatic non-const running_machine. 3. Eliminate passing running_machine explicitly where it can be computed. esrip.c, m37710.c, sfbonus.c had cases where the machine could easily be eliminated. 4. Pass the object machine/config first. In some cases this makes the interface object oriented, in some cases it simply makes it more idiomatic with the rest of MAME. 5. Prefer (screen, bitmap, cliprect) to (machine, bitmap, cliprect). Fully implementing this would be a large patch, this patch simply does it for the one core 'device', tms9928a.c.
* Bulk change alert. Aaron Giles2009-04-261-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This update changes the way we handle memory allocation. Rather than allocating in terms of bytes, allocations are now done in terms of objects. This is done via new set of macros that replace the malloc_or_die() macro: alloc_or_die(t) - allocate memory for an object of type 't' alloc_array_or_die(t,c) - allocate memory for an array of 'c' objects of type 't' alloc_clear_or_die(t) - same as alloc_or_die but memset's the memory to 0 alloc_array_clear_or_die(t,c) - same as alloc_array_or_die but memset's the memory to 0 All original callers of malloc_or_die have been updated to call these new macros. If you just need an array of bytes, you can use alloc_array_or_die(UINT8, numbytes). Made a similar change to the auto_* allocation macros. In addition, added 'machine' as a required parameter to the auto-allocation macros, as the resource pools will eventually be owned by the machine object. The new macros are: auto_alloc(m,t) - allocate memory for an object of type 't' auto_alloc_array(m,t,c) - allocate memory for an array of 'c' objects of type 't' auto_alloc_clear(m,t) - allocate and memset auto_alloc_array_clear(m,t,c) - allocate and memset All original calls or auto_malloc have been updated to use the new macros. In addition, auto_realloc(), auto_strdup(), auto_astring_alloc(), and auto_bitmap_alloc() have been updated to take a machine parameter. Changed validity check allocations to not rely on auto_alloc* anymore because they are not done in the context of a machine. One final change that is included is the removal of SMH_BANKn macros. Just use SMH_BANK(n) instead, which is what the previous macros mapped to anyhow.
* Many casts added to the core files, and various other tweaks Aaron Giles2009-03-121-2/+2
| | | | to make them compile as either C or C++.
* Hi mamedev, Aaron Giles2008-12-161-5/+2
| | | | | | | | | | | More deprecat.h cleanup in the core, notably changing the apis for poly_alloc. I also made cpu_get_index_slow fatalerror on failure since no one is checking the return value. deprecat.h -= 14, Machine -= ~55 ~aa
* From: Atari Ace [mailto:atari_ace@verizon.net] Aaron Giles2008-12-121-27/+29
| | | | | | | | | | | | | | | | | | | | | | | Sent: Thursday, December 11, 2008 10:56 AM To: submit@mamedev.org Cc: atariace@hotmail.com Subject: [patch] verboselog changes for future Machine removal Hi mamedev, Several mame files use an inline verboselog definition which saves typing the cpuexec_describe_context repeatedly. While this is a nice feature, each case introduces a then hard to remove deprecated Machine variable. One way to fix this would be to add machine to the parameter list for each verboselog call. Another way would be to change them to include the context call explicitly inside a typical logging macro (e.g. decocass.h). Not knowing which would be more acceptable to mamedev, I've included patches for both. ~aa (I chose to pass the machine to the verboselog function.)
* Here's the big one.... Aaron Giles2008-12-111-8/+1
| | | | | | | | | | | | | | | | | | | | | | | | Added new function cpuexec_describe_context(machine) which can be used in logerror() and other printf-style functions to return a description of the current CPU/PC given only the machine. Changed several dozen sites to use this instead of directly interrogating the activecpu. Removed all other uses of activecpu throughout the system. Removed activecpu from the machine structure to prevent future abuse. Removed cpu_push_context() and cpu_pop_context(), and all call sites. Voodoo devices now require a CPU to be defined in the configuration in order to know whom to steal cycles from or stall when FIFOs get full. Updated all voodoo users to specify one. CPD1869 devices now also require a CPU to be defined in the configuration, in order to know which CPU's registers to fetch. Updated all cdp1869 users to specify one. Many other small changes to make this all work.
* From: Atari Ace [atari_ace@verizon.net] Aaron Giles2008-12-111-2/+1
| | | | | | | | | | | | | | | | | | | Sent: Wednesday, December 10, 2008 9:27 AM To: submit@mamedev.org Cc: atariace@hotmail.com Subject: [patch] Add machine to some emu/machine init methods Hi mamedev, This patch widens some machine init interfaces to pass the machine parameter, allowing more Machine global references to be eliminated. Eventually most of these need to be converted to devices, but this change reduces the deprecation surface in the meantime. I also attached the script I used to do the initial changes to the drivers, which handled about 90% of the cases without further editing. ~aa
* Hi mamedev, Aaron Giles2008-12-081-13/+14
| | | | | | | | | | | | | | | | | | | | | | | This is a reworked/expanded version of the patch I sent yesterday. This one is split into three parts: 1. This introduces function macros for SAMPLES_START, CUSTOM_{START,STOP,RESET}, and ANTIC_RENDERER. 2. This introduces running_machine *machine throughout MAME. Principally it adds running_machine *machine = Machine to the top of functions, but in some static functions the parameter is added directly. Some similar changes in 99xxcore.h, v9938.c, v9938mod.c, galaxold.c, psx.c, taito_l.c are also made to eliminate Machine params. No global API is changed. 3. This changes the APIs introduced in the first part to pass device or space as appropriate. A few similar changes in some other global apis are made as well. The net result of this sequence of patches is to remove 40% of the Machine references and 27 deprecat.h includes. ~aa
* Changed save state system to accept machine parameters where Aaron Giles2008-12-051-13/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | appropriate, and to keep all global variables hanging off the machine structure. Once again, this means all state registration call sites have been touched: - state_save_register_global* now takes a machine parameter - state_save_register_item* now takes a machine parameter - added new state_save_register_device_item* which now uses the device name and tag to generate the base name Extended the fake sound devices to have more populated fields. Modified sound cores to use tags from the devices and simplified the start function. Renumbered CPU and sound get/set info constants to align with the device constants, and shared values where they were perfectly aligned. Set the type field in the fake device_configs for CPU and sound chips to a get_info stub which calls through to the CPU and sound specific get_info functions. This means the device_get_info() functions work for CPU and sound cores, even in their fake state. Changed device information getters from device_info() to device_get_info() to match the CPU and sound macros.
* Move cpunum_get_active() removal. Aaron Giles2008-11-271-1/+1
|
* Added "tag" parameter to state_save_register_item_* calls. Removed Aaron Giles2008-11-171-13/+13
| | | | | | state_save_combine_module_and_tag() function in favor of passing the tag when registering. Revisited all save state item registrations and changed them to use the tag where appropriate.
* Major cpuintrf changes: Aaron Giles2008-11-101-3/+4
| | | | | | | | | | | | | | | | | | | | | | * added a set of cpu_* calls which accept a CPU device object; these are now the preferred means of manipulating a CPU * removed the cpunum_* calls; added an array of cpu[] to the running_machine object; converted all existing cpunum_* calls to cpu_* calls, pulling the CPU device object from the new array in the running_machine * removed the activecpu_* calls; added an activecpu member to the running_machine object; converted all existing activecpu_* calls to cpu_* calls, pulling the active CPU device object from the running_machine * changed cpuintrf_push_context() to cpu_push_context(), taking a CPU object pointer; changed cpuintrf_pop_context() to cpu_pop_context(); eventually these will go away * many other similar changes moving toward a model where all CPU references are done by the CPU object and not by index
* (From Oliver Stoneberg) Aaron Giles2008-01-031-1/+1
| | | | | | | This is an updated version of my earlier ATTR_PRINTF patch. It was reviewed by Atari Ace to use ATTR_PRINTF properly and fixes even more format errors. I also reviewed the whole source again and it is now used in all possible places.
* Initial checkin of MAME 0.121.mame0121 Aaron Giles2007-12-171-0/+438