From 64397e939a5d3478fb5f2299ea4d7059a4ae35f9 Mon Sep 17 00:00:00 2001 From: Paul Win10 shuttle PC Date: Fri, 9 Nov 2018 12:02:55 -0600 Subject: [PATCH] Some minor fixes to firmware version of mirror detection. But didn't seem to fix the issue. Moved this function to host side bc it works there and is a better fit for the host. Minor updates to main inlretro.lua script --- firmware/source/nes.c | 17 ++++++++++------- host/scripts/inlretro.lua | 9 ++++++--- 2 files changed, 16 insertions(+), 10 deletions(-) diff --git a/firmware/source/nes.c b/firmware/source/nes.c index b11cf79..9e99ed8 100644 --- a/firmware/source/nes.c +++ b/firmware/source/nes.c @@ -576,22 +576,25 @@ uint8_t ciram_a10_mirroring( void ) //set A11, clear A10 //ADDRH(A11_BYTE); setting A11 in this manner doesn't work for some reason.. ADDR_SET(0x0800); - CIA10_RD(readH); + //CIA10_RD(readH); + readH = (C11bank->IDR & (1<IDR & (1< 1 screen A - if ((readV==0) & (readH==0)) return MIR_1SCNA; + if ((readV==0) && (readH==0)) return MIR_1SCNA; //if CIRAM A10 was always high -> 1 screen B - if ((readV!=0) & (readH!=0)) return MIR_1SCNB; + if ((readV!=0) && (readH!=0)) return MIR_1SCNB; //if CIRAM A10 toggled with A10 -> Vertical mirroring, horizontal arrangement - if ((readV!=0) & (readH==0)) return MIR_VERT; + if ((readV!=0) && (readH==0)) return MIR_VERT; //if CIRAM A10 toggled with A11 -> Horizontal mirroring, vertical arrangement - if ((readV==0) & (readH!=0)) return MIR_HORZ; + if ((readV==0) && (readH!=0)) return MIR_HORZ; //shouldn't be here... return GEN_FAIL; diff --git a/host/scripts/inlretro.lua b/host/scripts/inlretro.lua index 172ce3b..90d703b 100644 --- a/host/scripts/inlretro.lua +++ b/host/scripts/inlretro.lua @@ -4,10 +4,11 @@ -- USER NOTES -- ===================================================== -- 1- set 'curcart' to point to desired mapper script (around line 60 currently) --- 2- set 'cart_console' to the currently inserted cartridge (arond line 80 currently) +-- 2- set 'cart_console' to the currently inserted cartridge (around line 80 currently) -- this will control flow of the script later on which is the -- location of what you'll need to modify in the next step. -- 3- call curcart.process function to actually run something: +-- NES for example, this is done around line 270ish currently.. -- Here are a few NES NROM examples: -- -- --NROM test & dump to dump.bin file @@ -286,13 +287,15 @@ function main () --UNROM512 mapper 30 --curcart.process( true, false, true, true, true, "ignore/dump.bin", "ignore/BBC_nonJW.bin", "ignore/verifyout.bin") - curcart.process( true, false, false, false, false, "ignore/dump.bin", "ignore/MysticOrigins.prg", "ignore/verifyout.bin") + --curcart.process( true, false, false, false, false, "ignore/dump.bin", "ignore/MysticOrigins.prg", "ignore/verifyout.bin") --curcart.process( true, false, true, true, true, "ignore/dump.bin", "ignore/NESmaker.nes", "ignore/verifyout.bin") - --curcart.process( true, false, true, true, false, "ignore/dump.bin", "ignore/tb_map30.prg", "ignore/verifyout.bin") + curcart.process( true, false, true, true, false, "ignore/dump.bin", "ignore/tb_map30.prg", "ignore/verifyout.bin") --BNROM --curcart.process( true, false, true, true, true, "ignore/dump.bin", "ignore/lizard_PG.prg", "ignore/verifyout.bin") + --curcart.process( true, false, true, true, false, "ignore/dump.bin", "ignore/PJB_PRGE.prg", "ignore/verifyout.bin") + --curcart.process( true, false, true, true, false, "ignore/dump.bin", "ignore/SHBWar.prg", "ignore/verifyout.bin") --curcart.process( true, false, true, true, false, "ignore/dump.bin", "ignore/lizard_v2_fr.prg", "ignore/verifyout.bin") --curcart.process( true, false, true, true, false, "ignore/dump.bin", "ignore/hh85.prg", "ignore/verifyout.bin") --COLOR DREAMS