summaryrefslogtreecommitdiffstatshomepage
path: root/src/emu/romload.h
Commit message (Collapse)AuthorAgeFilesLines
* - Updated romload so devices are loaded from separate files [Miodrag Milanovic] Miodrag Milanovic2011-08-021-5/+0
| | | | | | | | - Removed LOADBYNAME, since it is deprecated by using per device rom load_software_part_region - Created makedev tool to generate array of devices, and created lst file according to current devices usage. - Changed listxml command to output device roms too
* nvram - in case of multiple bioses, system nvram will be saved in [Miodrag ↵ Miodrag Milanovic2011-07-061-0/+5
| | | | | | Milanovic] form systemname_biosnum.nv in cases when non-default bios is used. For default bios selection all stay the same.
* Collapsed device_config and device_t into one class. Updated all Aaron Giles2011-04-271-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* 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 *)
* Converted core_options to a class. Removed a bunch of marginal Aaron Giles2011-03-031-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* Hash generation and general cleanup. New class hash_collection holds Aaron Giles2011-02-141-9/+0
| | | | | | | | | | | 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-7/+4
| | | | | | | | | | | | | | | | | | | | | | | | 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.
* Added information screen output for any game known to have bad or missing ↵ Scott Stone2011-02-101-1/+4
| | | | data in order to better inform the user as to the reason their emulation may not work as expected. [Alex Jackson]
* Moved the state saving system to C++. For now the registration macros Aaron Giles2011-02-081-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | are still intact. The new state_manager class has templatized methods for saving the various types, and through template specialization can save more complex system types cleanly (like bitmaps and attotimes). Added new mechanism to detect proper state save types. This is much more strict and there will likely be some games/devices that fatalerror at startup until they are remedied. Spot checking has caught the more common situations. The new state_manager is embedded directly in the running_machine, allowing objects to register state saving in their constructors now. Added NAME() macro which is a generalization of FUNC() and can be used to wrap variables that are registered when directly using the new methods as opposed to the previous macros. For example: machine->state().save_item(NAME(global_item)) Added methods in the device_t class that implicitly register state against the current device, making for a cleaner interface. Just a couple of required regexes for now: state_save_register_postload( *)\(( *)([^,;]+), * \3->state().register_postload\1\(\2 state_save_register_presave( *)\(( *)([^,;]+), * \3->state().register_presave\1\(\2
* softlists: added WARNING if loading a software with supported="partial" or ↵ Fabio Priuli2011-01-141-1/+1
| | | | "no" [Fabio Priuli]
* romload.c: added support for split set to softlist (for cart, cd and hd) ↵ Fabio Priuli2011-01-131-0/+5
| | | | | | | | | | | | | [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.
* Added CHD support in softlists [Miodrag Milanovic] Miodrag Milanovic2011-01-101-2/+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.
* Changed driver_device to expose the game_driver's ROMs through the Aaron Giles2010-09-031-4/+4
| | | | | | | | | | | | | | | | | device interface. This means all ROMs are now exposed via devices, and thus the process of enumerating ROMs gets simpler. Changed all instances of temporarily allocating machine_config objects to just put them on the stack for simplicity, letting the destructor handle the cleanup work automatically. Changed machine_config constructor to take a game_driver, from which the machine_config constructor is obtained. This also means the resulting machine_config holds a reference to the game_driver. Changed running_machine constructor to no longer take a game_driver, since the game_driver is now obtainable via the machine_config.
* - Moved softlist implementation from MESS [Miodrag Milanovic] Miodrag Milanovic2010-06-201-3/+0
| | | | | - Moved image related UI from MESS to emu core - Reimplemented filename related image device calls
* Added back software list support in emu core, and update 6510 and SM8500 cpu ↵ Miodrag Milanovic2010-06-131-0/+4
| | | | cores with calls needed by MESS (no whatsnew)
* First round of an attempted cleanup of header files in the system. Aaron Giles2010-01-101-6/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Created new central header "emu.h"; this should be included by pretty much any driver or device as the first include. This file in turn includes pretty much everything a driver or device will need, minus any other devices it references. Note that emu.h should *never* be included by another header file. - Updated all files in the core (src/emu) to use emu.h. - Removed a ton of redundant and poorly-tracked header includes from within other header files. - Temporarily changed driver.h to map to emu.h until we update files outside of the core. Added class wrapper around tagmap so it can be directly included and accessed within objects that need it. Updated all users to embed tagmap objects and changed them to call through the class. Added nicer functions for finding devices, ports, and regions in a machine: machine->device("tag") -- return the named device, or NULL machine->port("tag") -- return the named port, or NULL machine->region("tag"[, &length[, &flags]]) -- return the named region and optionally its length and flags Made the device tag an astring. This required touching a lot of code that printed the device to explicitly fetch the C-string from it. (Thank you gcc for flagging that issue!)
* Extended the astring class wrapper into something useful, and Aaron Giles2010-01-081-1/+1
| | | | | | | | | | | | | | | | | | useable as a stack object. Also designed the interfaces to allow for chaining operations. And added a casting operator to const char * for seamless use in most functions that take plain old C strings. Changed all uses of astring to use the object directly on the stack or embedded in objects instead of explicitly allocating and deallocating it. Removed a lot of annoying memory management code as a result. Changed interfaces that accepted/returned an astring * to use an astring & instead. Removed auto_alloc_astring(machine). Use auto_alloc(machine, astring) instead.
* NOTE: This change requires two new osd functions: osd_malloc() and Aaron Giles2010-01-081-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | osd_free(). They take the same parameters as malloc() and free(). Renamed mamecore.h -> emucore.h. New C++-aware memory manager, implemented in emualloc.*. This is a simple manager that allows you to add any type of object to a resource pool. Most commonly, allocated objects are added, and so a set of allocation macros is provided to allow you to manage objects in a particular pool: pool_alloc(p, t) = allocate object of type 't' and add to pool 'p' pool_alloc_clear(p, t) = same as above, but clear the memory first pool_alloc_array(p, t, c) = allocate an array of 'c' objects of type 't' and add to pool 'p' pool_alloc_array_clear(p, t, c) = same, but with clearing pool_free(p, v) = free object 'v' and remove it from the pool Note that pool_alloc[_clear] is roughly equivalent to "new t" and pool_alloc_array[_clear] is roughly equivalent to "new t[c]". Also note that pool_free works for single objects and arrays. There is a single global_resource_pool defined which should be used for any global allocations. It has equivalent macros to the pool_* macros above that automatically target the global pool. In addition, the memory module defines global new/delete overrides that access file and line number parameters so that allocations can be tracked. Currently this tracking is only done if MAME_DEBUG is enabled. In debug builds, any unfreed memory will be printed at the end of the session. emualloc.h also has #defines to disable malloc/free/realloc/calloc. Since emualloc.h is included by emucore.h, this means pretty much all code within the emulator is forced to use the new allocators. Although straight new/delete do work, their use is discouraged, as any allocations made with them will not be tracked. Changed the familar auto_alloc_* macros to map to the resource pool model described above. The running_machine is now a class and contains a resource pool which is automatically destructed upon deletion. If you are a driver writer, all your allocations should be done with auto_alloc_*. Changed all drivers and files in the core using malloc/realloc or the old alloc_*_or_die macros to use (preferably) the auto_alloc_* macros instead, or the global_alloc_* macros if necessary. Added simple C++ wrappers for astring and bitmap_t, as these need proper constructors/destructors to be used for auto_alloc_astring and auto_alloc_bitmap. Removed references to the winalloc prefix file. Most of its functionality has moved into the core, save for the guard page allocations, which are now implemented in osd_alloc and osd_free.
* Results of running the latest srcclean. Aaron Giles2009-12-281-1/+1
|
* > -----Original Message----- Aaron Giles2009-08-131-2/+2
| | | | | | | | | | | | | | | | | | | | > From: Atari Ace [mailto:atari_ace@verizon.net] > Sent: Monday, August 03, 2009 10:52 PM > To: submit@mamedev.org > Cc: atariace@hotmail.com > Subject: [patch] De-globalize romload.c/validity.c > > Hi mamedev, > > Static and global variables in the core of MAME have slowly been > replaced with opaque structures latched onto the running machine. This > patch extends this idiom to two more files, romload.c and validity.c. > validity.c in fact didn't need any global state (it was used only to > pass data between function calls), and romload.c already had a struct > that largely served that purpose. > > ~aa
* Removed PREDECODE_GFX compile flag, as the on-the-fly decoding seems Aaron Giles2009-07-091-5/+0
| | | | | | | | to be working reliably. Deprecated the ROMREGION_DISPOSE flag, as 98% of the use of it no longer is applicable with on-the-fly decoding, and the remaining cases are difficult to identify among the others.
* Bulk change alert. Aaron Giles2009-04-261-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* Defined ROM_LOAD64_WORD/ROM_LOAD64_WORD_SWAP in emu/romload.h Phil Bennett2009-01-211-0/+3
|
* romload cleanups: Aaron Giles2009-01-021-8/+44
| | | | | | | | | | | - added running_machine to internal structure, removed as explicit parameter - added new function rom_file_size() to compute the size of a ROM - removed rom_first_chunk() and rom_next_chunk() which are no longer needed - changed progress display to be based on size of ROMs loaded, not number - changed temporary load buffer to be dynamically allocated - fixed reload logic to handle skipped BIOSes Also changed rand_memory() to use a fixed seed for consistent behavior.
* Removed a couple of unnecessary typedefs from mamecore.h. Aaron Giles2009-01-021-19/+0
| | | | | Updated romload to use an astring for accumulating errors (I always feared busting that buffer with some huge romlist).
* Added the ability for a ROMset to specify a default BIOS. Use Aaron Giles2008-12-311-0/+3
| | | | | ROM_DEFAULT_BIOS("biosname") in the ROM definition. This can be used to ensure a correct default BIOS for ROM versions that care.
* Added macros to access ROM and MACHINE_DRIVER by name. Curt Coder2008-11-261-1/+2
|
* cleaned up STV rom loading a bit davidhay2008-10-181-1/+3
|
* CPUs, sound chips, devices, and ROM-regions which are specified by devices Aaron Giles2008-09-081-2/+4
| | | | | | | | | | | | | | | | | now have their tags auto-prefixed with the device's tag. This allows for multiple instances to be present. For example, the PR-8210 laserdisc player has a CPU with a tag of "pr8210". When it is included as a device by a driver, the driver may tag the device "laserdisc". The resulting final CPU tag name will be "laserdisc:pr8210". Also updated the debugger expression engine to support names with embedded colons. Added warnings to ensure that tags used for CPUs, sound chips, regions, and devices follow some basic rules: they should be less than 12 characters long, be all lower-case, and only contain letters, numbers, underscores, or dots (no spaces). This is to ensure that they can be used properly in debugger expressions and don't get too long or unwieldy to type (even 12 chars is a bit long).
* Added concept of rom sources to the rom loader. Updated auditing, Aaron Giles2008-09-061-2/+7
| | | | | CLI utilities, validity checks, and ROM loading to use these new functions so that device-specific ROMs are handled properly.
* Added new device interface selector: DEVINFO_PTR_ROM_REGION. This allows a Aaron Giles2008-09-061-0/+5
| | | | | | | | | | | | | | | | | | | | | | device to provide a set of ROM regions to be loaded along with the game ROMs. It is expected that most regions defined for devices will use the ROMREGION_LOADBYNAME flag to enable the ROMs to live in a central location. Added new device interface selector: DEVINFO_PTR_MACHINE_CONFIG. This allows a device to specify a partial machine driver which is appended to the end of the machine driver for any game using that device. The intention for this is to allow devices which have their own BIOS logic to specify CPUs and other characteristics common to all systems using the device. Added new ROMREGION flag: ROMREGION_LOADBYNAME, which means that if the ROMs in that region are not found in the usual driver files, then the name of the region will be used as a driver filename for loading. Extended the ldcore interface structure to allow each player type to provide its own ROM region and partial machine driver. Moved preliminary PR-8210 emulation code from ldplayer.c to ldpr8210.c. It is currently disabled behind the EMULATE_PR8210_ROM compile time flag.
* Added new generic laserdisc VIDEO_UPDATE handler to the laserdisc code. Aaron Giles2008-08-181-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This handler works for both disc-only games and those with overlays. For disc-only games, the base macro is sufficient. For games with overlays, an additional set of configuration macros are provided: MDRV_LASERDISC_OVERLAY - specifies update function, width, height, and bitmap format of the overlay MDRV_LASERDISC_OVERLAY_CLIP - specifies the visible area of the overlay bitmap MDRV_LASERDISC_OVERLAY_POSITION - specifies default x,y position MDRV_LASERDISC_OVERLAY_SCALE - specifies default x,y scale factors The update function provided to MDRV_LASERDISC_OVERLAY is identical to a normal VIDEO_UPDATE callback, so a standard one can be used. All existing laserdisc drivers have been updated to support this new rendering mechanism, removing much duplicated code. Added the ability to configure the overlay position and scale parameters at runtime. Added OSD menus to control them. Added logic to save/restore the data in the game's configuration file. Added new macros MDRV_LASERDISC_SCREEN_ADD_NTSC and _PAL, which defines a standard screen with the correct video timing characteristics and update function for laserdiscs. Updated all drivers to use these macros instead of defining their own screens. Added DISK_REGIONS to all laserdisc drivers. Added DISK_IMAGE_READONLY_OPTIONAL to support games (like Cube Quest) where the disk is non-essential to the game's operation. Fixed bug in identifying the custom sound driver for the laserdisc. Updated ldverify to identify blank regions of the disc for post- processing. Fixed rendering 16bpp with alpha using bilinear filters (fixes screenshots of laserdisc games with overlays). Included support for parsing .gdi files in chdman. [ElSemi] Added new driver for Cube Quest. This includes CPU cores for the three bitslice processors, as well as laserdisc support for the hacked laserdisc that was used to drive the games. [Philip Bennett, Joe Magiera, Warren Ondras] Note that the SHA1/MD5 for the laserdisc will likely undergo at least one more change before being finalized.
* Moved several include files from mame/ to emu/, as they were Aaron Giles2008-08-131-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | included by generic components in emu/ and thus should have no dependencies on the MAME code. Added new target ldplayer, which is based on MAME but serves as a standalone laserdisc player for CHDs. Right now only the Pioneer LD-V1000 is connected, and limited commands are available. Each player type is a driver, so you specify the player type on the command-line. The driver then opens the first CHD it finds in your ROM path and uses that as the laserdisc. The intention is that you specify the -rompath each time on the command-line, so a typical approach might be: ldplayer ldv1000 -rompath j:\mach3 where it will pick up the mach3.chd lurking in your j:\mach3 folder. Several basic commands are supported: Space = play/pause Alt = toggle frame display Left = scan forward (when playing) or step forward (when paused) Right = scan backward (when playing) or step backward (when paused) 0-9 = enter numbers for search Enter = execute search to frame
* Disks opened by the romload module are no longer identified by index. Aaron Giles2008-08-011-1/+1
| | | | | | | | | | | | | | | | | Instead, they are identified by the region they were loaded in. This generally means one disk per region. get_disk_handle() now takes a region name in place of an index. Updated all callers to do this. The SCSI modules in particular posed a challenge to make this work, so watch out for potential bugs there. Changed the IDE interfaces to default to choosing the region with the same tag as the device for its master disk (assuming no slave). Added support for specifying explicit master/slave disk regions as part of the configuration, though slave disks are still not supported yet. Change the laserdisc interface to no longer require a disk number or a custom sound device. Both are now assumed to be tagged the same as the laserdisc device. Updated all drivers accordingly.
* Added region and regionbytes fields to the deviceconfig, which are Aaron Giles2008-07-301-0/+1
| | | | | | | | auto-filled by the device manager before starting the device. This simplifies the auto-binding process for devices. Added new selector for device-specific ROM regions. Not yet wired up in the ROM loader.
* Region classes go bye-bye. Aaron Giles2008-07-281-12/+9
|
* Changed the way memory regions are referenced. Instead of a single Aaron Giles2008-07-281-95/+88
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | integer value, regions are now referred to by a region class and a region tag. The class specifies the type of region (one of CPU, gfx, sound, user, disk, prom, pld) while the tag uniquely specifies the region. This change required updating all the ROM region definitions in the project to specify the class/tag instead of region number. Updated the core memory_region_* functions to accept a class/tag pair. Added new memory_region_next() function to allow for iteration over all memory regions of a given class. Added new function memory_region_class_name() to return the name for a given CPU memory region class. Changed the auto-binding behavior of CPU regions. Previously, the first CPU would auto-bind to REGION_CPU1 (that is, any ROM references would automatically assume that they lived in the corresponding region). Now, each CPU automatically binds to the RGNCLASS_CPU region with the same tag as the CPU itself. This behavior required ensuring that all previous REGION_CPU* regions were changed to RGNCLASS_CPU with the same tag as the CPU. Introduced a new auto-binding mechanism for sound cores. This works similarly to the CPU binding. Each sound core that requires a memory region now auto-binds to the RGNCLASS_SOUND with the same tag as the sound core. In almost all cases, this allowed for the removal of the explicit region item in the sound configuration, which in turn allowed for many sound configurations to removed altogether. Updated the expression engine's memory reference behavior. A recent update expanded the scope of memory references to allow for referencing data in non-active CPU spaces, in memory regions, and in EEPROMs. However, this previous update required an index, which is no longer appropriate for regions and will become increasingly less appropriate for CPUs over time. Instead, a new syntax is supported, of the form: "[tag.][space]size@addr", where 'tag' is an optional tag for the CPU or memory region you wish to access, followed by a period as a separator; 'space' is the memory address space or region class you wish to access (p/d/i for program/data/I/O spaces; o for opcode space; r for direct RAM; c/u/g/s for CPU/user/gfx/sound regions; e for EEPROMs); and 'size' is the usual b/w/d/q for byte/word/dword/qword. Cleaned up ROM definition flags and removed some ugly hacks that had existed previously. Expanded to support up to 256 BIOSes. Updated ROM_COPY to support specifying class/tag for the source region. Updated the address map AM_REGION macro to support specifying a class/tag for the region. Updated debugger windows to display the CPU and region tags where appropriate. Updated -listxml to output region class and tag for each ROM entry.
* Changed direct access EEPROM interface to return the "bus width" of the Aaron Giles2008-07-171-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | EEPROM data, and the size is in terms of units, not bytes. Updated all drivers accordingly. Changed the ROM loading code to actually alter the region flags based on the CPU endianness and bus width when creating the region, rather than fixing them up on the fly. This means that callers to memory_region_flags() will get the correct results. Changed the expression engine to use two callbacks for read/write rather than relying on externally defined functions. Expanded memory access support in the expression engine. Memory accesses can now be specified as [space][num]<size>@<address>. 'space' can be one of the following: p = program address space of CPU #num (default) d = data address space of CPU #num i = I/O address space of CPU #num o = opcode address space of CPU #num (R/W access to decrypted opcodes) r = direct RAM space of CPU #num (always allows writes, even for ROM) e = EEPROM index #num c = direct REGION_CPU#num access u = direct REGION_USER#num access g = direct REGION_GFX#num access s = direct REGION_SOUND#num access The 'num' field is optional for p/d/i/o/r, where is defaults to the current CPU, and for e, where it defaults to EEPROM #0. 'num' is required for all region-related prefixes. Some examples: w@curpc = word at 'curpc' in the active CPU's program address space dd@0 = dword at 0x0 in the active CPU's data address space r2b@100 = byte at 0x100 from a RAM/ROM region in CPU #2's program space ew@7f = word from EEPROM address 0x7f u2q@40 = qword from REGION_USER2, offset 0x40 The 'size' field is always required, and can be b/w/d/q for byte, word, dword, and qword accesses.
* Copyright cleanup: Aaron Giles2008-01-061-1/+1
| | | | | | - removed years from copyright notices - removed redundant (c) from copyright notices - updated "the MAME Team" to be "Nicola Salmoria and the MAME Team"
* Changes for MAME 0.121u2.mame0121u2 Aaron Giles2007-12-171-11/+13
|
* Initial checkin of MAME 0.121.mame0121 Aaron Giles2007-12-171-0/+300