-
Notifications
You must be signed in to change notification settings - Fork 0
/
MoreLib.c
61 lines (46 loc) · 1.34 KB
/
MoreLib.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
// I'm working on still this, bear with me, it will change...
// Doug Fraker 2017
#pragma bss-name(push, "ZEROPAGE")
unsigned char PAD_STATE; // controller 1, any presses
unsigned char PAD_STATE2; // controller 2, any presses
unsigned char PAD_STATET; // controller 1, new press, not held
unsigned char PAD_STATET2; // controller 2, new press, not held
/* this is so you have to type less
* cut and paste from this list
// any time button pressed or held
(PAD_STATE & PAD_A)
(PAD_STATE & PAD_B)
(PAD_STATE & PAD_SELECT)
(PAD_STATE & PAD_START)
(PAD_STATE & PAD_UP)
(PAD_STATE & PAD_DOWN)
(PAD_STATE & PAD_LEFT)
(PAD_STATE & PAD_RIGHT)
(PAD_STATE2 & PAD_A)
(PAD_STATE2 & PAD_B)
(PAD_STATE2 & PAD_SELECT)
(PAD_STATE2 & PAD_START)
(PAD_STATE2 & PAD_UP)
(PAD_STATE2 & PAD_DOWN)
(PAD_STATE2 & PAD_LEFT)
(PAD_STATE2 & PAD_RIGHT)
// only on button down, not hold
(PAD_STATET & PAD_A)
(PAD_STATET & PAD_B)
(PAD_STATET & PAD_SELECT)
(PAD_STATET & PAD_START)
(PAD_STATET & PAD_UP)
(PAD_STATET & PAD_DOWN)
(PAD_STATET & PAD_LEFT)
(PAD_STATET & PAD_RIGHT)
(PAD_STATET2 & PAD_A)
(PAD_STATET2 & PAD_B)
(PAD_STATET2 & PAD_SELECT)
(PAD_STATET2 & PAD_START)
(PAD_STATET2 & PAD_UP)
(PAD_STATET2 & PAD_DOWN)
(PAD_STATET2 & PAD_LEFT)
(PAD_STATET2 & PAD_RIGHT)
*/
#pragma bss-name(push, "BSS")
// just in case