summaryrefslogtreecommitdiff
path: root/apps/plugins/rockboy/cpuregs.h
diff options
context:
space:
mode:
authorMichiel Van Der Kolk <not.valid@email.address>2005-03-03 19:44:02 +0000
committerMichiel Van Der Kolk <not.valid@email.address>2005-03-03 19:44:02 +0000
commit3921e1aa6979163c2a07122dff49f6afef977a94 (patch)
tree9fc5cc461759e012a3fb6eecf55874a29a9eaebf /apps/plugins/rockboy/cpuregs.h
parent708e357a6351045f450be4ad28823463be161b6d (diff)
Added dynarec(under construction) and outline for lcd modes
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@6119 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/plugins/rockboy/cpuregs.h')
-rw-r--r--apps/plugins/rockboy/cpuregs.h29
1 files changed, 25 insertions, 4 deletions
diff --git a/apps/plugins/rockboy/cpuregs.h b/apps/plugins/rockboy/cpuregs.h
index 0d09908cc3..e4b1426a3e 100644
--- a/apps/plugins/rockboy/cpuregs.h
+++ b/apps/plugins/rockboy/cpuregs.h
@@ -14,6 +14,27 @@
#define W(r) ((r).w[LO])
#define DW(r) ((r).d)
+#ifdef DYNAREC
+#define A LB(cpu.a)
+#define B LB(cpu.b)
+#define C LB(cpu.c)
+#define D LB(cpu.d)
+#define E LB(cpu.e)
+#define F LB(cpu.f)
+#define H HB(cpu.hl)
+#define L LB(cpu.hl)
+
+#define xAF ((A<<8)|F)
+#define xBC ((B<<8)|C)
+#define xDE ((D<<8)|E)
+#define AF ((A<<8)|F)
+#define BC ((B<<8)|C)
+#define DE ((D<<8)|E)
+
+#define HL W(cpu.hl)
+#define xHL DW(cpu.hl)
+
+#else
#define A HB(cpu.af)
#define F LB(cpu.af)
#define B HB(cpu.bc)
@@ -27,15 +48,15 @@
#define BC W(cpu.bc)
#define DE W(cpu.de)
#define HL W(cpu.hl)
-
-#define PC W(cpu.pc)
-#define SP W(cpu.sp)
-
#define xAF DW(cpu.af)
#define xBC DW(cpu.bc)
#define xDE DW(cpu.de)
#define xHL DW(cpu.hl)
+#endif
+#define PC W(cpu.pc)
+#define SP W(cpu.sp)
+
#define xPC DW(cpu.pc)
#define xSP DW(cpu.sp)