Previous 15994 Revisions Next

r4072 Tuesday 6th January, 2009 at 03:21:44 UTC by Nathan Woods
Added a validity check; some drivers trip this
[src/emu/machine]6526cia.c

src/emu/machine/6526cia.c
r4071r4072
256256
257257
258258/*-------------------------------------------------
259    DEVICE_VALIDITY_CHECK( cia )
260-------------------------------------------------*/
261
262static DEVICE_VALIDITY_CHECK( cia )
263{
264   int error = FALSE;
265
266   if (device->clock <= 0)
267   {
268      mame_printf_error("%s: %s has a cia with an invalid clock\n", driver->source_file, driver->name);
269      error = TRUE;
270   }
271
272   return error;
273}
274
275
276/*-------------------------------------------------
259277    cia_update_interrupts
260278-------------------------------------------------*/
261279
r4071r4072
852870      case DEVINFO_FCT_START:                     info->start = DEVICE_START_NAME(cia);      break;
853871      case DEVINFO_FCT_STOP:                     /* Nothing */                        break;
854872      case DEVINFO_FCT_RESET:                     info->reset = DEVICE_RESET_NAME(cia);      break;
873      case DEVINFO_FCT_VALIDITY_CHECK:            info->validity_check = DEVICE_VALIDITY_CHECK_NAME(cia); break;
855874
856875      /* --- the following bits of info are returned as NULL-terminated strings --- */
857876      case DEVINFO_STR_NAME:                     strcpy(info->s, "6526 CIA rev1");         break;

Previous 15994 Revisions Next


© 1998-2018 The MESS Team