2016-03-30 23:07:55 +03:00
|
|
|
#ifndef timing_h
|
|
|
|
#define timing_h
|
|
|
|
#include "gb.h"
|
|
|
|
|
2017-04-17 20:16:17 +03:00
|
|
|
#ifdef GB_INTERNAL
|
2016-06-18 20:29:11 +03:00
|
|
|
void GB_advance_cycles(GB_gameboy_t *gb, uint8_t cycles);
|
2016-08-05 17:22:12 +03:00
|
|
|
void GB_set_internal_div_counter(GB_gameboy_t *gb, uint32_t value);
|
2016-07-18 00:39:43 +03:00
|
|
|
void GB_rtc_run(GB_gameboy_t *gb);
|
2016-08-05 17:22:12 +03:00
|
|
|
void GB_emulate_timer_glitch(GB_gameboy_t *gb, uint8_t old_tac, uint8_t new_tac);
|
2017-04-21 16:00:53 +03:00
|
|
|
bool GB_timing_sync_turbo(GB_gameboy_t *gb); /* Returns true if should skip frame */
|
|
|
|
void GB_timing_sync(GB_gameboy_t *gb);
|
|
|
|
|
2017-04-17 20:16:17 +03:00
|
|
|
|
|
|
|
enum {
|
|
|
|
GB_TIMA_RUNNING = 0,
|
|
|
|
GB_TIMA_RELOADING = 1,
|
|
|
|
GB_TIMA_RELOADED = 2
|
|
|
|
};
|
|
|
|
#endif
|
|
|
|
|
2016-03-30 23:07:55 +03:00
|
|
|
#endif /* timing_h */
|