From 6fd12ed6bf9899f81e96b45f273dce4f1e4b8862 Mon Sep 17 00:00:00 2001 From: retro-wertz Date: Mon, 27 May 2019 21:35:12 +0800 Subject: [PATCH] BMC-8157: ignore prg mapping for split rom types - fixes 1 of only 2 CK-001 4-in-1 carts i found so far --- src/boards/8157.c | 9 ++++++--- src/boards/KS7032.c | 2 +- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/src/boards/8157.c b/src/boards/8157.c index 8a95353..f62cb8f 100644 --- a/src/boards/8157.c +++ b/src/boards/8157.c @@ -36,10 +36,13 @@ static void Sync(void) { uint32 base = ((cmdreg & 0x060) | ((cmdreg & 0x100) >> 1)) >> 2; uint32 bank = (cmdreg & 0x01C) >> 2; uint32 lbank = (cmdreg & 0x200) ? 7 : ((cmdreg & 0x80) ? bank : 0); - if (PRGptr[1]) { - setprg16r(base >> 3, 0x8000, bank); /* for versions with split ROMs */ + /* this fails to load at least one game, which probably has invalid PRG size in header + * (rom is only 512KB but reported as having 3 prg banks with 128k each) */ + /*if (PRGptr[1]) { + setprg16r(base >> 3, 0x8000, bank); // for versions with split ROMs setprg16r(base >> 3, 0xC000, lbank); - } else { + } else*/ + { setprg16(0x8000, base | bank); setprg16(0xC000, base | lbank); } diff --git a/src/boards/KS7032.c b/src/boards/KS7032.c index 5a5bd53..7a8bdfc 100644 --- a/src/boards/KS7032.c +++ b/src/boards/KS7032.c @@ -2,7 +2,7 @@ * * Copyright notice for this file: * Copyright (C) 2007 CaH4e3 - * Copyright (C) 2019 Libretro Team (IRQ Update) + * Copyright (C) 2019 Libretro Team * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by