Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
alexbevi
GitHub Repository: alexbevi/BizHawk
Path: blob/master/libsnes/bsnes/snes/smp/smp.hpp
2 views
1
struct SMP : public Processor, public SMPcore {
2
static const uint8 iplrom[64];
3
uint8* apuram; //[64 * 1024];
4
5
enum : bool { Threaded = true };
6
alwaysinline void step(unsigned clocks);
7
alwaysinline void synchronize_cpu();
8
alwaysinline void synchronize_cpu_force();
9
alwaysinline void synchronize_dsp();
10
11
uint8 port_read(uint2 port) const;
12
void port_write(uint2 port, uint8 data);
13
14
void enter();
15
void power();
16
void reset();
17
18
void serialize(serializer&);
19
SMP();
20
~SMP();
21
void initialize();
22
23
privileged:
24
#include "memory/memory.hpp"
25
#include "timing/timing.hpp"
26
27
struct {
28
//timing
29
unsigned clock_counter;
30
unsigned dsp_counter;
31
unsigned timer_step;
32
33
//$00f0
34
uint8 clock_speed;
35
uint8 timer_speed;
36
bool timers_enable;
37
bool ram_disable;
38
bool ram_writable;
39
bool timers_disable;
40
41
//$00f1
42
bool iplrom_enable;
43
44
//$00f2
45
uint8 dsp_addr;
46
47
//$00f8,$00f9
48
uint8 ram00f8;
49
uint8 ram00f9;
50
} status;
51
52
static void Enter();
53
54
friend class SMPcore;
55
56
struct Debugger {
57
hook<void (uint16)> op_exec;
58
hook<void (uint16)> op_read;
59
hook<void (uint16, uint8)> op_write;
60
} debugger;
61
};
62
63
extern SMP smp;
64
65