diff options
author | StapleButter <thetotalworm@gmail.com> | 2017-05-09 04:52:17 +0200 |
---|---|---|
committer | StapleButter <thetotalworm@gmail.com> | 2017-05-09 04:52:17 +0200 |
commit | bde9e7dfed20c502b4c86acbd5c755d16de06448 (patch) | |
tree | baf0582932a502252aeda5ffb5065c3cd68e4e6e | |
parent | 50d2ffb207783f4afc56b6643deea580de74dca0 (diff) |
fill BIOS exception vectors with undef opcode when no BIOSes are found
-rw-r--r-- | src/NDS.cpp | 10 |
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); |