all repos — mgba @ 2aa8716cc95d380adcfa83131ad4d2aa3e071eaa

mGBA Game Boy Advance Emulator

GBA Video: Start timing mid-scanline when skipping BIOS
Vicki Pfau vi@endrift.com
Sun, 27 May 2018 15:00:21 -0700
commit

2aa8716cc95d380adcfa83131ad4d2aa3e071eaa

parent

38228e99356b48f36fef6e693c5e0bd8255d4f31

2 files changed, 5 insertions(+), 2 deletions(-)

jump to
M CHANGESCHANGES

@@ -33,6 +33,7 @@ - GBA Timer: Fix timers sometimes being late (fixes mgba.io/i/1012)

- 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)
M src/gba/video.csrc/gba/video.c

@@ -78,16 +78,18 @@ video->event.priority = 8;

} 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;