X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=Pico%2FCart.c;h=4de0fd4433e4b1f6b7fe53864bc5ce6059e0f95f;hb=e5fa9817777032758511868c8aaa9ff780786c3f;hp=1dc3eae2d66e9897152698ad6f9443aa74994a8c;hpb=9037e45d9f2752fdd6ebbc01328148839403a84f;p=picodrive.git diff --git a/Pico/Cart.c b/Pico/Cart.c index 1dc3eae..4de0fd4 100644 --- a/Pico/Cart.c +++ b/Pico/Cart.c @@ -481,7 +481,10 @@ int PicoCartLoad(pm_file *f,unsigned char **prom,unsigned int *psize) } // Check for SMD: - if ((size&0x3fff)==0x200) { DecodeSmd(rom,size); size-=0x200; } // Decode and byteswap SMD + if (size >= 0x4200 && (size&0x3fff)==0x200 && + ((rom[0x2280] == 'S' && rom[0x280] == 'E') || (rom[0x280] == 'S' && rom[0x2281] == 'E'))) { + DecodeSmd(rom,size); size-=0x200; // Decode and byteswap SMD + } else Byteswap(rom,size); // Just byteswap if (prom) *prom=rom; @@ -512,7 +515,7 @@ int PicoCartInsert(unsigned char *rom,unsigned int romsize) PicoCartUnloadHook = NULL; } - PicoAHW &= ~PAHW_SVP; + PicoAHW &= PAHW_MCD; PicoMemResetHooks(); PicoDmaHook = NULL; @@ -712,7 +715,7 @@ static void PicoCartDetect(void) } // Unusual region 'code' - if (rom_strcmp(0x1f0, "EUROPE") == 0) + if (rom_strcmp(0x1f0, "EUROPE") == 0 || rom_strcmp(0x1f0, "Europe") == 0) *(int *) (Pico.rom+0x1f0) = 0x20204520; }