+// ------------ bios/plugins ------------
+
+static const char *men_gpu_dithering[] = { "None", "Game dependant", "Always", NULL };
+static const char h_gpu_0[] = "Needed for Chrono Cross";
+static const char h_gpu_1[] = "Capcom fighting games";
+static const char h_gpu_2[] = "Black screens in Lunar";
+static const char h_gpu_3[] = "Compatibility mode";
+static const char h_gpu_6[] = "Pandemonium 2";
+static const char h_gpu_7[] = "Skip every second frame";
+static const char h_gpu_8[] = "Needed by Dark Forces";
+static const char h_gpu_9[] = "better g-colors, worse textures";
+static const char h_gpu_10[] = "Toggle busy flags after drawing";
+
+static menu_entry e_menu_plugin_gpu[] =
+{
+ mee_enum ("Dithering", 0, iUseDither, men_gpu_dithering),
+ mee_onoff_h ("Odd/even bit hack", 0, dwActFixes, 1<<0, h_gpu_0),
+ mee_onoff_h ("Expand screen width", 0, dwActFixes, 1<<1, h_gpu_1),
+ mee_onoff_h ("Ignore brightness color", 0, dwActFixes, 1<<2, h_gpu_2),
+ mee_onoff_h ("Disable coordinate check", 0, dwActFixes, 1<<3, h_gpu_3),
+ mee_onoff_h ("Lazy screen update", 0, dwActFixes, 1<<6, h_gpu_6),
+ mee_onoff_h ("Old frame skipping", 0, dwActFixes, 1<<7, h_gpu_7),
+ mee_onoff_h ("Repeated flat tex triangles ",0,dwActFixes, 1<<8, h_gpu_8),
+ mee_onoff_h ("Draw quads with triangles", 0, dwActFixes, 1<<9, h_gpu_9),
+ mee_onoff_h ("Fake 'gpu busy' states", 0, dwActFixes, 1<<10, h_gpu_10),
+ mee_end,
+};
+
+static int menu_loop_plugin_gpu(int id, int keys)
+{
+ static int sel = 0;
+ me_loop(e_menu_plugin_gpu, &sel, NULL);
+ return 0;
+}
+
+static const char *men_spu_reverb[] = { "Off", "Fake", "On", NULL };
+static const char *men_spu_interp[] = { "None", "Simple", "Gaussian", "Cubic", NULL };
+static const char h_spu_irq_wait[] = "Wait for CPU; only useful for some games, may cause glitches";
+static const char h_spu_thread[] = "Run sound emulation in separate thread";
+
+static menu_entry e_menu_plugin_spu[] =
+{
+ mee_enum ("Reverb", 0, iUseReverb, men_spu_reverb),
+ mee_enum ("Interpolation", 0, iUseInterpolation, men_spu_interp),
+ mee_onoff ("Adjust XA pitch", 0, iXAPitch, 1),
+ mee_onoff_h ("SPU IRQ Wait", 0, iSPUIRQWait, 1, h_spu_irq_wait),
+ mee_onoff_h ("Use sound thread", 0, iUseTimer, 1, h_spu_thread),
+ mee_end,
+};
+
+static int menu_loop_plugin_spu(int id, int keys)
+{
+ static int sel = 0;
+ me_loop(e_menu_plugin_spu, &sel, NULL);
+ return 0;
+}
+
+static const char h_gpu[] = "Configure built-in P.E.Op.S. SoftGL Driver V1.17";
+static const char h_spu[] = "Configure built-in P.E.Op.S. Sound Driver V1.7";
+static const char h_plugin_xpu[] = "Must save config and reload the game\n"
+ "for plugin change to take effect";
+
+static menu_entry e_menu_plugin_options[] =
+{
+ mee_enum_h ("GPU plugin", 0, gpu_plugsel, gpu_plugins, h_plugin_xpu),
+ mee_enum_h ("SPU plugin", 0, spu_plugsel, spu_plugins, h_plugin_xpu),
+ mee_handler_h ("Configure built-in GPU plugin", menu_loop_plugin_gpu, h_gpu),
+ mee_handler_h ("Configure built-in SPU plugin", menu_loop_plugin_spu, h_spu),
+ mee_end,
+};
+
+static int menu_loop_plugin_options(int id, int keys)
+{
+ static int sel = 0;
+ me_loop(e_menu_plugin_options, &sel, NULL);
+
+ // sync plugins
+ snprintf(Config.Gpu, sizeof(Config.Gpu), "%s", gpu_plugins[gpu_plugsel]);
+ snprintf(Config.Spu, sizeof(Config.Spu), "%s", spu_plugins[spu_plugsel]);
+
+ return 0;
+}
+
+// ------------ adv options menu ------------
+
+static const char h_cfg_xa[] = "Disables XA sound, which can sometimes improve performance";
+static const char h_cfg_cdda[] = "Disable CD Audio for a performance boost\n"
+ "(proper .cue/.bin dump is needed otherwise)";
+static const char h_cfg_sio[] = "This should be enabled for certain memcards/gamepads";
+static const char h_cfg_spuirq[] = "Compatibility tweak; should probably be left off";
+static const char h_cfg_rcnt1[] = "Parasite Eve 2, Vandal Hearts 1/2 Fix";
+static const char h_cfg_rcnt2[] = "InuYasha Sengoku Battle Fix";
+
+static menu_entry e_menu_adv_options[] =
+{
+ mee_onoff ("Show CPU load", 0, g_opts, OPT_SHOWCPU),
+ mee_onoff_h ("Disable XA Decoding", 0, Config.Xa, 1, h_cfg_xa),
+ mee_onoff_h ("Disable CD Audio", 0, Config.Cdda, 1, h_cfg_cdda),
+ mee_onoff_h ("SIO IRQ Always Enabled", 0, Config.Sio, 1, h_cfg_sio),
+ mee_onoff_h ("SPU IRQ Always Enabled", 0, Config.SpuIrq, 1, h_cfg_spuirq),
+ mee_onoff_h ("Rootcounter hack", 0, Config.RCntFix, 1, h_cfg_rcnt1),
+ mee_onoff_h ("Rootcounter hack 2", 0, Config.VSyncWA, 1, h_cfg_rcnt2),
+ mee_end,
+};
+
+static int menu_loop_adv_options(int id, int keys)
+{
+ static int sel = 0;
+ me_loop(e_menu_adv_options, &sel, NULL);
+ return 0;
+}
+