ragb/include/gb.h
2024-10-14 16:44:06 +02:00

34 lines
576 B
C

#ifndef GB_H
#define GB_H
#include <r_io.h>
enum {
GB_TIMERS_DIV = 0,
GB_TIMERS_TIMA,
GB_TIMERS_TMA,
GB_TIMERS_TAC,
};
typedef struct gb_timers_t {
ut64 seek;
ut32 fd;
ut16 odiv;
ut16 div;
ut8 buf[4];
ut8 otma;
st8 tima_wait;
bool check_fedge;
} GBTimers;
GBTimers *gb_timers_open(RIO *io);
void gb_timers_close(RIO *io, GBTimers *timers);
void gb_timers_update(GBTimers *timers, ut32 cycles);
//int gb_mbc1_open(RIO *io, char *path);
extern RIOPlugin r_io_plugin_gb_timers;
extern RIOPlugin r_io_plugin_gb_mbc1;
extern RIOPlugin r_io_plugin_gb_mbc2;
#endif