src/mess/machine/genesis.c
| r9275 | r9276 | |
| 4 | 4 | |
| 5 | 5 | Machine file to handle emulation of the Sega Mega Drive & Genesis. |
| 6 | 6 | |
| 7 | i2c games mapping table: |
| 7 | 8 | |
| 9 | game name | SDA_IN | SDA_OUT | SCL | SIZE_MASK | PAGE_MASK | |
| 10 | ----------------------------------|------------|------------|------------|----------------|-----------| |
| 11 | NBA Jam | 0x200001-0 | 0x200001-0*| 0x200000-1*| 0x00ff (24C02) | 0x03 | x |
| 12 | NBA Jam TE | 0x200001-0 | 0x200001-0 | 0x200000-0 | 0x00ff (24C02) | 0x03 | x |
| 13 | NFL Quarterback Club | 0x200001-0 | 0x200001-0 | 0x200000-0 | 0x00ff (24C02) | 0x03 | x |
| 14 | NFL Quarterback Club 96 | 0x200001-0 | 0x200001-0 | 0x200000-0 | 0x07ff (24C16) | 0x07 | x |
| 15 | College Slam | 0x200001-0 | 0x200001-0 | 0x200000-0 | 0x1fff (24C64) | 0x07 | |
| 16 | Frank Thomas Big Hurt Baseball | 0x200001-0 | 0x200001-0 | 0x200000-0 | 0x1fff (24C64) | 0x07 | |
| 17 | NHLPA Hockey 93 | 0x200001-7 | 0x200001-7 | 0x200001-6 | 0x007f (24C01) | 0x03 | |
| 18 | Rings of Power | 0x200001-7 | 0x200001-7 | 0x200001-6 | 0x007f (24C01) | 0x03 | |
| 19 | Evander Holyfield's Boxing | 0x200001-0 | 0x200001-0 | 0x200001-1 | 0x007f (24C01) | 0x03 | |
| 20 | Greatest Heavyweights of the Ring | 0x200001-0 | 0x200001-0 | 0x200001-1 | 0x007f (24C01) | 0x03 | |
| 21 | Wonder Boy V | 0x200001-0 | 0x200001-0 | 0x200001-1 | 0x007f (24C01) | 0x03 | |
| 22 | Sports Talk Baseball | 0x200001-0 | 0x200001-0 | 0x200001-1 | 0x007f (24C01) | 0x03 | |
| 23 | Megaman - the Wily Wars | 0x200001-0 | 0x200001-0 | 0x200001-1 | 0x007f (24C01) | 0x03 | ** |
| 24 | Micro Machines 2 | 0x300000-0 | 0x380001-7 | 0x300000-1 | 0x03ff (24C08) | 0x0f | |
| 25 | Micro Machines Military | 0x300000-0 | 0x380001-7 | 0x300000-1 | 0x03ff (24C08) | 0x0f | |
| 26 | Micro Machines 96 | 0x300000-0 | 0x380001-7 | 0x300000-1 | 0x07ff (24C16) | 0x0f | |
| 27 | Brian Lara Cricket 96 | 0x300000-0 | 0x380001-7 | 0x300000-1 | 0x1fff (24C64) | 0x??* | |
| 28 | ----------------------------------|------------|------------|------------|----------------|-----------| |
| 29 | |
| 30 | * Notes: check these |
| 31 | ** original Rockman Mega World (J) set uses normal backup RAM |
| 32 | |
| 8 | 33 | 2008-09: Moved here cart code and custom mapper handlers. Hopefully, |
| 9 | 34 | it will make painless the future merging with HazeMD |
| 10 | 35 | 2008-10: Fixed SRAM, matching as much as possible HazeMD. Some game is |
| r9275 | r9276 | |
| 34 | 59 | enum t_cart_type |
| 35 | 60 | { |
| 36 | 61 | STANDARD = 0, |
| 62 | NBA_JAM, /* NBA Jam */ |
| 63 | NBA_JAM_TE, /* NBA Jam TE / NFL Quarterback Club */ |
| 64 | NFL_QB_96, /* NFL Quarterback Club '96 */ |
| 65 | |
| 37 | 66 | SSF2, /* Super Street Fighter 2 */ |
| 38 | | LIONK3, /* Lion King 3 */ |
| 67 | LIONK3, /* Lion King 3 */ |
| 39 | 68 | SKINGKONG, /* Super King Kong 99 */ |
| 40 | | SDK99, /* Super Donkey Kong 99 */ |
| 69 | SDK99, /* Super Donkey Kong 99 */ |
| 41 | 70 | REDCLIFF, /* Romance of the Three Kingdoms - Battle of Red Cliffs, already decoded from .mdx format */ |
| 42 | 71 | REDCL_EN, /* The encoded version... */ |
| 43 | | RADICA, /* Radica TV games.. these probably should be a seperate driver since they are a seperate 'console' */ |
| 44 | | KOF99, /* King of Fighters '99 */ |
| 72 | RADICA, /* Radica TV games.. these probably should be a seperate driver since they are a seperate 'console' */ |
| 73 | KOF99, /* King of Fighters '99 */ |
| 45 | 74 | SOULBLAD, /* Soul Blade */ |
| 46 | 75 | MJLOVER, /* Mahjong Lover */ |
| 47 | 76 | SQUIRRELK, /* Squirrel King */ |
| 48 | | SMOUSE, /* Smart Mouse */ |
| 77 | SMOUSE, /* Smart Mouse */ |
| 49 | 78 | SMB, /* Super Mario Bros. */ |
| 50 | 79 | SMB2, /* Super Mario Bros. 2 */ |
| 51 | | KAIJU, /* Pokemon Stadium */ |
| 80 | KAIJU, /* Pokemon Stadium */ |
| 52 | 81 | CHINFIGHT3, /* Chinese Fighters 3 */ |
| 53 | | LIONK2, /* Lion King 2 */ |
| 82 | LIONK2, /* Lion King 2 */ |
| 54 | 83 | BUGSLIFE, /* A Bug's Life */ |
| 55 | | ELFWOR, /* Elf Wor */ |
| 84 | ELFWOR, /* Elf Wor */ |
| 56 | 85 | ROCKMANX3, /* Rockman X3 */ |
| 57 | 86 | SBUBBOB, /* Super Bubble Bobble */ |
| 58 | | KOF98, /* King of Fighters '98 */ |
| 87 | KOF98, /* King of Fighters '98 */ |
| 59 | 88 | REALTEC, /* Whac a Critter/Mallet legend, Defend the Earth, Funnyworld/Ballonboy */ |
| 60 | 89 | SUP19IN1, /* Super 19 in 1 */ |
| 61 | 90 | SUP15IN1 /* Super 15 in 1 */ |
| r9275 | r9276 | |
| 1128 | 1157 | soulb_sig[] = { 0x33, 0xfc, 0x00, 0x0c, 0x00, 0xff }, // move.w #$C,($FF020A).l (what happens if check fails) |
| 1129 | 1158 | s19in1_sig[] = { 0x13, 0xc0, 0x00, 0xa1, 0x30, 0x38 }; |
| 1130 | 1159 | |
| 1160 | //printf("%08x\n",genesis_last_loaded_image_length); |
| 1161 | |
| 1131 | 1162 | switch (genesis_last_loaded_image_length) |
| 1132 | 1163 | { |
| 1133 | 1164 | case 0x80000: |
| r9275 | r9276 | |
| 1190 | 1221 | |
| 1191 | 1222 | if (!allendianmemcmp(&ROM[0x17bb2], &s15in1_sig[0], sizeof(s15in1_sig))) |
| 1192 | 1223 | cart_type = SUP15IN1; |
| 1224 | |
| 1225 | if (!allendianmemcmp((char *)&ROM[0x0180], "GM T-081326", 11)) // NBA Jam |
| 1226 | cart_type = NBA_JAM; |
| 1227 | |
| 1193 | 1228 | break; |
| 1194 | 1229 | |
| 1195 | 1230 | case 0x200005: |
| r9275 | r9276 | |
| 1203 | 1238 | |
| 1204 | 1239 | if (!allendianmemcmp(&ROM[0x1fd0d2], &kof99_sig[0], sizeof(kof99_sig))) |
| 1205 | 1240 | cart_type = KOF99; |
| 1241 | |
| 1242 | if (!allendianmemcmp((char *)&ROM[0x0180], "GM T-81406", 10)) // NBA Jam TE |
| 1243 | cart_type = NBA_JAM_TE; |
| 1244 | |
| 1245 | if (!allendianmemcmp((char *)&ROM[0x0180], "GM T-81276", 10)) // NFL Quarterback Club |
| 1246 | cart_type = NBA_JAM_TE; |
| 1247 | |
| 1206 | 1248 | break; |
| 1207 | 1249 | |
| 1208 | 1250 | case 0x400000: |
| r9275 | r9276 | |
| 1215 | 1257 | |
| 1216 | 1258 | if (!allendianmemcmp(&ROM[0x1e700], &s19in1_sig[0], sizeof(s19in1_sig))) |
| 1217 | 1259 | cart_type = SUP19IN1; |
| 1260 | |
| 1261 | if (!allendianmemcmp((char *)&ROM[0x0180], "GM T-81586", 10)) // NFL Quarterback Club 96 |
| 1262 | cart_type = NFL_QB_96; |
| 1218 | 1263 | break; |
| 1219 | 1264 | |
| 1220 | 1265 | case 0x500000: |