-
Notifications
You must be signed in to change notification settings - Fork 0
/
ProcessorDebug.h
39 lines (32 loc) · 943 Bytes
/
ProcessorDebug.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#ifndef GBEMU_PROCESSOR_DEBUG_H
#define GBEMU_PROCESSOR_DEBUG_H
#include <string>
#include "Processor.cpp"
class ProcessorDebug : public Processor{
public:
int instructionCount;
Memory lastMem;
Register lastReg;
const std::string opcode_description_table [0x100] = {TABLE_OPCODE_DESCRIPTION};
const std::string opcode_description_table_CB [0x100] = {TABLE_OPCODE_DESCRIPTION_CB};
ProcessorDebug(Memory& _mem) : Processor(_mem){
lastMem;
lastReg;
instructionCount = 0;
}
void loadMem(std::string rom);
void run();
void debugTick();
void printFlags();
void printOperandValues(byte opcode, byte op1Type, byte op2Type);
void saveState();
void compareMem();
void compareReg();
void compareRegPtr(); // BANG
// compares both the current memory and register values with those stored by the last saveState() function
inline void compareStates(){
compareReg();
compareMem();
}
};
#endif