GBA: Improve timing when not booting from BIOS

This commit is contained in:
Vicki Pfau 2021-06-28 13:35:04 -07:00
parent 7dce4be2e2
commit 6c6d498817
3 changed files with 6 additions and 3 deletions

View File

@ -11,6 +11,7 @@ Features:
Emulation fixes:
- GB Memory: Add cursory cartridge open bus emulation (fixes mgba.io/i/2032)
- GB Video: Clear VRAM on reset (fixes mgba.io/i/2152)
- GBA: Improve timing when not booting from BIOS
- GBA SIO: Add missing NORMAL8 implementation bits (fixes mgba.io/i/2172)
- GBA SIO: Fix missing interrupt on an unattached NORMAL transfer
- GBA SIO: Fix SI value for unattached MULTI mode

View File

@ -265,8 +265,10 @@ void GBASkipBIOS(struct GBA* gba) {
} else {
cpu->gprs[ARM_PC] = BASE_WORKING_RAM + 0xC0;
}
gba->video.vcount = 0x7D;
gba->memory.io[REG_VCOUNT >> 1] = 0x7D;
gba->video.vcount = 0x7E;
gba->memory.io[REG_VCOUNT >> 1] = 0x7E;
mTimingDeschedule(&gba->timing, &gba->video.event);
mTimingSchedule(&gba->timing, &gba->video.event, 117);
gba->memory.io[REG_POSTFLG >> 1] = 1;
ARMWritePC(cpu);
}

View File

@ -70,7 +70,7 @@ void GBAVideoReset(struct GBAVideo* video) {
} else {
// TODO: Verify exact scanline on hardware
video->vcount = 0x7E;
nextEvent = 170;
nextEvent = 117;
}
video->p->memory.io[REG_VCOUNT >> 1] = video->vcount;