summaryrefslogtreecommitdiff
path: root/apps/plugins/rockboy/cpu.h
diff options
context:
space:
mode:
authorJens Arnold <amiconn@rockbox.org>2005-03-02 23:49:38 +0000
committerJens Arnold <amiconn@rockbox.org>2005-03-02 23:49:38 +0000
commit384de102469fee4e0792df8fe38586d3206774ed (patch)
treeee5342103e17738acfb8421328ea7c57433f55e6 /apps/plugins/rockboy/cpu.h
parent48dad47df98bdec632e8930b6a97359dc2c428f5 (diff)
downloadrockbox-384de102469fee4e0792df8fe38586d3206774ed.zip
rockbox-384de102469fee4e0792df8fe38586d3206774ed.tar.gz
rockbox-384de102469fee4e0792df8fe38586d3206774ed.tar.bz2
rockbox-384de102469fee4e0792df8fe38586d3206774ed.tar.xz
Rockboy - gameboy emulation for rockbox, based on gnuboy. Still a bit early, but already playable on iRiver H1xx and the simulators. The archos recorder version is currently rather slow...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@6104 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/plugins/rockboy/cpu.h')
-rw-r--r--apps/plugins/rockboy/cpu.h41
1 files changed, 41 insertions, 0 deletions
diff --git a/apps/plugins/rockboy/cpu.h b/apps/plugins/rockboy/cpu.h
new file mode 100644
index 0000000..22d58b0
--- /dev/null
+++ b/apps/plugins/rockboy/cpu.h
@@ -0,0 +1,41 @@
+
+
+#ifndef __CPU_H__
+#define __CPU_H__
+
+
+
+#include "defs.h"
+
+
+union reg
+{
+ byte b[2][2];
+ word w[2];
+ un32 d; /* padding for alignment, carry */
+};
+
+struct cpu
+{
+ union reg pc, sp, bc, de, hl, af;
+ int ime, ima;
+ int speed;
+ int halt;
+ int div, tim;
+ int lcdc;
+ int snd;
+};
+
+extern struct cpu cpu;
+
+
+void cpu_reset(void);
+void div_advance(int cnt);
+void timer_advance(int cnt);
+void lcdc_advance(int cnt);
+void sound_advance(int cnt);
+void cpu_timers(int cnt);
+int cpu_emulate(int cycles);
+
+
+#endif