/** * Executes a single step * * @param emu Reference to the emulator structure */ void emulator_tick(emulator_t* emu) { cpu_tick(&emu->cpu); /* When graphics are emulated, we execute a screen refresh after 34ms has * passed (30 frames per second) */ uint32_t frame_time = 20; if (emu->graphics) { uint64_t now = emulator_get_time(); if ((now - emu->last_refresh) > frame_time) { fb_tick(&emu->fb); emu->last_refresh = now; } } }
void frame_tick_task(void *param) { for (;;) { fb_tick(fb_default()); } }