mirror of https://github.com/bsnes-emu/bsnes.git
Match the HLE timings to the LLE timings
This commit is contained in:
parent
ea7dec4e88
commit
4f9c8e9374
|
@ -770,12 +770,6 @@ void GB_display_run(GB_gameboy_t *gb, uint8_t cycles)
|
||||||
/* Todo: find out actual access time of SCX */
|
/* Todo: find out actual access time of SCX */
|
||||||
gb->position_in_line = - (gb->io_registers[GB_IO_SCX] & 7) - 8;
|
gb->position_in_line = - (gb->io_registers[GB_IO_SCX] & 7) - 8;
|
||||||
|
|
||||||
// Todo: unverified timing
|
|
||||||
gb->current_lcd_line++;
|
|
||||||
if (gb->icd_hreset_callback) {
|
|
||||||
gb->icd_hreset_callback(gb);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (gb->current_lcd_line == LINES && GB_is_sgb(gb)) {
|
if (gb->current_lcd_line == LINES && GB_is_sgb(gb)) {
|
||||||
display_vblank(gb);
|
display_vblank(gb);
|
||||||
}
|
}
|
||||||
|
@ -915,6 +909,12 @@ void GB_display_run(GB_gameboy_t *gb, uint8_t cycles)
|
||||||
}
|
}
|
||||||
GB_SLEEP(gb, display, 11, LINE_LENGTH - gb->cycles_for_line);
|
GB_SLEEP(gb, display, 11, LINE_LENGTH - gb->cycles_for_line);
|
||||||
gb->mode_for_interrupt = 2;
|
gb->mode_for_interrupt = 2;
|
||||||
|
|
||||||
|
// Todo: unverified timing
|
||||||
|
gb->current_lcd_line++;
|
||||||
|
if (gb->icd_hreset_callback) {
|
||||||
|
gb->icd_hreset_callback(gb);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Lines 144 - 152 */
|
/* Lines 144 - 152 */
|
||||||
|
@ -987,7 +987,7 @@ void GB_display_run(GB_gameboy_t *gb, uint8_t cycles)
|
||||||
gb->window_disabled_while_active = false;
|
gb->window_disabled_while_active = false;
|
||||||
gb->current_line = 0;
|
gb->current_line = 0;
|
||||||
// TODO: not the correct timing
|
// TODO: not the correct timing
|
||||||
gb->current_lcd_line = -1;
|
gb->current_lcd_line = 0;
|
||||||
if (gb->icd_vreset_callback) {
|
if (gb->icd_vreset_callback) {
|
||||||
gb->icd_vreset_callback(gb);
|
gb->icd_vreset_callback(gb);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue