Previous 15994 Revisions Next

r8720 Friday 6th August, 2010 at 13:39:45 UTC by Fabio Priuli
Fixed extrainfo issue in all the other drivers which use it. I guess both NES and INTV might have had problems loading certain games in 0.139 due to this.
[src/mess/drivers]a2600.c
[src/mess/machine]ataricrt.c intv.c lynx.c msx.c nes.c pce.c

src/mess/machine/ataricrt.c
r8719r8720
289289      const char *info;
290290      memcpy(&mem[0x4000], &mem[0x8000], 0x4000);
291291      info = image.extrainfo();
292      if (info!=NULL && strcmp(info, "A13MIRRORING")==0)
292      if (strcmp(info, "") && !strcmp(info, "A13MIRRORING"))
293293      {
294294         memcpy(&mem[0x8000], &mem[0xa000], 0x2000);
295295         memcpy(&mem[0x6000], &mem[0x4000], 0x2000);
src/mess/machine/nes.c
r8719r8720
646646
647647   if (image.software_entry() == NULL)
648648   {
649      const char *mapinfo;
649      const char *mapinfo = NULL;
650650      int mapint1 = 0, mapint2 = 0, mapint3 = 0, mapint4 = 0, goodcrcinfo = 0;
651651      char magic[4], extend[5];
652652      int local_options = 0;
r8719r8720
665665         state->prg_ram = 1;   // always map state->wram in bank5 (eventually, this should be enabled only for some mappers)
666666
667667         // check if the image is recognized by nes.hsi
668         mapinfo = image.extrainfo();
668         if (strcmp(image.extrainfo(), ""))
669            mapinfo = image.extrainfo();
669670
670671         // image_extrainfo() resets the file position back to start.
671672         // Let's skip past the magic header once again.
src/mess/machine/msx.c
r8719r8720
8888   int size_aligned;
8989   UINT8 *mem;
9090   int type;
91   const char *extra;
91   const char *extra = NULL;
9292   char *sramfile;
9393   slot_state *state;
9494   int id = -1;
r8719r8720
133133   }
134134
135135   /* see if msx.crc will tell us more */
136   extra = image.extrainfo ();
137   if (!extra) {
136   if (strcmp(image.extrainfo(), ""))
137      extra = image.extrainfo ();
138
139   if (!extra)
140   {
138141      logerror("cart #%d: warning: no information in crc file\n", id);
139142      type = -1;
140143   }
141   else if ((1 != sscanf (extra, "%d", &type) ) ||
142         type < 0 || type > SLOT_LAST_CARTRIDGE_TYPE) {
144   else if ((1 != sscanf(extra, "%d", &type) ) ||
145         type < 0 || type > SLOT_LAST_CARTRIDGE_TYPE)
146   {
143147      logerror("cart #%d: warning: information in crc file not valid\n", id);
144148      type = -1;
145149   }
146   else {
150   else
151   {
147152      logerror ("cart #%d: info: cart extra info: '%s' = %s\n", id, extra,
148153                  msx_slot_list[type].name);
149154   }
150155
151156   /* if not, attempt autodetection */
152   if (type < 0) {
157   if (type < 0)
158   {
153159      type = msx_probe_type (mem, size);
154160
155161      if (mem[0] != 'A' || mem[1] != 'B') {
src/mess/machine/lynx.c
r8719r8720
19261926
19271927void lynx_crc_keyword(device_image_interface &image)
19281928{
1929    const char *info;
1929    const char *info = NULL;
19301930
1931    info = image.extrainfo();
1931   if (strcmp(image.extrainfo(), ""))
1932       info = image.extrainfo();
1933
19321934    rotate = 0;
19331935
19341936    if (info)
src/mess/machine/intv.c
r8719r8720
398398      int start, size;
399399      int mapper, rom[5], ram, extra;
400400
401      if (!image.extrainfo())
401      if (!strcmp(image.extrainfo(), ""))
402402      {
403403         /* If no extrainfo, we assume a single 0x2000 chunk at 0x5000 */
404404         for (i = 0; i < 0x2000; i++ )
src/mess/machine/pce.c
r8719r8720
114114{
115115   UINT32 size;
116116   int split_rom = 0, offset = 0;
117   const char *extrainfo;
117   const char *extrainfo = NULL;
118118   unsigned char *ROM;
119119   logerror("*** DEVICE_IMAGE_LOAD(pce_cart) : %s\n", image.filename());
120120
r8719r8720
141141   {
142142      image.fseek(offset, SEEK_SET);
143143      image.fread( ROM, size);
144      extrainfo = image.extrainfo();
144      if (strcmp(image.extrainfo(), ""))
145         extrainfo = image.extrainfo();
145146   }
146147   else
147   {
148148      memcpy(ROM, image.get_software_region("rom") + offset, size);
149      extrainfo = NULL;
150   }
151149
152150   if (extrainfo)
153151   {
src/mess/drivers/a2600.c
r8719r8720
560560   running_machine *machine = image.device().machine;
561561   const struct _extrainfo_banking_def *eibd;
562562   UINT8 *cart = CART;
563   const char   *extrainfo;
563   const char   *extrainfo = NULL;
564564
565565   cart_size = image.length();
566566
r8719r8720
596596      }
597597   }
598598
599   extrainfo = image.extrainfo();
599   if (strcmp(image.extrainfo(), ""))
600      extrainfo = image.extrainfo();
600601
601   if ( extrainfo && extrainfo[0] )
602   if (extrainfo && extrainfo[0])
602603   {
603      for ( eibd = extrainfo_banking_defs; eibd->extrainfo[0]; eibd++ )
604      for (eibd = extrainfo_banking_defs; eibd->extrainfo[0]; eibd++)
604605      {
605         if ( ! mame_stricmp( eibd->extrainfo, extrainfo ) )
606         if (! mame_stricmp(eibd->extrainfo, extrainfo))
606607         {
607608            banking_mode = eibd->bank_mode;
608609         }

Previous 15994 Revisions Next


© 1998-2018 The MESS Team