all repos — mgba @ 6c0d67cf5f86684e971e673000cfa4338563d5dc

mGBA Game Boy Advance Emulator

GB Video: Fix dot clock timing being slightly wrong
Vicki Pfau vi@endrift.com
Tue, 25 Jul 2017 13:46:24 -0700
commit

6c0d67cf5f86684e971e673000cfa4338563d5dc

parent

1a30dcc5537a4263209f0f5c088be6c02b593c72

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

jump to
M CHANGESCHANGES

@@ -7,6 +7,7 @@ - Python: Fix importing .gb or .gba before .core

- GBA: Reset active region as needed when loading a ROM - Qt: Fix command line debugger closing second game - GB Serialize: Fix audio state loading + - GB Video: Fix dot clock timing being slightly wrong Misc: - GBA Timer: Use global cycles for timers - GBA: Extend oddly-sized ROMs to full address space (fixes mgba.io/i/722)
M src/gb/video.csrc/gb/video.c

@@ -211,7 +211,7 @@ void _endMode2(struct mTiming* timing, void* context, uint32_t cyclesLate) {

struct GBVideo* video = context; _cleanOAM(video, video->ly); video->x = 0; - video->dotClock = timing->masterCycles - cyclesLate; + video->dotClock = mTimingCurrentTime(timing) - cyclesLate; int32_t next = GB_VIDEO_MODE_3_LENGTH_BASE + video->objMax * 6 - (video->p->memory.io[REG_SCX] & 7); video->mode = 3; video->modeEvent.callback = _endMode3;