Previous 15994 Revisions Next

r8738 Sunday 8th August, 2010 at 09:01:34 UTC by Fabio Priuli
hooked up bw2 and vic1001/vic20 software lists to the correspondent drivers
[hash]vic1001_cart.xml
[src/mess/drivers]bw2.c vic20.c

hash/vic1001_cart.xml
r8737r8738
1414      </part>
1515   </software>
1616
17   <software name="ae" supported"no">
17   <software name="ae" supported="no">
1818      <description>A.E.</description>
1919      <!-- <serial>VicCart-224</serial> -->
2020      <year>1982</year>
21      <publisher>Br0derbund</publisher>
21      <publisher>Broderbund</publisher>
2222      <part name="cart" interface="vic1001_cart">
2323         <dataarea name="6000" size="8192">
24            <rom name="a.e. (br0derbund)(1982)(viccart-224)(jue).60" size="8192" crc="5b8f0411" sha1="06db59f9c2def1d9a12dad588ab9ccec9fd9f33b" offset="0x0000" />
24            <rom name="a.e. (broderbund)(1982)(viccart-224)(jue).60" size="8192" crc="5b8f0411" sha1="06db59f9c2def1d9a12dad588ab9ccec9fd9f33b" offset="0x0000" />
2525         </dataarea>
2626         <dataarea name="a000" size="8192">
27            <rom name="a.e. (br0derbund)(1982)(viccart-224)(jue).a0" size="8192" crc="05ae8278" sha1="3309bb5fe0c4fddfacfe99acbac9e8922297e7a4" offset="0x0000" />
27            <rom name="a.e. (broderbund)(1982)(viccart-224)(jue).a0" size="8192" crc="05ae8278" sha1="3309bb5fe0c4fddfacfe99acbac9e8922297e7a4" offset="0x0000" />
2828         </dataarea>
2929      </part>
3030   </software>
r8737r8738
9494      </part>
9595   </software>
9696
97    <software name="agresorn">
97    <software name="agressor">
9898      <description>Aggressor (NTSC)</description>
9999      <!-- <serial>C305</serial> -->
100100      <year>1982</year>
r8737r8738
106106      </part>
107107   </software>
108108
109    <software name="agresornp" cloneof="agresorn">
109    <software name="agressorp" cloneof="agressor">
110110      <description>Aggressor (PAL)</description>
111111      <!-- <serial>C305</serial> -->
112112      <year>1982</year>
src/mess/drivers/vic20.c
r8737r8738
558558{
559559   const address_space *program = cputag_get_address_space(image.device().machine, M6502_TAG, ADDRESS_SPACE_PROGRAM);
560560   const char *filetype = image.filetype();
561   int address = 0;
562   int size = image.length();
563   UINT8 *ptr;
561   UINT32 address = 0;
562   UINT32 size;
563   UINT8 *ptr = memory_region(image.device().machine, M6502_TAG);
564564
565   if (!mame_stricmp(filetype, "20"))
566      address = 0x2000;
567   else if (!mame_stricmp(filetype, "40"))
568      address = 0x4000;
569   else if (!mame_stricmp(filetype, "60"))
570      address = 0x6000;
571   else if (!mame_stricmp(filetype, "70"))
572      address = 0x7000;
573   else if (!mame_stricmp(filetype, "a0"))
574      address = 0xa000;
575   else if (!mame_stricmp(filetype, "b0"))
576      address = 0xb000;
565   if (image.software_entry() == NULL)
566   {
567      size = image.length();
577568
578   ptr = memory_region(image.device().machine, M6502_TAG);
569      if (!mame_stricmp(filetype, "20"))
570         address = 0x2000;
571      else if (!mame_stricmp(filetype, "40"))
572         address = 0x4000;
573      else if (!mame_stricmp(filetype, "60"))
574         address = 0x6000;
575      else if (!mame_stricmp(filetype, "70"))
576         address = 0x7000;
577      else if (!mame_stricmp(filetype, "a0"))
578         address = 0xa000;
579      else if (!mame_stricmp(filetype, "b0"))
580         address = 0xb000;
579581
580   if (size == 0x4000 && address != 0x4000)
581   {
582      image.fread( ptr + address, 0x2000);
583      image.fread( ptr + 0xa000, 0x2000);
584
585      memory_install_rom(program, address, address + 0x1fff, 0, 0, ptr + address);
586      memory_install_rom(program, 0xa000, 0xbfff, 0, 0, ptr + 0xa000);
582      // special case for a 16K image containing two 8K files glued together
583      if (size == 0x4000 && address != 0x4000)
584      {
585         image.fread(ptr + address, 0x2000);
586         image.fread(ptr + 0xa000, 0x2000);
587         
588         memory_install_rom(program, address, address + 0x1fff, 0, 0, ptr + address);
589         memory_install_rom(program, 0xa000, 0xbfff, 0, 0, ptr + 0xa000);
590      }
591      else
592      {
593         image.fread(ptr + address, size);
594         memory_install_rom(program, address, (address + size) - 1, 0, 0, ptr + address);
595      }
587596   }
588597   else
589598   {
590      image.fread( ptr + address, size);
591
592      memory_install_rom(program, address, (address + size) - 1, 0, 0, ptr + address);
599      size = image.get_software_region_length("4000");
600      if (size)
601      {
602         address = 0x4000;
603         memcpy(ptr + address, image.get_software_region("4000"), size);
604         memory_install_rom(program, address, (address + size) - 1, 0, 0, ptr + address);
605      }
606     
607      size = image.get_software_region_length("6000");
608      if (size)
609      {
610         address = 0x6000;
611         memcpy(ptr + address, image.get_software_region("6000"), size);
612         memory_install_rom(program, address, (address + size) - 1, 0, 0, ptr + address);
613      }
614     
615      size = image.get_software_region_length("a000");
616      if (size)
617      {
618         address = 0xa000;
619         memcpy(ptr + address, image.get_software_region("a000"), size);
620         memory_install_rom(program, address, (address + size) - 1, 0, 0, ptr + address);
621      }
593622   }
594623
595624   return IMAGE_INIT_PASS;
r8737r8738
656685   MDRV_CARTSLOT_ADD("cart")
657686   MDRV_CARTSLOT_EXTENSION_LIST("20,40,60,70,a0,b0")
658687   MDRV_CARTSLOT_NOT_MANDATORY
688   MDRV_CARTSLOT_INTERFACE("vic1001_cart")
659689   MDRV_CARTSLOT_LOAD(vic20_cart)
660690
691   /* software lists */
692   MDRV_SOFTWARE_LIST_ADD("cart_list","vic1001_cart")
693
661694   /* internal ram */
662695   MDRV_RAM_ADD("messram")
663696   MDRV_RAM_DEFAULT_SIZE("5K")
src/mess/drivers/bw2.c
r8737r8738
764764   DEVCB_NULL,
765765   FLOPPY_STANDARD_5_25_DSHD,
766766   FLOPPY_OPTIONS_NAME(bw2),
767   NULL
767   "bw2_flop"
768768};
769769
770770static const wd17xx_interface bw2_wd17xx_interface =
r8737r8738
855855   MDRV_WD179X_ADD("wd179x", bw2_wd17xx_interface )
856856
857857   MDRV_FLOPPY_2_DRIVES_ADD(bw2_floppy_config)
858   MDRV_SOFTWARE_LIST_ADD("flop_list","bw2")
858859
859860   /* internal ram */
860861   MDRV_RAM_ADD("messram")

Previous 15994 Revisions Next


© 1998-2018 The MESS Team