check boot mode

This commit is contained in:
Kirill Zhumarin 2025-04-07 09:38:04 +00:00
parent c3924fac5d
commit 5e85329f76

View file

@ -99,6 +99,11 @@ if (bootMode == 0xFFFFFFFF) {
process.exit(1);
}
if (bootMode != 0xFFFF0002) {
console.log(sprintf("Invalid boot mode: %08X", bootMode));
process.exit(1);
}
const oldIrqHandler = (await dwd.readMemory(PRAM_IRQ_HANDLER, 4)).buffer.readUInt32LE(0);
console.log(sprintf("Old SWI handler: %08X", oldIrqHandler))