mirror of
https://github.com/dborth/snes9xgx.git
synced 2025-02-17 11:56:25 +01:00
Backport c4emu and gfx fixes (#810)
C4emu backport: C4: Do the sign extend manually. Revert "MSVC 2005 bugfix" GFX backport: Fix GCC warning about indentation. GFX.DoInterlace-- should occur even if we don't render frame.
This commit is contained in:
parent
6b23a58a83
commit
f93f2b84fa
@ -1022,11 +1022,11 @@ void S9xSetC4 (uint8 byte, uint16 Address)
|
|||||||
if (Memory.C4RAM[0x1f4d] != 0x0e)
|
if (Memory.C4RAM[0x1f4d] != 0x0e)
|
||||||
printf("$7f4d=%02x, expected 0e for command 54 %02x\n", Memory.C4RAM[0x1f4d], Memory.C4RAM[0x1f4d]);
|
printf("$7f4d=%02x, expected 0e for command 54 %02x\n", Memory.C4RAM[0x1f4d], Memory.C4RAM[0x1f4d]);
|
||||||
#endif
|
#endif
|
||||||
int64 b = (int64) READ_3WORD(Memory.C4RAM + 0x1f80);
|
int64 a = (int64)READ_3WORD(Memory.C4RAM + 0x1f80);
|
||||||
int64 c = b << 40;
|
a |= 0xffffffffff000000 * ((a >> 23) & 1);
|
||||||
int64 a = SAR(c, 30);
|
//printf("%08X%08X\n", (uint32) (a>>32), (uint32) (a&0xFFFFFFFF));
|
||||||
a = SAR(c, 10);
|
|
||||||
a *= a;
|
a *= a;
|
||||||
|
//printf("%08X%08X\n", (uint32) (a>>32), (uint32) (a&0xFFFFFFFF));
|
||||||
WRITE_3WORD(Memory.C4RAM + 0x1f83, a);
|
WRITE_3WORD(Memory.C4RAM + 0x1f83, a);
|
||||||
WRITE_3WORD(Memory.C4RAM + 0x1f86, (a >> 24));
|
WRITE_3WORD(Memory.C4RAM + 0x1f86, (a >> 24));
|
||||||
break;
|
break;
|
||||||
|
@ -200,6 +200,8 @@ void S9xBuildDirectColourMaps (void)
|
|||||||
void S9xStartScreenRefresh (void)
|
void S9xStartScreenRefresh (void)
|
||||||
{
|
{
|
||||||
GFX.InterlaceFrame = !GFX.InterlaceFrame;
|
GFX.InterlaceFrame = !GFX.InterlaceFrame;
|
||||||
|
if (GFX.DoInterlace)
|
||||||
|
GFX.DoInterlace--;
|
||||||
|
|
||||||
if (IPPU.RenderThisFrame)
|
if (IPPU.RenderThisFrame)
|
||||||
{
|
{
|
||||||
@ -211,9 +213,6 @@ void S9xStartScreenRefresh (void)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (GFX.DoInterlace)
|
|
||||||
GFX.DoInterlace--;
|
|
||||||
|
|
||||||
S9xGraphicsScreenResize();
|
S9xGraphicsScreenResize();
|
||||||
|
|
||||||
IPPU.RenderedFramesCount++;
|
IPPU.RenderedFramesCount++;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user