summaryrefslogtreecommitdiff
path: root/apps/plugins/rockboy/hw.h
diff options
context:
space:
mode:
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 @@
1
2
3
4#ifndef __HW_H__
5#define __HW_H__
6
7
8#include "defs.h"
9
10
11#define PAD_RIGHT 0x01
12#define PAD_LEFT 0x02
13#define PAD_UP 0x04
14#define PAD_DOWN 0x08
15#define PAD_A 0x10
16#define PAD_B 0x20
17#define PAD_SELECT 0x40
18#define PAD_START 0x80
19
20#define IF_VBLANK 0x01
21#define IF_STAT 0x02
22#define IF_TIMER 0x04
23#define IF_SERIAL 0x08
24#define IF_PAD 0x10
25
26struct hw
27{
28 byte ilines;
29 byte pad;
30 int hdma;
31 int cgb,gba;
32};
33
34
35extern struct hw hw;
36
37void hw_interrupt(byte i, byte mask);
38void hw_dma(byte b);
39void hw_hdma_cmd(byte c);
40void hw_hdma(void);
41void pad_refresh(void);
42void pad_press(byte k);
43void pad_release(byte k);
44void pad_set(byte k, int st);
45void hw_reset(void);
46
47#endif