[Core/IO] added gamepad type auto-detection

This commit is contained in:
EkeEke 2014-04-01 20:36:16 +02:00
parent 1e951838de
commit 54210e8222
16 changed files with 392 additions and 412 deletions

View File

@ -2,7 +2,7 @@
* Genesis Plus
* Mega Drive cartridge hardware support
*
* Copyright (C) 2007-2013 Eke-Eke (Genesis Plus GX)
* Copyright (C) 2007-2014 Eke-Eke (Genesis Plus GX)
*
* Many cartridge protections were initially documented by Haze
* (http://haze.mameworld.info/)
@ -419,7 +419,7 @@ void md_cart_init(void)
if (input.system[1] != SYSTEM_WAYPLAY)
{
old_system[1] = input.system[1];
input.system[1] = SYSTEM_MD_GAMEPAD;
input.system[1] = SYSTEM_GAMEPAD;
}
/* extra connectors mapped at $38xxxx or $3Fxxxx */

View File

@ -77,151 +77,151 @@ typedef struct
static const rominfo_t game_list[] =
{
/* program requiring Mega Drive VDP (Mode 5) */
{0x47FA618D, 0, 1, SYSTEM_MS_GAMEPAD, MAPPER_SEGA, SYSTEM_PBC, REGION_USA}, /* Charles MacDonald's Mode 5 Demo Program */
{0x47FA618D, 0, 1, SYSTEM_GAMEPAD, MAPPER_SEGA, SYSTEM_PBC, REGION_USA}, /* Charles MacDonald's Mode 5 Demo Program */
/* game requiring SEGA mapper */
{0xFF67359B, 0, 0, SYSTEM_MS_GAMEPAD, MAPPER_SEGA, SYSTEM_SMS2, REGION_USA}, /* DataStorm (homebrew) */
{0xFF67359B, 0, 0, SYSTEM_GAMEPAD, MAPPER_SEGA, SYSTEM_SMS2, REGION_USA}, /* DataStorm (homebrew) */
/* games requiring 315-5124 VDP (Mark-III, Master System I) */
{0x32759751, 0, 1, SYSTEM_MS_GAMEPAD, MAPPER_SEGA, SYSTEM_SMS, REGION_JAPAN_NTSC}, /* Y's (J) */
{0x32759751, 0, 1, SYSTEM_GAMEPAD, MAPPER_SEGA, SYSTEM_SMS, REGION_JAPAN_NTSC}, /* Y's (J) */
/* games requiring Sega 315-5235 mapper without bank shifting */
{0x23BAC434, 0, 0, SYSTEM_MS_GAMEPAD, MAPPER_SEGA_X, SYSTEM_GG, REGION_USA}, /* Shining Force Gaiden - Final Conflict (JP) [T-Eng] */
{0x23BAC434, 0, 0, SYSTEM_GAMEPAD, MAPPER_SEGA_X, SYSTEM_GG, REGION_USA}, /* Shining Force Gaiden - Final Conflict (JP) [T-Eng] */
/* games using various Korean mappers */
{0x445525E2, 0, 0, SYSTEM_MS_GAMEPAD, MAPPER_MSX, SYSTEM_SMS, REGION_JAPAN_NTSC}, /* Penguin Adventure (KR) */
{0x83F0EEDE, 0, 0, SYSTEM_MS_GAMEPAD, MAPPER_MSX, SYSTEM_SMS, REGION_JAPAN_NTSC}, /* Street Master (KR) */
{0xA05258F5, 0, 0, SYSTEM_MS_GAMEPAD, MAPPER_MSX, SYSTEM_SMS, REGION_JAPAN_NTSC}, /* Won-Si-In (KR) */
{0x06965ED9, 0, 0, SYSTEM_MS_GAMEPAD, MAPPER_MSX, SYSTEM_SMS, REGION_JAPAN_NTSC}, /* F-1 Spirit - The way to Formula-1 (KR) */
{0x77EFE84A, 0, 0, SYSTEM_MS_GAMEPAD, MAPPER_MSX, SYSTEM_SMS, REGION_JAPAN_NTSC}, /* Cyborg Z (KR) */
{0xF89AF3CC, 0, 0, SYSTEM_MS_GAMEPAD, MAPPER_MSX, SYSTEM_SMS, REGION_JAPAN_NTSC}, /* Knightmare II - The Maze of Galious (KR) */
{0x9195C34C, 0, 0, SYSTEM_MS_GAMEPAD, MAPPER_MSX, SYSTEM_SMS, REGION_JAPAN_NTSC}, /* Super Boy 3 (KR) */
{0xE316C06D, 0, 0, SYSTEM_MS_GAMEPAD, MAPPER_MSX_NEMESIS, SYSTEM_SMS, REGION_JAPAN_NTSC}, /* Nemesis (KR) */
{0x0A77FA5E, 0, 0, SYSTEM_MS_GAMEPAD, MAPPER_MSX, SYSTEM_SMS, REGION_JAPAN_NTSC}, /* Nemesis 2 (KR) */
{0xA67F2A5C, 0, 0, SYSTEM_MS_GAMEPAD, MAPPER_MULTI, SYSTEM_SMS, REGION_JAPAN_NTSC}, /* 4-Pak All Action (KR) */
{0x89B79E77, 0, 0, SYSTEM_MS_GAMEPAD, MAPPER_KOREA, SYSTEM_SMS, REGION_JAPAN_NTSC}, /* Dodgeball King (KR) */
{0x18FB98A3, 0, 0, SYSTEM_MS_GAMEPAD, MAPPER_KOREA, SYSTEM_SMS, REGION_JAPAN_NTSC}, /* Jang Pung 3 (KR) */
{0x97D03541, 0, 0, SYSTEM_MS_GAMEPAD, MAPPER_KOREA, SYSTEM_SMS, REGION_JAPAN_NTSC}, /* Sangokushi 3 (KR) */
{0x192949D5, 0, 0, SYSTEM_MS_GAMEPAD, MAPPER_KOREA_8K, SYSTEM_SMS, REGION_JAPAN_NTSC}, /* Janggun-ui Adeul (KR) */
{0x9FA727A0, 0, 0, SYSTEM_MS_GAMEPAD, MAPPER_KOREA_16K, SYSTEM_GGMS, REGION_USA}, /* Street Hero [Proto 0] [SMS-GG] (US) */
{0xFB481971, 0, 0, SYSTEM_MS_GAMEPAD, MAPPER_KOREA_16K, SYSTEM_GGMS, REGION_USA}, /* Street Hero [Proto 1] [SMS-GG] (US) */
{0x445525E2, 0, 0, SYSTEM_GAMEPAD, MAPPER_MSX, SYSTEM_SMS, REGION_JAPAN_NTSC}, /* Penguin Adventure (KR) */
{0x83F0EEDE, 0, 0, SYSTEM_GAMEPAD, MAPPER_MSX, SYSTEM_SMS, REGION_JAPAN_NTSC}, /* Street Master (KR) */
{0xA05258F5, 0, 0, SYSTEM_GAMEPAD, MAPPER_MSX, SYSTEM_SMS, REGION_JAPAN_NTSC}, /* Won-Si-In (KR) */
{0x06965ED9, 0, 0, SYSTEM_GAMEPAD, MAPPER_MSX, SYSTEM_SMS, REGION_JAPAN_NTSC}, /* F-1 Spirit - The way to Formula-1 (KR) */
{0x77EFE84A, 0, 0, SYSTEM_GAMEPAD, MAPPER_MSX, SYSTEM_SMS, REGION_JAPAN_NTSC}, /* Cyborg Z (KR) */
{0xF89AF3CC, 0, 0, SYSTEM_GAMEPAD, MAPPER_MSX, SYSTEM_SMS, REGION_JAPAN_NTSC}, /* Knightmare II - The Maze of Galious (KR) */
{0x9195C34C, 0, 0, SYSTEM_GAMEPAD, MAPPER_MSX, SYSTEM_SMS, REGION_JAPAN_NTSC}, /* Super Boy 3 (KR) */
{0xE316C06D, 0, 0, SYSTEM_GAMEPAD, MAPPER_MSX_NEMESIS, SYSTEM_SMS, REGION_JAPAN_NTSC}, /* Nemesis (KR) */
{0x0A77FA5E, 0, 0, SYSTEM_GAMEPAD, MAPPER_MSX, SYSTEM_SMS, REGION_JAPAN_NTSC}, /* Nemesis 2 (KR) */
{0xA67F2A5C, 0, 0, SYSTEM_GAMEPAD, MAPPER_MULTI, SYSTEM_SMS, REGION_JAPAN_NTSC}, /* 4-Pak All Action (KR) */
{0x89B79E77, 0, 0, SYSTEM_GAMEPAD, MAPPER_KOREA, SYSTEM_SMS, REGION_JAPAN_NTSC}, /* Dodgeball King (KR) */
{0x18FB98A3, 0, 0, SYSTEM_GAMEPAD, MAPPER_KOREA, SYSTEM_SMS, REGION_JAPAN_NTSC}, /* Jang Pung 3 (KR) */
{0x97D03541, 0, 0, SYSTEM_GAMEPAD, MAPPER_KOREA, SYSTEM_SMS, REGION_JAPAN_NTSC}, /* Sangokushi 3 (KR) */
{0x192949D5, 0, 0, SYSTEM_GAMEPAD, MAPPER_KOREA_8K, SYSTEM_SMS, REGION_JAPAN_NTSC}, /* Janggun-ui Adeul (KR) */
{0x9FA727A0, 0, 0, SYSTEM_GAMEPAD, MAPPER_KOREA_16K, SYSTEM_GGMS, REGION_USA}, /* Street Hero [Proto 0] [SMS-GG] (US) */
{0xFB481971, 0, 0, SYSTEM_GAMEPAD, MAPPER_KOREA_16K, SYSTEM_GGMS, REGION_USA}, /* Street Hero [Proto 1] [SMS-GG] (US) */
/* games using Codemaster mapper */
{0x29822980, 0, 0, SYSTEM_MS_GAMEPAD, MAPPER_CODIES, SYSTEM_SMS2, REGION_EUROPE}, /* Cosmic Spacehead */
{0x8813514B, 0, 0, SYSTEM_MS_GAMEPAD, MAPPER_CODIES, SYSTEM_SMS2, REGION_EUROPE}, /* Excellent Dizzy Collection, The [Proto] */
{0xB9664AE1, 0, 0, SYSTEM_MS_GAMEPAD, MAPPER_CODIES, SYSTEM_SMS2, REGION_EUROPE}, /* Fantastic Dizzy */
{0xA577CE46, 0, 0, SYSTEM_MS_GAMEPAD, MAPPER_CODIES, SYSTEM_SMS2, REGION_EUROPE}, /* Micro Machines */
{0xEA5C3A6F, 0, 0, SYSTEM_MS_GAMEPAD, MAPPER_CODIES, SYSTEM_SMS2, REGION_USA}, /* Dinobasher - Starring Bignose the Caveman [Proto] */
{0xAA140C9C, 0, 0, SYSTEM_MS_GAMEPAD, MAPPER_CODIES, SYSTEM_GGMS, REGION_USA}, /* Excellent Dizzy Collection, The [SMS-GG] */
{0xC888222B, 0, 0, SYSTEM_MS_GAMEPAD, MAPPER_CODIES, SYSTEM_GGMS, REGION_USA}, /* Fantastic Dizzy [SMS-GG] */
{0x76C5BDFB, 0, 0, SYSTEM_MS_GAMEPAD, MAPPER_CODIES, SYSTEM_GGMS, REGION_USA}, /* Jang Pung 2 [SMS-GG] */
{0x6CAA625B, 0, 0, SYSTEM_MS_GAMEPAD, MAPPER_CODIES, SYSTEM_GG, REGION_USA}, /* Cosmic Spacehead [GG]*/
{0x152F0DCC, 0, 0, SYSTEM_MS_GAMEPAD, MAPPER_CODIES, SYSTEM_GG, REGION_USA}, /* Drop Zone */
{0x5E53C7F7, 0, 0, SYSTEM_MS_GAMEPAD, MAPPER_CODIES, SYSTEM_GG, REGION_USA}, /* Ernie Els Golf */
{0xD9A7F170, 0, 0, SYSTEM_MS_GAMEPAD, MAPPER_CODIES, SYSTEM_GG, REGION_USA}, /* Man Overboard! */
{0xF7C524F6, 0, 0, SYSTEM_MS_GAMEPAD, MAPPER_CODIES, SYSTEM_GG, REGION_USA}, /* Micro Machines [GG] */
{0xDBE8895C, 0, 0, SYSTEM_MS_GAMEPAD, MAPPER_CODIES, SYSTEM_GG, REGION_USA}, /* Micro Machines 2 - Turbo Tournament */
{0xC1756BEE, 0, 0, SYSTEM_MS_GAMEPAD, MAPPER_CODIES, SYSTEM_GG, REGION_USA}, /* Pete Sampras Tennis */
{0x72981057, 0, 0, SYSTEM_MS_GAMEPAD, MAPPER_CODIES, SYSTEM_GG, REGION_USA}, /* CJ Elephant Fugitive */
{0x29822980, 0, 0, SYSTEM_GAMEPAD, MAPPER_CODIES, SYSTEM_SMS2, REGION_EUROPE}, /* Cosmic Spacehead */
{0x8813514B, 0, 0, SYSTEM_GAMEPAD, MAPPER_CODIES, SYSTEM_SMS2, REGION_EUROPE}, /* Excellent Dizzy Collection, The [Proto] */
{0xB9664AE1, 0, 0, SYSTEM_GAMEPAD, MAPPER_CODIES, SYSTEM_SMS2, REGION_EUROPE}, /* Fantastic Dizzy */
{0xA577CE46, 0, 0, SYSTEM_GAMEPAD, MAPPER_CODIES, SYSTEM_SMS2, REGION_EUROPE}, /* Micro Machines */
{0xEA5C3A6F, 0, 0, SYSTEM_GAMEPAD, MAPPER_CODIES, SYSTEM_SMS2, REGION_USA}, /* Dinobasher - Starring Bignose the Caveman [Proto] */
{0xAA140C9C, 0, 0, SYSTEM_GAMEPAD, MAPPER_CODIES, SYSTEM_GGMS, REGION_USA}, /* Excellent Dizzy Collection, The [SMS-GG] */
{0xC888222B, 0, 0, SYSTEM_GAMEPAD, MAPPER_CODIES, SYSTEM_GGMS, REGION_USA}, /* Fantastic Dizzy [SMS-GG] */
{0x76C5BDFB, 0, 0, SYSTEM_GAMEPAD, MAPPER_CODIES, SYSTEM_GGMS, REGION_USA}, /* Jang Pung 2 [SMS-GG] */
{0x6CAA625B, 0, 0, SYSTEM_GAMEPAD, MAPPER_CODIES, SYSTEM_GG, REGION_USA}, /* Cosmic Spacehead [GG]*/
{0x152F0DCC, 0, 0, SYSTEM_GAMEPAD, MAPPER_CODIES, SYSTEM_GG, REGION_USA}, /* Drop Zone */
{0x5E53C7F7, 0, 0, SYSTEM_GAMEPAD, MAPPER_CODIES, SYSTEM_GG, REGION_USA}, /* Ernie Els Golf */
{0xD9A7F170, 0, 0, SYSTEM_GAMEPAD, MAPPER_CODIES, SYSTEM_GG, REGION_USA}, /* Man Overboard! */
{0xF7C524F6, 0, 0, SYSTEM_GAMEPAD, MAPPER_CODIES, SYSTEM_GG, REGION_USA}, /* Micro Machines [GG] */
{0xDBE8895C, 0, 0, SYSTEM_GAMEPAD, MAPPER_CODIES, SYSTEM_GG, REGION_USA}, /* Micro Machines 2 - Turbo Tournament */
{0xC1756BEE, 0, 0, SYSTEM_GAMEPAD, MAPPER_CODIES, SYSTEM_GG, REGION_USA}, /* Pete Sampras Tennis */
{0x72981057, 0, 0, SYSTEM_GAMEPAD, MAPPER_CODIES, SYSTEM_GG, REGION_USA}, /* CJ Elephant Fugitive */
/* games using serial EEPROM */
{0x36EBCD6D, 0, 0, SYSTEM_MS_GAMEPAD, MAPPER_93C46, SYSTEM_GG, REGION_USA}, /* Majors Pro Baseball */
{0x3D8D0DD6, 0, 0, SYSTEM_MS_GAMEPAD, MAPPER_93C46, SYSTEM_GG, REGION_USA}, /* World Series Baseball [v0] */
{0xBB38CFD7, 0, 0, SYSTEM_MS_GAMEPAD, MAPPER_93C46, SYSTEM_GG, REGION_USA}, /* World Series Baseball [v1] */
{0x578A8A38, 0, 0, SYSTEM_MS_GAMEPAD, MAPPER_93C46, SYSTEM_GG, REGION_USA}, /* World Series Baseball '95 */
{0x36EBCD6D, 0, 0, SYSTEM_GAMEPAD, MAPPER_93C46, SYSTEM_GG, REGION_USA}, /* Majors Pro Baseball */
{0x3D8D0DD6, 0, 0, SYSTEM_GAMEPAD, MAPPER_93C46, SYSTEM_GG, REGION_USA}, /* World Series Baseball [v0] */
{0xBB38CFD7, 0, 0, SYSTEM_GAMEPAD, MAPPER_93C46, SYSTEM_GG, REGION_USA}, /* World Series Baseball [v1] */
{0x578A8A38, 0, 0, SYSTEM_GAMEPAD, MAPPER_93C46, SYSTEM_GG, REGION_USA}, /* World Series Baseball '95 */
/* games using Terebi Oekaki graphic board */
{0xDD4A661B, 0, 0, SYSTEM_MS_GAMEPAD, MAPPER_TEREBI, SYSTEM_SG, REGION_JAPAN_NTSC}, /* Terebi Oekaki */
{0xDD4A661B, 0, 0, SYSTEM_GAMEPAD, MAPPER_TEREBI, SYSTEM_SG, REGION_JAPAN_NTSC}, /* Terebi Oekaki */
/* games using 2KB external RAM (volatile) */
{0x092F29D6, 0, 0, SYSTEM_MS_GAMEPAD, MAPPER_RAM_2K, SYSTEM_SG, REGION_JAPAN_NTSC}, /* The Castle (J) */
{0xAF4F14BC, 0, 0, SYSTEM_MS_GAMEPAD, MAPPER_RAM_2K, SYSTEM_SG, REGION_JAPAN_NTSC}, /* Othello (J) */
{0x1D1A0CA3, 0, 0, SYSTEM_MS_GAMEPAD, MAPPER_RAM_2K, SYSTEM_SGII, REGION_JAPAN_NTSC}, /* Othello (TW) */
{0x092F29D6, 0, 0, SYSTEM_GAMEPAD, MAPPER_RAM_2K, SYSTEM_SG, REGION_JAPAN_NTSC}, /* The Castle (J) */
{0xAF4F14BC, 0, 0, SYSTEM_GAMEPAD, MAPPER_RAM_2K, SYSTEM_SG, REGION_JAPAN_NTSC}, /* Othello (J) */
{0x1D1A0CA3, 0, 0, SYSTEM_GAMEPAD, MAPPER_RAM_2K, SYSTEM_SGII, REGION_JAPAN_NTSC}, /* Othello (TW) */
/* games requiring SG-1000 II 8K RAM extension adapter */
{0xCE5648C3, 0, 0, SYSTEM_MS_GAMEPAD, MAPPER_RAM_8K_EXT1, SYSTEM_SGII, REGION_JAPAN_NTSC}, /* Bomberman Special [DahJee] (TW) */
{0x223397A1, 0, 0, SYSTEM_MS_GAMEPAD, MAPPER_RAM_8K_EXT1, SYSTEM_SGII, REGION_JAPAN_NTSC}, /* King's Valley (TW) */
{0x281D2888, 0, 0, SYSTEM_MS_GAMEPAD, MAPPER_RAM_8K_EXT1, SYSTEM_SGII, REGION_JAPAN_NTSC}, /* Knightmare (TW) */
{0x306D5F78, 0, 0, SYSTEM_MS_GAMEPAD, MAPPER_RAM_8K_EXT1, SYSTEM_SGII, REGION_JAPAN_NTSC}, /* Rally-X [DahJee] (TW) */
{0x29E047CC, 0, 0, SYSTEM_MS_GAMEPAD, MAPPER_RAM_8K_EXT1, SYSTEM_SGII, REGION_JAPAN_NTSC}, /* Road Fighter (TW) */
{0x5CBD1163, 0, 0, SYSTEM_MS_GAMEPAD, MAPPER_RAM_8K_EXT1, SYSTEM_SGII, REGION_JAPAN_NTSC}, /* Tank Battalion (TW) */
{0x2E7166D5, 0, 0, SYSTEM_MS_GAMEPAD, MAPPER_RAM_8K_EXT1, SYSTEM_SGII, REGION_JAPAN_NTSC}, /* The Legend of Kage (TW) */
{0xC550B4F0, 0, 0, SYSTEM_MS_GAMEPAD, MAPPER_RAM_8K_EXT1, SYSTEM_SGII, REGION_JAPAN_NTSC}, /* TwinBee (TW) */
{0xFC87463C, 0, 0, SYSTEM_MS_GAMEPAD, MAPPER_RAM_8K_EXT1, SYSTEM_SGII, REGION_JAPAN_NTSC}, /* Yie Ar Kung-Fu II (TW) */
{0x69FC1494, 0, 0, SYSTEM_MS_GAMEPAD, MAPPER_RAM_8K_EXT2, SYSTEM_SGII, REGION_JAPAN_NTSC}, /* Bomberman Special (TW) */
{0xFFC4EE3F, 0, 0, SYSTEM_MS_GAMEPAD, MAPPER_RAM_8K_EXT2, SYSTEM_SGII, REGION_JAPAN_NTSC}, /* Magical Kid Wiz (TW) */
{0x2E366CCF, 0, 0, SYSTEM_MS_GAMEPAD, MAPPER_RAM_8K_EXT2, SYSTEM_SGII, REGION_JAPAN_NTSC}, /* The Castle (TW) */
{0xAAAC12CF, 0, 0, SYSTEM_MS_GAMEPAD, MAPPER_RAM_8K_EXT2, SYSTEM_SGII, REGION_JAPAN_NTSC}, /* Rally-X (TW) */
{0xD2EDD329, 0, 0, SYSTEM_MS_GAMEPAD, MAPPER_RAM_8K_EXT2, SYSTEM_SGII, REGION_JAPAN_NTSC}, /* Road Fighter (TW) */
{0xCE5648C3, 0, 0, SYSTEM_GAMEPAD, MAPPER_RAM_8K_EXT1, SYSTEM_SGII, REGION_JAPAN_NTSC}, /* Bomberman Special [DahJee] (TW) */
{0x223397A1, 0, 0, SYSTEM_GAMEPAD, MAPPER_RAM_8K_EXT1, SYSTEM_SGII, REGION_JAPAN_NTSC}, /* King's Valley (TW) */
{0x281D2888, 0, 0, SYSTEM_GAMEPAD, MAPPER_RAM_8K_EXT1, SYSTEM_SGII, REGION_JAPAN_NTSC}, /* Knightmare (TW) */
{0x306D5F78, 0, 0, SYSTEM_GAMEPAD, MAPPER_RAM_8K_EXT1, SYSTEM_SGII, REGION_JAPAN_NTSC}, /* Rally-X [DahJee] (TW) */
{0x29E047CC, 0, 0, SYSTEM_GAMEPAD, MAPPER_RAM_8K_EXT1, SYSTEM_SGII, REGION_JAPAN_NTSC}, /* Road Fighter (TW) */
{0x5CBD1163, 0, 0, SYSTEM_GAMEPAD, MAPPER_RAM_8K_EXT1, SYSTEM_SGII, REGION_JAPAN_NTSC}, /* Tank Battalion (TW) */
{0x2E7166D5, 0, 0, SYSTEM_GAMEPAD, MAPPER_RAM_8K_EXT1, SYSTEM_SGII, REGION_JAPAN_NTSC}, /* The Legend of Kage (TW) */
{0xC550B4F0, 0, 0, SYSTEM_GAMEPAD, MAPPER_RAM_8K_EXT1, SYSTEM_SGII, REGION_JAPAN_NTSC}, /* TwinBee (TW) */
{0xFC87463C, 0, 0, SYSTEM_GAMEPAD, MAPPER_RAM_8K_EXT1, SYSTEM_SGII, REGION_JAPAN_NTSC}, /* Yie Ar Kung-Fu II (TW) */
{0x69FC1494, 0, 0, SYSTEM_GAMEPAD, MAPPER_RAM_8K_EXT2, SYSTEM_SGII, REGION_JAPAN_NTSC}, /* Bomberman Special (TW) */
{0xFFC4EE3F, 0, 0, SYSTEM_GAMEPAD, MAPPER_RAM_8K_EXT2, SYSTEM_SGII, REGION_JAPAN_NTSC}, /* Magical Kid Wiz (TW) */
{0x2E366CCF, 0, 0, SYSTEM_GAMEPAD, MAPPER_RAM_8K_EXT2, SYSTEM_SGII, REGION_JAPAN_NTSC}, /* The Castle (TW) */
{0xAAAC12CF, 0, 0, SYSTEM_GAMEPAD, MAPPER_RAM_8K_EXT2, SYSTEM_SGII, REGION_JAPAN_NTSC}, /* Rally-X (TW) */
{0xD2EDD329, 0, 0, SYSTEM_GAMEPAD, MAPPER_RAM_8K_EXT2, SYSTEM_SGII, REGION_JAPAN_NTSC}, /* Road Fighter (TW) */
/* games requiring 2K internal RAM (SG-1000 II clone hardware) */
{0x7F7F009D, 0, 0, SYSTEM_MS_GAMEPAD, MAPPER_NONE, SYSTEM_SGII, REGION_JAPAN_NTSC}, /* Circus Charlie (KR) */
{0x77DB4704, 0, 0, SYSTEM_MS_GAMEPAD, MAPPER_NONE, SYSTEM_SGII, REGION_JAPAN_NTSC}, /* Q*Bert */
{0xC5A67B95, 0, 0, SYSTEM_MS_GAMEPAD, MAPPER_NONE, SYSTEM_SGII, REGION_JAPAN_NTSC}, /* Othello Multivision BIOS */
{0x7F7F009D, 0, 0, SYSTEM_GAMEPAD, MAPPER_NONE, SYSTEM_SGII, REGION_JAPAN_NTSC}, /* Circus Charlie (KR) */
{0x77DB4704, 0, 0, SYSTEM_GAMEPAD, MAPPER_NONE, SYSTEM_SGII, REGION_JAPAN_NTSC}, /* Q*Bert */
{0xC5A67B95, 0, 0, SYSTEM_GAMEPAD, MAPPER_NONE, SYSTEM_SGII, REGION_JAPAN_NTSC}, /* Othello Multivision BIOS */
/* games requiring Japanese region setting */
{0x71DEBA5A, 0, 0, SYSTEM_MS_GAMEPAD, MAPPER_SEGA, SYSTEM_GG, REGION_JAPAN_NTSC}, /* Pop Breaker */
{0xC9DD4E5F, 0, 0, SYSTEM_MS_GAMEPAD, MAPPER_SEGA, SYSTEM_SMS, REGION_JAPAN_NTSC}, /* Woody Pop (Super Arkanoid) */
{0x71DEBA5A, 0, 0, SYSTEM_GAMEPAD, MAPPER_SEGA, SYSTEM_GG, REGION_JAPAN_NTSC}, /* Pop Breaker */
{0xC9DD4E5F, 0, 0, SYSTEM_GAMEPAD, MAPPER_SEGA, SYSTEM_SMS, REGION_JAPAN_NTSC}, /* Woody Pop (Super Arkanoid) */
/* games requiring Japanese Master System I/O chip (315-5297) */
{0xBD1CC7DF, 0, 0, SYSTEM_MS_GAMEPAD, MAPPER_SEGA, SYSTEM_SMS, REGION_JAPAN_NTSC}, /* Super Tetris (KR) */
{0x6D309AC5, 0, 0, SYSTEM_MS_GAMEPAD, MAPPER_SEGA, SYSTEM_SMS, REGION_JAPAN_NTSC}, /* Power Boggle Boggle (KR) */
{0xBD1CC7DF, 0, 0, SYSTEM_GAMEPAD, MAPPER_SEGA, SYSTEM_SMS, REGION_JAPAN_NTSC}, /* Super Tetris (KR) */
{0x6D309AC5, 0, 0, SYSTEM_GAMEPAD, MAPPER_SEGA, SYSTEM_SMS, REGION_JAPAN_NTSC}, /* Power Boggle Boggle (KR) */
/* games requiring random RAM pattern initialization */
{0x08BF3DE3, 0, 0, SYSTEM_MS_GAMEPAD, MAPPER_NONE, SYSTEM_MARKIII, REGION_JAPAN_NTSC}, /* Alibaba and 40 Thieves (KR) */
{0x643B6B76, 0, 0, SYSTEM_MS_GAMEPAD, MAPPER_NONE, SYSTEM_MARKIII, REGION_JAPAN_NTSC}, /* Block Hole (KR) */
{0x08BF3DE3, 0, 0, SYSTEM_GAMEPAD, MAPPER_NONE, SYSTEM_MARKIII, REGION_JAPAN_NTSC}, /* Alibaba and 40 Thieves (KR) */
{0x643B6B76, 0, 0, SYSTEM_GAMEPAD, MAPPER_NONE, SYSTEM_MARKIII, REGION_JAPAN_NTSC}, /* Block Hole (KR) */
/* games requiring PAL timings */
{0x72420F38, 0, 0, SYSTEM_MS_GAMEPAD, MAPPER_SEGA, SYSTEM_SMS2, REGION_EUROPE}, /* Addams Familly */
{0x2D48C1D3, 0, 0, SYSTEM_MS_GAMEPAD, MAPPER_SEGA, SYSTEM_SMS2, REGION_EUROPE}, /* Back to the Future Part III */
{0x1CBB7BF1, 0, 0, SYSTEM_MS_GAMEPAD, MAPPER_SEGA, SYSTEM_SMS2, REGION_EUROPE}, /* Battlemaniacs (BR) */
{0x1B10A951, 0, 0, SYSTEM_MS_GAMEPAD, MAPPER_SEGA, SYSTEM_SMS2, REGION_EUROPE}, /* Bram Stoker's Dracula */
{0xC0E25D62, 0, 0, SYSTEM_MS_GAMEPAD, MAPPER_SEGA, SYSTEM_SMS2, REGION_EUROPE}, /* California Games II */
{0x45C50294, 0, 0, SYSTEM_MS_GAMEPAD, MAPPER_SEGA, SYSTEM_SMS2, REGION_EUROPE}, /* Jogos de Verao II (BR) */
{0xC9DBF936, 0, 0, SYSTEM_MS_GAMEPAD, MAPPER_SEGA, SYSTEM_SMS2, REGION_EUROPE}, /* Home Alone */
{0x0047B615, 0, 0, SYSTEM_MS_GAMEPAD, MAPPER_SEGA, SYSTEM_SMS2, REGION_EUROPE}, /* Predator2 */
{0xF42E145C, 0, 0, SYSTEM_MS_GAMEPAD, MAPPER_SEGA, SYSTEM_SMS2, REGION_EUROPE}, /* Quest for the Shaven Yak Starring Ren Hoek & Stimpy (BR) */
{0x9F951756, 0, 0, SYSTEM_MS_GAMEPAD, MAPPER_SEGA, SYSTEM_SMS2, REGION_EUROPE}, /* RoboCop 3 */
{0xF8176918, 0, 0, SYSTEM_MS_GAMEPAD, MAPPER_SEGA, SYSTEM_SMS2, REGION_EUROPE}, /* Sensible Soccer */
{0x1575581D, 0, 0, SYSTEM_MS_GAMEPAD, MAPPER_SEGA, SYSTEM_SMS2, REGION_EUROPE}, /* Shadow of the Beast */
{0x96B3F29E, 0, 0, SYSTEM_MS_GAMEPAD, MAPPER_SEGA, SYSTEM_SMS2, REGION_EUROPE}, /* Sonic Blast (BR) */
{0x5B3B922C, 0, 0, SYSTEM_MS_GAMEPAD, MAPPER_SEGA, SYSTEM_SMS2, REGION_EUROPE}, /* Sonic the Hedgehog 2 [V0] */
{0xD6F2BFCA, 0, 0, SYSTEM_MS_GAMEPAD, MAPPER_SEGA, SYSTEM_SMS2, REGION_EUROPE}, /* Sonic the Hedgehog 2 [V1] */
{0xCA1D3752, 0, 0, SYSTEM_MS_GAMEPAD, MAPPER_SEGA, SYSTEM_SMS2, REGION_EUROPE}, /* Space Harrier [50 Hz] */
{0x85CFC9C9, 0, 0, SYSTEM_MS_GAMEPAD, MAPPER_SEGA, SYSTEM_SMS2, REGION_EUROPE}, /* Taito Chase H.Q. */
{0x332A847D, 0, 0, SYSTEM_MS_GAMEPAD, MAPPER_SEGA, SYSTEM_SMS2, REGION_EUROPE}, /* NBA Jam [Proto] */
{0x72420F38, 0, 0, SYSTEM_GAMEPAD, MAPPER_SEGA, SYSTEM_SMS2, REGION_EUROPE}, /* Addams Familly */
{0x2D48C1D3, 0, 0, SYSTEM_GAMEPAD, MAPPER_SEGA, SYSTEM_SMS2, REGION_EUROPE}, /* Back to the Future Part III */
{0x1CBB7BF1, 0, 0, SYSTEM_GAMEPAD, MAPPER_SEGA, SYSTEM_SMS2, REGION_EUROPE}, /* Battlemaniacs (BR) */
{0x1B10A951, 0, 0, SYSTEM_GAMEPAD, MAPPER_SEGA, SYSTEM_SMS2, REGION_EUROPE}, /* Bram Stoker's Dracula */
{0xC0E25D62, 0, 0, SYSTEM_GAMEPAD, MAPPER_SEGA, SYSTEM_SMS2, REGION_EUROPE}, /* California Games II */
{0x45C50294, 0, 0, SYSTEM_GAMEPAD, MAPPER_SEGA, SYSTEM_SMS2, REGION_EUROPE}, /* Jogos de Verao II (BR) */
{0xC9DBF936, 0, 0, SYSTEM_GAMEPAD, MAPPER_SEGA, SYSTEM_SMS2, REGION_EUROPE}, /* Home Alone */
{0x0047B615, 0, 0, SYSTEM_GAMEPAD, MAPPER_SEGA, SYSTEM_SMS2, REGION_EUROPE}, /* Predator2 */
{0xF42E145C, 0, 0, SYSTEM_GAMEPAD, MAPPER_SEGA, SYSTEM_SMS2, REGION_EUROPE}, /* Quest for the Shaven Yak Starring Ren Hoek & Stimpy (BR) */
{0x9F951756, 0, 0, SYSTEM_GAMEPAD, MAPPER_SEGA, SYSTEM_SMS2, REGION_EUROPE}, /* RoboCop 3 */
{0xF8176918, 0, 0, SYSTEM_GAMEPAD, MAPPER_SEGA, SYSTEM_SMS2, REGION_EUROPE}, /* Sensible Soccer */
{0x1575581D, 0, 0, SYSTEM_GAMEPAD, MAPPER_SEGA, SYSTEM_SMS2, REGION_EUROPE}, /* Shadow of the Beast */
{0x96B3F29E, 0, 0, SYSTEM_GAMEPAD, MAPPER_SEGA, SYSTEM_SMS2, REGION_EUROPE}, /* Sonic Blast (BR) */
{0x5B3B922C, 0, 0, SYSTEM_GAMEPAD, MAPPER_SEGA, SYSTEM_SMS2, REGION_EUROPE}, /* Sonic the Hedgehog 2 [V0] */
{0xD6F2BFCA, 0, 0, SYSTEM_GAMEPAD, MAPPER_SEGA, SYSTEM_SMS2, REGION_EUROPE}, /* Sonic the Hedgehog 2 [V1] */
{0xCA1D3752, 0, 0, SYSTEM_GAMEPAD, MAPPER_SEGA, SYSTEM_SMS2, REGION_EUROPE}, /* Space Harrier [50 Hz] */
{0x85CFC9C9, 0, 0, SYSTEM_GAMEPAD, MAPPER_SEGA, SYSTEM_SMS2, REGION_EUROPE}, /* Taito Chase H.Q. */
{0x332A847D, 0, 0, SYSTEM_GAMEPAD, MAPPER_SEGA, SYSTEM_SMS2, REGION_EUROPE}, /* NBA Jam [Proto] */
/* games running in Game Gear MS compatibility mode */
{0x59840FD6, 0, 0, SYSTEM_MS_GAMEPAD, MAPPER_SEGA, SYSTEM_GGMS, REGION_USA}, /* Castle of Illusion - Starring Mickey Mouse [SMS-GG] */
{0x9C76FB3A, 0, 0, SYSTEM_MS_GAMEPAD, MAPPER_SEGA, SYSTEM_GGMS, REGION_USA}, /* Rastan Saga [SMS-GG] */
{0xC8381DEF, 0, 0, SYSTEM_MS_GAMEPAD, MAPPER_SEGA, SYSTEM_GGMS, REGION_USA}, /* Taito Chase H.Q [SMS-GG] */
{0xDA8E95A9, 0, 0, SYSTEM_MS_GAMEPAD, MAPPER_SEGA, SYSTEM_GGMS, REGION_USA}, /* WWF Wrestlemania Steel Cage Challenge [SMS-GG] */
{0x1D93246E, 0, 0, SYSTEM_MS_GAMEPAD, MAPPER_SEGA, SYSTEM_GGMS, REGION_USA}, /* Olympic Gold [A][SMS-GG] */
{0xA2F9C7AF, 0, 0, SYSTEM_MS_GAMEPAD, MAPPER_SEGA, SYSTEM_GGMS, REGION_USA}, /* Olympic Gold [B][SMS-GG] */
{0x01EAB89D, 0, 0, SYSTEM_MS_GAMEPAD, MAPPER_SEGA, SYSTEM_GGMS, REGION_USA}, /* Out Run Europa [SMS-GG] */
{0xF037EC00, 0, 0, SYSTEM_MS_GAMEPAD, MAPPER_SEGA, SYSTEM_GGMS, REGION_USA}, /* Out Run Europa (US) [SMS-GG] */
{0xE5F789B9, 0, 0, SYSTEM_MS_GAMEPAD, MAPPER_SEGA, SYSTEM_GGMS, REGION_USA}, /* Predator 2 [SMS-GG] */
{0x311D2863, 0, 0, SYSTEM_MS_GAMEPAD, MAPPER_SEGA, SYSTEM_GGMS, REGION_USA}, /* Prince of Persia [A][SMS-GG] */
{0x45F058D6, 0, 0, SYSTEM_MS_GAMEPAD, MAPPER_SEGA, SYSTEM_GGMS, REGION_USA}, /* Prince of Persia [B][SMS-GG] */
{0x56201996, 0, 0, SYSTEM_MS_GAMEPAD, MAPPER_SEGA, SYSTEM_GGMS, REGION_USA}, /* R.C. Grand Prix [SMS-GG] */
{0x10DBBEF4, 0, 0, SYSTEM_MS_GAMEPAD, MAPPER_SEGA, SYSTEM_GGMS, REGION_USA}, /* Super Kick Off [SMS-GG] */
{0x9942B69B, 0, 0, SYSTEM_MS_GAMEPAD, MAPPER_SEGA, SYSTEM_GGMS, REGION_JAPAN_NTSC}, /* Castle of Illusion - Starring Mickey Mouse (J) [SMS-GG] */
{0x7BB81E3D, 0, 0, SYSTEM_MS_GAMEPAD, MAPPER_SEGA, SYSTEM_GGMS, REGION_JAPAN_NTSC}, /* Taito Chase H.Q (J) [SMS-GG] */
{0x6F8E46CF, 0, 0, SYSTEM_MS_GAMEPAD, MAPPER_SEGA, SYSTEM_GGMS, REGION_JAPAN_NTSC}, /* Alex Kidd in Miracle World (TW) [SMS-GG] */
{0x3382D73F, 0, 0, SYSTEM_MS_GAMEPAD, MAPPER_SEGA, SYSTEM_GGMS, REGION_JAPAN_NTSC}, /* Olympic Gold (TW) [SMS-GG] */
{0x59840FD6, 0, 0, SYSTEM_GAMEPAD, MAPPER_SEGA, SYSTEM_GGMS, REGION_USA}, /* Castle of Illusion - Starring Mickey Mouse [SMS-GG] */
{0x9C76FB3A, 0, 0, SYSTEM_GAMEPAD, MAPPER_SEGA, SYSTEM_GGMS, REGION_USA}, /* Rastan Saga [SMS-GG] */
{0xC8381DEF, 0, 0, SYSTEM_GAMEPAD, MAPPER_SEGA, SYSTEM_GGMS, REGION_USA}, /* Taito Chase H.Q [SMS-GG] */
{0xDA8E95A9, 0, 0, SYSTEM_GAMEPAD, MAPPER_SEGA, SYSTEM_GGMS, REGION_USA}, /* WWF Wrestlemania Steel Cage Challenge [SMS-GG] */
{0x1D93246E, 0, 0, SYSTEM_GAMEPAD, MAPPER_SEGA, SYSTEM_GGMS, REGION_USA}, /* Olympic Gold [A][SMS-GG] */
{0xA2F9C7AF, 0, 0, SYSTEM_GAMEPAD, MAPPER_SEGA, SYSTEM_GGMS, REGION_USA}, /* Olympic Gold [B][SMS-GG] */
{0x01EAB89D, 0, 0, SYSTEM_GAMEPAD, MAPPER_SEGA, SYSTEM_GGMS, REGION_USA}, /* Out Run Europa [SMS-GG] */
{0xF037EC00, 0, 0, SYSTEM_GAMEPAD, MAPPER_SEGA, SYSTEM_GGMS, REGION_USA}, /* Out Run Europa (US) [SMS-GG] */
{0xE5F789B9, 0, 0, SYSTEM_GAMEPAD, MAPPER_SEGA, SYSTEM_GGMS, REGION_USA}, /* Predator 2 [SMS-GG] */
{0x311D2863, 0, 0, SYSTEM_GAMEPAD, MAPPER_SEGA, SYSTEM_GGMS, REGION_USA}, /* Prince of Persia [A][SMS-GG] */
{0x45F058D6, 0, 0, SYSTEM_GAMEPAD, MAPPER_SEGA, SYSTEM_GGMS, REGION_USA}, /* Prince of Persia [B][SMS-GG] */
{0x56201996, 0, 0, SYSTEM_GAMEPAD, MAPPER_SEGA, SYSTEM_GGMS, REGION_USA}, /* R.C. Grand Prix [SMS-GG] */
{0x10DBBEF4, 0, 0, SYSTEM_GAMEPAD, MAPPER_SEGA, SYSTEM_GGMS, REGION_USA}, /* Super Kick Off [SMS-GG] */
{0x9942B69B, 0, 0, SYSTEM_GAMEPAD, MAPPER_SEGA, SYSTEM_GGMS, REGION_JAPAN_NTSC}, /* Castle of Illusion - Starring Mickey Mouse (J) [SMS-GG] */
{0x7BB81E3D, 0, 0, SYSTEM_GAMEPAD, MAPPER_SEGA, SYSTEM_GGMS, REGION_JAPAN_NTSC}, /* Taito Chase H.Q (J) [SMS-GG] */
{0x6F8E46CF, 0, 0, SYSTEM_GAMEPAD, MAPPER_SEGA, SYSTEM_GGMS, REGION_JAPAN_NTSC}, /* Alex Kidd in Miracle World (TW) [SMS-GG] */
{0x3382D73F, 0, 0, SYSTEM_GAMEPAD, MAPPER_SEGA, SYSTEM_GGMS, REGION_JAPAN_NTSC}, /* Olympic Gold (TW) [SMS-GG] */
/* games requiring 3-D Glasses */
{0x6BD5C2BF, 1, 1, SYSTEM_MS_GAMEPAD, MAPPER_SEGA, SYSTEM_SMS2, REGION_USA}, /* Space Harrier 3-D */
{0x8ECD201C, 1, 1, SYSTEM_MS_GAMEPAD, MAPPER_SEGA, SYSTEM_SMS2, REGION_USA}, /* Blade Eagle 3-D */
{0xFBF96C81, 1, 1, SYSTEM_MS_GAMEPAD, MAPPER_SEGA, SYSTEM_SMS2, REGION_USA}, /* Blade Eagle 3-D (BR) */
{0x58D5FC48, 1, 1, SYSTEM_MS_GAMEPAD, MAPPER_SEGA, SYSTEM_SMS2, REGION_USA}, /* Blade Eagle 3-D [Proto] */
{0x31B8040B, 1, 1, SYSTEM_MS_GAMEPAD, MAPPER_SEGA, SYSTEM_SMS2, REGION_USA}, /* Maze Hunter 3-D */
{0xABD48AD2, 1, 1, SYSTEM_MS_GAMEPAD, MAPPER_SEGA, SYSTEM_SMS2, REGION_USA}, /* Poseidon Wars 3-D */
{0xA3EF13CB, 1, 1, SYSTEM_MS_GAMEPAD, MAPPER_SEGA, SYSTEM_SMS2, REGION_USA}, /* Zaxxon 3-D */
{0xBBA74147, 1, 1, SYSTEM_MS_GAMEPAD, MAPPER_SEGA, SYSTEM_SMS2, REGION_USA}, /* Zaxxon 3-D [Proto] */
{0xD6F43DDA, 1, 1, SYSTEM_MS_GAMEPAD, MAPPER_SEGA, SYSTEM_SMS2, REGION_USA}, /* Out Run 3-D */
{0x871562b0, 1, 1, SYSTEM_MS_GAMEPAD, MAPPER_SEGA, SYSTEM_SMS, REGION_JAPAN_NTSC}, /* Maze Walker */
{0x156948f9, 1, 1, SYSTEM_MS_GAMEPAD, MAPPER_SEGA, SYSTEM_SMS, REGION_JAPAN_NTSC}, /* Space Harrier 3-D (J) */
{0x6BD5C2BF, 1, 1, SYSTEM_GAMEPAD, MAPPER_SEGA, SYSTEM_SMS2, REGION_USA}, /* Space Harrier 3-D */
{0x8ECD201C, 1, 1, SYSTEM_GAMEPAD, MAPPER_SEGA, SYSTEM_SMS2, REGION_USA}, /* Blade Eagle 3-D */
{0xFBF96C81, 1, 1, SYSTEM_GAMEPAD, MAPPER_SEGA, SYSTEM_SMS2, REGION_USA}, /* Blade Eagle 3-D (BR) */
{0x58D5FC48, 1, 1, SYSTEM_GAMEPAD, MAPPER_SEGA, SYSTEM_SMS2, REGION_USA}, /* Blade Eagle 3-D [Proto] */
{0x31B8040B, 1, 1, SYSTEM_GAMEPAD, MAPPER_SEGA, SYSTEM_SMS2, REGION_USA}, /* Maze Hunter 3-D */
{0xABD48AD2, 1, 1, SYSTEM_GAMEPAD, MAPPER_SEGA, SYSTEM_SMS2, REGION_USA}, /* Poseidon Wars 3-D */
{0xA3EF13CB, 1, 1, SYSTEM_GAMEPAD, MAPPER_SEGA, SYSTEM_SMS2, REGION_USA}, /* Zaxxon 3-D */
{0xBBA74147, 1, 1, SYSTEM_GAMEPAD, MAPPER_SEGA, SYSTEM_SMS2, REGION_USA}, /* Zaxxon 3-D [Proto] */
{0xD6F43DDA, 1, 1, SYSTEM_GAMEPAD, MAPPER_SEGA, SYSTEM_SMS2, REGION_USA}, /* Out Run 3-D */
{0x871562b0, 1, 1, SYSTEM_GAMEPAD, MAPPER_SEGA, SYSTEM_SMS, REGION_JAPAN_NTSC}, /* Maze Walker */
{0x156948f9, 1, 1, SYSTEM_GAMEPAD, MAPPER_SEGA, SYSTEM_SMS, REGION_JAPAN_NTSC}, /* Space Harrier 3-D (J) */
/* games requiring 3-D Glasses & Sega Light Phaser */
{0xFBE5CFBB, 1, 0, SYSTEM_LIGHTPHASER, MAPPER_SEGA, SYSTEM_SMS2, REGION_USA}, /* Missile Defense 3D */
@ -255,83 +255,83 @@ static const rominfo_t game_list[] =
{0x41C948BF, 0, 0, SYSTEM_SPORTSPAD, MAPPER_SEGA, SYSTEM_SMS2, REGION_USA}, /* Sports Pad Soccer */
/* games supporting YM2413 FM */
{0x1C951F8E, 0, 1, SYSTEM_MS_GAMEPAD, MAPPER_SEGA, SYSTEM_SMS2, REGION_USA}, /* After Burner */
{0xC13896D5, 0, 1, SYSTEM_MS_GAMEPAD, MAPPER_SEGA, SYSTEM_SMS2, REGION_USA}, /* Alex Kidd: The Lost Stars */
{0x5CBFE997, 0, 1, SYSTEM_MS_GAMEPAD, MAPPER_SEGA, SYSTEM_SMS2, REGION_USA}, /* Alien Syndrome */
{0xBBA2FE98, 0, 1, SYSTEM_MS_GAMEPAD, MAPPER_SEGA, SYSTEM_SMS2, REGION_USA}, /* Altered Beast */
{0xFF614EB3, 0, 1, SYSTEM_MS_GAMEPAD, MAPPER_SEGA, SYSTEM_SMS2, REGION_USA}, /* Aztec Adventure */
{0x3084CF11, 0, 1, SYSTEM_MS_GAMEPAD, MAPPER_SEGA, SYSTEM_SMS2, REGION_USA}, /* Bomber Raid */
{0xAC6009A7, 0, 1, SYSTEM_MS_GAMEPAD, MAPPER_SEGA, SYSTEM_SMS2, REGION_USA}, /* California Games */
{0xA4852757, 0, 1, SYSTEM_MS_GAMEPAD, MAPPER_SEGA, SYSTEM_SMS2, REGION_USA}, /* Captain Silver */
{0xB81F6FA5, 0, 1, SYSTEM_MS_GAMEPAD, MAPPER_SEGA, SYSTEM_SMS2, REGION_USA}, /* Captain Silver (U) */
{0x3CFF6E80, 0, 1, SYSTEM_MS_GAMEPAD, MAPPER_SEGA, SYSTEM_SMS2, REGION_USA}, /* Casino Games */
{0xE7F62E6D, 0, 1, SYSTEM_MS_GAMEPAD, MAPPER_SEGA, SYSTEM_SMS2, REGION_USA}, /* Cloud Master */
{0x908E7524, 0, 1, SYSTEM_MS_GAMEPAD, MAPPER_SEGA, SYSTEM_SMS2, REGION_USA}, /* Cyborg Hunter */
{0xA55D89F3, 0, 1, SYSTEM_MS_GAMEPAD, MAPPER_SEGA, SYSTEM_SMS2, REGION_USA}, /* Double Dragon */
{0xB8B141F9, 0, 1, SYSTEM_MS_GAMEPAD, MAPPER_SEGA, SYSTEM_SMS2, REGION_USA}, /* Fantasy Zone II */
{0xD29889AD, 0, 1, SYSTEM_MS_GAMEPAD, MAPPER_SEGA, SYSTEM_SMS2, REGION_USA}, /* Fantasy Zone: The Maze */
{0xA4AC35D8, 0, 1, SYSTEM_MS_GAMEPAD, MAPPER_SEGA, SYSTEM_SMS2, REGION_USA}, /* Galaxy Force */
{0x6C827520, 0, 1, SYSTEM_MS_GAMEPAD, MAPPER_SEGA, SYSTEM_SMS2, REGION_USA}, /* Galaxy Force (U) */
{0x1890F407, 0, 1, SYSTEM_MS_GAMEPAD, MAPPER_SEGA, SYSTEM_SMS2, REGION_USA}, /* Game Box Série Esportes Radicais (BR) */
{0xB746A6F5, 0, 1, SYSTEM_MS_GAMEPAD, MAPPER_SEGA, SYSTEM_SMS2, REGION_USA}, /* Global Defense */
{0x91A0FC4E, 0, 1, SYSTEM_MS_GAMEPAD, MAPPER_SEGA, SYSTEM_SMS2, REGION_USA}, /* Global Defense [Proto] */
{0x48651325, 0, 1, SYSTEM_MS_GAMEPAD, MAPPER_SEGA, SYSTEM_SMS2, REGION_USA}, /* Golfamania */
{0x5DABFDC3, 0, 1, SYSTEM_MS_GAMEPAD, MAPPER_SEGA, SYSTEM_SMS2, REGION_USA}, /* Golfamania [Proto] */
{0xA51376FE, 0, 1, SYSTEM_MS_GAMEPAD, MAPPER_SEGA, SYSTEM_SMS2, REGION_USA}, /* Golvellius - Valley of Doom */
{0x98E4AE4A, 0, 1, SYSTEM_MS_GAMEPAD, MAPPER_SEGA, SYSTEM_SMS2, REGION_USA}, /* Great Golf */
{0x516ED32E, 0, 1, SYSTEM_MS_GAMEPAD, MAPPER_SEGA, SYSTEM_SMS2, REGION_USA}, /* Kenseiden */
{0xE8511B08, 0, 1, SYSTEM_MS_GAMEPAD, MAPPER_SEGA, SYSTEM_SMS2, REGION_USA}, /* Lord of The Sword */
{0x0E333B6E, 0, 1, SYSTEM_MS_GAMEPAD, MAPPER_SEGA, SYSTEM_SMS2, REGION_USA}, /* Miracle Warriors - Seal of The Dark Lord */
{0x301A59AA, 0, 1, SYSTEM_MS_GAMEPAD, MAPPER_SEGA, SYSTEM_SMS2, REGION_USA}, /* Miracle Warriors - Seal of The Dark Lord [Proto] */
{0x01D67C0B, 0, 1, SYSTEM_MS_GAMEPAD, MAPPER_SEGA, SYSTEM_SMS2, REGION_USA}, /* Mônica no Castelo do Dragão (BR) */
{0x5589D8D2, 0, 1, SYSTEM_MS_GAMEPAD, MAPPER_SEGA, SYSTEM_SMS2, REGION_USA}, /* Out Run */
{0xE030E66C, 0, 1, SYSTEM_MS_GAMEPAD, MAPPER_SEGA, SYSTEM_SMS2, REGION_USA}, /* Parlour Games */
{0xF97E9875, 0, 1, SYSTEM_MS_GAMEPAD, MAPPER_SEGA, SYSTEM_SMS2, REGION_USA}, /* Penguin Land */
{0x4077EFD9, 0, 1, SYSTEM_MS_GAMEPAD, MAPPER_SEGA, SYSTEM_SMS2, REGION_USA}, /* Power Strike */
{0xBB54B6B0, 0, 1, SYSTEM_MS_GAMEPAD, MAPPER_SEGA, SYSTEM_SMS2, REGION_USA}, /* R-Type */
{0x42FC47EE, 0, 1, SYSTEM_MS_GAMEPAD, MAPPER_SEGA, SYSTEM_SMS2, REGION_USA}, /* Rampage */
{0xC547EB1B, 0, 1, SYSTEM_MS_GAMEPAD, MAPPER_SEGA, SYSTEM_SMS2, REGION_USA}, /* Rastan */
{0x9A8B28EC, 0, 1, SYSTEM_MS_GAMEPAD, MAPPER_SEGA, SYSTEM_SMS2, REGION_USA}, /* Scramble Spirits */
{0xAAB67EC3, 0, 1, SYSTEM_MS_GAMEPAD, MAPPER_SEGA, SYSTEM_SMS2, REGION_USA}, /* Shanghai */
{0x0C6FAC4E, 0, 1, SYSTEM_MS_GAMEPAD, MAPPER_SEGA, SYSTEM_SMS2, REGION_USA}, /* Shinobi */
{0x4752CAE7, 0, 1, SYSTEM_MS_GAMEPAD, MAPPER_SEGA, SYSTEM_SMS2, REGION_USA}, /* SpellCaster */
{0x1A390B93, 0, 1, SYSTEM_MS_GAMEPAD, MAPPER_SEGA, SYSTEM_SMS2, REGION_USA}, /* Tennis Ace */
{0xAE920E4B, 0, 1, SYSTEM_MS_GAMEPAD, MAPPER_SEGA, SYSTEM_SMS2, REGION_USA}, /* Thunder Blade */
{0x51BD14BE, 0, 1, SYSTEM_MS_GAMEPAD, MAPPER_SEGA, SYSTEM_SMS2, REGION_USA}, /* Time Soldiers */
{0x22CCA9BB, 0, 1, SYSTEM_MS_GAMEPAD, MAPPER_SEGA, SYSTEM_SMS2, REGION_USA}, /* Turma da Mônica em: O Resgate (BR) */
{0xB52D60C8, 0, 1, SYSTEM_MS_GAMEPAD, MAPPER_SEGA, SYSTEM_SMS2, REGION_USA}, /* Ultima IV */
{0xDE9F8517, 0, 1, SYSTEM_MS_GAMEPAD, MAPPER_SEGA, SYSTEM_SMS2, REGION_USA}, /* Ultima IV [Proto] */
{0xDFB0B161, 0, 1, SYSTEM_MS_GAMEPAD, MAPPER_SEGA, SYSTEM_SMS2, REGION_USA}, /* Vigilante */
{0x679E1676, 0, 1, SYSTEM_MS_GAMEPAD, MAPPER_SEGA, SYSTEM_SMS2, REGION_USA}, /* Wonder Boy III: The Dragon's Trap */
{0x8CBEF0C1, 0, 1, SYSTEM_MS_GAMEPAD, MAPPER_SEGA, SYSTEM_SMS2, REGION_USA}, /* Wonder Boy in Monster Land */
{0x2F2E3BC9, 0, 1, SYSTEM_MS_GAMEPAD, MAPPER_SEGA, SYSTEM_SMS2, REGION_USA}, /* Zillion II - The Tri Formation */
{0x48D44A13, 0, 1, SYSTEM_MS_GAMEPAD, MAPPER_NONE, SYSTEM_SMS, REGION_JAPAN_NTSC}, /* BIOS (J) */
{0xD8C4165B, 0, 1, SYSTEM_MS_GAMEPAD, MAPPER_SEGA, SYSTEM_SMS, REGION_JAPAN_NTSC}, /* Aleste */
{0x4CC11DF9, 0, 1, SYSTEM_MS_GAMEPAD, MAPPER_SEGA, SYSTEM_SMS, REGION_JAPAN_NTSC}, /* Alien Syndrome (J) */
{0xE421E466, 0, 1, SYSTEM_MS_GAMEPAD, MAPPER_SEGA, SYSTEM_SMS, REGION_JAPAN_NTSC}, /* Chouon Senshi Borgman */
{0x2BCDB8FA, 0, 1, SYSTEM_MS_GAMEPAD, MAPPER_SEGA, SYSTEM_SMS, REGION_JAPAN_NTSC}, /* Doki Doki Penguin Land - Uchuu-Daibouken */
{0x56BD2455, 0, 1, SYSTEM_MS_GAMEPAD, MAPPER_SEGA, SYSTEM_SMS, REGION_JAPAN_NTSC}, /* Doki Doki Penguin Land - Uchuu-Daibouken [Proto] */
{0xC722FB42, 0, 1, SYSTEM_MS_GAMEPAD, MAPPER_SEGA, SYSTEM_SMS, REGION_JAPAN_NTSC}, /* Fantasy Zone II (J) */
{0x7ABC70E9, 0, 1, SYSTEM_MS_GAMEPAD, MAPPER_SEGA, SYSTEM_SMS, REGION_JAPAN_NTSC}, /* Family Games (Party Games) */
{0x6586BD1F, 0, 1, SYSTEM_MS_GAMEPAD, MAPPER_SEGA, SYSTEM_SMS, REGION_JAPAN_NTSC}, /* Masters Golf */
{0x4847BC91, 0, 1, SYSTEM_MS_GAMEPAD, MAPPER_SEGA, SYSTEM_SMS, REGION_JAPAN_NTSC}, /* Masters Golf [Proto] */
{0xB9FDF6D9, 0, 1, SYSTEM_MS_GAMEPAD, MAPPER_SEGA, SYSTEM_SMS, REGION_JAPAN_NTSC}, /* Haja no Fuuin */
{0x955A009E, 0, 1, SYSTEM_MS_GAMEPAD, MAPPER_SEGA, SYSTEM_SMS, REGION_JAPAN_NTSC}, /* Hoshi wo Sagashite */
{0x05EA5353, 0, 1, SYSTEM_MS_GAMEPAD, MAPPER_SEGA, SYSTEM_SMS, REGION_JAPAN_NTSC}, /* Kenseiden (J) */
{0xD11D32E4, 0, 1, SYSTEM_MS_GAMEPAD, MAPPER_SEGA, SYSTEM_SMS, REGION_JAPAN_NTSC}, /* Kujakuou */
{0xAA7D6F45, 0, 1, SYSTEM_MS_GAMEPAD, MAPPER_SEGA, SYSTEM_SMS, REGION_JAPAN_NTSC}, /* Lord of Sword */
{0xBF0411AD, 0, 1, SYSTEM_MS_GAMEPAD, MAPPER_SEGA, SYSTEM_SMS, REGION_JAPAN_NTSC}, /* Maou Golvellius */
{0x21A21352, 0, 1, SYSTEM_MS_GAMEPAD, MAPPER_SEGA, SYSTEM_SMS, REGION_JAPAN_NTSC}, /* Maou Golvellius [Proto] */
{0x5B5F9106, 0, 1, SYSTEM_MS_GAMEPAD, MAPPER_SEGA, SYSTEM_SMS, REGION_JAPAN_NTSC}, /* Nekyuu Kousien */
{0xBEA27D5C, 0, 1, SYSTEM_MS_GAMEPAD, MAPPER_SEGA, SYSTEM_SMS, REGION_JAPAN_NTSC}, /* Opa Opa */
{0x6605D36A, 0, 1, SYSTEM_MS_GAMEPAD, MAPPER_SEGA, SYSTEM_SMS, REGION_JAPAN_NTSC}, /* Phantasy Star (J) */
{0xE1FFF1BB, 0, 1, SYSTEM_MS_GAMEPAD, MAPPER_SEGA, SYSTEM_SMS, REGION_JAPAN_NTSC}, /* Shinobi (J) */
{0x11645549, 0, 1, SYSTEM_MS_GAMEPAD, MAPPER_SEGA, SYSTEM_SMS, REGION_JAPAN_NTSC}, /* Solomon no Kagi - Oujo Rihita no Namida */
{0x7E0EF8CB, 0, 1, SYSTEM_MS_GAMEPAD, MAPPER_SEGA, SYSTEM_SMS, REGION_JAPAN_NTSC}, /* Super Racing */
{0xB1DA6A30, 0, 1, SYSTEM_MS_GAMEPAD, MAPPER_SEGA, SYSTEM_SMS, REGION_JAPAN_NTSC}, /* Super Wonder Boy Monster World */
{0x8132AB2C, 0, 1, SYSTEM_MS_GAMEPAD, MAPPER_SEGA, SYSTEM_SMS, REGION_JAPAN_NTSC}, /* Tensai Bakabon */
{0xC0CE19B1, 0, 1, SYSTEM_MS_GAMEPAD, MAPPER_SEGA, SYSTEM_SMS, REGION_JAPAN_NTSC}, /* Thunder Blade (J) */
{0x07301F83, 0, 1, SYSTEM_MS_GAMEPAD, MAPPER_SEGA, SYSTEM_PBC, REGION_JAPAN_NTSC} /* Phantasy Star [Megadrive] (J) */
{0x1C951F8E, 0, 1, SYSTEM_GAMEPAD, MAPPER_SEGA, SYSTEM_SMS2, REGION_USA}, /* After Burner */
{0xC13896D5, 0, 1, SYSTEM_GAMEPAD, MAPPER_SEGA, SYSTEM_SMS2, REGION_USA}, /* Alex Kidd: The Lost Stars */
{0x5CBFE997, 0, 1, SYSTEM_GAMEPAD, MAPPER_SEGA, SYSTEM_SMS2, REGION_USA}, /* Alien Syndrome */
{0xBBA2FE98, 0, 1, SYSTEM_GAMEPAD, MAPPER_SEGA, SYSTEM_SMS2, REGION_USA}, /* Altered Beast */
{0xFF614EB3, 0, 1, SYSTEM_GAMEPAD, MAPPER_SEGA, SYSTEM_SMS2, REGION_USA}, /* Aztec Adventure */
{0x3084CF11, 0, 1, SYSTEM_GAMEPAD, MAPPER_SEGA, SYSTEM_SMS2, REGION_USA}, /* Bomber Raid */
{0xAC6009A7, 0, 1, SYSTEM_GAMEPAD, MAPPER_SEGA, SYSTEM_SMS2, REGION_USA}, /* California Games */
{0xA4852757, 0, 1, SYSTEM_GAMEPAD, MAPPER_SEGA, SYSTEM_SMS2, REGION_USA}, /* Captain Silver */
{0xB81F6FA5, 0, 1, SYSTEM_GAMEPAD, MAPPER_SEGA, SYSTEM_SMS2, REGION_USA}, /* Captain Silver (U) */
{0x3CFF6E80, 0, 1, SYSTEM_GAMEPAD, MAPPER_SEGA, SYSTEM_SMS2, REGION_USA}, /* Casino Games */
{0xE7F62E6D, 0, 1, SYSTEM_GAMEPAD, MAPPER_SEGA, SYSTEM_SMS2, REGION_USA}, /* Cloud Master */
{0x908E7524, 0, 1, SYSTEM_GAMEPAD, MAPPER_SEGA, SYSTEM_SMS2, REGION_USA}, /* Cyborg Hunter */
{0xA55D89F3, 0, 1, SYSTEM_GAMEPAD, MAPPER_SEGA, SYSTEM_SMS2, REGION_USA}, /* Double Dragon */
{0xB8B141F9, 0, 1, SYSTEM_GAMEPAD, MAPPER_SEGA, SYSTEM_SMS2, REGION_USA}, /* Fantasy Zone II */
{0xD29889AD, 0, 1, SYSTEM_GAMEPAD, MAPPER_SEGA, SYSTEM_SMS2, REGION_USA}, /* Fantasy Zone: The Maze */
{0xA4AC35D8, 0, 1, SYSTEM_GAMEPAD, MAPPER_SEGA, SYSTEM_SMS2, REGION_USA}, /* Galaxy Force */
{0x6C827520, 0, 1, SYSTEM_GAMEPAD, MAPPER_SEGA, SYSTEM_SMS2, REGION_USA}, /* Galaxy Force (U) */
{0x1890F407, 0, 1, SYSTEM_GAMEPAD, MAPPER_SEGA, SYSTEM_SMS2, REGION_USA}, /* Game Box Série Esportes Radicais (BR) */
{0xB746A6F5, 0, 1, SYSTEM_GAMEPAD, MAPPER_SEGA, SYSTEM_SMS2, REGION_USA}, /* Global Defense */
{0x91A0FC4E, 0, 1, SYSTEM_GAMEPAD, MAPPER_SEGA, SYSTEM_SMS2, REGION_USA}, /* Global Defense [Proto] */
{0x48651325, 0, 1, SYSTEM_GAMEPAD, MAPPER_SEGA, SYSTEM_SMS2, REGION_USA}, /* Golfamania */
{0x5DABFDC3, 0, 1, SYSTEM_GAMEPAD, MAPPER_SEGA, SYSTEM_SMS2, REGION_USA}, /* Golfamania [Proto] */
{0xA51376FE, 0, 1, SYSTEM_GAMEPAD, MAPPER_SEGA, SYSTEM_SMS2, REGION_USA}, /* Golvellius - Valley of Doom */
{0x98E4AE4A, 0, 1, SYSTEM_GAMEPAD, MAPPER_SEGA, SYSTEM_SMS2, REGION_USA}, /* Great Golf */
{0x516ED32E, 0, 1, SYSTEM_GAMEPAD, MAPPER_SEGA, SYSTEM_SMS2, REGION_USA}, /* Kenseiden */
{0xE8511B08, 0, 1, SYSTEM_GAMEPAD, MAPPER_SEGA, SYSTEM_SMS2, REGION_USA}, /* Lord of The Sword */
{0x0E333B6E, 0, 1, SYSTEM_GAMEPAD, MAPPER_SEGA, SYSTEM_SMS2, REGION_USA}, /* Miracle Warriors - Seal of The Dark Lord */
{0x301A59AA, 0, 1, SYSTEM_GAMEPAD, MAPPER_SEGA, SYSTEM_SMS2, REGION_USA}, /* Miracle Warriors - Seal of The Dark Lord [Proto] */
{0x01D67C0B, 0, 1, SYSTEM_GAMEPAD, MAPPER_SEGA, SYSTEM_SMS2, REGION_USA}, /* Mônica no Castelo do Dragão (BR) */
{0x5589D8D2, 0, 1, SYSTEM_GAMEPAD, MAPPER_SEGA, SYSTEM_SMS2, REGION_USA}, /* Out Run */
{0xE030E66C, 0, 1, SYSTEM_GAMEPAD, MAPPER_SEGA, SYSTEM_SMS2, REGION_USA}, /* Parlour Games */
{0xF97E9875, 0, 1, SYSTEM_GAMEPAD, MAPPER_SEGA, SYSTEM_SMS2, REGION_USA}, /* Penguin Land */
{0x4077EFD9, 0, 1, SYSTEM_GAMEPAD, MAPPER_SEGA, SYSTEM_SMS2, REGION_USA}, /* Power Strike */
{0xBB54B6B0, 0, 1, SYSTEM_GAMEPAD, MAPPER_SEGA, SYSTEM_SMS2, REGION_USA}, /* R-Type */
{0x42FC47EE, 0, 1, SYSTEM_GAMEPAD, MAPPER_SEGA, SYSTEM_SMS2, REGION_USA}, /* Rampage */
{0xC547EB1B, 0, 1, SYSTEM_GAMEPAD, MAPPER_SEGA, SYSTEM_SMS2, REGION_USA}, /* Rastan */
{0x9A8B28EC, 0, 1, SYSTEM_GAMEPAD, MAPPER_SEGA, SYSTEM_SMS2, REGION_USA}, /* Scramble Spirits */
{0xAAB67EC3, 0, 1, SYSTEM_GAMEPAD, MAPPER_SEGA, SYSTEM_SMS2, REGION_USA}, /* Shanghai */
{0x0C6FAC4E, 0, 1, SYSTEM_GAMEPAD, MAPPER_SEGA, SYSTEM_SMS2, REGION_USA}, /* Shinobi */
{0x4752CAE7, 0, 1, SYSTEM_GAMEPAD, MAPPER_SEGA, SYSTEM_SMS2, REGION_USA}, /* SpellCaster */
{0x1A390B93, 0, 1, SYSTEM_GAMEPAD, MAPPER_SEGA, SYSTEM_SMS2, REGION_USA}, /* Tennis Ace */
{0xAE920E4B, 0, 1, SYSTEM_GAMEPAD, MAPPER_SEGA, SYSTEM_SMS2, REGION_USA}, /* Thunder Blade */
{0x51BD14BE, 0, 1, SYSTEM_GAMEPAD, MAPPER_SEGA, SYSTEM_SMS2, REGION_USA}, /* Time Soldiers */
{0x22CCA9BB, 0, 1, SYSTEM_GAMEPAD, MAPPER_SEGA, SYSTEM_SMS2, REGION_USA}, /* Turma da Mônica em: O Resgate (BR) */
{0xB52D60C8, 0, 1, SYSTEM_GAMEPAD, MAPPER_SEGA, SYSTEM_SMS2, REGION_USA}, /* Ultima IV */
{0xDE9F8517, 0, 1, SYSTEM_GAMEPAD, MAPPER_SEGA, SYSTEM_SMS2, REGION_USA}, /* Ultima IV [Proto] */
{0xDFB0B161, 0, 1, SYSTEM_GAMEPAD, MAPPER_SEGA, SYSTEM_SMS2, REGION_USA}, /* Vigilante */
{0x679E1676, 0, 1, SYSTEM_GAMEPAD, MAPPER_SEGA, SYSTEM_SMS2, REGION_USA}, /* Wonder Boy III: The Dragon's Trap */
{0x8CBEF0C1, 0, 1, SYSTEM_GAMEPAD, MAPPER_SEGA, SYSTEM_SMS2, REGION_USA}, /* Wonder Boy in Monster Land */
{0x2F2E3BC9, 0, 1, SYSTEM_GAMEPAD, MAPPER_SEGA, SYSTEM_SMS2, REGION_USA}, /* Zillion II - The Tri Formation */
{0x48D44A13, 0, 1, SYSTEM_GAMEPAD, MAPPER_NONE, SYSTEM_SMS, REGION_JAPAN_NTSC}, /* BIOS (J) */
{0xD8C4165B, 0, 1, SYSTEM_GAMEPAD, MAPPER_SEGA, SYSTEM_SMS, REGION_JAPAN_NTSC}, /* Aleste */
{0x4CC11DF9, 0, 1, SYSTEM_GAMEPAD, MAPPER_SEGA, SYSTEM_SMS, REGION_JAPAN_NTSC}, /* Alien Syndrome (J) */
{0xE421E466, 0, 1, SYSTEM_GAMEPAD, MAPPER_SEGA, SYSTEM_SMS, REGION_JAPAN_NTSC}, /* Chouon Senshi Borgman */
{0x2BCDB8FA, 0, 1, SYSTEM_GAMEPAD, MAPPER_SEGA, SYSTEM_SMS, REGION_JAPAN_NTSC}, /* Doki Doki Penguin Land - Uchuu-Daibouken */
{0x56BD2455, 0, 1, SYSTEM_GAMEPAD, MAPPER_SEGA, SYSTEM_SMS, REGION_JAPAN_NTSC}, /* Doki Doki Penguin Land - Uchuu-Daibouken [Proto] */
{0xC722FB42, 0, 1, SYSTEM_GAMEPAD, MAPPER_SEGA, SYSTEM_SMS, REGION_JAPAN_NTSC}, /* Fantasy Zone II (J) */
{0x7ABC70E9, 0, 1, SYSTEM_GAMEPAD, MAPPER_SEGA, SYSTEM_SMS, REGION_JAPAN_NTSC}, /* Family Games (Party Games) */
{0x6586BD1F, 0, 1, SYSTEM_GAMEPAD, MAPPER_SEGA, SYSTEM_SMS, REGION_JAPAN_NTSC}, /* Masters Golf */
{0x4847BC91, 0, 1, SYSTEM_GAMEPAD, MAPPER_SEGA, SYSTEM_SMS, REGION_JAPAN_NTSC}, /* Masters Golf [Proto] */
{0xB9FDF6D9, 0, 1, SYSTEM_GAMEPAD, MAPPER_SEGA, SYSTEM_SMS, REGION_JAPAN_NTSC}, /* Haja no Fuuin */
{0x955A009E, 0, 1, SYSTEM_GAMEPAD, MAPPER_SEGA, SYSTEM_SMS, REGION_JAPAN_NTSC}, /* Hoshi wo Sagashite */
{0x05EA5353, 0, 1, SYSTEM_GAMEPAD, MAPPER_SEGA, SYSTEM_SMS, REGION_JAPAN_NTSC}, /* Kenseiden (J) */
{0xD11D32E4, 0, 1, SYSTEM_GAMEPAD, MAPPER_SEGA, SYSTEM_SMS, REGION_JAPAN_NTSC}, /* Kujakuou */
{0xAA7D6F45, 0, 1, SYSTEM_GAMEPAD, MAPPER_SEGA, SYSTEM_SMS, REGION_JAPAN_NTSC}, /* Lord of Sword */
{0xBF0411AD, 0, 1, SYSTEM_GAMEPAD, MAPPER_SEGA, SYSTEM_SMS, REGION_JAPAN_NTSC}, /* Maou Golvellius */
{0x21A21352, 0, 1, SYSTEM_GAMEPAD, MAPPER_SEGA, SYSTEM_SMS, REGION_JAPAN_NTSC}, /* Maou Golvellius [Proto] */
{0x5B5F9106, 0, 1, SYSTEM_GAMEPAD, MAPPER_SEGA, SYSTEM_SMS, REGION_JAPAN_NTSC}, /* Nekyuu Kousien */
{0xBEA27D5C, 0, 1, SYSTEM_GAMEPAD, MAPPER_SEGA, SYSTEM_SMS, REGION_JAPAN_NTSC}, /* Opa Opa */
{0x6605D36A, 0, 1, SYSTEM_GAMEPAD, MAPPER_SEGA, SYSTEM_SMS, REGION_JAPAN_NTSC}, /* Phantasy Star (J) */
{0xE1FFF1BB, 0, 1, SYSTEM_GAMEPAD, MAPPER_SEGA, SYSTEM_SMS, REGION_JAPAN_NTSC}, /* Shinobi (J) */
{0x11645549, 0, 1, SYSTEM_GAMEPAD, MAPPER_SEGA, SYSTEM_SMS, REGION_JAPAN_NTSC}, /* Solomon no Kagi - Oujo Rihita no Namida */
{0x7E0EF8CB, 0, 1, SYSTEM_GAMEPAD, MAPPER_SEGA, SYSTEM_SMS, REGION_JAPAN_NTSC}, /* Super Racing */
{0xB1DA6A30, 0, 1, SYSTEM_GAMEPAD, MAPPER_SEGA, SYSTEM_SMS, REGION_JAPAN_NTSC}, /* Super Wonder Boy Monster World */
{0x8132AB2C, 0, 1, SYSTEM_GAMEPAD, MAPPER_SEGA, SYSTEM_SMS, REGION_JAPAN_NTSC}, /* Tensai Bakabon */
{0xC0CE19B1, 0, 1, SYSTEM_GAMEPAD, MAPPER_SEGA, SYSTEM_SMS, REGION_JAPAN_NTSC}, /* Thunder Blade (J) */
{0x07301F83, 0, 1, SYSTEM_GAMEPAD, MAPPER_SEGA, SYSTEM_PBC, REGION_JAPAN_NTSC} /* Phantasy Star [Megadrive] (J) */
};
/* Cartridge & BIOS ROM hardware */
@ -373,9 +373,6 @@ void sms_cart_init(void)
/* game CRC */
uint32 crc = crc32(0, cart.rom, cart.romsize);
/* use Master System controller by default */
uint8 device = SYSTEM_MS_GAMEPAD;
/* unmapped memory return $FF on read (mapped to unused cartridge areas $510000-$5103FF & $510400-$5107FF) */
memset(cart.rom + 0x510000, 0xFF, 0x800);
@ -408,8 +405,18 @@ void sms_cart_init(void)
/* auto-detect cartridge mapper */
cart_rom.mapper = game_list[i].mapper;
/* save current input settings */
if (old_system[0] == -1)
{
old_system[0] = input.system[0];
}
if (old_system[1] == -1)
{
old_system[1] = input.system[1];
}
/* auto-detect required peripherals */
device = game_list[i].peripheral;
input.system[0] = input.system[1] = game_list[i].peripheral;
/* auto-detect 3D glasses support */
cart.special = game_list[i].g_3d;
@ -467,25 +474,11 @@ void sms_cart_init(void)
/* enable cartridge backup memory by default */
sram.on = 1;
/* save current settings */
if (old_system[0] == -1)
{
old_system[0] = input.system[0];
}
if (old_system[1] == -1)
{
old_system[1] = input.system[1];
}
/* force port A & port B configuration */
input.system[0] = device;
input.system[1] = SYSTEM_MS_GAMEPAD;
/* default gun offset */
/* default gun offset for Light Phaser */
input.x_offset = 20;
input.y_offset = 0;
/* SpaceGun & Gangster Town use different gun offset */
/* SpaceGun & Gangster Town use specific gun offset */
if ((crc == 0x5359762D) || (crc == 0x5FC74D2A))
{
input.x_offset = 16;

View File

@ -3,7 +3,7 @@
* Input peripherals support
*
* Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003 Charles Mac Donald (original code)
* Copyright (C) 2007-2013 Eke-Eke (Genesis Plus GX)
* Copyright (C) 2007-2014 Eke-Eke (Genesis Plus GX)
*
* Redistribution and use of this code or any derivative works are permitted
* provided that the following conditions are met:
@ -54,7 +54,7 @@ int old_system[2] = {-1,-1};
void input_init(void)
{
int i;
int i, padtype;
int player = 0;
for (i=0; i<MAX_DEVICES; i++)
@ -77,18 +77,31 @@ void input_init(void)
return;
}
switch (input.system[0])
/* default gamepad type */
if (romtype & SYSTEM_MD)
{
case SYSTEM_MS_GAMEPAD:
/* 3-buttons or 6-buttons */
padtype = (rominfo.peripherals & 2) ? DEVICE_PAD6B : DEVICE_PAD3B;
}
else
{
input.dev[0] = DEVICE_PAD2B;
player++;
break;
/* 2-buttons */
padtype = DEVICE_PAD2B;
}
case SYSTEM_MD_GAMEPAD:
switch (input.system[0])
{
case SYSTEM_GAMEPAD:
{
/* 2-buttons, 3-buttons or 6-buttons control pad */
if (config.input[player].padtype != (DEVICE_PAD2B | DEVICE_PAD3B | DEVICE_PAD6B))
{
input.dev[0] = config.input[player].padtype;
}
else
{
input.dev[0] = padtype;
}
player++;
break;
}
@ -120,7 +133,15 @@ void input_init(void)
{
if (player < MAX_INPUTS)
{
input.dev[i] = config.input[player].padtype;
/* only allow 3-buttons or 6-buttons control pad */
if (config.input[player].padtype != (DEVICE_PAD2B | DEVICE_PAD3B | DEVICE_PAD6B))
{
input.dev[i] = config.input[player].padtype & DEVICE_PAD6B;
}
else
{
input.dev[i] = padtype & DEVICE_PAD6B;
}
player++;
}
}
@ -133,7 +154,15 @@ void input_init(void)
{
if (player < MAX_INPUTS)
{
input.dev[i] = config.input[player].padtype;
/* only allow 3-buttons or 6-buttons control pad */
if (config.input[player].padtype != (DEVICE_PAD2B | DEVICE_PAD3B | DEVICE_PAD6B))
{
input.dev[i] = config.input[player].padtype & DEVICE_PAD6B;
}
else
{
input.dev[i] = padtype & DEVICE_PAD6B;
}
player++;
}
}
@ -170,16 +199,16 @@ void input_init(void)
switch (input.system[1])
{
case SYSTEM_MS_GAMEPAD:
case SYSTEM_GAMEPAD:
{
input.dev[4] = DEVICE_PAD2B;
player++;
break;
}
case SYSTEM_MD_GAMEPAD:
if (config.input[player].padtype != (DEVICE_PAD2B | DEVICE_PAD3B | DEVICE_PAD6B))
{
input.dev[4] = config.input[player].padtype;
}
else
{
input.dev[4] = padtype;
}
player++;
break;
}
@ -231,7 +260,15 @@ void input_init(void)
{
if (player < MAX_INPUTS)
{
input.dev[i] = config.input[player].padtype;
/* only allow 3-buttons or 6-buttons control pad */
if (config.input[player].padtype != (DEVICE_PAD2B | DEVICE_PAD3B | DEVICE_PAD6B))
{
input.dev[i] = config.input[player].padtype & DEVICE_PAD6B;
}
else
{
input.dev[i] = padtype & DEVICE_PAD6B;
}
player++;
}
}
@ -269,7 +306,15 @@ void input_init(void)
{
if (player < MAX_INPUTS)
{
input.dev[i] = config.input[player].padtype;
/* only allow 3-buttons or 6-buttons control pad */
if (config.input[player].padtype != (DEVICE_PAD2B | DEVICE_PAD3B | DEVICE_PAD6B))
{
input.dev[i] = config.input[player].padtype & DEVICE_PAD6B;
}
else
{
input.dev[i] = padtype & DEVICE_PAD6B;
}
player ++;
}
}

View File

@ -3,7 +3,7 @@
* Input peripherals support
*
* Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003 Charles Mac Donald (original code)
* Copyright (C) 2007-2013 Eke-Eke (Genesis Plus GX)
* Copyright (C) 2007-2014 Eke-Eke (Genesis Plus GX)
*
* Redistribution and use of this code or any derivative works are permitted
* provided that the following conditions are met:
@ -45,18 +45,18 @@
/* Ports configuration */
#define NO_SYSTEM (0) /* unconnected port*/
#define SYSTEM_MD_GAMEPAD (1) /* single 3-buttons or 6-buttons Control Pad */
#define SYSTEM_GAMEPAD (1) /* 2-buttons, 3-buttons or 6-buttons Control Pad */
#define SYSTEM_MOUSE (2) /* Sega Mouse */
#define SYSTEM_MENACER (3) /* Sega Menacer (port B only) */
#define SYSTEM_JUSTIFIER (4) /* Konami Justifiers (port B only) */
#define SYSTEM_XE_A1P (5) /* XE-A1P analog controller (port A only) */
#define SYSTEM_ACTIVATOR (6) /* Sega Activator */
#define SYSTEM_MS_GAMEPAD (7) /* single 2-buttons Control Pad (Master System) */
#define SYSTEM_LIGHTPHASER (8) /* Sega Light Phaser (Master System) */
#define SYSTEM_PADDLE (9) /* Sega Paddle Control (Master System) */
#define SYSTEM_SPORTSPAD (10) /* Sega Sports Pad (Master System) */
#define SYSTEM_TEAMPLAYER (11) /* Multi Tap -- Sega TeamPlayer */
#define SYSTEM_WAYPLAY (12) /* Multi Tap -- EA 4-Way Play (use both ports) */
#define SYSTEM_LIGHTPHASER (7) /* Sega Light Phaser (Master System) */
#define SYSTEM_PADDLE (8) /* Sega Paddle Control (Master System) */
#define SYSTEM_SPORTSPAD (9) /* Sega Sports Pad (Master System) */
#define SYSTEM_TEAMPLAYER (10) /* Multi Tap -- Sega TeamPlayer */
#define SYSTEM_WAYPLAY (11) /* Multi Tap -- EA 4-Way Play (use both ports) */
/* Device type */
#define NO_DEVICE (0xff) /* unconnected device (fixed ID for Team Player) */

View File

@ -3,7 +3,7 @@
* ROM Loading Support
*
* Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003 Charles Mac Donald (original code)
* Copyright (C) 2007-2013 Eke-Eke (Genesis Plus GX)
* Copyright (C) 2007-2014 Eke-Eke (Genesis Plus GX)
*
* Redistribution and use of this code or any derivative works are permitted
* provided that the following conditions are met:
@ -682,9 +682,6 @@ int load_rom(char *filename)
}
#endif
/* Save auto-detected system hardware */
romtype = system_hw;
/* PICO ROM */
if (strstr(rominfo.consoletype, "SEGA PICO") != NULL)
{
@ -692,8 +689,11 @@ int load_rom(char *filename)
system_hw = SYSTEM_PICO;
}
/* Save auto-detected system hardware */
romtype = system_hw;
/* CD BOOTROM */
else if (strstr(rominfo.ROMType, "BR") != NULL)
if (strstr(rominfo.ROMType, "BR") != NULL)
{
/* enable CD hardware */
system_hw = SYSTEM_MCD;
@ -717,7 +717,7 @@ int load_rom(char *filename)
(strstr(rominfo.product,"T-5740") != NULL))
{
/* check if console hardware is set to AUTO */
if (config.system == 0x00)
if (!config.system)
{
/* auto-enable CD hardware */
system_hw = SYSTEM_MCD;
@ -790,7 +790,7 @@ int load_rom(char *filename)
}
/* force MENACER configuration */
input.system[0] = SYSTEM_MD_GAMEPAD;
input.system[0] = SYSTEM_GAMEPAD;
input.system[1] = SYSTEM_MENACER;
input.x_offset = 82;
input.y_offset = 0;
@ -808,7 +808,7 @@ int load_rom(char *filename)
}
/* force MENACER configuration */
input.system[0] = SYSTEM_MD_GAMEPAD;
input.system[0] = SYSTEM_GAMEPAD;
input.system[1] = SYSTEM_MENACER;
input.x_offset = 133;
input.y_offset = -8;
@ -826,7 +826,7 @@ int load_rom(char *filename)
}
/* force MENACER configuration */
input.system[0] = SYSTEM_MD_GAMEPAD;
input.system[0] = SYSTEM_GAMEPAD;
input.system[1] = SYSTEM_MENACER;
input.x_offset = 68;
input.y_offset = -24;
@ -844,7 +844,7 @@ int load_rom(char *filename)
}
/* force MENACER configuration */
input.system[0] = SYSTEM_MD_GAMEPAD;
input.system[0] = SYSTEM_GAMEPAD;
input.system[1] = SYSTEM_MENACER;
input.x_offset = 64;
input.y_offset = -8;
@ -862,7 +862,7 @@ int load_rom(char *filename)
}
/* force MENACER configuration */
input.system[0] = SYSTEM_MD_GAMEPAD;
input.system[0] = SYSTEM_GAMEPAD;
input.system[1] = SYSTEM_MENACER;
input.x_offset = 61;
input.y_offset = 0;
@ -880,7 +880,7 @@ int load_rom(char *filename)
}
/* force MENACER configuration */
input.system[0] = SYSTEM_MD_GAMEPAD;
input.system[0] = SYSTEM_GAMEPAD;
input.system[1] = SYSTEM_MENACER;
input.x_offset = 70;
input.y_offset = 18;
@ -898,7 +898,7 @@ int load_rom(char *filename)
}
/* force MENACER configuration */
input.system[0] = SYSTEM_MD_GAMEPAD;
input.system[0] = SYSTEM_GAMEPAD;
input.system[1] = SYSTEM_MENACER;
input.x_offset = 49;
input.y_offset = 0;
@ -916,7 +916,7 @@ int load_rom(char *filename)
}
/* force MENACER configuration */
input.system[0] = SYSTEM_MD_GAMEPAD;
input.system[0] = SYSTEM_GAMEPAD;
input.system[1] = SYSTEM_MENACER;
input.x_offset = 60;
input.y_offset = 30;
@ -935,7 +935,7 @@ int load_rom(char *filename)
}
/* force JUSTIFIER configuration */
input.system[0] = SYSTEM_MD_GAMEPAD;
input.system[0] = SYSTEM_GAMEPAD;
input.system[1] = SYSTEM_JUSTIFIER;
input.x_offset = (strstr(rominfo.international,"GUN FIGHTERS") != NULL) ? 24 : 0;
input.y_offset = 0;

