summaryrefslogtreecommitdiff
path: root/includes/mips.h
diff options
context:
space:
mode:
Diffstat (limited to 'includes/mips.h')
-rw-r--r--includes/mips.h57
1 files changed, 11 insertions, 46 deletions
diff --git a/includes/mips.h b/includes/mips.h
index 814120f..8ace76f 100644
--- a/includes/mips.h
+++ b/includes/mips.h
@@ -1,53 +1,18 @@
#ifndef __MIPS_H__
#define __MIPS_H__
-#include <Exceptions.h>
-#include <generic.h>
-#include <Handle.h>
-class mips : public Base {
- public:
- Uint8 Read8(Uint32);
- Uint16 Read16(Uint32);
- Uint32 Read32(Uint32);
- void Write8(Uint32, Uint8);
- void Write16(Uint32, Uint16);
- void Write32(Uint32, Uint32);
- void unpatch8(Uint32);
- void unpatch16(Uint32);
- void unpatch32(Uint32);
- bool IsPatched(Uint32);
- void LoadPSYQ(Handle *);
- void SavePSYQ(Handle *);
- Uint32 GetPC();
- void disassemble(Uint32);
- private:
- void patch(Uint32, int);
- void unpatch(Uint32, int);
- Uint8 psyqhead[0x800];
- Uint8 plainmemory[0x200000];
- Uint8 patches[0x200000];
- Uint8 patchesmap[0x200000 / 8];
- Uint32 paddr, psize, startpc;
-
- struct psyq {
- Uint8 id[8];
- Uint32 text, data, pc0, gp0, t_addr, t_size;
- Uint32 d_addr, d_size, b_addr, b_size, s_addr, s_size;
- Uint32 sp, fp, gp, ra, s0;
- };
-};
+#include "mipsdis.h"
+
+void decode(TDis * d, Uint32 pc);
-class TDis : public Base {
- public:
- TDis(Uint32);
- void setInstruction(String);
- void setAddress(Uint32);
- void addArgReg(int);
- void addArgImm(Uint32);
- void addArgRelative(Uint32);
- void addArgAbsolute(Uint32);
- private:
- Uint32 pc;
+enum registers {
+ Rzr, Rat, Rv0, Rv1, Ra0, Ra1, Ra2, Ra3,
+ Rt0, Rt1, Rt2, Rt3, Rt4, Rt5, Rt6, Rt7,
+ Rs0, Rs1, Rs2, Rs3, Rs4, Rs5, Rs6, Rs7,
+ Rt8, Rt9, Rk0, Rk1, Rgp, Rsp, Rfp, Rra,
};
+extern char * registers[];
+extern char * CP0registers[];
+
#endif