all repos — mgba @ 047d8121788c50f09eb1fdece766fc14e1a1f0f0

mGBA Game Boy Advance Emulator

DS GX: Properly mask address for slot 2 4x4-texel textures
Vicki Pfau vi@endrift.com
Wed, 12 Apr 2017 23:55:39 -0700
commit

047d8121788c50f09eb1fdece766fc14e1a1f0f0

parent

516143b170059dcb24fcb28714a7eae4cce5db1e

2 files changed, 2 insertions(+), 1 deletions(-)

jump to
M CHANGESCHANGES

@@ -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.csrc/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;