aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStapleButter <thetotalworm@gmail.com>2017-05-09 04:52:17 +0200
committerStapleButter <thetotalworm@gmail.com>2017-05-09 04:52:17 +0200
commitbde9e7dfed20c502b4c86acbd5c755d16de06448 (patch)
treebaf0582932a502252aeda5ffb5065c3cd68e4e6e
parent50d2ffb207783f4afc56b6643deea580de74dca0 (diff)
fill BIOS exception vectors with undef opcode when no BIOSes are found
-rw-r--r--src/NDS.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/NDS.cpp b/src/NDS.cpp
index 5eb8657..4ad325b 100644
--- a/src/NDS.cpp
+++ b/src/NDS.cpp
@@ -238,7 +238,12 @@ void Reset()
f = fopen("bios9.bin", "rb");
if (!f)
+ {
printf("ARM9 BIOS not found\n");
+
+ for (i = 0; i < 16; i++)
+ ((u32*)ARM9BIOS)[i] = 0xE7FFDEFF;
+ }
else
{
fseek(f, 0, SEEK_SET);
@@ -250,7 +255,12 @@ void Reset()
f = fopen("bios7.bin", "rb");
if (!f)
+ {
printf("ARM7 BIOS not found\n");
+
+ for (i = 0; i < 16; i++)
+ ((u32*)ARM7BIOS)[i] = 0xE7FFDEFF;
+ }
else
{
fseek(f, 0, SEEK_SET);