From d85a03d9adff33aa46f4cba0bd3ad2e1b8ee8b6d Mon Sep 17 00:00:00 2001 From: Nathan Woods Date: Fri, 5 Dec 2008 12:28:40 +0000 Subject: Added differentiation between the r1 and r2 versions of the 6526; not acting on it yet --- src/emu/machine/6526cia.c | 29 ++++++++++++++++++++++------- src/emu/machine/6526cia.h | 6 ++++-- 2 files changed, 26 insertions(+), 9 deletions(-) diff --git a/src/emu/machine/6526cia.c b/src/emu/machine/6526cia.c index 1baa2d6d6eb..2f507b03b5c 100644 --- a/src/emu/machine/6526cia.c +++ b/src/emu/machine/6526cia.c @@ -111,7 +111,7 @@ static TIMER_CALLBACK( cia_clock_tod_callback ); INLINE cia_state *get_token(const device_config *device) { assert(device != NULL); - assert((device->type == CIA6526) || (device->type == CIA8520)); + assert((device->type == CIA6526R1) || (device->type == CIA6526R2) || (device->type == CIA8520)); return (cia_state *) device->token; } @@ -119,7 +119,7 @@ INLINE cia_state *get_token(const device_config *device) INLINE const cia6526_interface *get_interface(const device_config *device) { assert(device != NULL); - assert((device->type == CIA6526) || (device->type == CIA8520)); + assert((device->type == CIA6526R1) || (device->type == CIA6526R2) || (device->type == CIA8520)); return (cia6526_interface *) device->static_config; } @@ -496,7 +496,7 @@ void cia_clock_tod(const device_config *device) if (cia->tod_running) { - if (device->type == CIA6526) + if ((device->type == CIA6526R1) || (device->type == CIA6526R2)) { /* The 6526 split the value into hours, minutes, seconds and * subseconds */ @@ -837,10 +837,10 @@ static DEVICE_SET_INFO( cia6526 ) /*------------------------------------------------- - DEVICE_GET_INFO( cia6526 ) + DEVICE_GET_INFO( cia6526r1 ) -------------------------------------------------*/ -DEVICE_GET_INFO(cia6526) +DEVICE_GET_INFO(cia6526r1) { switch (state) { @@ -856,7 +856,7 @@ DEVICE_GET_INFO(cia6526) case DEVINFO_FCT_RESET: info->reset = DEVICE_RESET_NAME(cia); break; /* --- the following bits of info are returned as NULL-terminated strings --- */ - case DEVINFO_STR_NAME: info->s = "6526 CIA"; break; + case DEVINFO_STR_NAME: info->s = "6526 CIA rev1"; break; case DEVINFO_STR_FAMILY: info->s = "6526 CIA"; break; case DEVINFO_STR_VERSION: info->s = "1.0"; break; case DEVINFO_STR_SOURCE_FILE: info->s = __FILE__; break; @@ -865,6 +865,21 @@ DEVICE_GET_INFO(cia6526) } +/*------------------------------------------------- + DEVICE_GET_INFO( cia8520 ) +-------------------------------------------------*/ + +DEVICE_GET_INFO(cia6526r2) +{ + switch (state) + { + /* --- the following bits of info are returned as NULL-terminated strings --- */ + case DEVINFO_STR_NAME: info->s = "6526 CIA rev2"; break; + default: DEVICE_GET_INFO_CALL(cia6526r1); break; + } +} + + /*------------------------------------------------- DEVICE_GET_INFO( cia8520 ) -------------------------------------------------*/ @@ -875,6 +890,6 @@ DEVICE_GET_INFO(cia8520) { /* --- the following bits of info are returned as NULL-terminated strings --- */ case DEVINFO_STR_NAME: info->s = "8520 CIA"; break; - default: DEVICE_GET_INFO_CALL(cia6526); break; + default: DEVICE_GET_INFO_CALL(cia6526r1); break; } } diff --git a/src/emu/machine/6526cia.h b/src/emu/machine/6526cia.h index 26bfe535462..12272bdba44 100644 --- a/src/emu/machine/6526cia.h +++ b/src/emu/machine/6526cia.h @@ -15,7 +15,8 @@ MACROS ***************************************************************************/ -#define CIA6526 DEVICE_GET_INFO_NAME(cia6526) +#define CIA6526R1 DEVICE_GET_INFO_NAME(cia6526r1) +#define CIA6526R2 DEVICE_GET_INFO_NAME(cia6526r1) #define CIA8520 DEVICE_GET_INFO_NAME(cia8520) @@ -43,7 +44,8 @@ struct _cia6526_interface FUNCTION PROTOTYPES ***************************************************************************/ -DEVICE_GET_INFO(cia6526); +DEVICE_GET_INFO(cia6526r1); +DEVICE_GET_INFO(cia6526r2); DEVICE_GET_INFO(cia8520); /* configuration */ -- cgit v1.2.3