Remove the CPU options menu and add a menu with general options. Currently

contains CPU and floppy speed settings and leds on/off
This commit is contained in:
simon.kagstrom 2009-05-21 11:54:30 +00:00
parent 7a0a29b614
commit 11cfa91379

View File

@ -51,17 +51,13 @@ static const char *memory_messages[] = {
NULL NULL
}; };
static const char *cpu_messages[] = { static const char *options_messages[] = {
/*00*/ "Model", /*00*/ "CPU to chipset speed",
/*01*/ "^|68000|68010|68020|68030|68040", /*01*/ "^|max|1|2|3|5|10|15|20",
/*02*/ "Accuracy", /*02*/ "Floppy speed",
/*03*/ "^|Normal|Compatible|Cycle exact", /*03*/ "^|100|400|800",
/*04*/ "Speed", /*04*/ "Leds",
/*05*/ "^|Approx 1-1|Maximum", /*05*/ "^|on|off",
/*06*/ "Chipset",
/*07*/ "^|OCS|ECS Agnus|Full ECS|AGA",
/*08*/ "TV mode (emulation)",
/*09*/ "^|NTSC|PAL",
NULL NULL
}; };
@ -221,33 +217,68 @@ static void memory_options(void)
prefs_has_changed = 1; prefs_has_changed = 1;
} }
static void cpu_options(void) static int get_cpu_to_chipset_speed(void)
{ {
int submenus[5], opt; switch(currprefs.m68k_speed)
memset(submenus, 0, sizeof(submenus)); {
case 1: return 1;
case 2: return 2;
case 3: return 3;
case 5: return 4;
case 10: return 5;
case 15: return 6;
case 20: return 7;
default: break; /* max */
}
return 0;
}
submenus[0] = currprefs.cpu_level; static void set_cpu_to_chipset_speed(int which)
submenus[1] = currprefs.cpu_cycle_exact; {
submenus[2] = currprefs.m68k_speed; int table[] = {-1,1,2,3,5,10,15,20};
// submenus[3] = currprefs.chipset_mask; // FIXME!
submenus[4] = currprefs.chipset_refreshrate == 50;
opt = menu_select_title("CPU options menu", changed_prefs.m68k_speed = table[which];
cpu_messages, submenus); }
if (opt < 0)
return;
changed_prefs.cpu_level = submenus[0]; static int get_floppy_speed(void)
changed_prefs.cpu_cycle_exact = submenus[1]; {
changed_prefs.m68k_speed = submenus[2]; switch(currprefs.floppy_speed)
/* FIXME! Chipset mask */ {
changed_prefs.chipset_refreshrate = submenus[4] == 1 ? 60 : 50; case 400:
prefs_has_changed = 1; return 1;
case 800:
return 2;
default: break; /* 100 */
}
return 0;
}
static void set_floppy_speed(int which)
{
int table[] = {100, 400, 800};
changed_prefs.floppy_speed = table[which];
} }
static void general_options(void) static void general_options(void)
{ {
// changed_prefs.leds_on_screen = 1; //Floppy, Power, FPS, etc etc. int submenus[3];
int opt;
submenus[0] = get_cpu_to_chipset_speed();
submenus[1] = get_floppy_speed();
submenus[2] = currprefs.leds_on_screen;
opt = menu_select_title("General options menu",
options_messages, submenus);
if (opt < 0)
return;
set_cpu_to_chipset_speed(submenus[0]);
set_floppy_speed(submenus[1]);
//Floppy, Power, FPS, etc etc.
changed_prefs.leds_on_screen = submenus[2];
prefs_has_changed = 1;
} }
/* Helpers to determine the accuracy */ /* Helpers to determine the accuracy */