repo.or.cz
/
rofl0r-gnuboy.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
change ev_poll() to accept a wait parameter
[rofl0r-gnuboy.git]
/
hw.h
blob
a4a25857e3bb36a695df47220de6607eafadc38a
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
26
struct
hw
27
{
28
byte ilines
;
29
byte pad
;
30
int
cgb
,
gba
;
31
int
hdma
;
32
};
33
34
35
extern
struct
hw hw
;
36
37
void
hw_interrupt
(
byte i
,
byte mask
);
38
void
hw_dma
(
byte b
);
39
void
hw_hdma
();
40
void
hw_hdma_cmd
(
byte c
);
41
void
hw_reset
();
42
void
pad_refresh
();
43
void
pad_set
(
byte k
,
int
st
);
44
45
#endif
46
47