2012-05-23 11:27:45 +00:00
|
|
|
struct SharpRTC : Coprocessor {
|
2015-11-14 00:52:51 +00:00
|
|
|
static auto Enter() -> void;
|
2016-02-09 11:51:12 +00:00
|
|
|
auto main() -> void;
|
Update to v074r11 release.
byuu says:
Changelog:
- debugger compiles on all three profiles
- libsnes compiles on all three platforms (no API changes to libsnes)
- memory.cpp : namespace memory removed (wram -> cpu, apuram -> smp,
vram, oam, cgram -> ppu)
- sa1.cpp : namespace memory removed (SA-1 specific functions merged
inline to SA1::bus_read,write)
- GameBoy: added serial link support with interrupts and proper 8192hz
timing, but obviously it acts as if no other GB is connected to it
- GameBoy: added STAT OAM interrupt, and better STAT d1,d0 mode values
- UI: since Qt is dead, I've renamed the config files back to bsnes.cfg
and bsnes-geometry.cfg
- SA1: IRAM was not syncing to CPU on SA-1 side
- PPU/Accuracy and PPU/Performance needed Sprite oam renamed to Sprite
sprite; so that I could add uint8 oam[544]
- makes more sense anyway, OAM = object attribute memory, obj or
sprite are better names for Sprite rendering class
- more cleanup
2011-01-24 09:03:17 +00:00
|
|
|
|
2015-11-14 00:52:51 +00:00
|
|
|
auto init() -> void;
|
|
|
|
auto load() -> void;
|
|
|
|
auto unload() -> void;
|
|
|
|
auto power() -> void;
|
|
|
|
auto reset() -> void;
|
|
|
|
auto sync() -> void;
|
2010-08-09 13:28:56 +00:00
|
|
|
|
2016-02-16 09:32:49 +00:00
|
|
|
auto read(uint24 addr, uint8 data) -> uint8;
|
|
|
|
auto write(uint24 addr, uint8 data) -> void;
|
2010-08-09 13:28:56 +00:00
|
|
|
|
2015-11-14 00:52:51 +00:00
|
|
|
auto serialize(serializer&) -> void;
|
2010-08-09 13:28:56 +00:00
|
|
|
|
2015-11-14 00:52:51 +00:00
|
|
|
enum class State : uint { Ready, Command, Read, Write } rtc_state;
|
|
|
|
int rtc_index;
|
2010-08-09 13:28:56 +00:00
|
|
|
|
2015-11-14 00:52:51 +00:00
|
|
|
uint second;
|
|
|
|
uint minute;
|
|
|
|
uint hour;
|
|
|
|
uint day;
|
|
|
|
uint month;
|
|
|
|
uint year;
|
|
|
|
uint weekday;
|
2012-05-23 11:27:45 +00:00
|
|
|
|
|
|
|
//memory.cpp
|
2015-11-14 00:52:51 +00:00
|
|
|
auto rtc_read(uint4 addr) -> uint4;
|
|
|
|
auto rtc_write(uint4 addr, uint4 data) -> void;
|
2012-05-23 11:27:45 +00:00
|
|
|
|
2015-11-14 00:52:51 +00:00
|
|
|
auto load(const uint8* data) -> void;
|
|
|
|
auto save(uint8* data) -> void;
|
2012-05-23 11:27:45 +00:00
|
|
|
|
|
|
|
//time.cpp
|
2015-11-14 00:52:51 +00:00
|
|
|
static const uint daysinmonth[12];
|
|
|
|
auto tick_second() -> void;
|
|
|
|
auto tick_minute() -> void;
|
|
|
|
auto tick_hour() -> void;
|
|
|
|
auto tick_day() -> void;
|
|
|
|
auto tick_month() -> void;
|
|
|
|
auto tick_year() -> void;
|
|
|
|
|
|
|
|
auto calculate_weekday(uint year, uint month, uint day) -> uint;
|
2010-08-09 13:28:56 +00:00
|
|
|
};
|
|
|
|
|
2012-05-22 12:10:00 +00:00
|
|
|
extern SharpRTC sharprtc;
|