summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author Nathan Woods <npwoods@mess.org>2008-12-05 12:28:40 +0000
committer Nathan Woods <npwoods@mess.org>2008-12-05 12:28:40 +0000
commitd85a03d9adff33aa46f4cba0bd3ad2e1b8ee8b6d (patch)
tree8dd2e64ad6e6a7844df5c988cd6e87b18c5230dd
parentb7da4d6684b6e6b606d8ce96fabbc9e3d6db09d1 (diff)
Added differentiation between the r1 and r2 versions of the 6526; not acting
on it yet
-rw-r--r--src/emu/machine/6526cia.c29
-rw-r--r--src/emu/machine/6526cia.h6
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;
@@ -869,12 +869,27 @@ 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 )
+-------------------------------------------------*/
+
DEVICE_GET_INFO(cia8520)
{
switch (state)
{
/* --- 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 */