GBA Video: Remove lastHblank, as it is implied
Jeffrey Pfau jeffrey@endrift.com
Mon, 05 Oct 2015 19:21:21 -0700
3 files changed,
3 insertions(+),
7 deletions(-)
M
CHANGES
→
CHANGES
@@ -36,6 +36,7 @@ - Qt: Dropping multiplayer windows works more cleanly now
- GBA BIOS: Implement RegisterRamReset for SIO registers - GBA: Additional savestate sanity checks - All: Reset next event to cycles instead of zero to interrupt + - GBA Video: Remove lastHblank, as it is implied 0.3.0: (2015-08-16) Features:
M
src/gba/video.c
→
src/gba/video.c
@@ -71,7 +71,6 @@ video->vcount = 0x7E;
} video->p->memory.io[REG_VCOUNT >> 1] = video->vcount; - video->lastHblank = 0; video->nextHblank = VIDEO_HDRAW_LENGTH; video->nextEvent = video->nextHblank; video->eventDiff = 0;@@ -120,7 +119,6 @@ video->nextEvent -= cycles;
video->eventDiff += cycles; if (video->nextEvent <= 0) { int32_t lastEvent = video->nextEvent; - video->lastHblank -= video->eventDiff; video->nextHblank -= video->eventDiff; video->nextHblankIRQ -= video->eventDiff; video->nextVcounterIRQ -= video->eventDiff;@@ -178,8 +176,7 @@ }
} else { // Begin Hblank dispstat = GBARegisterDISPSTATFillInHblank(dispstat); - video->lastHblank = video->nextHblank; - video->nextEvent = video->lastHblank + VIDEO_HBLANK_LENGTH; + video->nextEvent = video->nextHblank + VIDEO_HBLANK_LENGTH; video->nextHblank = video->nextEvent + VIDEO_HDRAW_LENGTH; video->nextHblankIRQ = video->nextHblank;@@ -278,7 +275,7 @@ memcpy(state->oam, video->oam.raw, SIZE_OAM);
memcpy(state->pram, video->palette, SIZE_PALETTE_RAM); state->video.nextEvent = video->nextEvent; state->video.eventDiff = video->eventDiff; - state->video.lastHblank = video->lastHblank; + state->video.lastHblank = video->nextHblank - VIDEO_HBLANK_LENGTH; state->video.nextHblank = video->nextHblank; state->video.nextHblankIRQ = video->nextHblankIRQ; state->video.nextVblankIRQ = video->nextVblankIRQ;@@ -300,7 +297,6 @@ GBAStore16(video->p->cpu, BASE_PALETTE_RAM | i, value, 0);
} video->nextEvent = state->video.nextEvent; video->eventDiff = state->video.eventDiff; - video->lastHblank = state->video.lastHblank; video->nextHblank = state->video.nextHblank; video->nextHblankIRQ = state->video.nextHblankIRQ; video->nextVblankIRQ = state->video.nextVblankIRQ;
M
src/gba/video.h
→
src/gba/video.h
@@ -185,7 +185,6 @@
// VCOUNT int vcount; - int32_t lastHblank; int32_t nextHblank; int32_t nextEvent; int32_t eventDiff;