From 20bb2b729e6891f18f04d3069c921299b2a5b448 Mon Sep 17 00:00:00 2001 From: Joel Smith Date: Tue, 9 Jul 2019 23:59:36 -0700 Subject: [PATCH] Fixed SNES RAM and ROM check so if it is unknown and not provided it will break and alert user --- host/scripts/snes/v2proto_hirom.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/host/scripts/snes/v2proto_hirom.lua b/host/scripts/snes/v2proto_hirom.lua index 0561958..5d3d671 100644 --- a/host/scripts/snes/v2proto_hirom.lua +++ b/host/scripts/snes/v2proto_hirom.lua @@ -868,11 +868,13 @@ local function process(process_opts, console_opts) if ram_size == 0 then ram_size = ram_size_kb_tbl[internal_header["sram_size"]] - print("RAM Size not provided, " .. ram_size_tbl[internal_header["sram_size"]] .. " detected.") + assert(ram_size, "SRAM Size unknown and not provided, please add ram size to console_opts") + print("SRAM Size not provided, " .. ram_size_tbl[internal_header["sram_size"]] .. " detected.") end if rom_size == 0 then rom_size = rom_size_kb_tbl[internal_header["rom_size"]] + assert(rom_size, "ROM Size unknown and not provided, please add rom size to console_opts") print("ROM Size not provided, " .. rom_ubound[internal_header["rom_size"]] .. " detected.") end