mirror of https://github.com/mgba-emu/mgba.git
DS Video: Enable overflow bit on extended affine modes
This commit is contained in:
parent
8b4df520e2
commit
cb0f95b070
1
CHANGES
1
CHANGES
|
@ -13,6 +13,7 @@ Bugfixes:
|
|||
- DS GX: Reset polygon attributes between buffer swaps
|
||||
- DS Video: Fix blend bit on windows for 3D layer (fixes mgba.io/i/611)
|
||||
- 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
|
||||
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
|
||||
|
|
|
@ -743,6 +743,20 @@ void DSVideoSoftwareRendererDrawBackgroundExt0(struct GBAVideoSoftwareRenderer*
|
|||
}
|
||||
}
|
||||
|
||||
#define DS_BACKGROUND_BITMAP_ITERATE(W, H) \
|
||||
x += background->dx; \
|
||||
y += background->dy; \
|
||||
\
|
||||
if (background->overflow) { \
|
||||
localX = x & ((W << 8) - 1); \
|
||||
localY = y & ((H << 8) - 1); \
|
||||
} else if (x < 0 || y < 0 || (x >> 8) >= W || (y >> 8) >= H) { \
|
||||
continue; \
|
||||
} else { \
|
||||
localX = x; \
|
||||
localY = y; \
|
||||
}
|
||||
|
||||
void DSVideoSoftwareRendererDrawBackgroundExt1(struct GBAVideoSoftwareRenderer* renderer, struct GBAVideoSoftwareBackground* background, int inY) {
|
||||
BACKGROUND_BITMAP_INIT;
|
||||
|
||||
|
@ -770,7 +784,7 @@ void DSVideoSoftwareRendererDrawBackgroundExt1(struct GBAVideoSoftwareRenderer*
|
|||
|
||||
int outX;
|
||||
for (outX = renderer->start; outX < renderer->end; ++outX) {
|
||||
BACKGROUND_BITMAP_ITERATE(width, height);
|
||||
DS_BACKGROUND_BITMAP_ITERATE(width, height);
|
||||
|
||||
if (!mosaicWait) {
|
||||
uint32_t address = (localX >> 8) + (localY >> 8) * width + screenBase;
|
||||
|
@ -827,7 +841,7 @@ void DSVideoSoftwareRendererDrawBackgroundExt2(struct GBAVideoSoftwareRenderer*
|
|||
|
||||
int outX;
|
||||
for (outX = renderer->start; outX < renderer->end; ++outX) {
|
||||
BACKGROUND_BITMAP_ITERATE(width, height);
|
||||
DS_BACKGROUND_BITMAP_ITERATE(width, height);
|
||||
|
||||
if (!mosaicWait) {
|
||||
uint32_t address = ((localX >> 8) + (localY >> 8) * width + screenBase) << 1;
|
||||
|
|
Loading…
Reference in New Issue