Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
alexbevi
GitHub Repository: alexbevi/BizHawk
Path: blob/master/libsnes/bsnes/snes/snes.hpp
2 views
1
#ifndef SNES_HPP
2
#define SNES_HPP
3
4
#include <base/base.hpp>
5
6
namespace SNES {
7
namespace Info {
8
static const char Name[] = "bsnes";
9
static const unsigned SerializerVersion = 23;
10
}
11
}
12
13
/*
14
bsnes - SNES emulator
15
author: byuu
16
license: GPLv3
17
project started: 2004-10-14
18
*/
19
20
#include <libco/libco.h>
21
22
#if defined(GAMEBOY)
23
#include <gameboy/gameboy.hpp>
24
#endif
25
26
namespace SNES {
27
struct Processor {
28
cothread_t thread;
29
unsigned frequency;
30
int64 clock;
31
32
inline void create(void (*entrypoint)(), unsigned frequency) {
33
if(thread) co_delete(thread);
34
thread = co_create(65536 * sizeof(void*), entrypoint);
35
this->frequency = frequency;
36
clock = 0;
37
}
38
39
inline void serialize(serializer &s) {
40
s.integer(frequency);
41
s.integer(clock);
42
}
43
44
inline Processor() : thread(nullptr) {
45
}
46
47
inline ~Processor() {
48
if(thread) co_delete(thread);
49
}
50
};
51
52
#include <snes/memory/memory.hpp>
53
#include <snes/cpu/core/core.hpp>
54
#include <snes/smp/core/core.hpp>
55
#include <snes/ppu/counter/counter.hpp>
56
57
#if defined(PROFILE_ACCURACY)
58
#include "profile-accuracy.hpp"
59
#elif defined(PROFILE_COMPATIBILITY)
60
#include "profile-compatibility.hpp"
61
#elif defined(PROFILE_PERFORMANCE)
62
#include "profile-performance.hpp"
63
#endif
64
65
#include <snes/controller/controller.hpp>
66
#include <snes/system/system.hpp>
67
#include <snes/chip/chip.hpp>
68
#include <snes/cartridge/cartridge.hpp>
69
#include <snes/cheat/cheat.hpp>
70
#include <snes/interface/interface.hpp>
71
72
#include <snes/memory/memory-inline.hpp>
73
#include <snes/ppu/counter/counter-inline.hpp>
74
}
75
76
#endif
77
78