summaryrefslogtreecommitdiffstatshomepage
path: root/src/mame/drivers/cischeat.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Rename *.c -> *.cpp in our source (nw) Miodrag Milanovic2015-11-081-2938/+0
|
* change flags from GAME_ to MACHINE_ David Haywood2015-07-291-8/+8
| | | | this better fits the drivers from MESS (which have always illogically used the GAME_ flags despite not being games) and also fits fine with arcade machines.
* Done work for Luca Elia (nw) Miodrag Milanovic2015-05-131-1/+1
|
* Added known authors to licenses tags (nw) Miodrag Milanovic2015-05-091-1/+1
|
* Added dummy license headers for MAME part (nw) Miodrag Milanovic2015-05-071-0/+2
|
* Checkpoint 2: Alex W. Jackson2014-03-151-2/+2
| | | | | | gfxdecode devices must now be assigned a palette in MCFG. Added palette devices to several MESS drivers and devices to comply with this requirement. This palette is assigned as a default to the gfx_elements created by the device (but still not used for drawing yet, except in the UI graphics viewer) Tilemaps now have a pointer to a palette device and use that palette for rgb32 drawing, rather than the palette of the screen or bitmap they are drawing to (since rgb32 screens don't have palettes now). When a tilemap is created, it takes its palette from the gfxdecode device it was created with, but you can change a tilemap's palette device with set_palette() at any time (doing this does not mark the tilemap dirty, since all tilemaps use indexed bitmaps internally)
* Made palette settings for screen explicit and mandatory for ind16 mode (nw) Miodrag Milanovic2014-03-141-0/+2
|
* Video attributes are now per screen (nw) Miodrag Milanovic2014-03-061-4/+2
|
* some more palette cleanups (nw) David Haywood2014-03-061-109/+39
|
* cischeat fix, issue was that shadow flag was not set, anyway doing modify is ↵ Miodrag Milanovic2014-03-011-4/+4
| | | | proper thing to do (nw)
* Huge update, palette is now device (nw) Miodrag Milanovic2014-02-271-27/+31
| | | note: Aaron please give more descriptive text for release log I have no more strength :)
* Switched rgb_t to a class, replacing macros with methods. Mappings are Aaron Giles2014-02-191-21/+21
| | | | | | | | | | | | | | | | | | | as follows: MAKE_RGB(r,g,b) == rgb_t(r,g,b) MAKE_ARGB(a,r,g,b) == rgb_t(a,r,g,b) RGB_ALPHA(data) == data.a() RGB_RED(data) == data.r() RGB_GREEN(data) == data.g() RGB_BLUE(data) == data.b() RGB_BLACK == rgb_t::black RGB_WHITE == rgb_t::white Implicit conversions to/from UINT32 are built in as well as simple addition, subtraction, and scaling (with clamping). As a result of being a class, some stricter typing was needed in a few places but overall not too much.
* Created gfxdecode_device instead of using machine fixed gfxdecode [Miodrag ↵ Miodrag Milanovic2014-02-161-4/+4
| | | | | | | | | | Milanovic] Updated all devices and drivers for using it. out of whatsnew: Note that it is made to work same as before, in some cases it can be more logic to move gfxdevice into subdevice itself then to keep it in main driver.
* various cpu lookup cleanup (nw) Miodrag Milanovic2013-04-151-4/+4
|
* cleanup (nw) Miodrag Milanovic2013-04-141-4/+4
|
* and more oki changes (nw) Miodrag Milanovic2013-04-121-8/+4
|
* oki tag lookup removal (nw) Miodrag Milanovic2013-04-121-6/+2
|
* Removal of not needed machine().root_device() (nw) Miodrag Milanovic2013-02-131-2/+2
|
* Modernization of drivers part 2 (no whatsnew) Miodrag Milanovic2013-02-051-6/+6
|
* Cleanups and version bumpmame0148 Miodrag Milanovic2013-01-111-300/+300
|
* Created a base class delegate_common_base for all delegate Aaron Giles2012-10-141-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | types. Created a binding_type_exception which is thrown when a bind attempt fails due to mismatched types. Added helper templates to driver_device to wrap legacy device read/write handlers into driver_device member functions. This should help move some things forward until more common code is converted into proper devices. Introduce new module devcb2 which contains modernized versions of devcb. Compared to previous implementation this one is simpler overall, trampolining calls through a single internal set of adapter functions. The new versions are also designed to be specified in the machine_config rather than in structures, so they are no longer simple POD types. Additional new/changed features: * reads and writes can map to delegates for line or 8/16/32/64-bit * reads and writes can map to an I/O port * reads can be mapped to a constant value, with or without logging * writes can be mapped to a device's input line * all reads/writes can have a shift, mask, and/or xor applied * devices can opt to make the functions safe-if-NULL when resolving * only member function types are supported Rewrote the YM2151 interface to be fully modernized, and removed the ym2151_interface struct in favor of inline configs using the new devcb2 mechanism. In many cases, removed no longer needed trampolines, instead taking advantage of direct support for input line writes.
* TIMER_CALLBACK_DEVICE_MEMBER modernization part 1 (no whatsnew) Miodrag Milanovic2012-09-251-13/+13
|
* Since nobody checks for NULLs anyway, make Aaron Giles2012-09-191-1/+1
| | | | | | | | | | | | device_memory_interface::space() assert against NULL and return a reference, and pushed references throughout all address space usage in the system. Added a has_space() method to check for those rare case when it is ambiguous. [Aaron Giles] Also reinstated the generic space and added fatal error handlers if anyone tries to actually read/write from it.
* INTERRUPT_GEN -> INTERRUPT_GEN_MEMBER (no whatsnew) Miodrag Milanovic2012-09-181-3/+3
|
* Modernized screen update calls (no whatsnew) Miodrag Milanovic2012-09-171-4/+4
|
* Massive change, MACHINE_START\RESET, VIDEO_START\RESET and PALETTE_INIT ↵ Miodrag Milanovic2012-09-131-4/+4
| | | | changed to be members of state classes (no whatsnew)
* Closeout on old macros. Retired cputag_set_input_line Aaron Giles2012-09-121-7/+7
| | | | | | | and cputag_set_input_line_and_vector, replacing them with machine.device("tag")->execute().set_input_line[_and_vector]. [Aaron Giles]
* All driver inits are now member of state classes. Miodrag Milanovic2012-08-101-14/+13
| | | | | Added DECLARE_DRIVER_INIT macro to define it H file, and DRIVER_INIT_MEMBER for member declaration in C files Updated all drivers accordingly (no whatsnew)
* Updated GAME and GAMEL with class name per machine used, for future ↵ Miodrag Milanovic2012-08-041-8/+8
| | | | DRIVER_INIT change (no whatsnew)
* Conversion of _DEVICE_HA​NDLER to _MEMBER methods - part 2 (no whatsnew) Miodrag Milanovic2012-05-251-7/+14
|
* ioport.c C++ conversion. Mostly internal changes, with no Aaron Giles2012-05-031-21/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | intended differences from previous behavior. For drivers, the main change is that input_port_read() no longer exists. Instead, the port must be fetched from the appropriate device, and then read() is called. For member functions, this is actually simpler/cleaner: value = ioport("tag")->read() For legacy functions which have a driver_data state, it goes: value = state->ioport("tag")->read() For other legacy functions, they need to fetch the root device: value = machine.root_device().ioport("tag")->read() The other big change for drivers is that IPT_VBLANK is gone. Instead, it has been replaced by a device line callback on the screen device. There's a new macro PORT_VBLANK("tag") which automatically points things to the right spot. Here's a set of imperfect search & replace strings to convert the input_port_read calls and fix up IPT_VBLANK: input_port_read( *\( *)(machine\(\)) *, *([^)]+ *\)) ioport\1\3->read\(\) input_port_read( *\( *)(.*machine[()]*) *, *([^)]+ *\)) \2\.root_device\(\)\.ioport\1\3->read\(\) (state = .*driver_data[^}]+)space->machine\(\)\.root_device\(\)\. \1state-> (state = .*driver_data[^}]+)device->machine\(\)\.root_device\(\)\. \1state-> input_port_read_safe( *\( *)(machine\(\)) *, *([^,]+), *([^)]+\)) ioport\1\3->read_safe\(\4\) IPT_VBLANK( *\)) IPT_CUSTOM\1 PORT_VBLANK("screen")
* Changed device->subregion to device->memregion. Moved Aaron Giles2012-04-201-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | memory_region management into the memory manager instead of directly in the machine. Hid the global region method; now all regions must be looked up relative to a device. If you're a member function, you can just use memregion("tag") directly. If you're a global function or a device referencing global regions, use machine().root_device().memregion("tag") to look up regions relative to the root. S&R to convert all references: machine([()]*)\.region machine\1\.root_device\(\).subregion Then remove redundant machine().root_device() within src/mame: ([ \t])machine\(\)\.root_device\(\)\. \1 And use state->memregion() if we have a state variable present: (state *= *[^;]+driver_data[^}]+)([^ \t]*)machine[()]*\.root_device\(\)\. \1state-> Finally some cleanup: screen.state-> state-> device->state-> state-> space->state-> state-> And a few hand-tweaks.
* Remove AM_BASE in favor of AM_SHARED + required_shared_ptr. Aaron Giles2012-04-151-35/+35
| | | | | | | | This update passes validity checks but will certainly have a number of drivers failing at startup because all pointers are defaulted to required by the automated scripts used. Will fix problems once we get a regression run to find out which drivers need attention.
* MAME going modern part 7 (no whatsnew) Miodrag Milanovic2012-04-061-23/+24
|
* MAME going modern part 6 (no whatsnew) Miodrag Milanovic2012-04-051-15/+13
|
* Moved all drivers to using the audio/watchdog helpers defined in the ↵ Miodrag Milanovic2012-04-051-6/+6
| | | | driver_device base class. (no whatsnew)
* Moved all drivers to using the paletteram helpers defined in the Aaron Giles2012-04-051-10/+10
| | | | | | | | | | | | | | | | | | driver_device base class. The palette base is now specified via an AM_SHARE of "paletteram" or "paletteram2". The driver_device base class now finds these pointers and places them in m_generic_paletteram_8/_16/_32 and m_generic_paletteram2_8/_16/_32. Removed machine.generic.paletteram*, and machine.generic entirely. Removed AM_BASE_GENERIC/AM_SIZE_GENERIC as they don't apply anymore. Changed required_/optional_shared_ptr to support set_target with base and size for manually configuring a shared pointer, and a new allocate method for dynamically allocating (and registering the memory for save states). A few subsequent cleanups are coming related to this, but wanted to get this in before the next modern push.
* MAME going modern part 5 (no whatsnew) Miodrag Milanovic2012-04-041-86/+81
| | | Tomorrow and next days just bug fixing from my side, no big changes
* Some formating cleanup (no whatsnew) Miodrag Milanovic2012-04-021-35/+35
|
* MAME going modern part 2 (no whatsnew) Miodrag Milanovic2012-04-011-80/+80
|
* MAME going modern part 1 (no whatsnew) Miodrag Milanovic2012-03-311-17/+17
| | | | - Added 4th parameter to all address maps - Added missing state classes
* Major bitmap-related changes throughout the system. There are Aaron Giles2012-01-121-6/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | almost certainly some regressions lurking. Let me know if something seems busted. Bitmaps are now strongly typed based on format. bitmap_t still exists as an abstract base class, but it is almost never used. Instead, format-specific bitmap classes are provided: bitmap_ind8 == 8bpp indexed bitmap_ind16 == 16bpp indexed bitmap_ind32 == 32bpp indexed bitmap_ind64 == 64bpp indexed bitmap_rgb32 == 32bpp RGB bitmap_argb32 == 32bpp ARGB bitmap_yuy16 == 16bpp YUY For each format, a generic pix() method is provided which references pixels of the correct type. The old pix8/pix16/pix32/ pix64 methods still exist in the short term, but the only one available is the one that matches the bitmap's pixel size. Note also that the old RGB15 format bitmaps are no longer supported at all. Converted model1, megadriv, and stv drivers away from the RGB15 format bitmaps. New auto_bitmap_<type>_alloc() macros are provided for allocating the appropriate type of bitmap. Screen update functions now must specify the correct bitmap type as their input parameters. For static update functions the SCREEN_UPDATE macro is now replaced with SCREEN_UPDATE_RGB32 and SCREEN_UPDATE_IND16 macros. All existing drivers have been updated to use the correct macros. Screen update functions are now required for all screens; there is no longer any default behavior of copying a "default" bitmap to the screen (in fact the default bitmap has been deprecated). Use one of the following to specify your screen_update callback: MCFG_SCREEN_UPDATE_STATIC(name) - static functions MCFG_SCREEN_UPDATE_DRIVER(class, func) - driver members MCFG_SCREEN_UPDATE_DEVICE(tag, class, func) - device members Because the target bitmap format can now be deduced from the screen update function itself, the MCFG_SCREEN_FORMAT macro is no longer necessary, and has been removed. If you specify a screen update callback that takes a bitmap_ind16, then the screen will be configured to use a 16bpp indexed bitmap, and if you specify a callback that takes a bitmap_rgb32, then a 32bpp RGB bitmap will be provided. Extended the bitmap classes to support wrapping a subregion of another bitmap, and cleaner allocation/resetting. The preferred use of bitmaps now is to define them directly in drivers/devices and use allocate() or wrap() to set them up, rather than allocating them via auto_bitmap_*_alloc(). Several common devices needed overhauls or changes as a result of the above changes: * Reorganized the laserdisc base driver and all the laserdisc drivers as modern C++ devices, cleaning the code up considerably. Merged ldsound device into the laserdsc device since modern devices are flexible enough to handle it. * Reorganized the v9938 device as a modern C++ device. Removed v9938mod.c in favor of template functions in v9938.c directly. * Added independent ind16 and rgb32 callbacks for TMS340x0 devices. * All video devices are now hard-coded to either ind16 or rgb32 bitmaps. The most notable is the mc6845 which is rgb32, and required changes to a number of consumers. * Added screen_update methods to most video devices so they can be directly called via MCFG_SCREEN_UPDATE_DEVICE instead of creating tons of stub functions.
* Modernized m_rom_1 -> AM_REGION usage Angelo Salese2011-05-011-48/+8
|
* Added shifter display to Cisco Heat driver [Angelo Salese] Removed cheesy ↵ Angelo Salese2011-05-011-12/+13
| | | | hack to F1 GP Star 2 irq communications [Angelo Salese]
* Fixed inputs and removed digital hacks in Cisco Heat driver [Angelo Salese] Angelo Salese2011-05-011-128/+96
|
* Final bulk rename for 0.142: ensure that all members of Aaron Giles2011-04-011-74/+74
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | driver_device classes have an m_ prefix on them. When we eventually move functions using these into member functions, we will be able to remove the state-> pointers, and having the member variables prefixed will allow them to be distinguished from local variables. Some regex'es used (plus manually fixing the remaining stuff): In src/mame/... state->([a-zA-Z_][^_][a-zA-Z0-9_]*) state->m_\1 state->([^m]_[a-zA-Z0-9_]*) state->m_\1 state->m_save_item state->save_item state->m_save_pointer state->save_pointer (AM_BASE_MEMBER *\( *[a-zA-Z0-9_]+ *, *)([a-zA-Z_][^_]) \1m_\2 (AM_BASE_SIZE_MEMBER *\( *[a-zA-Z0-9_]+ *, *)([a-zA-Z_][^_][a-zA-Z0-9_]* *, *)([a-zA-Z_][^_]) \1m_\2m_\3 (AM_SIZE_MEMBER *\( *[a-zA-Z0-9_]+ *, *)([a-zA-Z_][^_]) \1m_\2 m__ m_ In src/mame/includes/... (\t[a-zA-Z0-9_<>]+[ \t]+[&*]*[ \t]*)([a-zA-Z_][^_][][a-zA-Z0-9_]*;)$ \1m_\2 (\t[a-zA-Z0-9_<>]+[ \t]*[&*]*[ \t]+)([a-zA-Z_][^_][][a-zA-Z0-9_]*;)$ \1m_\2
* BIG update. Aaron Giles2011-03-291-75/+75
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 *)
* Deprecate the old memory_install_* macros. Dynamic installation is now handled Aaron Giles2011-03-271-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | directly by calling methods on the address_space, which have been expanded with aliases to cover all previous situations. In addition, variants with no mirror or mask value are provided to cover the common cases: memory_install_read*_handler(space, begin, end, mirror, mask, handler) ==> space->install_legacy_read_handler(begin, end [, mirror, mask], FUNC(handler)) memory_install_write*_handler(space, begin, end, mirror, mask, handler) ==> space->install_legacy_write_handler(begin, end [, mirror, mask], FUNC(handler)) memory_install_readwrite*_handler(space, begin, end, mirror, mask, rhandler, whandler) ==> space->install_legacy_readwrite_handler(begin, end [, mirror, mask], FUNC(rhandler), FUNC(whandler)) memory_install_read*_device_handler(space, device, begin, end, mirror, mask, handler) ==> space->install_legacy_read_handler(*device, begin, end [, mirror, mask], FUNC(handler)) memory_install_write*_device_handler(space, device, begin, end, mirror, mask, handler) ==> space->install_legacy_write_handler(*device, begin, end [, mirror, mask], FUNC(handler)) memory_install_readwrite*_device_handler(space, device, begin, end, mirror, mask, rhandler, whandler) ==> space->install_legacy_readwrite_handler(*device, begin, end [, mirror, mask], FUNC(rhandler), FUNC(whandler)) memory_install_read_port(space, begin, end, mirror, mask, port) ==> space->install_read_port(begin, end [, mirror, mask], port) memory_install_read_bank(space, begin, end, mirror, mask, bank) ==> space->install_read_bank(begin, end [, mirror, mask], bank) memory_install_rom(space, begin, end, mirror, mask, ptr) ==> space->install_rom(begin, end [, mirror, mask], ptr) memory_install_ram(space, begin, end, mirror, mask, ptr) ==> space->install_ram(begin, end [, mirror, mask], ptr) memory_unmap_read(space, begin, end, mirror, mask) ==> space->unmap_read(begin, end [, mirror, mask]) memory_nop_read(space, begin, end, mirror, mask) ==> space->nop_read(begin, end [, mirror, mask]) Below are the bulk search & replace regex'es used for this memory_install_read([0-9]+)_handler( *)\(( *)([^,]+), *([^,]+,[^,]+, *)0 *, *0 *, *([^ )]+)( *)\) \4->install_legacy_read_handler\2\(\3\5FUNC\(\6\)\7\) memory_install_read([0-9]+)_handler( *)\(( *)([^,]+), *([^,]+,[^,]+,[^,]+,[^,]+, *)([^ )]+)( *)\) \4->install_legacy_read_handler\2\(\3\5FUNC\(\6\)\7\) memory_install_write([0-9]+)_handler( *)\(( *)([^,]+), *([^,]+,[^,]+, *)0 *, *0 *, *([^ )]+)( *)\) \4->install_legacy_write_handler\2\(\3\5FUNC\(\6\)\7\) memory_install_write([0-9]+)_handler( *)\(( *)([^,]+), *([^,]+,[^,]+,[^,]+,[^,]+, *)([^ )]+)( *)\) \4->install_legacy_write_handler\2\(\3\5FUNC\(\6\)\7\) memory_install_readwrite([0-9]+)_handler( *)\(( *)([^,]+), *([^,]+,[^,]+, *)0 *, *0 *, *([^ ,]+)( *, *)([^ )]+)( *)\) \4->install_legacy_readwrite_handler\2\(\3\5FUNC\(\6\)\7FUNC\(\8\)\9\) memory_install_readwrite([0-9]+)_handler( *)\(( *)([^,]+), *([^,]+,[^,]+,[^,]+,[^,]+, *)([^ ,]+)( *, *)([^ )]+)( *)\) \4->install_legacy_readwrite_handler\2\(\3\5FUNC\(\6\)\7FUNC\(\8\)\9\) memory_install_read([0-9]+)_device_handler( *)\(( *)([^,]+), *([^,]+), *([^,]+,[^,]+, *)0 *, *0 *, *([^ )]+)( *)\) \4->install_legacy_read_handler\2\(\3\*\5, \6FUNC\(\7\)\8\) memory_install_read([0-9]+)_device_handler( *)\(( *)([^,]+), *([^,]+), *([^,]+,[^,]+,[^,]+,[^,]+, *)([^ )]+)( *)\) \4->install_legacy_read_handler\2\(\3\*\5, \6FUNC\(\7\)\8\) memory_install_write([0-9]+)_device_handler( *)\(( *)([^,]+), *([^,]+), *([^,]+,[^,]+, *)0 *, *0 *, *([^ )]+)( *)\) \4->install_legacy_write_handler\2\(\3\*\5, \6FUNC\(\7\)\8\) memory_install_write([0-9]+)_device_handler( *)\(( *)([^,]+), *([^,]+), *([^,]+,[^,]+,[^,]+,[^,]+, *)([^ )]+)( *)\) \4->install_legacy_write_handler\2\(\3\*\5, \6FUNC\(\7\)\8\) memory_install_readwrite8_device_handler( *)\(( *)([^,]+), *([^,]+), *([^,]+,[^,]+, *)0 *, *0 *, *([^ ,]+)( *, *)([^ )]+)( *)\) \3->install_legacy_readwrite_handler\1\(\2\*\4, \5FUNC\(\6\)\7FUNC\(\8\)\9\) memory_install_readwrite8_device_handler( *)\(( *)([^,]+), *([^,]+), *([^,]+,[^,]+,[^,]+,[^,]+, *)([^ ,]+)( *, *)([^ )]+)( *)\) \3->install_legacy_readwrite_handler\1\(\2\*\4, \5FUNC\(\6\)\7FUNC\(\8\)\9\) memory_install_readwrite16_device_handler( *)\(( *)([^,]+), *([^,]+), *([^,]+,[^,]+, *)0 *, *0 *, *([^ ,]+)( *, *)([^ )]+)( *)\) \3->install_legacy_readwrite_handler\1\(\2\*\4, \5FUNC\(\6\)\7FUNC\(\8\)\9\) memory_install_readwrite16_device_handler( *)\(( *)([^,]+), *([^,]+), *([^,]+,[^,]+,[^,]+,[^,]+, *)([^ ,]+)( *, *)([^ )]+)( *)\) \3->install_legacy_readwrite_handler\1\(\2\*\4, \5FUNC\(\6\)\7FUNC\(\8\)\9\) memory_install_readwrite32_device_handler( *)\(( *)([^,]+), *([^,]+), *([^,]+,[^,]+, *)0 *, *0 *, *([^ ,]+)( *, *)([^ )]+)( *)\) \3->install_legacy_readwrite_handler\1\(\2\*\4, \5FUNC\(\6\)\7FUNC\(\8\)\9\) memory_install_readwrite32_device_handler( *)\(( *)([^,]+), *([^,]+), *([^,]+,[^,]+,[^,]+,[^,]+, *)([^ ,]+)( *, *)([^ )]+)( *)\) \3->install_legacy_readwrite_handler\1\(\2\*\4, \5FUNC\(\6\)\7FUNC\(\8\)\9\) memory_install_readwrite64_device_handler( *)\(( *)([^,]+), *([^,]+), *([^,]+,[^,]+, *)0 *, *0 *, *([^ ,]+)( *, *)([^ )]+)( *)\) \3->install_legacy_readwrite_handler\1\(\2\*\4, \5FUNC\(\6\)\7FUNC\(\8\)\9\) memory_install_readwrite64_device_handler( *)\(( *)([^,]+), *([^,]+), *([^,]+,[^,]+,[^,]+,[^,]+, *)([^ ,]+)( *, *)([^ )]+)( *)\) \3->install_legacy_readwrite_handler\1\(\2\*\4, \5FUNC\(\6\)\7FUNC\(\8\)\9\) memory_install_read_port( *)\(( *)([^,]+), *([^,]+,[^,]+), *0 *, *0 *, \3->install_read_port\1\(\2\4, memory_install_read_port( *)\(( *)([^,]+), * \3->install_read_port\1\(\2 memory_install_write_port( *)\(( *)([^,]+), *([^,]+,[^,]+), *0 *, *0 *, \3->install_write_port\1\(\2\4, memory_install_write_port( *)\(( *)([^,]+), * \3->install_write_port\1\(\2 memory_install_readwrite_port( *)\(( *)([^,]+), *([^,]+,[^,]+), *0 *, *0 *, \3->install_readwrite_port\1\(\2\4, memory_install_readwrite_port( *)\(( *)([^,]+), * \3->install_readwrite_port\1\(\2 memory_install_read_bank( *)\(( *)([^,]+), *([^,]+,[^,]+), *0 *, *0 *, \3->install_read_bank\1\(\2\4, memory_install_read_bank( *)\(( *)([^,]+), * \3->install_read_bank\1\(\2 memory_install_write_bank( *)\(( *)([^,]+), *([^,]+,[^,]+), *0 *, *0 *, \3->install_write_bank\1\(\2\4, memory_install_write_bank( *)\(( *)([^,]+), * \3->install_write_bank\1\(\2 memory_install_readwrite_bank( *)\(( *)([^,]+), *([^,]+,[^,]+), *0 *, *0 *, \3->install_readwrite_bank\1\(\2\4, memory_install_readwrite_bank( *)\(( *)([^,]+), * \3->install_readwrite_bank\1\(\2 memory_install_rom( *)\(( *)([^,]+), *([^,]+,[^,]+), *0 *, *0 *, \3->install_rom\1\(\2\4, memory_install_rom( *)\(( *)([^,]+), * \3->install_rom\1\(\2 memory_install_ram( *)\(( *)([^,]+), *([^,]+,[^,]+), *0 *, *0 *, \3->install_ram\1\(\2\4, memory_install_ram( *)\(( *)([^,]+), * \3->install_ram\1\(\2 memory_install_writeonly( *)\(( *)([^,]+), *([^,]+,[^,]+), *0 *, *0 *, \3->install_writeonly\1\(\2\4, memory_install_writeonly( *)\(( *)([^,]+), * \3->install_writeonly\1\(\2 memory_unmap_read( *)\(( *)([^,]+), *([^,]+,[^,]+), *0 *, *0 *\) \3->unmap_read\1\(\2\4\) memory_unmap_read( *)\(( *)([^,]+), * \3->unmap_read\1\(\2 memory_unmap_write( *)\(( *)([^,]+), *([^,]+,[^,]+), *0 *, *0 *\) \3->unmap_write\1\(\2\4\) memory_unmap_write( *)\(( *)([^,]+), * \3->unmap_write\1\(\2 memory_unmap_readwrite( *)\(( *)([^,]+), *([^,]+,[^,]+), *0 *, *0 *\) \3->unmap_readwrite\1\(\2\4\) memory_unmap_readwrite( *)\(( *)([^,]+), * \3->unmap_readwrite\1\(\2 memory_nop_read( *)\(( *)([^,]+), *([^,]+,[^,]+), *0 *, *0 *\) \3->nop_read\1\(\2\4\) memory_nop_read( *)\(( *)([^,]+), * \3->nop_read\1\(\2 memory_nop_write( *)\(( *)([^,]+), *([^,]+,[^,]+), *0 *, *0 *\) \3->nop_write\1\(\2\4\) memory_nop_write( *)\(( *)([^,]+), * \3->nop_write\1\(\2 memory_nop_readwrite( *)\(( *)([^,]+), *([^,]+,[^,]+), *0 *, *0 *\) \3->nop_readwrite\1\(\2\4\) memory_nop_readwrite( *)\(( *)([^,]+), * \3->nop_readwrite\1\(\2
* Created new enum type address_spacenum for specifying an address Aaron Giles2011-03-271-18/+18
| | | | | | | | | | | | 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.
* Added device_t::memory() to fetch a reference to the memory interface, Aaron Giles2011-03-271-8/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | or assert if not present. Split address_space::install_[legacy_]handler into install_[legacy_]read_handler, install_[legacy_]write_handler, and install_[legacy_]readwrite_handler. Added variants of address_space handler installers which don't take mirror or mask parameters, since this is by far the most common case. Deprecated API cleanup. Simple search & replace: cpu_suspend ==> device_suspend cpu_resume ==> device_resume cpu_yield ==> device_yield cpu_spin ==> device_spin cpu_spinuntil_trigger ==> device_spin_until_trigger cpu_spinuntil_time ==> device_spin_until_time cpu_spinuntil_int ==> device_spin_until_interrupt cpu_eat_cycles ==> device_eat_cycles cpu_adjust_icount ==> device_adjust_icount cpu_triggerint ==> device_triggerint cpu_set_input_line ==> device_set_input_line cpu_set_input_line_vector ==> device_set_input_line_vector cpu_set_input_line_and_vector ==> device_set_input_line_and_vector cpu_set_irq_callback ==> device_set_irq_callback More complex changes: device_memory(device) ==> device->memory() device_get_space(device, spacenum) ==> device->memory().space(spacenum) cpu_get_address_space(cpu, spacenum) ==> cpu->memory().space(spacenum) cputag_get_address_space(mach, tag, spacenum) ==> mach->device("tag")->memory().space(spacenum) cputag_get_clock(mach, tag) ==> mach->device("tag")->unscaled_clock() cputag_set_clock(mach, tag, hz) ==> mach->device("tag")->set_unscaled_clock(hz) Some regex'es for the more prevalent cases above: S: cpu_get_address_space( *)\(( *)([^,]+)( *), * R: \3->memory().space\1\(\2 S: cputag_get_address_space( *)\(( *)([^,]+)( *),( *)([^,]+)( *), * R: \3->device\1\(\2\6\7\)->memory().space\1\(\2 S: cputag_get_clock( *)\(( *)([^,]+)( *),( *)([^ )]+) *\) R: \3->device\1\(\2\6\7\)->unscaled_clock\(\)