diff options
author | 2008-12-18 08:28:50 +0000 | |
---|---|---|
committer | 2008-12-18 08:28:50 +0000 | |
commit | cf9fc5861805c5e344fab6e96d084a372c2683aa (patch) | |
tree | d1fd7dd4b3d409b5cdc49be0441a5fccee7e2188 /src/emu/machine/z80sio.h | |
parent | d9fbf0dba5d2e98f1fe0a2f7107ac17db1146e03 (diff) |
Made the concept of a "clock" native to devices. The clock is now
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).
Diffstat (limited to 'src/emu/machine/z80sio.h')
-rw-r--r-- | src/emu/machine/z80sio.h | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/emu/machine/z80sio.h b/src/emu/machine/z80sio.h index bc9e04db736..80f256ec4ae 100644 --- a/src/emu/machine/z80sio.h +++ b/src/emu/machine/z80sio.h @@ -18,8 +18,6 @@ typedef struct _z80sio_interface z80sio_interface; struct _z80sio_interface { - const char *cpu; /* CPU whose clock we use for our base */ - int baseclock; void (*irq_cb)(const device_config *device, int state); write8_device_func dtr_changed_cb; write8_device_func rts_changed_cb; @@ -34,8 +32,8 @@ struct _z80sio_interface DEVICE CONFIGURATION MACROS ***************************************************************************/ -#define MDRV_Z80SIO_ADD(_tag, _intrf) \ - MDRV_DEVICE_ADD(_tag, Z80SIO) \ +#define MDRV_Z80SIO_ADD(_tag, _clock, _intrf) \ + MDRV_DEVICE_ADD(_tag, Z80SIO, _clock) \ MDRV_DEVICE_CONFIG(_intrf) #define MDRV_Z80SIO_REMOVE(_tag) \ |