Previous 15994 Revisions Next

r8531 Sunday 18th July, 2010 at 07:51:31 UTC by Miodrag Milanović
[PV2000] Connected softlist
[src/mess/drivers]pv2000.c

src/mess/drivers/pv2000.c
r8530r8531
372372   memset(&memory_region(machine, "maincpu")[0x7000], 0xff, 0x1000);   // initialize RAM
373373}
374374
375static DEVICE_IMAGE_LOAD( pv2000_cart )
376{
377   UINT8 *cart = memory_region(image.device().machine, "maincpu") + 0xC000;
378   UINT32 size;
375379
380   if (image.software_entry() == NULL)
381      size = image.length();
382   else
383      size = image.get_software_region_length("rom");
384
385   if (size != 0x2000 && size != 0x4000)
386   {
387      image.seterror(IMAGE_ERROR_UNSPECIFIED, "Unsupported cartridge size");
388      return IMAGE_INIT_FAIL;
389   }
390
391   if (image.software_entry() == NULL)
392   {
393      if (image.fread( cart, size) != size)
394      {
395         image.seterror(IMAGE_ERROR_UNSPECIFIED, "Unable to fully read from file");
396         return IMAGE_INIT_FAIL;
397      }
398   }
399   else
400      memcpy(cart, image.get_software_region("rom"), size);
401
402   return IMAGE_INIT_PASS;
403}
404
376405static const cassette_config pv2000_cassette_config =
377406{
378407   cassette_default_formats,
r8530r8531
413442   MDRV_CARTSLOT_ADD("cart")
414443   MDRV_CARTSLOT_EXTENSION_LIST("rom,col,bin")
415444   MDRV_CARTSLOT_NOT_MANDATORY
445   MDRV_CARTSLOT_LOAD(pv2000_cart)
446   MDRV_CARTSLOT_INTERFACE("pv2000_cart")   
447   
448   /* Software lists */
449   MDRV_SOFTWARE_LIST_ADD("cart_list","pv2000")   
416450MACHINE_DRIVER_END
417451
418452

Previous 15994 Revisions Next


© 1998-2018 The MESS Team