summaryrefslogtreecommitdiffstatshomepage
path: root/src/mame/drivers/amspdwy.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Rename *.c -> *.cpp in our source (nw) Miodrag Milanovic2015-11-081-383/+0
|
* amspdwy: remove palette trampoline Dirk Best2015-08-021-2/+2
|
* change flags from GAME_ to MACHINE_ David Haywood2015-07-291-2/+2
| | | | 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
|
* small cleanup Michaël Banaan Ananas2014-03-261-2/+2
|
* changed amspdwy_port_r to simply AM_ROM Michaël Banaan Ananas2014-03-261-53/+51
|
* Checkpoint 2: Alex W. Jackson2014-03-151-1/+1
| | | | | | 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/+1
|
* some more mame fixes (nw) Miodrag Milanovic2014-02-281-1/+1
|
* Huge update, palette is now device (nw) Miodrag Milanovic2014-02-271-2/+2
| | | note: Aaron please give more descriptive text for release log I have no more strength :)
* Created gfxdecode_device instead of using machine fixed gfxdecode [Miodrag ↵ Miodrag Milanovic2014-02-161-1/+1
| | | | | | | | | | 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.
* cleanups (nw) Ivan Vangelista2014-02-081-3/+1
|
* Cleanups and version bumpmame0148u4 Miodrag Milanovic2013-04-301-1/+0
|
* moved cpu_device * to required_device in existing driver state classes (nw) Miodrag Milanovic2013-04-091-1/+0
|
* Removal of not needed machine().root_device() (nw) Miodrag Milanovic2013-02-131-3/+3
|
* Modernization of drivers part 1 (no whatsnew) Miodrag Milanovic2013-02-051-11/+10
|
* output of new srcclean changes that are relatively small [smf] smf-2013-01-111-1/+0
|
* Cleanups and version bumpmame0148 Miodrag Milanovic2013-01-111-44/+44
|
* Created a base class delegate_common_base for all delegate Aaron Giles2012-10-141-16/+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.
* INTERRUPT_GEN -> INTERRUPT_GEN_MEMBER (no whatsnew) Miodrag Milanovic2012-09-181-1/+1
|
* Modernized screen update calls (no whatsnew) Miodrag Milanovic2012-09-171-1/+1
|
* Memory handler normalization, part 1. Aaron Giles2012-09-171-1/+1
| | | | | | | | | | | | | READ/WRITE_DEVICE*_HANDLERs are now passed an address_space &, and the 8-bit variants get a mem_mask as well. This means they are now directly compatible with the member function delegates. Added a generic address space to the driver_device that can be used when no specific address space is available. Also added DECLARE_READ/WRITE_DEVICE*_HANDLER macros to declare device callbacks with default mem_mask parameters. [Aaron Giles]
* Massive change, MACHINE_START\RESET, VIDEO_START\RESET and PALETTE_INIT ↵ Miodrag Milanovic2012-09-131-16/+11
| | | | changed to be members of state classes (no whatsnew)
* Clear out remaining global inlines in diexec.h. Aaron Giles2012-09-121-3/+3
|
* All driver inits are now member of state classes. Miodrag Milanovic2012-08-101-2/+2
| | | | | 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-2/+2
| | | | DRIVER_INIT change (no whatsnew)
* Conversion of _DEVICE_HA​NDLER to _MEMBER methods - part 2 (no whatsnew) Miodrag Milanovic2012-05-251-3/+4
|
* ioport.c C++ conversion. Mostly internal changes, with no Aaron Giles2012-05-031-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* Now that memory_bank is exposed as an object, removed all the global Aaron Giles2012-04-181-1/+1
| | | | | | | | | | | | | | | | | | | bank manipulation APIs from memory_manager, and instead added a memory_manager::bank("tag") function which will return a pointer to the representative memory_bank. Operations can then be performed as expected directly on the memory_bank. Most code did not need an update yet, as I haven't done the search/replace to move away from global functions (which still exist for now). Added device_t::subbank("tag") to return a bank that is owned by the given device. Switched YM2151 interfaces over to devcb callbacks. Created proper sound devices for the Williams NARC, CVSD and ADPCM sound boards. Updated midyunit, midtunit, williams(joust2), and mcr68(archrivl/pigskin/trisport) to use the new devices.
* Remove AM_BASE in favor of AM_SHARED + required_shared_ptr. Aaron Giles2012-04-151-3/+3
| | | | | | | | 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.
* Moved soundlatch helpers into driver.c and removed emu/audio/generic.c. Aaron Giles2012-04-091-2/+2
| | | | | | | Normalized soundlatch helper function names. Created delegates for machine/sound/video_start/reset callbacks and added necessary infrastructure to use them going forward.
* MAME going modern part 7 (no whatsnew) Miodrag Milanovic2012-04-061-4/+4
|
* Moved all drivers to using the audio/watchdog helpers defined in the ↵ Miodrag Milanovic2012-04-051-1/+1
| | | | driver_device base class. (no whatsnew)
* Moved all drivers to using the paletteram helpers defined in the Aaron Giles2012-04-051-1/+1
| | | | | | | | | | | | | | | | | | 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-13/+12
| | | Tomorrow and next days just bug fixing from my side, no big changes
* Some formating cleanup (no whatsnew) Miodrag Milanovic2012-04-021-3/+3
|
* MAME going modern part 2 (no whatsnew) Miodrag Milanovic2012-04-011-11/+11
|
* MAME going modern part 1 (no whatsnew) Miodrag Milanovic2012-03-311-3/+3
| | | | - Added 4th parameter to all address maps - Added missing state classes
* Major bitmap-related changes throughout the system. There are Aaron Giles2012-01-121-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* Final bulk rename for 0.142: ensure that all members of Aaron Giles2011-04-011-20/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-11/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-3/+3
| | | | | | | | | | | | 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-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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\(\)
* misc companyname cleanups/consitencies Michaël Banaan Ananas2011-03-091-2/+2
|
* requires tight sync for sound Michaël Banaan Ananas2011-03-061-0/+1
|
* Modified video update system. [Miodrag Milanovic] Miodrag Milanovic2011-02-241-1/+2
| | | | | | | | | | | | | | | | | | | | Screen update function is now per screen device (it was before but was attached to machine driver) MCFG_VIDEO_UPDATE -> MCFG_SCREEN_UPDATE MCFG_VIDEO_EOF -> MCFG_SCREEN_EOF EOF is now executed for all screens, so for all existing it is defined just for one screen. This part will be updated in future. Note that there are now screen_update and screen_eof virtual functions for "modern" drivers which are called same as they did before. All drivers are updated and in places where update function was separated per screen I did name separate function. This change will enable us to put screen definition fully into device.
* Take advantage of the driver_device to clean up state saving for Aaron Giles2011-02-081-3/+3
| | | | | | | | | | | | | | | | | | | | many drivers. Also move some allocated memory into arrays in the state structure where appropriate (this is still in progress). Regex'es used (in src/mame only): state_save_register_global( *)\(( *)([^,]+), *state->([^ )]+)( *)\) state->save_item\1\(\2NAME\(state->\4\)\5\) state_save_register_global_array( *)\(( *)([^,]+), *state->([^ )]+)( *)\) state->save_item\1\(\2NAME\(state->\4\)\5\) state_save_register_global_bitmap( *)\(( *)([^,]+), *state->([^ )]+)( *)\) state->save_item\1\(\2NAME\(*state->\4\)\5\) state_save_register_global_pointer( *)\(( *)([^,]+), *state->([^,]+), state->save_pointer\1\(\2NAME\(state->\4\)\5,