added zram clearing on reset for Psycho Pinball (does it happen on hw?)
[picodrive.git] / Pico / Cart.c
index dacd793..4de0fd4 100644 (file)
@@ -481,7 +481,10 @@ int PicoCartLoad(pm_file *f,unsigned char **prom,unsigned int *psize)
   }\r
 \r
   // Check for SMD:\r
-  if ((size&0x3fff)==0x200) { DecodeSmd(rom,size); size-=0x200; } // Decode and byteswap SMD\r
+  if (size >= 0x4200 && (size&0x3fff)==0x200 &&\r
+      ((rom[0x2280] == 'S' && rom[0x280] == 'E') || (rom[0x280] == 'S' && rom[0x2281] == 'E'))) {\r
+    DecodeSmd(rom,size); size-=0x200; // Decode and byteswap SMD\r
+  }\r
   else Byteswap(rom,size); // Just byteswap\r
 \r
   if (prom)  *prom=rom;\r
@@ -712,7 +715,7 @@ static void PicoCartDetect(void)
   }\r
 \r
   // Unusual region 'code'\r
-  if (rom_strcmp(0x1f0, "EUROPE") == 0)\r
+  if (rom_strcmp(0x1f0, "EUROPE") == 0 || rom_strcmp(0x1f0, "Europe") == 0)\r
     *(int *) (Pico.rom+0x1f0) = 0x20204520;\r
 }\r
 \r