diff --git a/CHANGES b/CHANGES index fa6ce9109..c69211dbd 100644 --- a/CHANGES +++ b/CHANGES @@ -8,6 +8,7 @@ Bugfixes: - DS Video: Capture with alpha bit set - DS Video: Bitmap sprites use alpha bit for transparent - DS GX: Fix 4-color texture coordinates + - DS GX: Reset polygon attributes between buffer swaps 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 diff --git a/src/ds/gx.c b/src/ds/gx.c index fd5202b34..cea01bb2b 100644 --- a/src/ds/gx.c +++ b/src/ds/gx.c @@ -1175,6 +1175,8 @@ static void _fifoRun(struct mTiming* timing, void* context, uint32_t cyclesLate) memset(&gx->currentVertex, 0, sizeof(gx->currentVertex)); memset(&gx->nextPoly, 0, sizeof(gx-> nextPoly)); gx->currentVertex.color = 0x7FFF; + gx->currentPoly.polyParams = 0x001F00C0; + gx->nextPoly.polyParams = 0x001F00C0; break; case DS_GX_CMD_VIEWPORT: gx->viewportX1 = (uint8_t) entry.params[0]; @@ -1279,6 +1281,8 @@ void DSGXReset(struct DSGX* gx) { memset(&gx->currentVertex, 0, sizeof(gx->currentVertex)); memset(&gx->nextPoly, 0, sizeof(gx-> nextPoly)); gx->currentVertex.color = 0x7FFF; + gx->currentPoly.polyParams = 0x001F00C0; + gx->nextPoly.polyParams = 0x001F00C0; gx->dmaSource = -1; }