currentConfig.KeyBinds[ 6] = 1<<5;
currentConfig.KeyBinds[ 7] = 1<<6;
currentConfig.KeyBinds[ 4] = 1<<7;
+ currentConfig.KeyBinds[13] = 1<<26; // switch rend
currentConfig.KeyBinds[ 8] = 1<<27; // save state
currentConfig.KeyBinds[ 9] = 1<<28; // load state
currentConfig.KeyBinds[12] = 1<<29; // vol up
if (!(Pico.video.reg[1]&8)) num += 8;
DrawLineDest = (unsigned short *) giz_screen + 321*(num+1);
+ if ((currentConfig.EmuOpt&0x4000) && (num&1) == (Pico.m.frame_count&1))
+ return 1; // skip next line
+
return 0;
}
Pico.m.dirtyPal = 0;
vidConvCpyRGB565(localPal, Pico.cram, 0x40);
}
- if (!(Pico.video.reg[12]&1)) lines_flags|=0x100;
+ if (!(Pico.video.reg[12]&1)) lines_flags|=0x10000;
+ if (currentConfig.EmuOpt&0x4000)
+ lines_flags|=(Pico.m.frame_count&1)?0x20000:0x40000;
vidCpy8to16((unsigned short *)giz_screen+321*8, PicoDraw2FB+328*8, localPal, lines_flags);
}
else if (!(emu_opt&0x80))
} */
}
lines_flags = (Pico.video.reg[1]&8) ? 240 : 224;
- if (!(Pico.video.reg[12]&1)) lines_flags|=0x100;
+ if (!(Pico.video.reg[12]&1)) lines_flags|=0x10000;
+ if (currentConfig.EmuOpt&0x4000)
+ lines_flags|=(Pico.m.frame_count&1)?0x20000:0x40000;
vidCpy8to16((unsigned short *)giz_screen+321*8, PicoDraw2FB+328*8, localPal, lines_flags);
}
if (which & 0x1800) { // save or load (but not both)
int do_it = 1;
if ( emu_checkSaveFile(state_slot) &&
- (( (which & 0x1000) && (currentConfig.EmuOpt & 0x800)) || // load
- (!(which & 0x1000) && (currentConfig.EmuOpt & 0x200))) ) { // save
+ (( (which & 0x1000) && (currentConfig.EmuOpt & 0x800)) || // load
+ (!(which & 0x1000) && (currentConfig.EmuOpt & 0x200))) ) // save
+ {
int keys;
+ if (giz_screen == NULL)
+ giz_screen = Framework2D_LockBuffer();
blit("", (which & 0x1000) ? "LOAD STATE? (PLAY=yes, STOP=no)" : "OVERWRITE SAVE? (PLAY=yes, STOP=no)");
while( !((keys = Framework_PollGetButtons()) & (BTN_PLAY|BTN_STOP)) )
Sleep(50);
reset_timing = 1;
}
if (which & 0x0400) { // switch renderer
- if ( PicoOpt&0x10) { PicoOpt&=~0x10; currentConfig.EmuOpt |= 0x80; }
- else if (!(currentConfig.EmuOpt&0x80)) PicoOpt|= 0x10;
- else currentConfig.EmuOpt &= ~0x80;
+ if (PicoOpt&0x10) { PicoOpt&=~0x10; currentConfig.EmuOpt |= 0x80; }
+ else { PicoOpt|= 0x10; currentConfig.EmuOpt &= ~0x80; }
vidResetMode();
PicoFrame();
+ if (currentConfig.EmuOpt&0x2000)
+ Framework2D_WaitVSync();
+
if (giz_screen == NULL)
giz_screen = Framework2D_LockBuffer();
{ "Emulate Z80", MB_ONOFF, MA_OPT2_ENABLE_Z80, ¤tConfig.PicoOpt,0x0004, 0, 0, 1 },\r
{ "Emulate YM2612 (FM)", MB_ONOFF, MA_OPT2_ENABLE_YM2612, ¤tConfig.PicoOpt,0x0001, 0, 0, 1 },\r
{ "Emulate SN76496 (PSG)", MB_ONOFF, MA_OPT2_ENABLE_SN76496,¤tConfig.PicoOpt,0x0002, 0, 0, 1 },\r
+ { "Wait for V-sync (slow)", MB_ONOFF, MA_OPT2_VSYNC, ¤tConfig.EmuOpt, 0x2000, 0, 0, 1 },\r
{ "gzip savestates", MB_ONOFF, MA_OPT2_GZIP_STATES, ¤tConfig.EmuOpt, 0x0008, 0, 0, 1 },\r
{ "Don't save last used ROM", MB_ONOFF, MA_OPT2_NO_LAST_ROM, ¤tConfig.EmuOpt, 0x0020, 0, 0, 1 },\r
{ "done", MB_NONE, MA_OPT2_DONE, NULL, 0, 0, 0, 1 },\r
menu_entry opt_entries[] =\r
{\r
{ NULL, MB_NONE, MA_OPT_RENDERER, NULL, 0, 0, 0, 1 },\r
- { "Scale low res mode", MB_ONOFF, MA_OPT_SCALING, ¤tConfig.scaling, 0x001, 0, 3, 1 },\r
- { "Accurate timing (slower)", MB_ONOFF, MA_OPT_ACC_TIMING, ¤tConfig.PicoOpt, 0x040, 0, 0, 1 },\r
- { "Accurate sprites (slower)", MB_ONOFF, MA_OPT_ACC_SPRITES, ¤tConfig.PicoOpt, 0x080, 0, 0, 1 },\r
- { "Show FPS", MB_ONOFF, MA_OPT_SHOW_FPS, ¤tConfig.EmuOpt, 0x002, 0, 0, 1 },\r
+ { "Interlaced rend. (faster)", MB_ONOFF, MA_OPT_INTERLACED, ¤tConfig.EmuOpt, 0x4000, 0, 0, 1 },\r
+ { "Scale low res mode", MB_ONOFF, MA_OPT_SCALING, ¤tConfig.scaling, 0x0001, 0, 3, 1 },\r
+ { "Accurate timing (slower)", MB_ONOFF, MA_OPT_ACC_TIMING, ¤tConfig.PicoOpt, 0x0040, 0, 0, 1 },\r
+ { "Accurate sprites (slower)", MB_ONOFF, MA_OPT_ACC_SPRITES, ¤tConfig.PicoOpt, 0x0080, 0, 0, 1 },\r
+ { "Show FPS", MB_ONOFF, MA_OPT_SHOW_FPS, ¤tConfig.EmuOpt, 0x0002, 0, 0, 1 },\r
{ NULL, MB_RANGE, MA_OPT_FRAMESKIP, ¤tConfig.Frameskip, 0, -1, 16, 1 },\r
- { "Enable sound", MB_ONOFF, MA_OPT_ENABLE_SOUND, ¤tConfig.EmuOpt, 0x004, 0, 0, 1 },\r
+ { "Enable sound", MB_ONOFF, MA_OPT_ENABLE_SOUND, ¤tConfig.EmuOpt, 0x0004, 0, 0, 1 },\r
{ NULL, MB_NONE, MA_OPT_SOUND_QUALITY, NULL, 0, 0, 0, 1 },\r
- { "6 button pad", MB_ONOFF, MA_OPT_6BUTTON_PAD, ¤tConfig.PicoOpt, 0x020, 0, 0, 1 },\r
+ { "6 button pad", MB_ONOFF, MA_OPT_6BUTTON_PAD, ¤tConfig.PicoOpt, 0x0020, 0, 0, 1 },\r
{ NULL, MB_NONE, MA_OPT_REGION, NULL, 0, 0, 0, 1 },\r
- { "Use SRAM/BRAM savestates", MB_ONOFF, MA_OPT_SRAM_STATES, ¤tConfig.EmuOpt, 0x001, 0, 0, 1 },\r
+ { "Use SRAM/BRAM savestates", MB_ONOFF, MA_OPT_SRAM_STATES, ¤tConfig.EmuOpt, 0x0001, 0, 0, 1 },\r
{ NULL, MB_NONE, MA_OPT_CONFIRM_STATES,NULL, 0, 0, 0, 1 },\r
{ "Save slot", MB_RANGE, MA_OPT_SAVE_SLOT, &state_slot, 0, 0, 9, 1 },\r
{ "[Sega/Mega CD options]", MB_NONE, MA_OPT_SCD_OPTS, NULL, 0, 0, 0, 1 },\r
switch (selected_id) {\r
case MA_OPT_RENDERER:\r
if (inp & BTN_LEFT) {\r
- if ( currentConfig.PicoOpt&0x10) currentConfig.PicoOpt&= ~0x10;\r
- else if (!(currentConfig.EmuOpt &0x80))currentConfig.EmuOpt |= 0x80;\r
- else if ( currentConfig.EmuOpt &0x80) break;\r
+ if ((currentConfig.PicoOpt&0x10) || !(currentConfig.EmuOpt &0x80)) {\r
+ currentConfig.PicoOpt&= ~0x10;\r
+ currentConfig.EmuOpt |= 0x80;\r
+ }\r
} else {\r
- if ( currentConfig.PicoOpt&0x10) break;\r
- else if (!(currentConfig.EmuOpt &0x80))currentConfig.PicoOpt|= 0x10;\r
- else if ( currentConfig.EmuOpt &0x80) currentConfig.EmuOpt &= ~0x80;\r
+ if (!(currentConfig.PicoOpt&0x10) || (currentConfig.EmuOpt &0x80)) {\r
+ currentConfig.PicoOpt|= 0x10;\r
+ currentConfig.EmuOpt &= ~0x80;\r
+ }\r
}\r
break;\r
case MA_OPT_SOUND_QUALITY:\r
if ((inp & BTN_RIGHT) && currentConfig.PsndRate == 44100 && !(currentConfig.PicoOpt&0x08)) {\r
- currentConfig.PsndRate = 11025; currentConfig.PicoOpt|= 0x08;\r
+ currentConfig.PsndRate = 11025; currentConfig.PicoOpt|= 0x08;\r
} else if ((inp & BTN_LEFT) && currentConfig.PsndRate == 11025 && (currentConfig.PicoOpt&0x08)) {\r
currentConfig.PsndRate = 44100; currentConfig.PicoOpt&=~0x08;\r
} else currentConfig.PsndRate = sndrate_prevnext(currentConfig.PsndRate, inp & BTN_RIGHT);\r