-// This is part of Pico Library\r
-\r
-// (c) Copyright 2004 Dave, All rights reserved.\r
-// (c) Copyright 2006-2007, Grazvydas "notaz" Ignotas\r
-// Free for non-commercial use.\r
-\r
-// For commercial use, separate licencing terms must be obtained.\r
-\r
+/*\r
+ * PicoDrive\r
+ * (c) Copyright Dave, 2004\r
+ * (C) notaz, 2006-2010\r
+ *\r
+ * This work is licensed under the terms of MAME license.\r
+ * See COPYING file in the top-level directory.\r
+ */\r
\r
#include "pico_int.h"\r
#include "../zlib/zlib.h"\r
void (*PicoCartLoadProgressCB)(int percent) = NULL;\r
void (*PicoCDLoadProgressCB)(const char *fname, int percent) = NULL; // handled in Pico/cd/cd_file.c\r
\r
+int PicoGameLoaded;\r
+\r
static void PicoCartDetect(const char *carthw_cfg);\r
\r
/* cso struct */\r
if (filesize > (1 << s))\r
s++;\r
rom_alloc_size = 1 << s;\r
+ // be sure we can cover all address space\r
+ if (rom_alloc_size < 0x10000)\r
+ rom_alloc_size = 0x10000;\r
}\r
else {\r
// make alloc size at least sizeof(mcd_state),\r
\r
// Allocate space for the rom plus padding\r
// use special address for 32x dynarec\r
- rom = plat_mmap(0x02000000, rom_alloc_size);\r
+ rom = plat_mmap(0x02000000, rom_alloc_size, 0, 0);\r
return rom;\r
}\r
\r
else\r
PicoPower();\r
\r
+ PicoGameLoaded = 1;\r
return 0;\r
}\r
\r
plat_munmap(Pico.rom, rom_alloc_size);\r
Pico.rom = NULL;\r
}\r
+ PicoGameLoaded = 0;\r
}\r
\r
static unsigned int rom_crc32(void)\r
carthw_realtec_startup();\r
else if (strcmp(p, "radica_mapper") == 0)\r
carthw_radica_startup();\r
+ else if (strcmp(p, "piersolar_mapper") == 0)\r
+ carthw_pier_startup();\r
else if (strcmp(p, "prot_lk3") == 0)\r
carthw_prot_lk3_startup();\r
else {\r