From a4f52bc3f31b1ce8092b1d2de695dd5bfd1721db Mon Sep 17 00:00:00 2001 From: Marcus Ramse Date: Fri, 3 May 2024 22:26:45 +0000 Subject: [PATCH] sim: less tall bluescreen errors --- simulator/src/runtime.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/simulator/src/runtime.ts b/simulator/src/runtime.ts index a1b9a92..4588db8 100644 --- a/simulator/src/runtime.ts +++ b/simulator/src/runtime.ts @@ -246,7 +246,7 @@ export class Runtime { const headerX = (160 - (8 * title.length)) / 2; const headerY = 20; const messageX = 9; - const messageY = 60; + const messageY = 52; this.framebuffer.fillScreen(blue); @@ -272,15 +272,15 @@ function errorToBlueScreenText(err: Error) { } else if (err.message.match(/out of bounds/)) { message = "The cartridge has\nattempted a memory\naccess that is\nout of bounds."; } - return message + "\n\n\n\n\nHit R to reboot."; + return message + "\n\n\n\nHit R to reboot."; } else if (err instanceof WebAssembly.LinkError) { - return "The cartridge has\ntried to import\na missing function.\n\n\n\nSee console for\nmore details."; + return "The cartridge has\ntried to import\na missing function.\n\n\nSee console for\nmore details."; } else if (err instanceof WebAssembly.CompileError) { - return "The cartridge is\ncorrupted.\n\n\n\nSee console for\nmore details."; + return "The cartridge is\ncorrupted.\n\n\nSee console for\nmore details."; } else if (err instanceof Wasm4Error) { return err.wasm4Message; } - return "Unknown error.\n\n\n\nSee console for\nmore details."; + return "Unknown error.\n\n\nSee console for\nmore details."; } class Wasm4Error extends Error {