Previous 15994 Revisions Next

r3307 Saturday 20th September, 2008 at 17:57:43 UTC by Fabio Priuli
[MD] Added support for the encoded RotTK: Red Cliff (courtesy of HazeMD)
[src/mess/machine]genesis.c

src/mess/machine/genesis.c
r3306r3307
4545   SKINGKONG,            /* Super King Kong 99 */
4646   SDK99,               /* Super Donkey Kong 99 */
4747   REDCLIFF,            /* Romance of the Three Kingdoms - Battle of Red Cliffs, already decoded from .mdx format */
48   REDCL_EN,            /* The encoded version... */
4849   RADICA,               /* Radica TV games.. these probably should be a seperate driver since they are a seperate 'console' */
4950   KOF99,               /* King of Fighters '99 */
5051   SOULBLAD,            /* Soul Blade */
r3306r3307
649650      memory_install_read16_handler(machine, 0, ADDRESS_SPACE_PROGRAM, 0x400004, 0x400005, 0, 0, redclif_prot_r);
650651   }
651652
653   if (cart_type == REDCL_EN)
654   {
655      int x;
656
657      for (x = VIRGIN_COPY_GEN; x < VIRGIN_COPY_GEN + 0x200005; x++)
658      {
659         ROM[x] ^= 0x40;
660      }
661
662      memcpy(&ROM[0x000000], &ROM[VIRGIN_COPY_GEN + 4], 0x200000); /* default rom */
663
664      memory_install_read16_handler(machine, 0, ADDRESS_SPACE_PROGRAM, 0x400000, 0x400001, 0, 0, redclif_prot2_r);
665      memory_install_read16_handler(machine, 0, ADDRESS_SPACE_PROGRAM, 0x400004, 0x400005, 0, 0, redclif_prot_r);
666   }
667
652668   if (cart_type == RADICA)
653669   {
654670      memcpy(&ROM[0x400000], &ROM[VIRGIN_COPY_GEN], 0x400000); // keep a copy for later banking.. making use of huge ROM_REGION allocated to genesis driver
r3306r3307
10771093         lk3_sig[]      = { 0x0c, 0x01, 0x00, 0x30, 0x66, 0xe4 },
10781094         sdk_sig[]      = { 0x48, 0xe7, 0xff, 0xfe, 0x52, 0x79 },
10791095         redcliff_sig[]   = { 0x10, 0x39, 0x00, 0x40, 0x00, 0x04 }, // move.b  ($400004).l,d0
1096         redcl_en_sig[]   = { 0x50, 0x79, 0x40, 0x00, 0x40, 0x44 }, // move.b  ($400004).l,d0
10801097         smb_sig[]      = { 0x20, 0x4d, 0x41, 0x52, 0x49, 0x4f },
10811098         smb2_sig[]      = { 0x4e, 0xb9, 0x00, 0x0f, 0x25, 0x84 },
10821099         kaiju_sig[]      = { 0x19, 0x7c, 0x00, 0x01, 0x00, 0x00 },
r3306r3307
10891106         radica_sig[]   = { 0x4e, 0xd0, 0x30, 0x39, 0x00, 0xa1 }, // jmp (a0) move.w ($a130xx),d0
10901107         soulb_sig[]      = { 0x33, 0xfc, 0x00, 0x0c, 0x00, 0xff }, // move.w  #$C,($FF020A).l (what happens if check fails)
10911108         s19in1_sig[]   = { 0x13, 0xc0, 0x00, 0xa1, 0x30, 0x38 };
1092   
1109
10931110      switch (genesis_last_loaded_image_length)
10941111      {
10951112         case 0x80000:
r3306r3307
11541171               cart_type = SUP15IN1;
11551172            break;
11561173
1174         case 0x200005:
1175            if (!allendianmemcmp(&ROM[0xce564], &redcl_en_sig[0], sizeof(redcliff_sig)))
1176               cart_type = REDCL_EN;
1177            break;
1178
11571179         case 0x300000:
11581180            if (!allendianmemcmp(&ROM[0x220], &sdk_sig[0], sizeof(sdk_sig)))
11591181               cart_type = SDK99;

Previous 15994 Revisions Next


© 1998-2018 The MESS Team