Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
alexbevi
GitHub Repository: alexbevi/BizHawk
Path: blob/master/libsnes/bsnes/snes/chip/necdsp/necdsp.hpp
2 views
1
//NEC uPD7725
2
//NEC uPD96050
3
4
class NECDSP : public Coprocessor {
5
public:
6
enum class Revision : unsigned { uPD7725, uPD96050 } revision;
7
8
#include "registers.hpp"
9
10
//zero 01-sep-2014 - dont clobber these when reconstructing!
11
static unsigned frequency;
12
static uint24 programROM[16384];
13
static uint16 dataROM[2048];
14
static unsigned programROMSize;
15
static unsigned dataROMSize;
16
17
unsigned dataRAMSize;
18
uint16 dataRAM[2048];
19
20
static void Enter();
21
void enter();
22
23
void exec_op(uint24 opcode);
24
void exec_rt(uint24 opcode);
25
void exec_jp(uint24 opcode);
26
void exec_ld(uint24 opcode);
27
28
string disassemble(uint14 ip);
29
30
uint8 sr_read(unsigned);
31
void sr_write(unsigned, uint8 data);
32
33
uint8 dr_read(unsigned);
34
void dr_write(unsigned, uint8 data);
35
36
uint8 dp_read(unsigned addr);
37
void dp_write(unsigned addr, uint8 data);
38
39
void init();
40
void load();
41
void unload();
42
void power();
43
void reset();
44
45
void serialize(serializer&);
46
NECDSP();
47
~NECDSP();
48
};
49
50
extern NECDSP necdsp;
51
52