From 67662ee23fa14467f815bfa018e222ed5b614fc4 Mon Sep 17 00:00:00 2001 From: "Unknown W. Brackets" Date: Sun, 12 Apr 2015 22:39:49 -0700 Subject: [PATCH] Force clut address to align to 16. Hardware seems to ignore the lower bits when loading. --- GPU/GPUState.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/GPU/GPUState.h b/GPU/GPUState.h index b14a94f9b0..36f71cc6db 100644 --- a/GPU/GPUState.h +++ b/GPU/GPUState.h @@ -302,7 +302,7 @@ struct GPUgstate int getTextureEnvColR() const { return texenvcolor&0xFF; } int getTextureEnvColG() const { return (texenvcolor>>8)&0xFF; } int getTextureEnvColB() const { return (texenvcolor>>16)&0xFF; } - u32 getClutAddress() const { return (clutaddr & 0x00FFFFFF) | ((clutaddrupper << 8) & 0x0F000000); } + u32 getClutAddress() const { return (clutaddr & 0x00FFFFF0) | ((clutaddrupper << 8) & 0x0F000000); } int getClutLoadBytes() const { return (loadclut & 0x3F) * 32; } int getClutLoadBlocks() const { return (loadclut & 0x3F); } GEPaletteFormat getClutPaletteFormat() const { return static_cast(clutformat & 3); }