Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
alexbevi
GitHub Repository: alexbevi/BizHawk
Path: blob/master/libsnes/bsnes/snes/system/system.hpp
2 views
1
struct Interface;
2
3
struct System : property<System> {
4
enum class Region : unsigned { NTSC = 0, PAL = 1, Autodetect = 2 };
5
enum class ExpansionPortDevice : unsigned { None = 0, BSX = 1 };
6
7
void run();
8
void runtosave();
9
10
void init();
11
void term();
12
void load();
13
void unload();
14
void power();
15
void reset();
16
17
void frame();
18
void scanline();
19
20
//return *active* system information (settings are cached upon power-on)
21
readonly<Region> region;
22
readonly<ExpansionPortDevice> expansion;
23
readonly<unsigned> cpu_frequency;
24
readonly<unsigned> apu_frequency;
25
readonly<unsigned> serialize_size;
26
27
serializer serialize();
28
bool unserialize(serializer&);
29
30
System();
31
32
private:
33
void runthreadtosave();
34
35
void serialize(serializer&);
36
void serialize_all(serializer&);
37
void serialize_init();
38
39
friend class Cartridge;
40
friend class Video;
41
friend class Audio;
42
friend class Input;
43
};
44
45
#include "video.hpp"
46
#include "audio.hpp"
47
#include "input.hpp"
48
49
#include <snes/config/config.hpp>
50
#include <snes/scheduler/scheduler.hpp>
51
#include <snes/random/random.hpp>
52
53
extern System system;
54
55