Commit de00a8df authored by ds22x's avatar ds22x
Browse files

Pull commits 83a225cd...

Pull commits 83a225cd c1b248c8 b82b02ba & 485358ed from upstream
parents 8de23c74 485358ed
Pipeline #58429 canceled with stages
No preview for this file type
No preview for this file type
......@@ -2,7 +2,7 @@
* Genesis Plus
* SG-1000, Master System & Game Gear cartridge hardware support
*
* Copyright (C) 2007-2020 Eke-Eke (Genesis Plus GX)
* Copyright (C) 2007-2021 Eke-Eke (Genesis Plus GX)
*
* Redistribution and use of this code or any derivative works are permitted
* provided that the following conditions are met:
......@@ -107,6 +107,7 @@ static const rominfo_t game_list[] =
{0x97D03541, 0, 0, 0, MAPPER_KOREA, SYSTEM_SMS, REGION_JAPAN_NTSC}, /* Sangokushi 3 (KR) */
{0x192949D5, 0, 0, 0, MAPPER_KOREA_8K, SYSTEM_SMS, REGION_JAPAN_NTSC}, /* Janggun-ui Adeul (KR) */
{0x76C5BDFB, 0, 0, 0, MAPPER_KOREA_16K, SYSTEM_GGMS, REGION_JAPAN_NTSC}, /* Jang Pung II [SMS-GG] (KR) */
{0x01A2D595, 0, 0, 0, MAPPER_KOREA_16K, SYSTEM_GGMS, REGION_USA}, /* Street Battle [Proto] [SMS-GG] (US) */
{0x9FA727A0, 0, 0, 0, MAPPER_KOREA_16K, SYSTEM_GGMS, REGION_USA}, /* Street Hero [Proto 0] [SMS-GG] (US) */
{0xFB481971, 0, 0, 0, MAPPER_KOREA_16K, SYSTEM_GGMS, REGION_USA}, /* Street Hero [Proto 1] [SMS-GG] (US) */
{0xA67F2A5C, 0, 0, 0, MAPPER_MULTI_16K, SYSTEM_SMS, REGION_JAPAN_NTSC}, /* 4-Pak All Action (KR) */
......@@ -214,9 +215,7 @@ static const rominfo_t game_list[] =
/* games running in Game Gear MS compatibility mode */
{0x59840FD6, 0, 0, 0, MAPPER_SEGA, SYSTEM_GGMS, REGION_USA}, /* Castle of Illusion - Starring Mickey Mouse [SMS-GG] */
{0x9C76FB3A, 0, 0, 0, MAPPER_SEGA, SYSTEM_GGMS, REGION_USA}, /* Rastan Saga [SMS-GG] */
{0xC8381DEF, 0, 0, 0, MAPPER_SEGA, SYSTEM_GGMS, REGION_USA}, /* Taito Chase H.Q [SMS-GG] */
{0xDA8E95A9, 0, 0, 0, MAPPER_SEGA, SYSTEM_GGMS, REGION_USA}, /* WWF Wrestlemania Steel Cage Challenge [SMS-GG] */
{0xCC521975, 0, 0, 0, MAPPER_SEGA, SYSTEM_GGMS, REGION_USA}, /* Cave Dude [Proto] [SMS-GG] */
{0x1D93246E, 0, 0, 0, MAPPER_SEGA, SYSTEM_GGMS, REGION_USA}, /* Olympic Gold [A][SMS-GG] */
{0xA2F9C7AF, 0, 0, 0, MAPPER_SEGA, SYSTEM_GGMS, REGION_USA}, /* Olympic Gold [B][SMS-GG] */
{0x01EAB89D, 0, 0, 0, MAPPER_SEGA, SYSTEM_GGMS, REGION_USA}, /* Out Run Europa [SMS-GG] */
......@@ -224,12 +223,37 @@ static const rominfo_t game_list[] =
{0xE5F789B9, 0, 0, 0, MAPPER_SEGA, SYSTEM_GGMS, REGION_USA}, /* Predator 2 [SMS-GG] */
{0x311D2863, 0, 0, 0, MAPPER_SEGA, SYSTEM_GGMS, REGION_USA}, /* Prince of Persia [A][SMS-GG] */
{0x45F058D6, 0, 0, 0, MAPPER_SEGA, SYSTEM_GGMS, REGION_USA}, /* Prince of Persia [B][SMS-GG] */
{0x9C76FB3A, 0, 0, 0, MAPPER_SEGA, SYSTEM_GGMS, REGION_USA}, /* Rastan Saga [SMS-GG] */
{0x56201996, 0, 0, 0, MAPPER_SEGA, SYSTEM_GGMS, REGION_USA}, /* R.C. Grand Prix [SMS-GG] */
{0x10DBBEF4, 0, 0, 0, MAPPER_SEGA, SYSTEM_GGMS, REGION_USA}, /* Super Kick Off [SMS-GG] */
{0xC8381DEF, 0, 0, 0, MAPPER_SEGA, SYSTEM_GGMS, REGION_USA}, /* Taito Chase H.Q [SMS-GG] */
{0xDA8E95A9, 0, 0, 0, MAPPER_SEGA, SYSTEM_GGMS, REGION_USA}, /* WWF Wrestlemania Steel Cage Challenge [SMS-GG] */
{0x9942B69B, 0, 0, 0, MAPPER_SEGA, SYSTEM_GGMS, REGION_JAPAN_NTSC}, /* Castle of Illusion - Starring Mickey Mouse (J) [SMS-GG] */
{0x7BB81E3D, 0, 0, 0, MAPPER_SEGA, SYSTEM_GGMS, REGION_JAPAN_NTSC}, /* Taito Chase H.Q (J) [SMS-GG] */
{0x6630E5FD, 0, 0, 0, MAPPER_SEGA, SYSTEM_GGMS, REGION_JAPAN_NTSC}, /* Aerial Assault (TW) [SMS-GG] */
{0x6F8E46CF, 0, 0, 0, MAPPER_SEGA, SYSTEM_GGMS, REGION_JAPAN_NTSC}, /* Alex Kidd in Miracle World (TW) [SMS-GG] */
{0x98F64975, 0, 0, 0, MAPPER_SEGA, SYSTEM_GGMS, REGION_JAPAN_NTSC}, /* Black Belt (TW) [SMS-GG] */
{0x55f929ce, 0, 0, 0, MAPPER_SEGA, SYSTEM_GGMS, REGION_JAPAN_NTSC}, /* Choplifter (TW) [SMS-GG] */
{0xAD9FF469, 0, 0, 0, MAPPER_SEGA, SYSTEM_GGMS, REGION_JAPAN_NTSC}, /* Cyber Shinobi, The (TW) [SMS-GG] */
{0xF4F848C2, 0, 0, 0, MAPPER_SEGA, SYSTEM_GGMS, REGION_JAPAN_NTSC}, /* Double Dragon (TW) [SMS-GG] */
{0x96e16fe4, 0, 0, 0, MAPPER_SEGA, SYSTEM_GGMS, REGION_JAPAN_NTSC}, /* E-SWAT [v1] (TW) [SMS-GG] */
{0xB948752E, 0, 0, 0, MAPPER_SEGA, SYSTEM_GGMS, REGION_JAPAN_NTSC}, /* Final Bubble Bobble (TW) [SMS-GG] */
{0x44136A72, 0, 0, 0, MAPPER_SEGA, SYSTEM_GGMS, REGION_JAPAN_NTSC}, /* Forgotten Worlds (TW) [SMS-GG] */
{0x6FE448A5, 0, 0, 0, MAPPER_SEGA, SYSTEM_GGMS, REGION_JAPAN_NTSC}, /* Great Basketball (TW) [SMS-GG] */
{0xB6207F0D, 0, 0, 0, MAPPER_SEGA, SYSTEM_GGMS, REGION_JAPAN_NTSC}, /* Hokuto no Ken (TW) [SMS-GG] */
{0x4762E022, 0, 0, 0, MAPPER_SEGA, SYSTEM_GGMS, REGION_JAPAN_NTSC}, /* Kung Fu Kid (TW) [SMS-GG] */
{0x3382D73F, 0, 0, 0, MAPPER_SEGA, SYSTEM_GGMS, REGION_JAPAN_NTSC}, /* Olympic Gold (TW) [SMS-GG] */
{0x354BEE78, 0, 0, 0, MAPPER_SEGA, SYSTEM_GGMS, REGION_JAPAN_NTSC}, /* Paperboy [v1] (TW) [SMS-GG] */
{0xCAFD2D83, 0, 0, 0, MAPPER_SEGA, SYSTEM_GGMS, REGION_JAPAN_NTSC}, /* Prince of Persia (TW) [SMS-GG] */
{0xCACDF759, 0, 0, 0, MAPPER_SEGA, SYSTEM_GGMS, REGION_JAPAN_NTSC}, /* Quartet (TW) [SMS-GG] */
{0xE532716F, 0, 0, 0, MAPPER_SEGA, SYSTEM_GGMS, REGION_JAPAN_NTSC}, /* R-Type (TW) [SMS-GG] */
{0x7D59283B, 0, 0, 0, MAPPER_SEGA, SYSTEM_GGMS, REGION_JAPAN_NTSC}, /* Scramble Spirits (TW) [SMS-GG] */
{0x89EFCC22, 0, 0, 0, MAPPER_SEGA, SYSTEM_GGMS, REGION_JAPAN_NTSC}, /* Secret Command (TW) [SMS-GG] */
{0xAB67C6BD, 0, 0, 0, MAPPER_SEGA, SYSTEM_GGMS, REGION_JAPAN_NTSC}, /* Shadow Dancer - The Secret Of Shinobi (TW) [SMS-GG] */
{0xAC2EA669, 0, 0, 0, MAPPER_SEGA, SYSTEM_GGMS, REGION_JAPAN_NTSC}, /* Shadow of the Beast (TW) [SMS-GG] */
{0x63A7F906, 0, 0, 0, MAPPER_SEGA, SYSTEM_GGMS, REGION_JAPAN_NTSC}, /* Strider (TW) [SMS-GG] */
{0xD282EF71, 0, 0, 0, MAPPER_SEGA, SYSTEM_GGMS, REGION_JAPAN_NTSC}, /* Submarine Attack (TW) [SMS-GG] */
{0x98CF1254, 0, 0, 0, MAPPER_SEGA, SYSTEM_GGMS, REGION_JAPAN_NTSC}, /* Thunder Blade (TW) [SMS-GG] */
/* games requiring 3-D Glasses */
{0x6BD5C2BF, 1, 1, 0, MAPPER_SEGA, SYSTEM_SMS, REGION_USA}, /* Space Harrier 3-D */
......
......@@ -2,7 +2,7 @@
* Genesis Plus
* SG-1000, Master System & Game Gear cartridge hardware support
*
* Copyright (C) 2007-2020 Eke-Eke (Genesis Plus GX)
* Copyright (C) 2007-2021 Eke-Eke (Genesis Plus GX)
*
* Redistribution and use of this code or any derivative works are permitted
* provided that the following conditions are met:
......
......@@ -754,6 +754,28 @@ int load_rom(char *filename)
/* 16-bit ROM cartridge (max. 8MB) with optional CD hardware add-on support enabled */
else if ((system_hw == SYSTEM_MD) && (cart.romsize <= 0x800000) && (config.add_on != HW_ADDON_NONE))
{
int len;
char fname[256];
#if defined(USE_LIBCHDR)
/* automatically try to load associated .chd file if no .cue file CD image loaded yet */
if (!cdd.loaded)
{
len = strlen(filename);
while ((len && (filename[len] != '.')) || (len > 251)) len--;
strncpy(fname, filename, len);
strcpy(&fname[len], ".chd");
fname[len+4] = 0;
cdd_load(fname, (char *)cdc.ram);
}
#endif
/* automatically enable CD hardware emulation (Mode 1) in case : */
/* - loaded ROM has known CD hardware support */
/* or */
/* - CD hardware emulation is forced on */
/* or */
/* - MegaSD add-on emulation is disabled and normal CD image file is loaded */
if ((rominfo.peripherals & PCDROM) || (strstr(rominfo.domestic,"FLUX") != NULL) ||
(config.add_on == HW_ADDON_MEGACD) || ((config.add_on | cdd.loaded) == HW_ADDON_MEGACD))
{
......@@ -763,8 +785,7 @@ int load_rom(char *filename)
/* automatically try to load associated .iso file if no CD image loaded yet */
if (!cdd.loaded)
{
char fname[256];
int len = strlen(filename);
len = strlen(filename);
while ((len && (filename[len] != '.')) || (len > 251)) len--;
strncpy(fname, filename, len);
strcpy(&fname[len], ".iso");
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment