Merge pull request #109 from retro-wertz/update

Updates
This commit is contained in:
Twinaphex
2017-04-30 13:45:51 +02:00
committed by GitHub
4 changed files with 67 additions and 47 deletions

View File

@@ -95,51 +95,49 @@ static void mira(void) {
}
}
static void tekprom(void) { // TODO: verify for single, small multi and large multi
static void tekprom(void) {
uint32 bankmode = ((tkcom[3] & 6) << 5);
switch (tkcom[0] & 7) {
case 00:
if (tkcom[0] & 0x80)
setprg8(0x6000, (((prgb[3] << 2) + 3) & 0x3F) | bankmode);
setprg32(0x8000, (prgb[3] & 7) | ((tkcom[3] & 7) << 3));
break;
case 01:
if (tkcom[0] & 0x80)
setprg8(0x6000, (((prgb[3] << 1) + 1) & 0x3F) | bankmode);
setprg16(0x8000, (prgb[1] & 0x0F) | ((tkcom[3] & 7) << 4));
setprg16(0xC000, 0x0F | ((tkcom[3] & 7) << 4));
break;
case 03: // bit reversion
case 02:
if (tkcom[0] & 0x80)
setprg8(0x6000, (prgb[3] & 0x1F) | ((tkcom[3] & 7) << 5)); // 45in1 multy has different bits, seems board was hacked to support big data banks
setprg8(0x8000, (prgb[0] & 0x1F) | ((tkcom[3] & 7) << 5));
setprg8(0xa000, (prgb[1] & 0x1F) | ((tkcom[3] & 7) << 5));
setprg8(0xc000, (prgb[2] & 0x1F) | ((tkcom[3] & 7) << 5));
setprg8(0xe000, 0x1F | ((tkcom[3] & 7) << 5));
// setprg8(0xe000,(prgb[3]&0x0F)|((tkcom[3]&6)<<3));
// setprg32(0x8000,((prgb[0]&0x0F)>>2)|((tkcom[3]&6)<<3));
break;
case 04:
if (tkcom[0] & 0x80)
setprg8(0x6000, (((prgb[3] << 2) + 3) & 0x3F) | bankmode);
setprg32(0x8000, (prgb[3] & 0x0F) | ((tkcom[3] & 6) << 3));
break;
case 05:
if (tkcom[0] & 0x80)
setprg8(0x6000, (((prgb[3] << 1) + 1) & 0x3F) | bankmode);
setprg16(0x8000, (prgb[1] & 0x1F) | ((tkcom[3] & 6) << 4));
setprg16(0xC000, (prgb[3] & 0x1F) | ((tkcom[3] & 6) << 4));
break;
case 07: // bit reversion
case 06:
if (tkcom[0] & 0x80)
setprg8(0x6000, (prgb[3] & 0x3F) | bankmode);
setprg8(0x8000, (prgb[0] & 0x3F) | bankmode);
setprg8(0xa000, (prgb[1] & 0x3F) | bankmode);
setprg8(0xc000, (prgb[2] & 0x3F) | bankmode);
setprg8(0xe000, (prgb[3] & 0x3F) | bankmode);
break;
case 00:
if (tkcom[0] & 0x80)
setprg8(0x6000, (((prgb[3] << 2) + 3) & 0x3F) | bankmode);
setprg32(0x8000, 0x0F | ((tkcom[3] & 6) << 3));
break;
case 01:
if (tkcom[0] & 0x80)
setprg8(0x6000, (((prgb[3] << 1) + 1) & 0x3F) | bankmode);
setprg16(0x8000, (prgb[1] & 0x1F) | ((tkcom[3] & 6) << 4));
setprg16(0xC000, 0x1F | ((tkcom[3] & 6) << 4));
break;
case 03: // bit reversion
case 02:
if (tkcom[0] & 0x80)
setprg8(0x6000, (prgb[3] & 0x3F) | bankmode);
setprg8(0x8000, (prgb[0] & 0x3F) | bankmode);
setprg8(0xa000, (prgb[1] & 0x3F) | bankmode);
setprg8(0xc000, (prgb[2] & 0x3F) | bankmode);
setprg8(0xe000, 0x3F | bankmode);
break;
case 04:
if (tkcom[0] & 0x80)
setprg8(0x6000, (((prgb[3] << 2) + 3) & 0x3F) | bankmode);
setprg32(0x8000, (prgb[3] & 0x0F) | ((tkcom[3] & 6) << 3));
break;
case 05:
if (tkcom[0] & 0x80)
setprg8(0x6000, (((prgb[3] << 1) + 1) & 0x3F) | bankmode);
setprg16(0x8000, (prgb[1] & 0x1F) | ((tkcom[3] & 6) << 4));
setprg16(0xC000, (prgb[3] & 0x1F) | ((tkcom[3] & 6) << 4));
break;
case 07: // bit reversion
case 06:
if (tkcom[0] & 0x80)
setprg8(0x6000, (prgb[3] & 0x3F) | bankmode);
setprg8(0x8000, (prgb[0] & 0x3F) | bankmode);
setprg8(0xa000, (prgb[1] & 0x3F) | bankmode);
setprg8(0xc000, (prgb[2] & 0x3F) | bankmode);
setprg8(0xe000, (prgb[3] & 0x3F) | bankmode);
break;
}
}
@@ -437,7 +435,6 @@ static void M90Power(void) {
tekvrom();
}
void Mapper90_Init(CartInfo *info) {
is211 = 0;
is209 = 0;

View File

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

View File

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

View File

@@ -600,9 +600,9 @@ static BMAPPINGLocal bmap[] = {
{(uint8_t*)"NAMCOT 108 Rev. C", 206, Mapper206_Init}, // Deprecated, Used to be "DEIROM" whatever it means, but actually simple version of MMC3
{(uint8_t*)"TAITO X1-005 Rev. B", 207, Mapper207_Init},
{(uint8_t*)"", 208, Mapper208_Init},
{(uint8_t*)"", 209, Mapper209_Init},
{(uint8_t*)"HUMMER/JY BOARD", 209, Mapper209_Init},
{(uint8_t*)"", 210, Mapper210_Init},
{(uint8_t*)"", 211, Mapper211_Init},
{(uint8_t*)"HUMMER/JY BOARD", 211, Mapper211_Init},
{(uint8_t*)"", 212, Mapper212_Init},
{(uint8_t*)"", 213, Mapper213_Init},
{(uint8_t*)"", 214, Mapper214_Init},