Skip to content

Commit

Permalink
GBA Video: Start timing mid-scanline when skipping BIOS
Browse files Browse the repository at this point in the history
  • Loading branch information
endrift committed May 27, 2018
1 parent 38228e9 commit 2aa8716
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGES
Expand Up @@ -33,6 +33,7 @@ Bugfixes:
- GBA Hardware: Fix RTC overriding light sensor (fixes mgba.io/i/1069)
- GBA Savedata: Fix savedata modified time updating when read-only
- GB Video: Fix enabling window when LY > WY (fixes mgba.io/i/409)
- GBA Video: Start timing mid-scanline when skipping BIOS
Misc:
- GBA Timer: Use global cycles for timers
- GBA: Extend oddly-sized ROMs to full address space (fixes mgba.io/i/722)
Expand Down
6 changes: 4 additions & 2 deletions src/gba/video.c
Expand Up @@ -78,16 +78,18 @@ void GBAVideoInit(struct GBAVideo* video) {
}

void GBAVideoReset(struct GBAVideo* video) {
int32_t nextEvent = VIDEO_HDRAW_LENGTH;
if (video->p->memory.fullBios) {
video->vcount = 0;
} else {
// TODO: Verify exact scanline hardware
// TODO: Verify exact scanline on hardware
video->vcount = 0x7E;
nextEvent = 170;
}
video->p->memory.io[REG_VCOUNT >> 1] = video->vcount;

video->event.callback = _startHblank;
mTimingSchedule(&video->p->timing, &video->event, VIDEO_HDRAW_LENGTH);
mTimingSchedule(&video->p->timing, &video->event, nextEvent);

video->frameCounter = 0;
video->frameskipCounter = 0;
Expand Down

0 comments on commit 2aa8716

Please sign in to comment.