summaryrefslogtreecommitdiff
path: root/gba_memory.c
diff options
context:
space:
mode:
authortwinaphex2014-12-10 17:27:18 +0100
committertwinaphex2014-12-10 17:27:18 +0100
commit82731290ee4e162fb040ee34337405e544e2e0ac (patch)
treefc298a3b65b27c26ce8c1eba55c641d663ef7476 /gba_memory.c
parent75cffe81f22426c10d5bd506efc0045b9c7e0867 (diff)
downloadpicogpsp-82731290ee4e162fb040ee34337405e544e2e0ac.tar.gz
picogpsp-82731290ee4e162fb040ee34337405e544e2e0ac.tar.bz2
picogpsp-82731290ee4e162fb040ee34337405e544e2e0ac.zip
We don't need to get rid of idle loop patching for non-dynarec
core
Diffstat (limited to 'gba_memory.c')
-rw-r--r--gba_memory.c33
1 files changed, 13 insertions, 20 deletions
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"))