diff options
Diffstat (limited to 'apps/plugins/rockboy/cpuregs.h')
-rw-r--r-- | apps/plugins/rockboy/cpuregs.h | 56 |
1 files changed, 56 insertions, 0 deletions
diff --git a/apps/plugins/rockboy/cpuregs.h b/apps/plugins/rockboy/cpuregs.h new file mode 100644 index 0000000000..0d09908cc3 --- /dev/null +++ b/apps/plugins/rockboy/cpuregs.h | |||
@@ -0,0 +1,56 @@ | |||
1 | |||
2 | |||
3 | #ifndef __CPUREGS_H__ | ||
4 | |||
5 | #define __CPUREGS_H__ | ||
6 | |||
7 | |||
8 | |||
9 | #include "defs.h" | ||
10 | #include "cpu.h" | ||
11 | |||
12 | #define LB(r) ((r).b[LO][LO]) | ||
13 | #define HB(r) ((r).b[LO][HI]) | ||
14 | #define W(r) ((r).w[LO]) | ||
15 | #define DW(r) ((r).d) | ||
16 | |||
17 | #define A HB(cpu.af) | ||
18 | #define F LB(cpu.af) | ||
19 | #define B HB(cpu.bc) | ||
20 | #define C LB(cpu.bc) | ||
21 | #define D HB(cpu.de) | ||
22 | #define E LB(cpu.de) | ||
23 | #define H HB(cpu.hl) | ||
24 | #define L LB(cpu.hl) | ||
25 | |||
26 | #define AF W(cpu.af) | ||
27 | #define BC W(cpu.bc) | ||
28 | #define DE W(cpu.de) | ||
29 | #define HL W(cpu.hl) | ||
30 | |||
31 | #define PC W(cpu.pc) | ||
32 | #define SP W(cpu.sp) | ||
33 | |||
34 | #define xAF DW(cpu.af) | ||
35 | #define xBC DW(cpu.bc) | ||
36 | #define xDE DW(cpu.de) | ||
37 | #define xHL DW(cpu.hl) | ||
38 | |||
39 | #define xPC DW(cpu.pc) | ||
40 | #define xSP DW(cpu.sp) | ||
41 | |||
42 | #define IMA cpu.ima | ||
43 | #define IME cpu.ime | ||
44 | #define IF R_IF | ||
45 | #define IE R_IE | ||
46 | |||
47 | #define FZ 0x80 | ||
48 | #define FN 0x40 | ||
49 | #define FH 0x20 | ||
50 | #define FC 0x10 | ||
51 | #define FL 0x0F /* low unused portion of flags */ | ||
52 | |||
53 | |||
54 | #endif /* __CPUREGS_H__ */ | ||
55 | |||
56 | |||