mirror of
https://github.com/ekeeke/Genesis-Plus-GX.git
synced 2024-12-27 03:31:49 +01:00
[Core/MS] improved region detection (fixes BIOS support with Japanese games)
This commit is contained in:
parent
5903e8291c
commit
ae28f87402
@ -2,7 +2,7 @@
|
|||||||
* Genesis Plus
|
* Genesis Plus
|
||||||
* SG-1000, Master System & Game Gear cartridge hardware support
|
* SG-1000, Master System & Game Gear cartridge hardware support
|
||||||
*
|
*
|
||||||
* Copyright (C) 2007-2017 Eke-Eke (Genesis Plus GX)
|
* Copyright (C) 2007-2018 Eke-Eke (Genesis Plus GX)
|
||||||
*
|
*
|
||||||
* Redistribution and use of this code or any derivative works are permitted
|
* Redistribution and use of this code or any derivative works are permitted
|
||||||
* provided that the following conditions are met:
|
* provided that the following conditions are met:
|
||||||
@ -718,11 +718,22 @@ int sms_cart_region_detect(void)
|
|||||||
while(i--);
|
while(i--);
|
||||||
|
|
||||||
/* Mark-III hardware */
|
/* Mark-III hardware */
|
||||||
if (system_hw == SYSTEM_MARKIII)
|
if (config.system == SYSTEM_MARKIII)
|
||||||
{
|
{
|
||||||
/* Japan */
|
/* Japan only */
|
||||||
|
region_code = REGION_JAPAN_NTSC;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Master System / Game Gear ROM file */
|
||||||
|
if (system_hw >= SYSTEM_SMS)
|
||||||
|
{
|
||||||
|
/* missing header or valid header with Japan region code */
|
||||||
|
if (!rominfo.country[0] || !memcmp(rominfo.country,"SMS Japan",9) || !memcmp(rominfo.country,"GG Japan",8))
|
||||||
|
{
|
||||||
|
/* assume Japan region (fixes BIOS support) */
|
||||||
return REGION_JAPAN_NTSC;
|
return REGION_JAPAN_NTSC;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/* default region */
|
/* default region */
|
||||||
return REGION_USA;
|
return REGION_USA;
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
* Genesis Plus
|
* Genesis Plus
|
||||||
* SG-1000, Master System & Game Gear cartridge hardware support
|
* SG-1000, Master System & Game Gear cartridge hardware support
|
||||||
*
|
*
|
||||||
* Copyright (C) 2007-2017 Eke-Eke (Genesis Plus GX)
|
* Copyright (C) 2007-2018 Eke-Eke (Genesis Plus GX)
|
||||||
*
|
*
|
||||||
* Redistribution and use of this code or any derivative works are permitted
|
* Redistribution and use of this code or any derivative works are permitted
|
||||||
* provided that the following conditions are met:
|
* provided that the following conditions are met:
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
* ROM Loading Support
|
* ROM Loading Support
|
||||||
*
|
*
|
||||||
* Copyright (C) 1998-2003 Charles Mac Donald (original code)
|
* Copyright (C) 1998-2003 Charles Mac Donald (original code)
|
||||||
* Copyright (C) 2007-2017 Eke-Eke (Genesis Plus GX)
|
* Copyright (C) 2007-2018 Eke-Eke (Genesis Plus GX)
|
||||||
*
|
*
|
||||||
* Redistribution and use of this code or any derivative works are permitted
|
* Redistribution and use of this code or any derivative works are permitted
|
||||||
* provided that the following conditions are met:
|
* provided that the following conditions are met:
|
||||||
@ -311,7 +311,7 @@ void getrominfo(char *romheader)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* if found, get infos from header */
|
/* if found, get infos from header */
|
||||||
if (offset)
|
if ((offset > 0) && (offset < cart.romsize))
|
||||||
{
|
{
|
||||||
/* checksum */
|
/* checksum */
|
||||||
rominfo.checksum = romheader[offset + 0x0a] | (romheader[offset + 0x0b] << 8);
|
rominfo.checksum = romheader[offset + 0x0a] | (romheader[offset + 0x0b] << 8);
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
* ROM Loading Support
|
* ROM Loading Support
|
||||||
*
|
*
|
||||||
* Copyright (C) 1998-2003 Charles Mac Donald (original code)
|
* Copyright (C) 1998-2003 Charles Mac Donald (original code)
|
||||||
* Copyright (C) 2007-2017 Eke-Eke (Genesis Plus GX)
|
* Copyright (C) 2007-2018 Eke-Eke (Genesis Plus GX)
|
||||||
*
|
*
|
||||||
* Redistribution and use of this code or any derivative works are permitted
|
* Redistribution and use of this code or any derivative works are permitted
|
||||||
* provided that the following conditions are met:
|
* provided that the following conditions are met:
|
||||||
|
Loading…
Reference in New Issue
Block a user