mirror of https://github.com/mgba-emu/mgba.git
GB Video: Improved video timings (again)
This commit is contained in:
parent
53bcea6373
commit
b5c350bc5b
1
CHANGES
1
CHANGES
|
@ -117,6 +117,7 @@ Misc:
|
|||
- Core: Move rewind diffing to its own thread
|
||||
- Util: Tune patch-fast extent sizes
|
||||
- Qt: Relax hard dependency on OpenGL
|
||||
- GB Video: Improved video timings
|
||||
|
||||
0.5.2: (2016-12-31)
|
||||
Bugfixes:
|
||||
|
|
|
@ -20,9 +20,9 @@ enum {
|
|||
GB_VIDEO_VERTICAL_TOTAL_PIXELS = 154,
|
||||
|
||||
// TODO: Figure out exact lengths
|
||||
GB_VIDEO_MODE_2_LENGTH = 76,
|
||||
GB_VIDEO_MODE_3_LENGTH_BASE = 171,
|
||||
GB_VIDEO_MODE_0_LENGTH_BASE = 209,
|
||||
GB_VIDEO_MODE_2_LENGTH = 80,
|
||||
GB_VIDEO_MODE_3_LENGTH_BASE = 172,
|
||||
GB_VIDEO_MODE_0_LENGTH_BASE = 204,
|
||||
|
||||
GB_VIDEO_HORIZONTAL_LENGTH = 456,
|
||||
|
||||
|
|
|
@ -215,7 +215,7 @@ void _endMode2(struct mTiming* timing, void* context, uint32_t cyclesLate) {
|
|||
_cleanOAM(video, video->ly);
|
||||
video->x = 0;
|
||||
video->dotClock = timing->masterCycles - cyclesLate;
|
||||
int32_t next = GB_VIDEO_MODE_3_LENGTH_BASE + video->objMax * 11 - (video->p->memory.io[REG_SCX] & 7);
|
||||
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;
|
||||
GBRegisterSTAT oldStat = video->stat;
|
||||
|
@ -245,7 +245,7 @@ void _endMode3(struct mTiming* timing, void* context, uint32_t cyclesLate) {
|
|||
GBUpdateIRQs(video->p);
|
||||
}
|
||||
video->p->memory.io[REG_STAT] = video->stat;
|
||||
int32_t next = GB_VIDEO_MODE_0_LENGTH_BASE - video->objMax * 11;
|
||||
int32_t next = GB_VIDEO_MODE_0_LENGTH_BASE - video->objMax * 6;
|
||||
mTimingSchedule(timing, &video->modeEvent, (next << video->p->doubleSpeed) - cyclesLate);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue