23
23
;* Rev 2.6 - 09-Apr-16 : Added GBC OAM and cart defines (AntonioND)
24
24
;* Rev 2.7 - 19-Jan-19 : Added rPCMXX (ISSOtm)
25
25
;* Rev 2.8 - 03-Feb-19 : Added audio registers flags (Álvaro Cuesta)
26
+ ;* Rev 2.9 - 28-Feb-20 : Added utility rP1 constants
26
27
27
28
; If all of these are already defined, don't do it again.
28
29
@@ -32,7 +33,7 @@ HARDWARE_INC SET 1
32
33
rev_Check_hardware_inc : MACRO
33
34
;NOTE: REVISION NUMBER CHANGES MUST BE ADDED
34
35
;TO SECOND PARAMETER IN FOLLOWING LINE.
35
- IF \1 > 2 .8 ;PUT REVISION NUMBER HERE
36
+ IF \1 > 2 .9 ;PUT REVISION NUMBER HERE
36
37
WARN "Version \1 or later of 'hardware.inc' is required."
37
38
ENDC
38
39
ENDM
@@ -89,13 +90,17 @@ OAMB_BANK1 EQU 3 ; Bank number; 0,1 (GBC)
89
90
; --
90
91
rP1 EQU $FF00
91
92
92
- P1F_5 EQU %00100000 ; P15 out port
93
- P1F_4 EQU %00010000 ; P14 out port
93
+ P1F_5 EQU %00100000 ; P15 out port, set to 0 to get buttons
94
+ P1F_4 EQU %00010000 ; P14 out port, set to 0 to get dpad
94
95
P1F_3 EQU %00001000 ; P13 in port
95
96
P1F_2 EQU %00000100 ; P12 in port
96
97
P1F_1 EQU %00000010 ; P11 in port
97
98
P1F_0 EQU %00000001 ; P10 in port
98
99
100
+ P1F_GET_DPAD EQU P1F_5
101
+ P1F_GET_BTN EQU P1F_4
102
+ P1F_GET_NONE EQU P1F_4 | P1F_5
103
+
99
104
; --
100
105
; -- SB ($FF01)
101
106
; -- Serial Transfer Data (R/W)
0 commit comments