}\r
if (do_it) {\r
blit("", (which & 0x1000) ? "LOADING GAME" : "SAVING GAME");\r
- if(movie_data) {\r
- }\r
emu_SaveLoadGame(which & 0x1000, 0);\r
}\r
\r
\r
// make save filename\r
romfname_ext(saveFname, "");\r
- if(sram) strcat(saveFname, ".srm");\r
+ if(sram) strcat(saveFname, (PicoMCD&1) ? ".brm" : ".srm");\r
else {\r
if(state_slot > 0 && state_slot < 10) sprintf(saveFname, "%s.%i", saveFname, state_slot);\r
strcat(saveFname, ".mds");\r
\r
if(sram) {\r
FILE *sramFile;\r
- int sram_size = SRam.end-SRam.start+1;\r
- if(SRam.reg_back & 4) sram_size=0x2000;\r
- if(!SRam.data) return 0; // SRam forcefully disabled for this game\r
+ int sram_size;\r
+ unsigned char *sram_data;\r
+ if (PicoMCD&1) {\r
+ sram_size = 0x2000;\r
+ sram_data = Pico_mcd->bram;\r
+ } else {\r
+ sram_size = SRam.end-SRam.start+1;\r
+ if(SRam.reg_back & 4) sram_size=0x2000;\r
+ sram_data = SRam.data;\r
+ }\r
+ if(!sram_data) return 0; // SRam forcefully disabled for this game\r
+\r
if(load) {\r
sramFile = fopen(saveFname, "rb");\r
if(!sramFile) return -1;\r
- fread(SRam.data, 1, sram_size, sramFile);\r
+ fread(sram_data, 1, sram_size, sramFile);\r
fclose(sramFile);\r
} else {\r
// sram save needs some special processing\r
// see if we have anything to save\r
for(; sram_size > 0; sram_size--)\r
- if(SRam.data[sram_size-1]) break;\r
+ if(sram_data[sram_size-1]) break;\r
\r
if(sram_size) {\r
sramFile = fopen(saveFname, "wb");\r
- ret = fwrite(SRam.data, 1, sram_size, sramFile);\r
+ ret = fwrite(sram_data, 1, sram_size, sramFile);\r
ret = (ret != sram_size) ? -1 : 0;\r
fclose(sramFile);\r
sync();\r
}\r
}\r
return ret;\r
- } else {\r
+ }\r
+ else\r
+ {\r
void *PmovFile = NULL;\r
// try gzip first\r
if(currentConfig.EmuOpt & 8) {\r