}\r
pdb_cleanup();\r
\r
- PicoIn.AHW &= PAHW_MCD|PAHW_SMS;\r
+ PicoIn.AHW &= PAHW_MCD|PAHW_SMS|PAHW_PICO;\r
\r
PicoCartMemSetup = NULL;\r
PicoDmaHook = NULL;\r
PicoLoadStateHook = NULL;\r
carthw_chunks = NULL;\r
\r
- if (!(PicoIn.AHW & (PAHW_MCD|PAHW_SMS)))\r
+ if (!(PicoIn.AHW & (PAHW_MCD|PAHW_SMS|PAHW_PICO)))\r
PicoCartDetect(carthw_cfg);\r
- else if (PicoIn.AHW & PAHW_SMS)\r
+ if (PicoIn.AHW & PAHW_SMS)\r
PicoCartDetectMS();\r
\r
// setup correct memory map for loaded ROM\r
check_str = 0x810, "OHMP"
hw = svp
-[Pico]
-check_str = 0x100, "SEGA PICO"
+[Soreike! Anpanman no Game de Asobou Anpanman - Pico]
+check_str = 0x100, "SEGA IAC "
hw = pico
-[Pico]
-check_str = 0x100, "SEGATOYS PICO"
-hw = pico
-
-[Pico]
-check_str = 0x100, "SEGA TOYS PICO"
-hw = pico
-
-[Pico]
-check_str = 0x100, "SAMSUNG PICO"
-hw = pico
-
-[Pico]
-check_str = 0x100, "IMA IKUNOUJYUKU"
+# Unou Kaihatsu Series: IMA IKUNO[U]JYUKU
+[Unou Kaihatsu Series - Pico]
+check_str = 0x100, "IMA IKUNO"
hw = pico
# sram emulation triggers some protection for this one
"check_str=0x810,\"OHMP\"\n"
"hw=svp\n"
"[]\n"
- "check_str=0x100,\"SEGA PICO\"\n"
+ "check_str=0x100,\"SEGA IAC \"\n"
"hw=pico\n"
"[]\n"
- "check_str=0x100,\"SEGATOYS PICO\"\n"
- "hw=pico\n"
- "[]\n"
- "check_str=0x100,\"SEGA TOYS PICO\"\n"
- "hw=pico\n"
- "[]\n"
- "check_str=0x100,\"SAMSUNG PICO\"\n"
- "hw=pico\n"
- "[]\n"
- "check_str=0x100,\"IMA IKUNOUJYUKU\"\n"
+ "check_str=0x100,\"IMA IKUNO\"\n"
"hw=pico\n"
"[]\n"
"check_str=0x120,\"PUGGSY\"\n"
static const short sms_offsets[] = { 0x7ff0, 0x3ff0, 0x1ff0 };
static const char *sms_exts[] = { "sms", "gg", "sg" };
static const char *md_exts[] = { "gen", "smd" };
+ static const char *pico_exts[] = { "pco" };
char buff0[512], buff[32];
unsigned short *d16;
pm_file *pmf;
goto extension_check;
}
- /* MD header? Act as TMSS BIOS here */
if (pm_seek(pmf, 0x100, SEEK_SET) == 0x100 && pm_read(buff, 16, pmf) == 16) {
+ /* PICO header? Almost always appropriately marked */
+ buff[16] = '\0';
+ if (strstr(buff, " PICO "))
+ goto looks_like_pico;
+ /* MD header? Act as TMSS BIOS here */
if (strncmp(buff, "SEGA", 4) == 0 || strncmp(buff, " SEG", 4) == 0)
goto looks_like_md;
}
if (strcasecmp(pmf->ext, sms_exts[i]) == 0)
goto looks_like_sms;
+ for (i = 0; i < ARRAY_SIZE(pico_exts); i++)
+ if (strcasecmp(pmf->ext, pico_exts[i]) == 0)
+ goto looks_like_pico;
+
/* If everything else fails, make a guess on the reset vector */
d16 = (unsigned short *)(buff0 + 4);
if ((((d16[0] << 16) | d16[1]) & 0xffffff) >= pmf->size) {
looks_like_sms:
pm_close(pmf);
return PM_MARK3;
+
+looks_like_pico:
+ pm_close(pmf);
+ return PM_PICO;
}
/* checks if fname points to valid MegaCD image */
else if (media_type == PM_MARK3) {
PicoIn.AHW = PAHW_SMS;
}
+ else if (media_type == PM_PICO) {
+ PicoIn.AHW = PAHW_PICO;
+ }
rom = pm_open(rom_fname);
if (rom == NULL) {
PM_BAD_CD_NO_BIOS = -4,\r
PM_MD_CART = 1, /* also 32x */\r
PM_MARK3,\r
+ PM_PICO,\r
PM_CD,\r
};\r
\r