summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNebuleon <nebuleon@alakazam>2013-08-22 23:54:08 +0000
committerNebuleon <nebuleon@alakazam>2013-08-22 23:54:08 +0000
commit16b526c271c4c274bcbcfe3b54a0023cbb8547cb (patch)
treeb1e65a3fc6f702a264d0b1e3c2aee51beabedfd0
parent985f8a8baf59e6cbe85f2a5edf77a3c60136eae9 (diff)
downloadReGBA-16b526c271c4c274bcbcfe3b54a0023cbb8547cb.zip
ReGBA-16b526c271c4c274bcbcfe3b54a0023cbb8547cb.tar.gz
ReGBA-16b526c271c4c274bcbcfe3b54a0023cbb8547cb.tar.bz2
cpu_asm.c: Do not use gpsp_persistent_config, which is a DSTwo port variable, when deciding whether to boot from the BIOS.
-rw-r--r--source/cpu.h2
-rw-r--r--source/cpu_asm.c4
-rw-r--r--source/dstwo/gpsp_main.c4
-rw-r--r--source/gcw0/main.c6
4 files changed, 8 insertions, 8 deletions
diff --git a/source/cpu.h b/source/cpu.h
index ba604bd..6ff618e 100644
--- a/source/cpu.h
+++ b/source/cpu.h
@@ -212,6 +212,6 @@ extern u32 spsr[6];
extern const u8 cpu_modes[32];
-void init_cpu();
+void init_cpu(u32 BootFromBIOS);
#endif
diff --git a/source/cpu_asm.c b/source/cpu_asm.c
index 6199a6b..e23ecd6 100644
--- a/source/cpu_asm.c
+++ b/source/cpu_asm.c
@@ -3854,7 +3854,7 @@ void dump_translation_cache()
printf("RO:%08X R/W:%08X\n", readonly_next_code - readonly_code_cache, writable_next_code - writable_code_cache);
}
-void init_cpu()
+void init_cpu(u32 BootFromBIOS)
{
u32 i;
@@ -3864,7 +3864,7 @@ void init_cpu()
}
reg[REG_SP] = 0x03007F00;
- reg[REG_PC] = gpsp_persistent_config.BootFromBIOS
+ reg[REG_PC] = BootFromBIOS
? 0x00000000
: 0x08000000;
reg[REG_CPSR] = 0x0000001F;
diff --git a/source/dstwo/gpsp_main.c b/source/dstwo/gpsp_main.c
index e739112..bee92f7 100644
--- a/source/dstwo/gpsp_main.c
+++ b/source/dstwo/gpsp_main.c
@@ -261,7 +261,7 @@ int gpsp_main(int argc, char *argv[])
quit();
}
- init_cpu();
+ init_cpu(gpsp_persistent_config.BootFromBIOS);
init_memory();
reset_sound();
@@ -535,7 +535,7 @@ void reset_gba()
{
init_main();
init_memory();
- init_cpu();
+ init_cpu(gpsp_persistent_config.BootFromBIOS);
reset_sound();
}
diff --git a/source/gcw0/main.c b/source/gcw0/main.c
index 8bfea80..f145d39 100644
--- a/source/gcw0/main.c
+++ b/source/gcw0/main.c
@@ -218,7 +218,7 @@ int main(int argc, char *argv[])
set_gba_resolution(screen_scale);
video_resolution_small();
- init_cpu();
+ init_cpu(0 /* boot from BIOS: no */);
init_memory();
}
else
@@ -244,7 +244,7 @@ int main(int argc, char *argv[])
video_resolution_small();
clear_screen(0);
flip_screen();
- init_cpu();
+ init_cpu(0 /* boot from BIOS: no */);
init_memory();
}
}
@@ -539,7 +539,7 @@ void reset_gba()
{
init_main();
init_memory();
- init_cpu();
+ init_cpu(0 /* boot from BIOS: no */);
reset_sound();
}