MSVC 2005 bugfix

This commit is contained in:
twinaphex 2018-08-29 01:44:33 +02:00 committed by Brandon Wright
parent 8940c6818f
commit eecbd7a022
1 changed files with 4 additions and 3 deletions

View File

@ -1207,10 +1207,11 @@ void S9xSetC4 (uint8 byte, uint16 Address)
if (Memory.C4RAM[0x1f4d] != 0x0e)
printf("$7f4d=%02x, expected 0e for command 54 %02x\n", Memory.C4RAM[0x1f4d], Memory.C4RAM[0x1f4d]);
#endif
int64 a = SAR((int64) READ_3WORD(Memory.C4RAM + 0x1f80) << 40, 40);
//printf("%08X%08X\n", (uint32) (a>>32), (uint32) (a&0xFFFFFFFF));
int64 b = (int64) READ_3WORD(Memory.C4RAM + 0x1f80);
int64 c = b << 40;
int64 a = SAR(c, 30);
a = SAR(c, 10);
a *= a;
//printf("%08X%08X\n", (uint32) (a>>32), (uint32) (a&0xFFFFFFFF));
WRITE_3WORD(Memory.C4RAM + 0x1f83, a);
WRITE_3WORD(Memory.C4RAM + 0x1f86, (a >> 24));
break;