DS Video: Fix caputre stride

This commit is contained in:
Vicki Pfau 2017-04-12 14:23:13 -07:00
parent 776f008c30
commit 01f6fd47d5
2 changed files with 4 additions and 3 deletions

View File

@ -15,6 +15,7 @@ Bugfixes:
- DS GX: Hack around writing to a full FIFO that has a swap pending (fixes mgba.io/i/608)
- DS Video: Enable overflow bit on extended affine modes
- DS Video: Fix extended mode 0 without extended palettes
- DS Video: Fix caputre stride
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

View File

@ -291,13 +291,13 @@ static void _performCapture(struct DSVideo* video, int y) {
pixel |= (colorA >> 3) & 0x001F;
#endif
pixel |= 0x8000;
STORE_16(pixel, ((x + y * DS_VIDEO_HORIZONTAL_PIXELS) * 2 + base) & 0x1FFFE, vram);
STORE_16(pixel, ((x + y * width) * 2 + base) & 0x1FFFE, vram);
}
break;
case 1:
for (x = 0; x < width; ++x) {
LOAD_16(pixel, ((x + y * DS_VIDEO_HORIZONTAL_PIXELS) * 2 + readBase) & 0x1FFFE, srcB);
STORE_16(pixel, ((x + y * DS_VIDEO_HORIZONTAL_PIXELS) * 2 + base) & 0x1FFFE, vram);
STORE_16(pixel, ((x + y * width) * 2 + base) & 0x1FFFE, vram);
}
break;
case 2:
@ -336,7 +336,7 @@ static void _performCapture(struct DSVideo* video, int y) {
pixel = (pixel & 0x7C1F) | ((pixel >> 16) & 0x03E0);
pixel |= 0x8000;
STORE_16(pixel, ((x + y * DS_VIDEO_HORIZONTAL_PIXELS) * 2 + base) & 0x1FFFE, vram);
STORE_16(pixel, ((x + y * width) * 2 + base) & 0x1FFFE, vram);
}
break;
}