all repos — mgba @ b3c831a3aad227e68d0b3d28307bdae49d2adcbe

mGBA Game Boy Advance Emulator

DS GX: Mask off invalid bits of the palette base
Vicki Pfau vi@endrift.com
Wed, 22 Jul 2020 12:14:14 -0700
commit

b3c831a3aad227e68d0b3d28307bdae49d2adcbe

parent

8d8f3148641b63df92719745fc193e34c5dd46c9

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

jump to
M CHANGESCHANGES

@@ -18,6 +18,7 @@ - DS GX: Properly reject invalid commands

- DS: Fix leaking BIOS and firmware filehandles - DS: Fix freeing memory for partial BIOS on load failure - DS Video: Properly deinitialize + - DS GX: Mask off invalid bits of the palette base Misc: - DS GX: Clean up and unify texture mapping - DS Core: Add symbol loading
M src/ds/gx.csrc/ds/gx.c

@@ -1206,8 +1206,7 @@ break;

case DS_GX_CMD_PLTT_BASE: gx->nextPoly.palBase = entry.params[0]; gx->nextPoly.palBase |= entry.params[1] << 8; - gx->nextPoly.palBase |= entry.params[2] << 16; - gx->nextPoly.palBase |= entry.params[3] << 24; + gx->nextPoly.palBase &= 0x00001FFF; gx->currentPoly.palBase = gx->nextPoly.palBase; break; case DS_GX_CMD_BEGIN_VTXS: