mirror of
https://github.com/holub/mame
synced 2025-05-21 13:18:56 +03:00
Added a validity check
This commit is contained in:
parent
6d8e81d505
commit
59dbaaa70a
@ -255,6 +255,24 @@ static DEVICE_RESET( cia )
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/*-------------------------------------------------
|
||||||
|
DEVICE_VALIDITY_CHECK( cia )
|
||||||
|
-------------------------------------------------*/
|
||||||
|
|
||||||
|
static DEVICE_VALIDITY_CHECK( cia )
|
||||||
|
{
|
||||||
|
int error = FALSE;
|
||||||
|
|
||||||
|
if (device->clock <= 0)
|
||||||
|
{
|
||||||
|
mame_printf_error("%s: %s has a cia with an invalid clock\n", driver->source_file, driver->name);
|
||||||
|
error = TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
return error;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/*-------------------------------------------------
|
/*-------------------------------------------------
|
||||||
cia_update_interrupts
|
cia_update_interrupts
|
||||||
-------------------------------------------------*/
|
-------------------------------------------------*/
|
||||||
@ -852,6 +870,7 @@ DEVICE_GET_INFO(cia6526r1)
|
|||||||
case DEVINFO_FCT_START: info->start = DEVICE_START_NAME(cia); break;
|
case DEVINFO_FCT_START: info->start = DEVICE_START_NAME(cia); break;
|
||||||
case DEVINFO_FCT_STOP: /* Nothing */ break;
|
case DEVINFO_FCT_STOP: /* Nothing */ break;
|
||||||
case DEVINFO_FCT_RESET: info->reset = DEVICE_RESET_NAME(cia); break;
|
case DEVINFO_FCT_RESET: info->reset = DEVICE_RESET_NAME(cia); break;
|
||||||
|
case DEVINFO_FCT_VALIDITY_CHECK: info->validity_check = DEVICE_VALIDITY_CHECK_NAME(cia); break;
|
||||||
|
|
||||||
/* --- the following bits of info are returned as NULL-terminated strings --- */
|
/* --- the following bits of info are returned as NULL-terminated strings --- */
|
||||||
case DEVINFO_STR_NAME: strcpy(info->s, "6526 CIA rev1"); break;
|
case DEVINFO_STR_NAME: strcpy(info->s, "6526 CIA rev1"); break;
|
||||||
|
Loading…
Reference in New Issue
Block a user