From 82731290ee4e162fb040ee34337405e544e2e0ac Mon Sep 17 00:00:00 2001 From: twinaphex Date: Wed, 10 Dec 2014 17:27:18 +0100 Subject: We don't need to get rid of idle loop patching for non-dynarec core --- gba_memory.c | 33 +++++++++++++-------------------- 1 file changed, 13 insertions(+), 20 deletions(-) (limited to 'gba_memory.c') diff --git a/gba_memory.c b/gba_memory.c index bff8c9b..e1fa1a7 100644 --- a/gba_memory.c +++ b/gba_memory.c @@ -2233,11 +2233,9 @@ s32 load_game_config(char *gamepak_title, char *gamepak_code, char *gamepak_make char config_path[512]; FILE *config_file; -#ifdef HAVE_DYNAREC idle_loop_target_pc = 0xFFFFFFFF; iwram_stack_optimize = 1; translation_gate_targets = 0; -#endif bios_rom[0x39] = 0x00; bios_rom[0x2C] = 0x00; flash_device_id = FLASH_DEVICE_MACRONIX_64KB; @@ -2282,29 +2280,24 @@ s32 load_game_config(char *gamepak_title, char *gamepak_code, char *gamepak_make return 0; } -#ifdef HAVE_DYNAREC - if (dynarec_enable) - { - if(!strcmp(current_variable, "idle_loop_eliminate_target")) - idle_loop_target_pc = strtol(current_value, NULL, 16); + if(!strcmp(current_variable, "idle_loop_eliminate_target")) + idle_loop_target_pc = strtol(current_value, NULL, 16); - if(!strcmp(current_variable, "translation_gate_target")) + if(!strcmp(current_variable, "translation_gate_target")) + { + if(translation_gate_targets < MAX_TRANSLATION_GATES) { - if(translation_gate_targets < MAX_TRANSLATION_GATES) - { - translation_gate_target_pc[translation_gate_targets] = - strtol(current_value, NULL, 16); - translation_gate_targets++; - } + translation_gate_target_pc[translation_gate_targets] = + strtol(current_value, NULL, 16); + translation_gate_targets++; } + } - if(!strcmp(current_variable, "iwram_stack_optimize") && - !strcmp(current_value, "no\0")) /* \0 for broken toolchain workaround */ - { - iwram_stack_optimize = 0; - } + if(!strcmp(current_variable, "iwram_stack_optimize") && + !strcmp(current_value, "no\0")) /* \0 for broken toolchain workaround */ + { + iwram_stack_optimize = 0; } -#endif if(!strcmp(current_variable, "flash_rom_type") && !strcmp(current_value, "128KB")) -- cgit v1.2.3