Previous 15994 Revisions Next

r7947 Friday 30th April, 2010 at 21:03:09 UTC by Fabio Priuli
Added software list handling to svision and crvision
[hash]crvision.xml
[src/mess/drivers]crvision.c svision.c

hash/crvision.xml
r7946r7947
11<?xml version="1.0"?>
22<!DOCTYPE softwarelist SYSTEM "softwarelist.dtd">
3
4<!-- Many thanks to Luca Antignano for the help with this software list -->
35<softwarelist name="crvision" description="V-Tech Creativision cartridges">
46   <!-- Id: 8008 -->
57   <software name="airsea">
r7946r7947
8486      </part>
8587   </software>
8688
87   <!-- Id: RAM V1 - Y-2605 -->
89   <!-- Id: 8011 -->
8890   <software name="basic">
89      <description>Basic v.1 (1983, Release 2)</description>
91      <description>Basic V.1 (1983, Release 2)</description>
9092      <year>1983</year>
9193      <publisher>Video Technology Ltd.</publisher>
9294      <part name="cart" interface="crvision_cart">
r7946r7947
133135   </software>
134136
135137   <!-- Id: 8013 -->
136   <software name="deepsea1" cloneof="deepsea">
138   <software name="deepsea">
137139      <description>Deep Sea Adventure (6k Cart)</description>
138140      <year>1982</year>
139141      <publisher>Video Technology Ltd.</publisher>
r7946r7947
145147   </software>
146148
147149   <!-- Id: 8013 -->
148   <software name="deepsea">
150   <software name="deepsea1" cloneof="deepsea">
149151      <description>Deep Sea Adventure (8k Cart)</description>
150152      <year>1982</year>
151153      <publisher>Video Technology Ltd.</publisher>
r7946r7947
157159   </software>
158160
159161   <!-- Id: 8020 -->
160   <software name="locomot1" cloneof="locomot">
162   <software name="locomot">
161163      <description>Locomotive (10k cart)</description>
162164      <year>1983</year>
163165      <publisher>Video Technology Ltd.</publisher>
r7946r7947
169171   </software>
170172
171173   <!-- Id: 8020 -->
172   <software name="locomot">
174   <software name="locomot1" cloneof="locomot">
173175      <description>Locomotive (12k cart)</description>
174176      <year>1983</year>
175177      <publisher>Video Technology Ltd.</publisher>
r7946r7947
288290   </software>
289291
290292   <!-- Id: 8002 -->
291   <software name="tankatk1" cloneof="tankatk">
293   <software name="tankatk">
292294      <description>Tank Attack (6k Cart)</description>
293295      <year>1981</year>
294296      <publisher>Video Technology Ltd.</publisher>
r7946r7947
300302   </software>
301303
302304   <!-- Id: 8002 -->
303   <software name="tankatk">
305   <software name="tankatk1" cloneof="tankatk">
304306      <description>Tank Attack (8k Cart)</description>
305307      <year>1981</year>
306308      <publisher>Video Technology Ltd.</publisher>
r7946r7947
312314   </software>
313315
314316   <!-- Id: 8004 -->
315   <software name="tennis1" cloneof="tennis">
317   <software name="tennis">
316318      <description>Tennis (Wimbledon, 6k Cart)</description>
317319      <year>1981</year>
318320      <publisher>Video Technology Ltd.</publisher>
r7946r7947
324326   </software>
325327
326328   <!-- Id: 8004 -->
327   <software name="tennis">
329   <software name="tennis1" cloneof="tennis">
328330      <description>Tennis (Wimbledon, 8k Cart)</description>
329331      <year>1981</year>
330332      <publisher>Video Technology Ltd.</publisher>
r7946r7947
348350   </software>
349351
350352   <!-- Id: Y-1620 -->
351   <software name="tennisd1" cloneof="tennis">
353   <software name="tennisd" cloneof="tennis">
352354      <description>Tennis (Dick Smith, 6k Cart)</description>
353355      <year>1981</year>
354356      <publisher>Video Technology Ltd.</publisher>
r7946r7947
360362   </software>
361363
362364   <!-- Id: Y-1620 -->
363   <software name="tennisd" cloneof="tennis">
365   <software name="tennisd1" cloneof="tennis">
364366      <description>Tennis (Dick Smith, 8k Cart)</description>
365367      <year>1981</year>
366368      <publisher>Video Technology Ltd.</publisher>
r7946r7947
371373      </part>
372374   </software>
373375
376    <!-- This was an hombrew cart sold back in the 80s -->
374377   <software name="hapmon">
375378      <description>Hapmon</description>
376379      <year>19??</year>
377      <publisher>&lt;unknown&gt;</publisher>
380      <publisher>Richard Hayter</publisher>
378381      <part name="cart" interface="crvision_cart">
379382         <dataarea name="rom" size="4096">
380383            <rom name="hapmon.bin" size="4096" crc="15d07b96" sha1="89359dca952bc90644dfd7f546c184a8165faa14" offset="000000" />
r7946r7947
385388<!-- These contain the same data as chopper, but in a different order (which is not handled properly by emulators). I'm listing these here to document checksums.
386389   <software name="chopper2" cloneof="chopper">
387390      <description>Chopper Rescue (Alt 2)</description>
388      <year>19??</year>
391      <year>1983</year>
389392      <publisher>Video Technology Ltd.</publisher>
390393      <part name="cart" interface="crvision_cart">
391394         <dataarea name="rom" size="18432">
r7946r7947
396399
397400   <software name="chopper1" cloneof="chopper">
398401      <description>Chopper Rescue (Alt)</description>
399      <year>19??</year>
402      <year>1983</year>
400403      <publisher>Video Technology Ltd.</publisher>
401404      <part name="cart" interface="crvision_cart">
402405         <dataarea name="rom" size="18432">
src/mess/drivers/crvision.c
r7946r7947
446446
447447static DEVICE_IMAGE_LOAD( crvision_cart )
448448{
449   int size = image_length(image);
449   UINT32 size;
450   UINT8 *temp_copy;
450451   running_machine *machine = image->machine;
451452   UINT8 *mem = memory_region(machine, M6502_TAG);
452453   const address_space *program = cputag_get_address_space(machine, M6502_TAG, ADDRESS_SPACE_PROGRAM);
453454
455   if (image_software_entry(image) == NULL)
456   {
457      size = image_length(image);
458      temp_copy = auto_alloc_array(machine, UINT8, size);
459      image_fread(image, temp_copy, size);
460   }
461   else
462   {
463      size= image_get_software_region_length(image, "rom");
464      temp_copy = auto_alloc_array(machine, UINT8, size);
465      memcpy(temp_copy, image_get_software_region(image, "rom"), size);
466   }
467
454468   switch (size)
455469   {
456470   case 0x1000: // 4K
457      image_fread(image, mem + 0x9000, 0x1000);         // load 4KB at 0x9000
471      memcpy(mem + 0x9000, temp_copy, 0x1000);         // load 4KB at 0x9000
458472      memcpy(mem + 0xb000, mem + 0x9000, 0x1000);         // mirror 4KB at 0xb000
459473      memory_install_read_bank(program, 0x8000, 0xbfff, 0, 0x2000, BANK_ROM1);
460474      break;
461475
462476   case 0x1800: // 6K
463      image_fread(image, mem + 0x9000, 0x1000);         // load lower 4KB at 0x9000
477      memcpy(mem + 0x9000, temp_copy, 0x1000);         // load lower 4KB at 0x9000
464478      memcpy(mem + 0xb000, mem + 0x9000, 0x1000);         // mirror lower 4KB at 0xb000
465      image_fread(image, mem + 0x8000, 0x0800);         // load higher 2KB at 0x8000
479      memcpy(mem + 0x8000, temp_copy + 0x1000, 0x0800);   // load higher 2KB at 0x8000
466480      memcpy(mem + 0x8800, mem + 0x8000, 0x0800);         // mirror higher 2KB at 0x8800
467481      memcpy(mem + 0xa000, mem + 0x8000, 0x0800);         // mirror higher 2KB at 0xa000
468482      memcpy(mem + 0xa800, mem + 0x8000, 0x0800);         // mirror higher 2KB at 0xa800
r7946r7947
470484      break;
471485
472486   case 0x2000: // 8K
473      image_fread(image, mem + 0x8000, 0x2000);         // load 8KB at 0x8000
487      memcpy(mem + 0x8000, temp_copy, 0x2000);         // load 8KB at 0x8000
474488      memcpy(mem + 0xa000, mem + 0x8000, 0x2000);         // mirror 8KB at 0xa000
475489      memory_install_read_bank(program, 0x8000, 0xbfff, 0, 0x2000, BANK_ROM1);
476490      break;
477491
478492   case 0x2800: // 10K
479      image_fread(image, mem + 0x8000, 0x2000);         // load lower 8KB at 0x8000
493      memcpy(mem + 0x8000, temp_copy, 0x2000);         // load lower 8KB at 0x8000
480494      memcpy(mem + 0xa000, mem + 0x8000, 0x2000);         // mirror lower 8KB at 0xa000
481      image_fread(image, mem + 0x4000, 0x0800);         // load higher 2KB at 0x4000
495      memcpy(mem + 0x4000, temp_copy + 0x2000, 0x0800);   // load higher 2KB at 0x4000
482496      memcpy(mem + 0x4800, mem + 0x4000, 0x0800);         // mirror higher 2KB at 0x4800
483497      memcpy(mem + 0x5000, mem + 0x4000, 0x0800);         // mirror higher 2KB at 0x5000
484498      memcpy(mem + 0x5800, mem + 0x4000, 0x0800);         // mirror higher 2KB at 0x5800
r7946r7947
491505      break;
492506
493507   case 0x3000: // 12K
494      image_fread(image, mem + 0x8000, 0x2000);         // load lower 8KB at 0x8000
508      memcpy(mem + 0x8000, temp_copy, 0x2000);         // load lower 8KB at 0x8000
495509      memcpy(mem + 0xa000, mem + 0x8000, 0x2000);         // mirror lower 8KB at 0xa000
496      image_fread(image, mem + 0x4000, 0x1000);         // load higher 4KB at 0x4000
510      memcpy(mem + 0x4000, temp_copy + 0x2000, 0x1000);   // load higher 4KB at 0x4000
497511      memcpy(mem + 0x5000, mem + 0x4000, 0x1000);         // mirror higher 4KB at 0x5000
498512      memcpy(mem + 0x6000, mem + 0x4000, 0x1000);         // mirror higher 4KB at 0x6000
499513      memcpy(mem + 0x7000, mem + 0x4000, 0x1000);         // mirror higher 4KB at 0x7000
r7946r7947
502516      break;
503517
504518   case 0x4000: // 16K
505      image_fread(image, mem + 0xa000, 0x2000);         // load lower 8KB at 0xa000
506      image_fread(image, mem + 0x8000, 0x2000);         // load higher 8KB at 0x8000
519      memcpy(mem + 0xa000, temp_copy, 0x2000);         // load lower 8KB at 0xa000
520      memcpy(mem + 0x8000, temp_copy + 0x2000, 0x2000);   // load higher 8KB at 0x8000
507521      memory_install_read_bank(program, 0x8000, 0xbfff, 0, 0, BANK_ROM1);
508522      memory_install_read_bank(program, 0x4000, 0x7fff, 0, 0, BANK_ROM2);
509523      break;
510524
511525   case 0x4800: // 18K
512      image_fread(image, mem + 0xa000, 0x2000);         // load lower 8KB at 0xa000
513      image_fread(image, mem + 0x8000, 0x2000);         // load higher 8KB at 0x8000
514      image_fread(image, mem + 0x4000, 0x0800);         // load higher 2KB at 0x4000
526      memcpy(mem + 0xa000, temp_copy, 0x2000);         // load lower 8KB at 0xa000
527      memcpy(mem + 0x8000, temp_copy + 0x2000, 0x2000);   // load higher 8KB at 0x8000
528      memcpy(mem + 0x4000, temp_copy + 0x4000, 0x0800);   // load higher 2KB at 0x4000
515529      memcpy(mem + 0x4800, mem + 0x4000, 0x0800);         // mirror higher 2KB at 0x4800
516530      memcpy(mem + 0x5000, mem + 0x4000, 0x0800);         // mirror higher 2KB at 0x5000
517531      memcpy(mem + 0x5800, mem + 0x4000, 0x0800);         // mirror higher 2KB at 0x5800
r7946r7947
524538      break;
525539
526540   default:
541      auto_free(machine, temp_copy);
527542      return INIT_FAIL;
528543   }
529544
r7946r7947
533548   memory_configure_bank(machine, "bank2", 0, 1, mem + 0x4000, 0);
534549   memory_set_bank(machine, "bank2", 0);
535550
551   auto_free(machine, temp_copy);
552
536553   return INIT_PASS;
537554}
538555
r7946r7947
568585   MDRV_CARTSLOT_ADD("cart")
569586   MDRV_CARTSLOT_EXTENSION_LIST("bin,rom")
570587   MDRV_CARTSLOT_MANDATORY
588   MDRV_CARTSLOT_INTERFACE("crvision_cart")
571589   MDRV_CARTSLOT_LOAD(crvision_cart)
572590
591   /* software lists */
592   MDRV_SOFTWARE_LIST_ADD("crvision")
593
573594   /* cassette */
574595   MDRV_CASSETTE_ADD(CASSETTE_TAG, crvision_cassette_config)
575596
src/mess/drivers/svision.c
r7946r7947
456456   timer_pulse(machine, attotime_mul(ATTOTIME_IN_SEC(8), 256/cputag_get_clock(machine, "maincpu")), NULL, 0, svision_pet_timer);
457457}
458458
459static DEVICE_IMAGE_LOAD( svision_cart )
460{
461   UINT32 size;
462   UINT8 *temp_copy;
463   int mirror, i;
464   
465   if (image_software_entry(image) == NULL)
466   {
467      size = image_length(image);
468      temp_copy = auto_alloc_array(image->machine, UINT8, size);
469
470      if (size > memory_region_length(image->machine, "user1"))
471      {
472         image_seterror(image, IMAGE_ERROR_UNSPECIFIED, "Unsupported cartridge size");
473         return INIT_FAIL;
474      }
475     
476      if (image_fread(image, temp_copy, size) != size)
477      {
478         image_seterror(image, IMAGE_ERROR_UNSPECIFIED, "Unable to fully read from file");
479         return INIT_FAIL;
480      }
481   }
482   else
483   {
484      size = image_get_software_region_length(image, "rom");
485      temp_copy = auto_alloc_array(image->machine, UINT8, size);
486      memcpy(temp_copy, image_get_software_region(image, "rom"), size);
487   }
488
489   mirror = memory_region_length(image->machine, "user1") / size;
490
491   /* With the following, we mirror the cart in the whole "user1" memory region */
492   for (i = 0; i < mirror; i++)
493      memcpy(memory_region(image->machine, "user1") + i * size, temp_copy, size);
494
495   auto_free(image->machine, temp_copy);
496
497   return INIT_PASS;
498}
499
459500static MACHINE_RESET( svision )
460501{
461502   svision.timer_shot = FALSE;
r7946r7947
510551   MDRV_CARTSLOT_ADD("cart")
511552   MDRV_CARTSLOT_EXTENSION_LIST("bin,ws,sv")
512553   MDRV_CARTSLOT_MANDATORY
554   MDRV_CARTSLOT_INTERFACE("svision_cart")
555   MDRV_CARTSLOT_LOAD(svision_cart)
556
557   /* Software lists */
558   MDRV_SOFTWARE_LIST_ADD("svision")
513559MACHINE_DRIVER_END
514560
515561static MACHINE_DRIVER_START( svisionp )
r7946r7947
542588MACHINE_DRIVER_END
543589
544590ROM_START(svision)
545   ROM_REGION(0x20000, "user1", 0)
546   ROM_CART_LOAD("cart", 0x0000, 0x20000, ROM_MIRROR)
591   ROM_REGION(0x20000, "user1", ROMREGION_ERASE00)
547592ROM_END
548593
549594

Previous 15994 Revisions Next


© 1998-2018 The MESS Team