2011-01-04 10:42:27 +00:00
|
|
|
struct MBC3 : MMIO {
|
2015-11-21 07:36:48 +00:00
|
|
|
auto second() -> void;
|
2016-06-28 10:43:47 +00:00
|
|
|
auto readIO(uint16 addr) -> uint8;
|
|
|
|
auto writeIO(uint16 addr, uint8 data) -> void;
|
2015-11-21 07:36:48 +00:00
|
|
|
auto power() -> void;
|
|
|
|
|
2016-06-28 10:43:47 +00:00
|
|
|
struct ROM {
|
|
|
|
uint8 select;
|
|
|
|
} rom;
|
|
|
|
struct RAM {
|
|
|
|
bool enable;
|
|
|
|
uint8 select;
|
|
|
|
} ram;
|
|
|
|
struct RTC {
|
|
|
|
bool latch;
|
2011-01-04 10:42:27 +00:00
|
|
|
|
2016-06-28 10:43:47 +00:00
|
|
|
bool halt;
|
|
|
|
uint second;
|
|
|
|
uint minute;
|
|
|
|
uint hour;
|
|
|
|
uint day;
|
|
|
|
bool dayCarry;
|
2011-01-04 10:42:27 +00:00
|
|
|
|
2016-06-28 10:43:47 +00:00
|
|
|
uint latchSecond;
|
|
|
|
uint latchMinute;
|
|
|
|
uint latchHour;
|
|
|
|
uint latchDay;
|
|
|
|
uint latchDayCarry;
|
|
|
|
} rtc;
|
2011-01-04 10:42:27 +00:00
|
|
|
} mbc3;
|