X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?p=pcsx_rearmed.git;a=blobdiff_plain;f=frontend%2Fmenu.c;h=e1a3cc00d17f22f916363363e904091d7807b246;hp=b14f195ca7b081a7540387d1be02080b42b5b5de;hb=076655d17df35d1f40137e88b7beaf5a039b058c;hpb=e16a7e51ca7c72b01c0e93c8593cdc705873dec5 diff --git a/frontend/menu.c b/frontend/menu.c index b14f195c..e1a3cc00 100644 --- a/frontend/menu.c +++ b/frontend/menu.c @@ -123,8 +123,16 @@ static int emu_save_load_game(int load, int sram) if (ret != 0) return 0; - if (load) + if (load) { ret = LoadState(fname); + + // reflect hle/bios mode from savestate + if (Config.HLE) + bios_sel = 0; + else if (bios_sel == 0 && bioses[1] != NULL) + // XXX: maybe find the right bios instead + bios_sel = 1; + } else ret = SaveState(fname); @@ -873,6 +881,8 @@ static const char h_cfg_sio[] = "This should be enabled for certain memcards/ 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 const char h_cfg_nodrc[] = "Disable dynamic recompiler and use interpreter\n" + "Might be useful to overcome some dynarec bugs"; static menu_entry e_menu_adv_options[] = { @@ -884,6 +894,7 @@ static menu_entry e_menu_adv_options[] = 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_onoff_h ("Disable dynarec (slow!)",0, Config.Cpu, 1, h_cfg_nodrc), mee_end, }; @@ -1349,6 +1360,8 @@ static void menu_leave_emu(void) void menu_prepare_emu(void) { + R3000Acpu *prev_cpu = psxCpu; + plat_video_menu_leave(); switch (scaling) { @@ -1370,6 +1383,11 @@ void menu_prepare_emu(void) apply_cpu_clock(); stop = 0; + psxCpu = (Config.Cpu == CPU_INTERPRETER) ? &psxInt : &psxRec; + if (psxCpu != prev_cpu) + // note that this does not really reset, just clears drc caches + psxCpu->Reset(); + // core doesn't care about Config.Cdda changes, // so handle them manually here if (Config.Cdda)