all repos — mgba @ 82c06bb42e7874bfc658a58d4a12be8230ac055d

mGBA Game Boy Advance Emulator

DS Video: Use separate value for maximum sprite cycles (fixes #624)
Vicki Pfau vi@endrift.com
Wed, 05 Aug 2020 01:51:47 -0700
commit

82c06bb42e7874bfc658a58d4a12be8230ac055d

parent

ef9081da7e5dfcb108887b0deb17e89a9610430b

3 files changed, 3 insertions(+), 1 deletions(-)

jump to
M CHANGESCHANGES

@@ -23,6 +23,7 @@ - DS: Properly close save file on close

- DS Video: Fix size of VRAM zeroes buffer - DS GX: Fix depth test scaling - DS GX: Fix overflow causing a division crash + - DS Video: Use separate value for maximum sprite cycles (fixes mgba.io/i/624) Misc: - ARM: Add F-block instruction decoding - DS GX: Clean up and unify texture mapping
M src/ds/renderers/software.csrc/ds/renderers/software.c

@@ -400,6 +400,7 @@ return;

} GBAVideoSoftwareRendererPreprocessBuffer(softwareRenderer, y); + softwareRenderer->spriteCyclesRemaining = 1530; // TODO: Figure out the actual value; this value is just a fudge factor for now int spriteLayers = GBAVideoSoftwareRendererPreprocessSpriteLayer(softwareRenderer, y); memset(softwareRenderer->alphaA, softwareRenderer->blda, sizeof(softwareRenderer->alphaA)); memset(softwareRenderer->alphaB, softwareRenderer->bldb, sizeof(softwareRenderer->alphaB));
M src/gba/renderers/video-software.csrc/gba/renderers/video-software.c

@@ -582,6 +582,7 @@ softwareRenderer->d.vramOBJ[0] = NULL; // OBJ VRAM bottom is blocked in bitmap modes

} GBAVideoSoftwareRendererPreprocessBuffer(softwareRenderer, y); + softwareRenderer->spriteCyclesRemaining = GBARegisterDISPCNTIsHblankIntervalFree(softwareRenderer->dispcnt) ? OBJ_HBLANK_FREE_LENGTH : OBJ_LENGTH; int spriteLayers = GBAVideoSoftwareRendererPreprocessSpriteLayer(softwareRenderer, y); softwareRenderer->d.vramOBJ[0] = objVramBase; if (softwareRenderer->lastHighlightAmount != softwareRenderer->d.highlightAmount) {

@@ -959,7 +960,6 @@ if (renderer->oamDirty) {

renderer->oamMax = GBAVideoRendererCleanOAM(renderer->d.oam->obj, renderer->sprites, renderer->objOffsetY, renderer->masterHeight, renderer->combinedObjSort); renderer->oamDirty = false; } - renderer->spriteCyclesRemaining = GBARegisterDISPCNTIsHblankIntervalFree(renderer->dispcnt) ? OBJ_HBLANK_FREE_LENGTH : OBJ_LENGTH; int mosaicV = GBAMosaicControlGetObjV(renderer->mosaic) + 1; int mosaicY = y - (y % mosaicV); int i;