int MainWidth=720,MainHeight=480;\r
\r
static HMENU mdisplay = 0;\r
+static int rom_loaded = 0;\r
\r
static void UpdateRect()\r
{\r
static void LoadROM(const char *cmdpath)\r
{\r
static char rompath[MAX_PATH] = { 0, };\r
- static unsigned char *rom_data = NULL;\r
unsigned char *rom_data_new = NULL;\r
unsigned int rom_size = 0;\r
pm_file *rom = NULL;\r
LoopWait=1;\r
for (i = 0; LoopWaiting == 0 && i < 10; i++) Sleep(100);\r
\r
+ PicoUnloadCart();\r
PicoCartInsert(rom_data_new, rom_size);\r
\r
- if (rom_data) free(rom_data);\r
- rom_data = rom_data_new;\r
+ rom_loaded = 1;\r
romname = rompath;\r
LoopWait=0;\r
}\r
lock_to_1_1=0;\r
CheckMenuItem(mdisplay, 1104, MF_UNCHECKED);\r
}\r
- LoopWait=0;\r
+ if (rom_loaded) LoopWait=0;\r
return 0;\r
case 1104:\r
lock_to_1_1=!lock_to_1_1;\r
"NJ: CZ80\n"\r
"MAME devs: YM2612 and SN76496 cores\n"\r
"Stéphane Dallongeville: Gens code, base of Fame/C (C68K), CZ80\n"\r
- "Tasco Deluxe: SVP RE work\n",\r
+ "Tasco Deluxe: SVP RE work\n"\r
+ "Pierpaolo Prazzoli: info about SSP16 chips\n",\r
"About", 0);\r
return 0;\r
}\r
InsertMenu(mmain, -1, MF_BYPOSITION|MF_STRING|MF_POPUP, (UINT_PTR) mfile, "&File");\r
InsertMenu(mmain, -1, MF_BYPOSITION|MF_STRING|MF_POPUP, (UINT_PTR) mdisplay, "&Display");\r
// InsertMenu(mmain, -1, MF_BYPOSITION|MF_STRING|MF_POPUP, 1200, "&Config");\r
- InsertMenu(mmain, -1, MF_BYPOSITION|MF_STRING|MF_POPUP, 1300, "&About");\r
+ InsertMenu(mmain, -1, MF_BYPOSITION|MF_STRING, 1300, "&About");\r
\r
// Create the window:\r
FrameWnd=CreateWindow(wc.lpszClassName,"PicoDrive " VERSION,style|WS_VISIBLE,\r