From 073edb4097d8cc0b8419973e48bb2cd14516b3f0 Mon Sep 17 00:00:00 2001 From: beyondcoast Date: Fri, 23 Nov 2018 22:36:07 -0600 Subject: [PATCH] Add debugging messages to mmc1 script mirroring test --- host/scripts/nes/mmc1.lua | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/host/scripts/nes/mmc1.lua b/host/scripts/nes/mmc1.lua index 02578c7..27cba30 100644 --- a/host/scripts/nes/mmc1.lua +++ b/host/scripts/nes/mmc1.lua @@ -45,28 +45,28 @@ local function mirror_test( debug ) --MM = 0: 1 screen A dict.nes("NES_MMC1_WR", 0x8000, 0x00) if (nes.detect_mapper_mirroring() ~= "1SCNA") then - print("MMC1 mirror test fail") + print("MMC1 mirror test fail (1 screen A)") return false end --MM = 1: 1 screen B dict.nes("NES_MMC1_WR", 0x8000, 0x01) if (nes.detect_mapper_mirroring() ~= "1SCNB") then - print("MMC1 mirror test fail") + print("MMC1 mirror test fail (1 screen B)") return false end --MM = 2: Vertical dict.nes("NES_MMC1_WR", 0x8000, 0x02) if (nes.detect_mapper_mirroring() ~= "VERT") then - print("MMC1 mirror test fail") + print("MMC1 mirror test fail (Vertical)") return false end --MM = 3: Horizontal dict.nes("NES_MMC1_WR", 0x8000, 0x03) if (nes.detect_mapper_mirroring() ~= "HORZ") then - print("MMC1 mirror test fail") + print("MMC1 mirror test fail (Horizontal)") return false end @@ -173,8 +173,9 @@ local function process( test, read, erase, program, verify, dumpfile, flashfile, file = assert(io.open(dumpfile, "wb")) --dump cart into file - dump.dumptofile( file, 256, "MMC1", "PRGROM", true ) - dump.dumptofile( file, 128, "MMC1", "CHRROM", true ) + -- TODO: This varies depending on cart? + dump.dumptofile( file, 128, "MMC1", "PRGROM", true ) + dump.dumptofile( file, 32, "MMC1", "CHRROM", true ) --close file assert(file:close())