// delayed setting of DMNA bit (needed for Silpheed)
if (Pico_mcd->m.state_flags & 2) {
Pico_mcd->m.state_flags &= ~2;
- Pico_mcd->s68k_regs[3] |= 2;
- Pico_mcd->s68k_regs[3] &= ~1;
+ if (!(Pico_mcd->s68k_regs[3] & 4)) {
+ Pico_mcd->s68k_regs[3] |= 2;
+ Pico_mcd->s68k_regs[3] &= ~1;
#ifdef USE_POLL_DETECT
- if ((s68k_poll_adclk&0xfe) == 2) {
- SekSetStopS68k(0); s68k_poll_adclk = 0;
- }
+ if ((s68k_poll_adclk&0xfe) == 2) {
+ SekSetStopS68k(0); s68k_poll_adclk = 0;
+ }
#endif
+ }
}
}
get_ext(romFileName, ext);\r
}\r
\r
+ if ((PicoMCD & 1) && Pico_mcd != NULL)\r
+ Stop_CD();\r
+\r
// check for MegaCD image\r
cd_state = emu_cd_check(&used_rom_name);\r
if (cd_state > 0) {\r
{\r
if(which & 0x1800) { // save or load (but not both)\r
int do_it = 1;\r
- if (!(which & 0x1000) && (currentConfig.EmuOpt & 0x200) && emu_check_save_file(state_slot)) {\r
+ if ( emu_check_save_file(state_slot) &&\r
+ (( (which & 0x1000) && (currentConfig.EmuOpt & 0x800)) || // load\r
+ (!(which & 0x1000) && (currentConfig.EmuOpt & 0x200))) ) { // save\r
unsigned long keys;\r
- blit("", "OVERWRITE SAVE? (Y=yes, X=no)");\r
+ blit("", (which & 0x1000) ? "LOAD STATE? (Y=yes, X=no)" : "OVERWRITE SAVE? (Y=yes, X=no)");\r
while( !((keys = gp2x_joystick_read(1)) & (GP2X_X|GP2X_Y)) )\r
usleep(50*1024);\r
if (keys & GP2X_X) do_it = 0;\r
char lastRomFile[512];\r
int EmuOpt; // LSb->MSb: use_sram, show_fps, enable_sound, gzip_saves,\r
// squidgehack, no_save_cfg_on_exit, <unused>, 16_bit_mode\r
- // craigix_ram, confirm_save, show_cd_leds\r
+ // craigix_ram, confirm_save, show_cd_leds, confirm_load\r
//\r
int PicoOpt; // used for config saving only, see Pico.h\r
int PsndRate; // ditto\r
static void draw_menu_options(int menu_sel)\r
{\r
int tl_x = 25, tl_y = 32, y;\r
- char monostereo[8], strframeskip[8], *strrend, *strscaling;\r
+ char monostereo[8], strframeskip[8], *strrend, *strscaling, *strssconfirm;\r
\r
strcpy(monostereo, (currentConfig.PicoOpt&0x08)?"stereo":"mono");\r
if (currentConfig.Frameskip < 0)\r
case 2: strscaling = "hw horiz. + vert."; break;\r
case 3: strscaling = "sw horizontal"; break;\r
}\r
+ switch ((currentConfig.EmuOpt >> 9) & 5) {\r
+ default: strssconfirm = "OFF"; break;\r
+ case 1: strssconfirm = "writes"; break;\r
+ case 4: strssconfirm = "loads"; break;\r
+ case 5: strssconfirm = "both"; break;\r
+ }\r
\r
y = tl_y;\r
//memset(gp2x_screen, 0, 320*240);\r
gp2x_text_out8(tl_x, (y+=10), "6 button pad %s", (currentConfig.PicoOpt&0x020)?"ON":"OFF"); // 9\r
gp2x_text_out8(tl_x, (y+=10), "Genesis Region: %s", region_name(currentConfig.PicoRegion));\r
gp2x_text_out8(tl_x, (y+=10), "Use SRAM/BRAM savestates %s", (currentConfig.EmuOpt &0x001)?"ON":"OFF"); // 11\r
- gp2x_text_out8(tl_x, (y+=10), "Confirm save overwrites %s", (currentConfig.EmuOpt &0x200)?"ON":"OFF"); // 12\r
+ gp2x_text_out8(tl_x, (y+=10), "Confirm savestate %s", strssconfirm); // 12\r
gp2x_text_out8(tl_x, (y+=10), "Save slot %i", state_slot); // 13\r
gp2x_text_out8(tl_x, (y+=10), "GP2X CPU clocks %iMhz", currentConfig.CPUclock);\r
gp2x_text_out8(tl_x, (y+=10), "[Sega/Mega CD options]");\r
case 8: currentConfig.PicoOpt^=0x200; break;\r
case 9: currentConfig.PicoOpt^=0x020; break;\r
case 11: currentConfig.EmuOpt ^=0x001; break;\r
- case 12: currentConfig.EmuOpt ^=0x200; break;\r
case 15: cd_menu_loop_options();\r
if (engineState == PGS_ReloadRom)\r
return 0; // test BIOS\r
case 10:\r
region_prevnext(inp & GP2X_RIGHT);\r
break;\r
+ case 12: {\r
+ int n = ((currentConfig.EmuOpt>>9)&1) | ((currentConfig.EmuOpt>>10)&2);\r
+ n += (inp & GP2X_LEFT) ? -1 : 1;\r
+ if (n < 0) n = 0; else if (n > 3) n = 3;\r
+ n |= n << 1; n &= ~2;\r
+ currentConfig.EmuOpt &= ~0xa00;\r
+ currentConfig.EmuOpt |= n << 9;\r
+ break;\r
+ }\r
case 13:\r
if (inp & GP2X_RIGHT) {\r
state_slot++; if (state_slot > 9) state_slot = 0;\r