summaryrefslogtreecommitdiff
path: root/apps/plugins/rockboy/hw.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/hw.h
parent48dad47df98bdec632e8930b6a97359dc2c428f5 (diff)
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/hw.h')
-rw-r--r--apps/plugins/rockboy/hw.h47
1 files changed, 47 insertions, 0 deletions
diff --git a/apps/plugins/rockboy/hw.h b/apps/plugins/rockboy/hw.h
new file mode 100644
index 0000000000..d05fb51194
--- /dev/null
+++ b/apps/plugins/rockboy/hw.h
@@ -0,0 +1,47 @@
+
+
+
+#ifndef __HW_H__
+#define __HW_H__
+
+
+#include "defs.h"
+
+
+#define PAD_RIGHT 0x01
+#define PAD_LEFT 0x02
+#define PAD_UP 0x04
+#define PAD_DOWN 0x08
+#define PAD_A 0x10
+#define PAD_B 0x20
+#define PAD_SELECT 0x40
+#define PAD_START 0x80
+
+#define IF_VBLANK 0x01
+#define IF_STAT 0x02
+#define IF_TIMER 0x04
+#define IF_SERIAL 0x08
+#define IF_PAD 0x10
+
+struct hw
+{
+ byte ilines;
+ byte pad;
+ int hdma;
+ int cgb,gba;
+};
+
+
+extern struct hw hw;
+
+void hw_interrupt(byte i, byte mask);
+void hw_dma(byte b);
+void hw_hdma_cmd(byte c);
+void hw_hdma(void);
+void pad_refresh(void);
+void pad_press(byte k);
+void pad_release(byte k);
+void pad_set(byte k, int st);
+void hw_reset(void);
+
+#endif