View File

@ -3,7 +3,7 @@
* ROM Loading Support
*
* Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003 Charles Mac Donald (original code)
* Copyright (C) 2007-2013 Eke-Eke (Genesis Plus GX)
* Copyright (C) 2007-2014 Eke-Eke (Genesis Plus GX)
*
* Redistribution and use of this code or any derivative works are permitted
* provided that the following conditions are met:

View File

@ -257,7 +257,7 @@ void config_default(void)
{
/* switch menu video mode to interlaced */
vmode->viTVMode = (vmode->viTVMode & ~3) | VI_INTERLACE;
VIDEO_Configure (vmode);
VIDEO_Configure(vmode);
VIDEO_Flush();
VIDEO_WaitVSync();
VIDEO_WaitVSync();
@ -273,7 +273,7 @@ void config_default(void)
}
/* default emulated inputs */
input.system[0] = SYSTEM_MD_GAMEPAD;
input.system[1] = (config.input[1].device != -1) ? SYSTEM_MD_GAMEPAD : NO_SYSTEM;
input.system[0] = SYSTEM_GAMEPAD;
input.system[1] = (config.input[1].device != -1) ? SYSTEM_GAMEPAD : NO_SYSTEM;
input_init();
}

View File

@ -97,8 +97,7 @@ extern const u8 Button_delete_over_png[];
/* Controller Settings */
extern const u8 Ctrl_4wayplay_png[];
extern const u8 Ctrl_gamepad_md_png[];
extern const u8 Ctrl_gamepad_ms_png[];
extern const u8 Ctrl_gamepad_png[];
extern const u8 Ctrl_justifiers_png[];
extern const u8 Ctrl_menacer_png[];
extern const u8 Ctrl_mouse_png[];
@ -109,6 +108,8 @@ extern const u8 Ctrl_paddle_png[];
extern const u8 Ctrl_sportspad_png[];
extern const u8 Ctrl_none_png[];
extern const u8 Ctrl_teamplayer_png[];
extern const u8 Ctrl_pad_auto_png[];
extern const u8 Ctrl_pad2b_png[];
extern const u8 Ctrl_pad3b_png[];
extern const u8 Ctrl_pad6b_png[];
extern const u8 Ctrl_config_png[];
@ -2024,21 +2025,19 @@ static void ctrlmenu(void)
int update = 0;
gui_item *items = NULL;
u8 *special = NULL;
u32 exp;
u8 type = 0;
u32 exp, index = 0;
/* System devices */
gui_item items_sys[2][13] =
gui_item items_sys[2][12] =
{
{
{NULL,Ctrl_none_png ,"","Select Port 1 device",110,130,48,72},
{NULL,Ctrl_gamepad_md_png ,"","Select Port 1 device", 85,117,96,84},
{NULL,Ctrl_gamepad_png ,"","Select Port 1 device",100,109,68,92},
{NULL,Ctrl_mouse_png ,"","Select Port 1 device", 97,113,64,88},
{NULL,Ctrl_menacer_png ,"","Select Port 1 device", 94,113,80,88},
{NULL,Ctrl_justifiers_png ,"","Select Port 1 device", 88,117,80,84},
{NULL,Ctrl_xe_a1p_png ,"","Select Port 1 device", 98,118,72,84},
{NULL,Ctrl_activator_png ,"","Select Port 1 device", 94,121,72,80},
{NULL,Ctrl_gamepad_ms_png ,"","Select Port 1 device", 91,125,84,76},
{NULL,Ctrl_lightphaser_png,"","Select Port 1 device", 89,109,88,92},
{NULL,Ctrl_paddle_png ,"","Select Port 1 device", 86,117,96,84},
{NULL,Ctrl_sportspad_png ,"","Select Port 1 device", 95,117,76,84},
@ -2047,13 +2046,12 @@ static void ctrlmenu(void)
},
{
{NULL,Ctrl_none_png ,"","Select Port 2 device",110,300,48,72},
{NULL,Ctrl_gamepad_md_png ,"","Select Port 2 device", 85,287,96,84},
{NULL,Ctrl_gamepad_png ,"","Select Port 2 device",100,279,68,92},
{NULL,Ctrl_mouse_png ,"","Select Port 2 device", 97,283,64,88},
{NULL,Ctrl_menacer_png ,"","Select Port 2 device", 94,283,80,88},
{NULL,Ctrl_justifiers_png ,"","Select Port 2 device", 88,287,80,84},
{NULL,Ctrl_xe_a1p_png ,"","Select Port 2 device", 98,288,72,84},
{NULL,Ctrl_activator_png ,"","Select Port 2 device", 94,291,72,80},
{NULL,Ctrl_gamepad_ms_png ,"","Select Port 2 device", 91,295,84,76},
{NULL,Ctrl_lightphaser_png,"","Select Port 2 device", 89,279,88,92},
{NULL,Ctrl_paddle_png ,"","Select Port 2 device", 86,287,96,84},
{NULL,Ctrl_sportspad_png ,"","Select Port 2 device", 95,287,76,84},
@ -2063,27 +2061,35 @@ static void ctrlmenu(void)
};
/* Specific controller options */
gui_item items_special[4][2] =
gui_item items_special[4][4] =
{
{
/* Gamepad option */
{NULL,Ctrl_pad3b_png,"Pad\nType","Use 3-buttons Pad",528,180,44,28},
{NULL,Ctrl_pad6b_png,"Pad\nType","Use 6-buttons Pad",528,180,44,28}
{NULL,Ctrl_pad6b_png,"Pad\nType","Use 6-buttons Pad",528,180,44,28},
{NULL,Ctrl_pad2b_png,"Pad\nType","Use 2-buttons Pad",528,180,44,28},
{NULL,Ctrl_pad_auto_png,"Pad\nType","Auto-detect Pad type",528,180,44,28},
},
{
/* Mouse option */
{NULL,ctrl_option_off_png,"Invert\nMouse","Enable/Disable Y-Axis inversion",534,180,24,24},
{NULL,ctrl_option_on_png ,"Invert\nMouse","Enable/Disable Y-Axis inversion",534,180,24,24},
{NULL,NULL,"","",0,0,0,0},
{NULL,NULL,"","",0,0,0,0},
},
{
/* Gun option */
{NULL,ctrl_option_off_png,"Show\nCursor","Enable/Disable Lightgun cursor",534,180,24,24},
{NULL,ctrl_option_on_png ,"Show\nCursor","Enable/Disable Lightgun cursor",534,180,24,24},
{NULL,NULL,"","",0,0,0,0},
{NULL,NULL,"","",0,0,0,0},
},
{
/* no option */
{NULL,NULL,"No Option","",436,180,160,52},
{NULL,NULL,"","",0,0,0,0},
{NULL,NULL,"","",0,0,0,0},
{NULL,NULL,"","",0,0,0,0},
}
};
@ -2115,12 +2121,14 @@ static void ctrlmenu(void)
button_player_none_data.texture[0] = gxTextureOpenPNG(button_player_none_data.image[0],0);
/* initialize custom images */
for (i=0; i<13; i++)
for (i=0; i<12; i++)
{
items_sys[1][i].texture = items_sys[0][i].texture = gxTextureOpenPNG(items_sys[0][i].data,0);
}
items_special[0][0].texture = gxTextureOpenPNG(items_special[0][0].data,0);
items_special[0][1].texture = gxTextureOpenPNG(items_special[0][1].data,0);
items_special[0][2].texture = gxTextureOpenPNG(items_special[0][2].data,0);
items_special[0][3].texture = gxTextureOpenPNG(items_special[0][3].data,0);
items_special[2][0].texture = items_special[1][0].texture = gxTextureOpenPNG(items_special[1][0].data,0);
items_special[2][1].texture = items_special[1][1].texture = gxTextureOpenPNG(items_special[1][1].data,0);
items_device[0].texture = items_special[1][0].texture;
@ -2201,7 +2209,7 @@ static void ctrlmenu(void)
if (input.system[0] > SYSTEM_WAYPLAY)
{
input.system[0] = NO_SYSTEM;
input.system[1] = SYSTEM_MD_GAMEPAD;
input.system[1] = SYSTEM_GAMEPAD;
}
/* reset I/O ports */
@ -2251,12 +2259,7 @@ static void ctrlmenu(void)
/* fixed configurations */
if (system_hw)
{
if (cart.special & HW_J_CART)
{
GUI_WaitPrompt("Error","J-CART detected !");
break;
}
else if (cart.special & HW_TEREBI_OEKAKI)
if (cart.special & HW_TEREBI_OEKAKI)
{
GUI_WaitPrompt("Error","Terebi Oekaki detected !");
break;
@ -2280,13 +2283,13 @@ static void ctrlmenu(void)
/* allow only one gun type */
if ((input.system[0] == SYSTEM_LIGHTPHASER) && (input.system[1] == SYSTEM_MENACER))
{
input.system[1] += 3;
input.system[1]++;
}
/* allow only one gun type */
if ((input.system[0] == SYSTEM_LIGHTPHASER) && (input.system[1] == SYSTEM_JUSTIFIER))
{
input.system[1] += 2;
input.system[1]++;
}
/* 4-wayplay uses both ports */
@ -2299,7 +2302,7 @@ static void ctrlmenu(void)
if (input.system[1] > SYSTEM_WAYPLAY)
{
input.system[1] = NO_SYSTEM;
input.system[0] = SYSTEM_MD_GAMEPAD;
input.system[0] = SYSTEM_GAMEPAD;
}
/* reset I/O ports */
@ -2365,10 +2368,13 @@ static void ctrlmenu(void)
}
}
/* save device index */
index = m->selected - 2;
/* update player index */
old_player = player;
player = 0;
for (i=0; i<(m->selected-2); i++)
for (i=0; i<index; i++)
{
if (input.dev[i] != NO_DEVICE) player ++;
}
@ -2402,12 +2408,10 @@ static void ctrlmenu(void)
m->buttons[9].shift[3] = 1;
}
/* emulated device type */
type = input.dev[m->selected - 2];
/* retrieve current player informations */
switch (type)
switch (input.dev[index])
{
case DEVICE_PAD2B:
case DEVICE_PAD3B:
case DEVICE_PAD6B:
{
@ -2426,16 +2430,15 @@ static void ctrlmenu(void)
case DEVICE_LIGHTGUN:
{
items = items_special[2];
if ((input.system[1] == SYSTEM_MENACER) || (input.system[1] == SYSTEM_JUSTIFIER))
{
/* Menacer & Justifiers affected to devices 4 & 5 */
special = &config.gun_cursor[m->selected & 1];
/* Menacer & Justifiers affected to entries 4 & 5 */
special = &config.gun_cursor[index & 1];
}
else
{
/* Lightphasers affected to devices 0 & 4 */
special = &config.gun_cursor[m->selected >> 2];
/* Lightphasers affected to entries 0 & 4 */
special = &config.gun_cursor[index / 4];
}
break;
}
@ -2467,11 +2470,11 @@ static void ctrlmenu(void)
GUI_DrawMenuFX(m, 20, 0);
/* some devices require analog sticks */
if ((type == DEVICE_XE_A1P) && ((config.input[player].device == -1) || (config.input[player].device == 1)))
if ((input.dev[index] == DEVICE_XE_A1P) && ((config.input[player].device == -1) || (config.input[player].device == 1)))
{
GUI_WaitPrompt("Warning","One Analog Stick required !");
}
else if ((type == DEVICE_ACTIVATOR) && ((config.input[player].device != 0) && (config.input[player].device != 3)))
else if ((input.dev[index] == DEVICE_ACTIVATOR) && ((config.input[player].device != 0) && (config.input[player].device != 3)))
{
GUI_WaitPrompt("Warning","Two Analog Sticks required !");
}
@ -2491,19 +2494,21 @@ static void ctrlmenu(void)
case 10: /* specific option */
{
if (special)
{
/* specific case: controller type */
if (input.dev[index] < 0x03)
{
/* switch pad type */
*special = (*special + 1) & 0x03;
/* reinitialize emulated device(s) */
io_init();
input_reset();
}
else
{
/* switch option */
*special ^= 1;
/* specific case: controller type */
if (type < 2)
{
/* re-initialize emulated device */
input_init();
input_reset();
/* update emulated device type */
type = *special;
}
/* update menu items */
@ -2659,7 +2664,15 @@ static void ctrlmenu(void)
if (config.input[player].device >= 0)
{
GUI_MsgBoxOpen("Keys Configuration", "",0);
gx_input_Config(config.input[player].port, config.input[player].device, type);
if ((*special == 3) && !system_hw)
{
/* no auto-detected pad type, use 6-buttons key mapping as default */
gx_input_Config(config.input[player].port, config.input[player].device, DEVICE_PAD6B);
}
else
{
gx_input_Config(config.input[player].port, config.input[player].device, input.dev[index]);
}
GUI_MsgBoxClose();
}
break;
@ -2790,6 +2803,8 @@ static void ctrlmenu(void)
}
gxTextureClose(&items_special[0][0].texture);
gxTextureClose(&items_special[0][1].texture);
gxTextureClose(&items_special[0][2].texture);
gxTextureClose(&items_special[0][3].texture);
gxTextureClose(&items_special[1][0].texture);
gxTextureClose(&items_special[1][1].texture);
gxTextureClose(&items_device[1].texture);

View File

@ -233,37 +233,40 @@ static void pad_update(s8 chan, u8 i)
return;
}
/* Emulated device */
switch (input.dev[i])
{
case DEVICE_PAD6B:
{
/* Extra buttons */
if (p & pad_keymap[KEY_BUTTONX]) input.pad[i] |= INPUT_X;
if (p & pad_keymap[KEY_BUTTONY]) input.pad[i] |= INPUT_Y;
if (p & pad_keymap[KEY_BUTTONZ]) input.pad[i] |= INPUT_Z;
if (p & pad_keymap[KEY_MODE]) input.pad[i] |= INPUT_MODE;
/* default inputs are checked below */
}
case DEVICE_PAD3B:
{
/* Default menu key (right analog stick) */
if (PAD_SubStickX(chan) > ANALOG_SENSITIVITY)
/* Default menu key (right analog stick if not needed by emulated device) */
if ((input.dev[i] < DEVICE_XE_A1P) && (PAD_SubStickX(chan) > ANALOG_SENSITIVITY))
{
ConfigRequested = 1;
return;
}
/* Emulated device */
switch (input.dev[i])
{
case DEVICE_PAD6B:
{
/* X,Y,Z,MODE buttons */
if (p & pad_keymap[KEY_BUTTONX]) input.pad[i] |= INPUT_X;
if (p & pad_keymap[KEY_BUTTONY]) input.pad[i] |= INPUT_Y;
if (p & pad_keymap[KEY_BUTTONZ]) input.pad[i] |= INPUT_Z;
if (p & pad_keymap[KEY_MODE]) input.pad[i] |= INPUT_MODE;
}
case DEVICE_PAD3B:
{
/* A button */
if (p & pad_keymap[KEY_BUTTONA]) input.pad[i] |= INPUT_A;
}
case DEVICE_PAD2B:
{
/* D-PAD */
if ((p & PAD_BUTTON_UP) || (y > ANALOG_SENSITIVITY)) input.pad[i] |= INPUT_UP;
else if ((p & PAD_BUTTON_DOWN) || (y < -ANALOG_SENSITIVITY)) input.pad[i] |= INPUT_DOWN;
if ((p & PAD_BUTTON_LEFT) || (x < -ANALOG_SENSITIVITY)) input.pad[i] |= INPUT_LEFT;
else if ((p & PAD_BUTTON_RIGHT) || (x > ANALOG_SENSITIVITY)) input.pad[i] |= INPUT_RIGHT;
/* Buttons */
if (p & pad_keymap[KEY_BUTTONA]) input.pad[i] |= INPUT_A;
/* default buttons */
if (p & pad_keymap[KEY_BUTTONB]) input.pad[i] |= INPUT_B;
if (p & pad_keymap[KEY_BUTTONC]) input.pad[i] |= INPUT_C;
if (p & pad_keymap[KEY_START]) input.pad[i] |= INPUT_START;
@ -308,19 +311,10 @@ static void pad_update(s8 chan, u8 i)
{
/* Y analog position [0-255] */
input.analog[i][1] = y ? (127 - y) : (128 - y);
/* default inputs are checked below */
}
case DEVICE_PADDLE:
{
/* Default menu key (right analog stick) */
if (PAD_SubStickX(chan) > ANALOG_SENSITIVITY)
{
ConfigRequested = 1;
return;
}
/* X analog position [0-255] */
input.analog[i][0] = (x + 128);
@ -332,38 +326,8 @@ static void pad_update(s8 chan, u8 i)
break;
}
case DEVICE_PAD2B:
{
/* Default menu key (right analog stick) */
if (PAD_SubStickX(chan) > ANALOG_SENSITIVITY)
{
ConfigRequested = 1;
return;
}
/* D-PAD */
if ((p & PAD_BUTTON_UP) || (y > ANALOG_SENSITIVITY)) input.pad[i] |= INPUT_UP;
else if ((p & PAD_BUTTON_DOWN) || (y < -ANALOG_SENSITIVITY)) input.pad[i] |= INPUT_DOWN;
if ((p & PAD_BUTTON_LEFT) || (x < -ANALOG_SENSITIVITY)) input.pad[i] |= INPUT_LEFT;
else if ((p & PAD_BUTTON_RIGHT) || (x > ANALOG_SENSITIVITY)) input.pad[i] |= INPUT_RIGHT;
/* Buttons */
if (p & pad_keymap[KEY_BUTTONB]) input.pad[i] |= INPUT_BUTTON1;
if (p & pad_keymap[KEY_BUTTONC]) input.pad[i] |= INPUT_BUTTON2;
if (p & pad_keymap[KEY_START]) input.pad[i] |= INPUT_START;
break;
}
case DEVICE_LIGHTGUN:
{
/* Default menu key (right analog stick) */
if (PAD_SubStickX(chan) > ANALOG_SENSITIVITY)
{
ConfigRequested = 1;
return;
}
/* Gun screen position (x,y) */
input.analog[i][0] += x / ANALOG_SENSITIVITY;
input.analog[i][1] -= y / ANALOG_SENSITIVITY;
@ -385,13 +349,6 @@ static void pad_update(s8 chan, u8 i)
case DEVICE_MOUSE:
{
/* Default menu key (right analog stick) */
if (PAD_SubStickX(chan) > ANALOG_SENSITIVITY)
{
ConfigRequested = 1;
return;
}
/* Mouse relative movement (-255,255) */
input.analog[i][0] = (x / ANALOG_SENSITIVITY) * 2;
input.analog[i][1] = (y / ANALOG_SENSITIVITY) * 2;
@ -413,13 +370,6 @@ static void pad_update(s8 chan, u8 i)
case DEVICE_PICO:
{
/* Default menu key (right analog stick) */
if (PAD_SubStickX(chan) > ANALOG_SENSITIVITY)
{
ConfigRequested = 1;
return;
}
/* D-PAD */
if (p & PAD_BUTTON_UP) input.pad[0] |= INPUT_UP;
else if (p & PAD_BUTTON_DOWN) input.pad[0] |= INPUT_DOWN;
@ -450,13 +400,6 @@ static void pad_update(s8 chan, u8 i)
case DEVICE_TEREBI:
{
/* Default menu key (right analog stick) */
if (PAD_SubStickX(chan) > ANALOG_SENSITIVITY)
{
ConfigRequested = 1;
return;
}
/* PEN screen position (x,y) */
input.analog[0][0] += x / ANALOG_SENSITIVITY;
input.analog[0][1] -= y / ANALOG_SENSITIVITY;
@ -763,7 +706,7 @@ static void wpad_update(s8 chan, u8 i, u32 exp)
{
case DEVICE_PAD6B:
{
/* Extra buttons */
/* X,Y,Z,MODE buttons */
if (p & wpad_keymap[KEY_BUTTONX]) input.pad[i] |= INPUT_X;
if (p & wpad_keymap[KEY_BUTTONY]) input.pad[i] |= INPUT_Y;
if (p & wpad_keymap[KEY_BUTTONZ]) input.pad[i] |= INPUT_Z;
@ -772,14 +715,19 @@ static void wpad_update(s8 chan, u8 i, u32 exp)
case DEVICE_PAD3B:
{
/* D- PAD */
/* A button */
if (p & wpad_keymap[KEY_BUTTONA]) input.pad[i] |= INPUT_A;
}
case DEVICE_PAD2B:
{
/* D-PAD */
if ((p & wpad_dirmap[exp][PAD_UP]) || (y > ANALOG_SENSITIVITY)) input.pad[i] |= INPUT_UP;
else if ((p & wpad_dirmap[exp][PAD_DOWN]) || (y < -ANALOG_SENSITIVITY)) input.pad[i] |= INPUT_DOWN;
if ((p & wpad_dirmap[exp][PAD_LEFT]) || (x < -ANALOG_SENSITIVITY)) input.pad[i] |= INPUT_LEFT;
else if ((p & wpad_dirmap[exp][PAD_RIGHT]) || (x > ANALOG_SENSITIVITY)) input.pad[i] |= INPUT_RIGHT;
/* Buttons */
if (p & wpad_keymap[KEY_BUTTONA]) input.pad[i] |= INPUT_A;
/* default buttons */
if (p & wpad_keymap[KEY_BUTTONB]) input.pad[i] |= INPUT_B;
if (p & wpad_keymap[KEY_BUTTONC]) input.pad[i] |= INPUT_C;
if (p & wpad_keymap[KEY_START]) input.pad[i] |= INPUT_START;
@ -791,7 +739,7 @@ static void wpad_update(s8 chan, u8 i, u32 exp)
{
/* Left Stick analog position [0-255] */
input.analog[i][0] = (x + 128);
input.analog[i][1] = y ? (127 - y) : (128 - y);
input.analog[i][1] = y ? (127 - y) : 128;
/* Right Stick analog position [0-255] */
if (exp == WPAD_EXP_CLASSIC)
@ -886,22 +834,6 @@ static void wpad_update(s8 chan, u8 i, u32 exp)
break;
}
case DEVICE_PAD2B:
{
/* D-PAD */
if ((p & wpad_dirmap[exp][PAD_UP]) || (y > ANALOG_SENSITIVITY)) input.pad[i] |= INPUT_UP;
else if ((p & wpad_dirmap[exp][PAD_DOWN]) || (y < -ANALOG_SENSITIVITY)) input.pad[i] |= INPUT_DOWN;
if ((p & wpad_dirmap[exp][PAD_LEFT]) || (x < -ANALOG_SENSITIVITY)) input.pad[i] |= INPUT_LEFT;
else if ((p & wpad_dirmap[exp][PAD_RIGHT]) || (x > ANALOG_SENSITIVITY)) input.pad[i] |= INPUT_RIGHT;
/* Buttons */
if (p & wpad_keymap[KEY_BUTTONB]) input.pad[i] |= INPUT_BUTTON1;
if (p & wpad_keymap[KEY_BUTTONC]) input.pad[i] |= INPUT_BUTTON2;
if (p & wpad_keymap[KEY_START]) input.pad[i] |= INPUT_START;
break;
}
case DEVICE_LIGHTGUN:
{
/* Gun screen position (x,y) */
@ -1261,7 +1193,7 @@ void gx_input_SetDefault(void)
{
config.input[i].device = -1;
config.input[i].port = i%4;
config.input[i].padtype = 0;
config.input[i].padtype = DEVICE_PAD2B | DEVICE_PAD3B | DEVICE_PAD6B; /* autodetected */
}
#ifdef HW_RVL

BIN
gx/images/Ctrl_gamepad.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.2 KiB

BIN
gx/images/Ctrl_pad2b.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

BIN
gx/images/Ctrl_pad_auto.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 534 B

View File

@ -712,8 +712,8 @@ static void configure_controls(void)
int i;
struct retro_variable var;
input.system[0] = SYSTEM_MD_GAMEPAD;
input.system[1] = SYSTEM_MD_GAMEPAD;
input.system[0] = SYSTEM_GAMEPAD;
input.system[1] = SYSTEM_GAMEPAD;
var.key = "padtype";
environ_cb(RETRO_ENVIRONMENT_GET_VARIABLE, &var);
@ -726,15 +726,9 @@ static void configure_controls(void)
else if (!strcmp(var.value, "2-buttons"))
for(i = 0; i < MAX_INPUTS; i++)
config.input[i].padtype = DEVICE_PAD2B;
else if ((system_hw & SYSTEM_PBC) != SYSTEM_MD)
for(i = 0; i < MAX_INPUTS; i++)
config.input[i].padtype = DEVICE_PAD2B;
else if (rominfo.peripherals & 2)
for(i = 0; i < MAX_INPUTS; i++)
config.input[i].padtype = DEVICE_PAD6B;
else
for(i = 0; i < MAX_INPUTS; i++)
config.input[i].padtype = DEVICE_PAD3B;
config.input[i].padtype = DEVICE_PAD2B | DEVICE_PAD3B | DEVICE_PAD6B;
var.key = "multitap";
environ_cb(RETRO_ENVIRONMENT_GET_VARIABLE, &var);

View File

@ -40,13 +40,14 @@ void set_config_defaults(void)
config.render = 0; /* 1 = double resolution output (only when interlaced mode 2 is enabled) */
/* controllers options */
input.system[0] = SYSTEM_MD_GAMEPAD;
input.system[1] = SYSTEM_MD_GAMEPAD;
input.system[0] = SYSTEM_GAMEPAD;
input.system[1] = SYSTEM_GAMEPAD;
config.gun_cursor[0] = 1;
config.gun_cursor[1] = 1;
config.invert_mouse = 0;
for (i=0;i<MAX_INPUTS;i++)
{
config.input[i].padtype = DEVICE_PAD3B;
/* autodetected control pad type */
config.input[i].padtype = DEVICE_PAD2B | DEVICE_PAD3B | DEVICE_PAD6B;
}
}