From bd96a8ddc7cc601f5456406e933cc4b2d3e38595 Mon Sep 17 00:00:00 2001 From: Brandon Wright Date: Tue, 12 Feb 2019 22:01:31 -0600 Subject: [PATCH] Revert "MSVC 2005 bugfix" This reverts commit eecbd7a022781a1a1da0aa0299cf8ccf92f119c4. --- c4emu.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/c4emu.cpp b/c4emu.cpp index 3718be77..a0dfcca3 100644 --- a/c4emu.cpp +++ b/c4emu.cpp @@ -1021,11 +1021,10 @@ 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 b = (int64) READ_3WORD(Memory.C4RAM + 0x1f80); - int64 c = b << 40; - int64 a = SAR(c, 30); - a = SAR(c, 10); + int64 a = SAR((int64) READ_3WORD(Memory.C4RAM + 0x1f80) << 40, 40); + //printf("%08X%08X\n", (uint32) (a>>32), (uint32) (a&0xFFFFFFFF)); 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;