mirror of
https://github.com/ekeeke/Genesis-Plus-GX.git
synced 2024-11-10 21:05:12 +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
|
||||
* 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
|
||||
* provided that the following conditions are met:
|
||||
@ -718,10 +718,21 @@ int sms_cart_region_detect(void)
|
||||
while(i--);
|
||||
|
||||
/* Mark-III hardware */
|
||||
if (system_hw == SYSTEM_MARKIII)
|
||||
if (config.system == SYSTEM_MARKIII)
|
||||
{
|
||||
/* Japan */
|
||||
return REGION_JAPAN_NTSC;
|
||||
/* 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;
|
||||
}
|
||||
}
|
||||
|
||||
/* default region */
|
||||
|
@ -2,7 +2,7 @@
|
||||
* Genesis Plus
|
||||
* 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
|
||||
* provided that the following conditions are met:
|
||||
|
@ -3,7 +3,7 @@
|
||||
* ROM Loading Support
|
||||
*
|
||||
* 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
|
||||
* provided that the following conditions are met:
|
||||
@ -311,7 +311,7 @@ void getrominfo(char *romheader)
|
||||
}
|
||||
|
||||
/* if found, get infos from header */
|
||||
if (offset)
|
||||
if ((offset > 0) && (offset < cart.romsize))
|
||||
{
|
||||
/* checksum */
|
||||
rominfo.checksum = romheader[offset + 0x0a] | (romheader[offset + 0x0b] << 8);
|
||||
|
@ -3,7 +3,7 @@
|
||||
* ROM Loading Support
|
||||
*
|
||||
* 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
|
||||
* provided that the following conditions are met:
|
||||
|
Loading…
Reference in New Issue
Block a user