Permalink
Browse files
DS GX: Fix bitmap textures when no palette is mapped (fixes #628)
- Loading branch information...
Showing
with
3 additions
and
2 deletions.
-
+1
−0
CHANGES
-
+2
−2
src/ds/gx/software.c
|
|
@@ -17,6 +17,7 @@ Bugfixes: |
|
|
- DS Video: Fix extended mode 0 without extended palettes
|
|
|
- DS Video: Fix caputre stride
|
|
|
- DS Video: Fix affine transformations in video capture
|
|
|
+ - DS GX: Fix bitmap textures when no palette is mapped (fixes mgba.io/i/628)
|
|
|
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
|
|
|
|
|
|
@@ -458,18 +458,18 @@ static void _preparePoly(struct DSGXRenderer* renderer, struct DSGXVertex* verts |
|
|
poly->texBase = NULL;
|
|
|
poly->palBase = NULL;
|
|
|
if (renderer->tex[DSGXTexParamsGetVRAMBase(poly->texParams) >> VRAM_BLOCK_OFFSET]) {
|
|
|
+ poly->texBase = &renderer->tex[DSGXTexParamsGetVRAMBase(poly->poly->texParams) >> VRAM_BLOCK_OFFSET][(DSGXTexParamsGetVRAMBase(poly->poly->texParams) << 2) & 0xFFFF];
|
|
|
switch (poly->texFormat) {
|
|
|
case 0:
|
|
|
+ poly->texBase = NULL;
|
|
|
break;
|
|
|
case 2:
|
|
|
if (renderer->texPal[poly->poly->palBase >> 11]) {
|
|
|
- poly->texBase = &renderer->tex[DSGXTexParamsGetVRAMBase(poly->poly->texParams) >> VRAM_BLOCK_OFFSET][(DSGXTexParamsGetVRAMBase(poly->poly->texParams) << 2) & 0xFFFF];
|
|
|
poly->palBase = &renderer->texPal[poly->poly->palBase >> 11][(poly->poly->palBase << 2) & 0x1FFF];
|
|
|
}
|
|
|
break;
|
|
|
default:
|
|
|
if (renderer->texPal[poly->poly->palBase >> 10]) {
|
|
|
- poly->texBase = &renderer->tex[DSGXTexParamsGetVRAMBase(poly->poly->texParams) >> VRAM_BLOCK_OFFSET][(DSGXTexParamsGetVRAMBase(poly->poly->texParams) << 2) & 0xFFFF];
|
|
|
poly->palBase = &renderer->texPal[poly->poly->palBase >> 10][(poly->poly->palBase << 3) & 0x1FFF];
|
|
|
}
|
|
|
break;
|
|
|
|
0 comments on commit
b80e06f