2017-08-24 14:24:34 +00:00
|
|
|
struct Player : Thread {
|
|
|
|
static auto Enter() -> void;
|
|
|
|
auto main() -> void;
|
|
|
|
auto step(uint clocks) -> void;
|
|
|
|
|
|
|
|
auto power() -> void;
|
|
|
|
auto frame() -> void;
|
|
|
|
|
|
|
|
auto keyinput() -> maybe<uint16>;
|
|
|
|
auto read() -> maybe<uint32>;
|
|
|
|
auto write(uint2 addr, uint8 byte) -> void;
|
|
|
|
|
|
|
|
auto serialize(serializer& s) -> void;
|
|
|
|
|
|
|
|
private:
|
2013-12-20 11:40:39 +00:00
|
|
|
struct Status {
|
|
|
|
bool enable;
|
|
|
|
bool rumble;
|
|
|
|
|
|
|
|
bool logoDetected;
|
2015-11-16 08:38:05 +00:00
|
|
|
uint logoCounter;
|
2013-12-20 11:40:39 +00:00
|
|
|
|
2015-11-16 08:38:05 +00:00
|
|
|
uint packet;
|
2013-12-20 11:40:39 +00:00
|
|
|
uint32 send;
|
|
|
|
uint32 recv;
|
|
|
|
|
2017-08-24 14:24:34 +00:00
|
|
|
uint timeout;
|
|
|
|
} status;
|
2013-12-20 11:40:39 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
extern Player player;
|