DS GX: Properly mask address for slot 2 4x4-texel textures
Vicki Pfau vi@endrift.com
Wed, 12 Apr 2017 23:55:39 -0700
2 files changed,
2 insertions(+),
1 deletions(-)
M
CHANGES
→
CHANGES
@@ -19,6 +19,7 @@ - DS Video: Fix affine transformations in video capture
- DS GX: Fix bitmap textures when no palette is mapped (fixes mgba.io/i/628) - DS GX: Don't reset state between buffer swaps (fixes mgba.io/i/642) - DS GX: Allow viewport to change in the middle of a frame + - DS GX: Properly mask address for slot 2 4x4-texel textures Misc: - DS: Set boot complete bit in RAM on boot (fixes mgba.io/i/576, mgba.io/i/580, mgba.io/i/586) - DS Memory: Ensure DS9 I/O is 8-byte aligned
M
src/ds/gx/software.c
→
src/ds/gx/software.c
@@ -188,7 +188,7 @@ if (!renderer->d.tex[1]) {
return 0; } uint16_t half = DSGXTexParamsGetVRAMBase(poly->texParams) & 0x8000; - uint32_t slot1Base = (DSGXTexParamsGetVRAMBase(poly->texParams) << 1) + (texelCoord >> 2) + half; + uint32_t slot1Base = ((DSGXTexParamsGetVRAMBase(poly->texParams) << 1) & 0x7FFF) + (texelCoord >> 2) + half; uint16_t texel2 = renderer->d.tex[1][slot1Base]; uint16_t texel2Base = (texel2 & 0x3FFF) << 1; int a = 0x8;