Fix MMC reg for 64bit builds

This commit is contained in:
OV2 2013-01-26 13:30:56 +01:00
parent d8e5d090aa
commit 58f28b2dde
1 changed files with 3 additions and 1 deletions

View File

@ -308,7 +308,9 @@ static void S9xSetSA1MemMap (uint32 which1, uint8 map)
for (int c = 0; c < 0x200; c += 16)
{
uint8 *block = &Memory.ROM[(((map & 0x80) ? map : which1) & 7) * 0x100000 + (c << 11) - 0x8000];
// conversion to int is needed here - map is promoted but which1 is not
int32 offset = (((map & 0x80) ? map : which1) & 7) * 0x100000 + (c << 11) - 0x8000;
uint8 *block = &Memory.ROM[offset];
for (int i = c + 8; i < c + 16; i++)
Memory.Map[start2 + i] = SA1.Map[start2 + i] = block;
}