BMC-8157: ignore prg mapping for split rom types

- fixes 1 of only 2 CK-001 4-in-1 carts i found so far
This commit is contained in:
retro-wertz
2019-05-27 21:35:12 +08:00
parent 005eb7bdc3
commit 6fd12ed6bf
2 changed files with 7 additions and 4 deletions

View File

@@ -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);
}

View File

@@ -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