Merge pull request #92 from negativeExponent/gb_update

Gb update
This commit is contained in:
Autechre 2020-08-18 16:28:06 +02:00 committed by GitHub
commit 36b011c72e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 3 deletions

View File

@ -362,7 +362,9 @@ void mapperMBC3ROM(uint16_t address, uint8_t value)
gbDataMBC3.mapperRAMEnable = ((value & 0x0a) == 0x0a ? 1 : 0);
break;
case 0x2000: // ROM bank select
value = value & 0x7f;
// MBC3 has 2MB rom size, anything above that is a 4MB MBC30
if (gbRomSize < 0x200000)
value &= 0x7f;
if (value == 0)
value = 1;
if (value == gbDataMBC3.mapperROMBank)

View File

@ -1462,11 +1462,11 @@ void retro_run(void)
case 0x0f:
case 0x10:
/* Check if any RTC has been loaded, zero value means nothing has been loaded. */
if (!gbDataMBC3.mapperSeconds && !gbDataMBC3.mapperLSeconds && !gbDataMBC3.mapperLastTime)
if (!gbDataMBC3.mapperLastTime)
initRTC = true;
break;
case 0xfd:
if (!gbDataTAMA5.mapperSeconds && !gbDataTAMA5.mapperLSeconds && !gbDataTAMA5.mapperLastTime)
if (!gbDataTAMA5.mapperLastTime)
initRTC = true;
break;
}