diff --git a/src/emu/machine/6526cia.c b/src/emu/machine/6526cia.c index 783933d84a4..c52a003dbbf 100644 --- a/src/emu/machine/6526cia.c +++ b/src/emu/machine/6526cia.c @@ -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 -------------------------------------------------*/ @@ -852,6 +870,7 @@ DEVICE_GET_INFO(cia6526r1) case DEVINFO_FCT_START: info->start = DEVICE_START_NAME(cia); break; case DEVINFO_FCT_STOP: /* Nothing */ 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 --- */ case DEVINFO_STR_NAME: strcpy(info->s, "6526 CIA rev1"); break;