From b3c831a3aad227e68d0b3d28307bdae49d2adcbe Mon Sep 17 00:00:00 2001 From: Vicki Pfau Date: Wed, 22 Jul 2020 12:14:14 -0700 Subject: [PATCH] DS GX: Mask off invalid bits of the palette base --- CHANGES | 1 + src/ds/gx.c | 3 +-- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGES b/CHANGES index 2b923ba6a..00c8a5470 100644 --- a/CHANGES +++ b/CHANGES @@ -18,6 +18,7 @@ Bugfixes: - 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 diff --git a/src/ds/gx.c b/src/ds/gx.c index ae59329fb..d46b5ae57 100644 --- a/src/ds/gx.c +++ b/src/ds/gx.c @@ -1206,8 +1206,7 @@ static void _fifoRun(struct mTiming* timing, void* context, uint32_t cyclesLate) 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: