Loading files
This file is pinned to the selected release. Download the original to open it in your design tool.
36797ad4cThis file is pinned to the selected release. Download the original to open it in your design tool.
#pragma once
#include <stdint.h>
struct Req;
struct Ack;
struct Dumper;
//-----------------------------------------------------------------------------
struct MetroBoyTimer {
void reset();
void tick(int phase_total, const Req& req, Ack& ack);
void tock(int phase_total, const Req& req);
void dump(Dumper& dump) const;
void update_tima();
uint16_t div = 0;
uint8_t tima = 0;
uint8_t tma = 0;
uint8_t tac = 0;
bool tima_clk = 0;
bool tima_7_sync = 0;
bool timer_int = 0;
};
//-----------------------------------------------------------------------------