From bde9e7dfed20c502b4c86acbd5c755d16de06448 Mon Sep 17 00:00:00 2001 From: StapleButter Date: Tue, 9 May 2017 04:52:17 +0200 Subject: fill BIOS exception vectors with undef opcode when no BIOSes are found --- src/NDS.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) 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); -- cgit v1.2.3