summaryrefslogtreecommitdiffstatshomepage
path: root/src/emu/machine/6522via.h
Commit message (Collapse)AuthorAgeFilesLines
* First round of an attempted cleanup of header files in the system. Aaron Giles2010-01-101-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | - 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!)
* VIA6522: Refactored interface to use READ/WRITE_LINE. Curt Coder2010-01-071-8/+8
|
* The other larger patch adds missing static and const qualifiers, and Aaron Giles2009-06-081-1/+0
| | | | | | | | | fixes up some header files. In particular, I adjusted const char *DEVTEMPLATE_SOURCE = __FILE__ to const char DEVTEMPLATE_SOURCE[] = __FILE__ which makes it actually const and saves a little memory. [Atari Ace]
* Removed the MDRV_<devtype>_REMOVE macros. A simple DEVICE_REMOVE Aaron Giles2009-06-081-3/+0
| | | | works now that device types are not needed.
* Removed device types from device queries that use tags, under the Aaron Giles2009-03-021-1/+1
| | | | | | | | | | | | | | | assumption that all device tags are unique. Specifically, the following no longer need to provide a device type: AM_DEVREAD/WRITE DEVCB_DEVICE_HANDLER devtag_get_device devtag_reset device_list_find_by_tag as well as several device interfaces that referenced other devices. Also fixed assertion due to overflow in the recent sound fix.
* Made the 6522 VIA implementation use devcb Nathan Woods2009-02-041-13/+15
|
* Made the concept of a "clock" native to devices. The clock is now Aaron Giles2008-12-181-8/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | specified when the device is added, and the clock is available in the device_config directly via device->clock. Updated all devices that have a clock to specify it when adding the device, rather than as part of their configuration. As part of this work, also created device-specific _ADD and _REMOVE macros to simplify configuration. Dfined a generic device execute function callback, though it is not used yet. The long term plan is that any device with an execute callback will be scheduled along with the CPUs. Now that CPUs are devices, their scheduling will be moved over to this logic eventually. Changed various NVRAM devices to fetch their default memory region from the device->region rather than specifying it in the configuration. Moved a number of CPUINFO_PTR_* constants to CPUINFO_FCT_*. Fixed several drivers that manually created their own gfx_elements to fill in the machine object, so they no longer crash. Fixed incorrect CPU display on info screen (recently broken). Moved device startup to *before* the DRIVER_INIT is called. This is to allow the DRIVER_INIT to configure devices that have been properly allocated. So far I don't see any negative effects, but be on the lookout if something weird shows up. Rewrote the device iteration logic to make use of the typenext field and the newly-introduced classnext field for iterating more efficiently through devices of a given type or class. Fixed behavior of MDRV_CPU_REPLACE so it does not delete and then re-add a CPU (causing the order to change).
* Changed the 6522 VIA implementation to be a device Nathan Woods2008-12-141-154/+51
|
* 6522 interface cleanups Nathan Woods2008-12-131-6/+20
|
* Terminology cleanup. "Machine" handlers are now "space" handlers. Aaron Giles2008-11-151-12/+12
|
* From: Oliver Stoeneberg [mailto:oliverst@online.de] Aaron Giles2008-06-261-6/+6
| | | | | | | Subject: another Machine -> machine cleanup This cleans up most of the Machine stuff in src/emu/machine. There is a bit left to clean up, but it's mostly stuck at some interfaces now.
* From: Atari Ace [mailto:atari_ace@verizon.net] Aaron Giles2008-05-221-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Subject: [patch] More Machine->machine changes, add machine to irq callbacks Hi mamedev, Here are two more patches to eliminate Machine globals. The first patch was autogenerated by the attached fixup script. That script has been updated to catch additional cases which it previously missed (when Machine is the last parameter to a function or Machine is used in an assignment). This makes ~50 more files deprecat.h free. A sizable chunk (~20%) of the remaining uses of the Machine global in the drivers are due to irq callbacks for sound and machine updates. Typically such callbacks need to call cpunum_set_input_line, which requires a machine parameter, so if the callbacks don't pass the machine parameter, these routines have no choice but to reference the global variable. The second patch attempts to address most cases of this by adding the machine parameter to the callback interfaces. This allows us to remove #include "deprecat.h" from ~150 files, at the cost of having to fix up hundreds of callbacks. In total, these patches reduced the number of files with deprecat.h from 783 to 575. ~aa
* Added running_machine * parameter to the front of all read/write handlers. Aaron Giles2008-03-051-12/+12
| | | | | | | | | | | | | | | | | | Updated all call-through handlers appropriately. Renamed read8_handler to read8_machine_func, replicating this pattern throughout. Defined new set of memory handler functions which are similar but which pass a const device_config * in place of the running_machine *. These are called read8_device_func, etc. Added macros READ8_DEVICE_HANDLER() for specifying functions of this type. Note that some plumbing still needs to happen in memory.c before this will work. This check-in should remove the need for the global Machine and in turn "deprecat.h" for a lot of drivers, but that work has not been done. On the flip side, some new accesses to the global Machine were added in the emu/ files. These should be addressed over time, but are smaller in number than the references in the driver.
* Initial checkin of MAME 0.121.mame0121 Aaron Giles2007-12-171-0/+195