1
0
mirror of https://github.com/cc65/cc65.git synced 2024-06-01 13:41:34 +00:00
This commit is contained in:
Stefan 2017-11-21 10:22:53 +01:00 committed by GitHub
parent f9b4e0b574
commit e49744ecd0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -105,6 +105,26 @@ extern unsigned char sv_nmi_counter;
extern unsigned char sv_timer_irq_counter;
extern unsigned char sv_timer_dma_counter;
/* Masks for joy_read */
#define JOY_UP_MASK 0x08
#define JOY_DOWN_MASK 0x04
#define JOY_LEFT_MASK 0x02
#define JOY_RIGHT_MASK 0x01
#define JOY_BTN_1_MASK 0x20
#define JOY_BTN_2_MASK 0x10
#define JOY_BTN_3_MASK 0x80
#define JOY_BTN_4_MASK 0x40
#define JOY_BTN_A_MASK JOY_BTN_1_MASK
#define JOY_BTN_B_MASk JOY_BTN_2_MASK
#define JOY_START_MASK JOY_BTN_3_MASK
#define JOY_SELECT_MASK JOY_BTN_4_MASK
#define JOY_BTN_A(v) ((v) & JOY_BTN_A_MASK)
#define JOY_BTN_B(v) ((v) & JOY_BTN_B_MASK)
#define JOY_START(v) ((v) & JOY_START_MASK)
#define JOY_SELECT(v) ((v) & JOY_SELECT_MASK)
/* The addresses of the static drivers */
extern void supervision_stdjoy_joy[]; /* Referred to by joy_static_stddrv[] */