Moved the call to display_run to advance_cycle.

This fixes games with delicate timings such as X/Ekkusu, that expect STAT to change *during* an opcode.
This commit is contained in:
Lior Halphon 2016-04-02 19:15:07 +03:00
parent 0787e5b271
commit af7309b98d
2 changed files with 2 additions and 1 deletions

View File

@ -404,7 +404,6 @@ void gb_run(GB_gameboy_t *gb)
update_joyp(gb);
debugger_run(gb);
cpu_run(gb);
display_run(gb);
}
void gb_set_pixels_output(GB_gameboy_t *gb, uint32_t *output)

View File

@ -1,6 +1,7 @@
#include "gb.h"
#include "timing.h"
#include "memory.h"
#include "display.h"
void advance_cycles(GB_gameboy_t *gb, unsigned char cycles)
{
@ -25,6 +26,7 @@ void advance_cycles(GB_gameboy_t *gb, unsigned char cycles)
hdma_run(gb);
timers_run(gb);
apu_run(gb);
display_run(gb);
}
void timers_run(GB_gameboy_t *gb)