Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
alexbevi
GitHub Repository: alexbevi/BizHawk
Path: blob/master/libsnes/bsnes/gameboy/system/system.hpp
2 views
1
class Interface;
2
3
enum class Input : unsigned {
4
Up, Down, Left, Right, B, A, Select, Start,
5
};
6
7
struct System : property<System> {
8
enum class Revision : unsigned {
9
GameBoy,
10
SuperGameBoy,
11
GameBoyColor,
12
};
13
readonly<Revision> revision;
14
inline bool dmg() const { return (Revision)revision == Revision::GameBoy; }
15
inline bool sgb() const { return (Revision)revision == Revision::SuperGameBoy; }
16
inline bool cgb() const { return (Revision)revision == Revision::GameBoyColor; }
17
18
struct BootROM {
19
static const uint8 dmg[ 256];
20
static const uint8 sgb[ 256];
21
static const uint8 cgb[2048];
22
} bootROM;
23
24
void run();
25
void runtosave();
26
void runthreadtosave();
27
28
void init();
29
void load(Revision);
30
void power();
31
32
unsigned clocks_executed;
33
34
//serialization.cpp
35
unsigned serialize_size;
36
37
serializer serialize();
38
bool unserialize(serializer&);
39
40
void serialize(serializer&);
41
void serialize_all(serializer&);
42
void serialize_init();
43
};
44
45
#include <gameboy/interface/interface.hpp>
46
47
extern System system;
48
49