diff --git a/src/emu.cpp b/src/emu.cpp index 7959ab0..6be7de5 100644 --- a/src/emu.cpp +++ b/src/emu.cpp @@ -12,6 +12,7 @@ #include "cpu.h" #include "emu.h" +#include "ruc/format/log.h" #include "ruc/format/print.h" #include "ruc/meta/assert.h" @@ -82,6 +83,11 @@ uint32_t Emu::readMemory(uint32_t address) const } } + // When trying to access the cartridge header + if (address >= 0x100 && address <= 0x14f) { + ruc::error("No cartridge loaded!"); + } + VERIFY_NOT_REACHED(); return 0; }