Added refresh rate and sound stereo delay options, vsync=true to enable double buffer

This commit is contained in:
fabio.olimpieri 2013-12-27 09:11:19 +00:00
parent 0623999eab
commit 1ad41dbcf6
3 changed files with 39 additions and 22 deletions

View File

@ -5554,8 +5554,10 @@ void check_prefs_changed_custom (void)
if (currprefs.chipset_mask != changed_prefs.chipset_mask || if (currprefs.chipset_mask != changed_prefs.chipset_mask ||
currprefs.gfx_vsync != changed_prefs.gfx_vsync || currprefs.gfx_vsync != changed_prefs.gfx_vsync ||
currprefs.ntscmode != changed_prefs.ntscmode) { currprefs.ntscmode != changed_prefs.ntscmode ||
currprefs.gfx_refreshrate != changed_prefs.gfx_refreshrate){
currprefs.gfx_vsync = changed_prefs.gfx_vsync; currprefs.gfx_vsync = changed_prefs.gfx_vsync;
currprefs.gfx_refreshrate = changed_prefs.gfx_refreshrate;
currprefs.chipset_mask = changed_prefs.chipset_mask; currprefs.chipset_mask = changed_prefs.chipset_mask;
if (currprefs.ntscmode != changed_prefs.ntscmode) { if (currprefs.ntscmode != changed_prefs.ntscmode) {
currprefs.ntscmode = changed_prefs.ntscmode; currprefs.ntscmode = changed_prefs.ntscmode;

View File

@ -136,6 +136,8 @@ static const char *emulation_messages[] = {
/*03*/ "^|real|max|90%|80%|60%|40%|20%|0%", /*03*/ "^|real|max|90%|80%|60%|40%|20%|0%",
/*04*/ "Framerate", /*04*/ "Framerate",
/*05*/ "^|100%|50%|33%|25%|12%|custom", /*05*/ "^|100%|50%|33%|25%|12%|custom",
/*04*/ "Refresh rate (Hz)",
/*05*/ "^|off|10|20|30|40|50|60",
/*06*/ "Floppy speed", /*06*/ "Floppy speed",
/*07*/ "^|normal|turbo|400%|800%", /*07*/ "^|normal|turbo|400%|800%",
/*08*/ "Collision level", /*08*/ "Collision level",
@ -150,13 +152,16 @@ static const char *audio_messages[] = {
/*01*/ "^|none|normal|exact", /*01*/ "^|none|normal|exact",
/*02*/ " ", /*02*/ " ",
/*03*/ "Sound stereo separation", /*03*/ "Sound stereo separation",
/*04*/ "^|0|3|6|9|12", /*04*/ "^|0|20%|40%|60%|80%|100%",
/*05*/ " ", /*05*/ " ",
/*06*/ "Sound interpolation", /*06*/ "Sound stereo delay",
/*07*/ "^|none|rh|crux|sinc", /*07*/ "^|0|2|4|6|8|10",
/*08*/ " ", /*08*/ " ",
/*09*/ "Floppy sound", /*09*/ "Sound interpolation",
/*10*/ "^|on|off", /*10*/ "^|none|rh|crux|sinc",
/*11*/ " ",
/*12*/ "Floppy sound",
/*13*/ "^|on|off",
NULL NULL
}; };
@ -593,7 +598,7 @@ void set_dfxclick(int sounddf_on)
static void emulation_options(void) static void emulation_options(void)
{ {
int submenus[6]; int submenus[7];
int opt; int opt;
memset(submenus, 0, sizeof(submenus)); memset(submenus, 0, sizeof(submenus));
@ -601,37 +606,44 @@ static void emulation_options(void)
submenus[0] = get_emulation_accuracy(); submenus[0] = get_emulation_accuracy();
submenus[1] = get_cpu_to_chipset_speed(); submenus[1] = get_cpu_to_chipset_speed();
submenus[2] = get_gfx_framerate(); submenus[2] = get_gfx_framerate();
submenus[3] = get_floppy_speed(); submenus[3] = changed_prefs.gfx_refreshrate/10;
submenus[4] = changed_prefs.collision_level; submenus[4] = get_floppy_speed();
submenus[5] = !changed_prefs.immediate_blits; submenus[5] = changed_prefs.collision_level;
submenus[6] = !changed_prefs.immediate_blits;
opt = menu_select_title("Emulation options menu", opt = menu_select_title("Emulation options menu",
emulation_messages, submenus); emulation_messages, submenus);
if (opt < 0) if (opt < 0)
return; return;
if ((submenus[3] != changed_prefs.gfx_refreshrate/10)&&(currprefs.gfx_vsync==0))
msgInfo("You must set gfx_vsync=true in uaerc file",3000,0);
/* Cycle-exact or not? */ /* Cycle-exact or not? */
set_emulation_accuracy(submenus[0]); set_emulation_accuracy(submenus[0]);
set_cpu_to_chipset_speed(submenus[1]); set_cpu_to_chipset_speed(submenus[1]);
set_gfx_framerate(submenus[2]); set_gfx_framerate(submenus[2]);
set_floppy_speed(submenus[3]); changed_prefs.gfx_refreshrate = submenus[3]*10;
changed_prefs.collision_level = submenus[4]; set_floppy_speed(submenus[4]);
changed_prefs.immediate_blits = !submenus[5]; changed_prefs.collision_level = submenus[5];
changed_prefs.immediate_blits = !submenus[6];
} }
static void audio_options(void) static void audio_options(void)
{ {
int submenus[4]; int submenus[5];
int opt; int opt;
memset(submenus, 0, sizeof(submenus)); memset(submenus, 0, sizeof(submenus));
submenus[0] = changed_prefs.produce_sound-1; submenus[0] = changed_prefs.produce_sound-1;
submenus[1] = changed_prefs.sound_stereo_separation/3; submenus[1] = changed_prefs.sound_stereo_separation/2;
submenus[2] = changed_prefs.sound_interpol; submenus[2] = changed_prefs.sound_mixed_stereo/2;
submenus[3] = !get_dfxclick(); submenus[3] = changed_prefs.sound_interpol;
submenus[4] = !get_dfxclick();
opt = menu_select_title("Audio options menu", opt = menu_select_title("Audio options menu",
audio_messages, submenus); audio_messages, submenus);
@ -639,9 +651,10 @@ static void audio_options(void)
return; return;
changed_prefs.produce_sound = submenus[0]+1; changed_prefs.produce_sound = submenus[0]+1;
changed_prefs.sound_stereo_separation = submenus[1]*3; changed_prefs.sound_stereo_separation = submenus[1]*2;
changed_prefs.sound_interpol = submenus[2]; changed_prefs.sound_mixed_stereo = submenus[2]*2;
set_dfxclick(!submenus[3]); changed_prefs.sound_interpol = submenus[3];
set_dfxclick(!submenus[4]);
} }
static void other_options(void) static void other_options(void)

View File

@ -170,7 +170,9 @@ gfx_width_fullscreen=640
gfx_height_fullscreen=480 gfx_height_fullscreen=480
gfx_center_horizontal=true gfx_center_horizontal=true
gfx_center_vertical=true gfx_center_vertical=true
gfx_vsync=false
# This enables double buffer and refresh rate setting
gfx_vsync=true
# Set true to adapt the Amiga screen to Wii SDL screen (640X480) # Set true to adapt the Amiga screen to Wii SDL screen (640X480)
gfx_correct_aspect=false gfx_correct_aspect=false