From 48cb05ac89c78c1a1cc48f1f095e0b87c4bf45c6 Mon Sep 17 00:00:00 2001 From: retro-wertz Date: Sun, 30 Apr 2017 19:09:01 +0800 Subject: [PATCH] fix bus conflict to some mapper3 roms --- src/boards/datalatch.c | 20 +++++++++++++++++++- src/ines-correct.h | 5 +++++ 2 files changed, 24 insertions(+), 1 deletion(-) diff --git a/src/boards/datalatch.c b/src/boards/datalatch.c index 53cd50b..1fe77fd 100644 --- a/src/boards/datalatch.c +++ b/src/boards/datalatch.c @@ -150,7 +150,25 @@ static void CNROMSync(void) { } void CNROM_Init(CartInfo *info) { - Latch_Init(info, CNROMSync, 0, 0x8000, 0xFFFF, 1, 1); + //TODO: move these to extended database when implemented. + int _busc, x; + uint64 partialmd5 = 0; + _busc = 1; + for (x = 0; x < 8; x++) + partialmd5 |= (uint64)info->MD5[15 - x] << (x * 8); + if (partialmd5 == 0x117181328eb1ad23LL) //75 Bingo (Sachen-English) [U].unf + _busc = 0; + else + switch (info->CRC32) { + case 0xf283cf58: // Colorful Dragon (Asia) (PAL) (Unl).nes + case 0x2915faf0: // Incantation (Asia) (Unl).nes + case 0xebd0644d: // Dao Shuai (Asia) (Unl).nes + case 0x8f154a0d: // Pu Ke Jing Ling (China) (Unl).nes + case 0xd04a40e6: // Bingo 75 (Asia) (Unl).nes + _busc = 0; + break; + } + Latch_Init(info, CNROMSync, 0, 0x8000, 0xFFFF, 1, _busc); } //------------------ Map 7 --------------------------- diff --git a/src/ines-correct.h b/src/ines-correct.h index 41b2f69..6538443 100644 --- a/src/ines-correct.h +++ b/src/ines-correct.h @@ -57,6 +57,11 @@ {0x419461d0, 2, 1}, /* Super Cars */ {0xdbf90772, 3, 0}, /* Alpha Mission */ {0xd858033d, 3, 0}, /* Armored Scrum Object */ + {0xf283cf58, 3, 0}, /* Colorful Dragon (Asia) (PAL) (Unl) */ + {0xd858033d, 3, 0}, /* Incantation (Asia) (Unl) */ + {0x8f154a0d, 3, 0}, /* Pu Ke Jing Ling (China) (Unl) */ + {0xd04a40e6, 3, 0}, /* Bingo 75 (Asia) (Unl) */ + {0xebd0644d, 3, 1}, /* Dao Shuai (Asia) (Unl) */ {0x9bde3267, 3, 1}, /* Adventures of Dino Riki */ {0xd8eff0df, 3, 1}, /* Gradius (J) */ {0x1d41cc8c, 3, 1}, /* Gyruss */