X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=include%2Flynx.h;h=4b0390a13223c846115ba9d32719f379fdf2f299;hb=2af76c7cffb08af3a6f7ca87c90132aa3e365f76;hp=a77625e2cb9f1dd863b9181c3d99d7d3208d6185;hpb=63257695804fd206d02dece5f773435803010ea2;p=cc65 diff --git a/include/lynx.h b/include/lynx.h index a77625e2c..4b0390a13 100644 --- a/include/lynx.h +++ b/include/lynx.h @@ -2,7 +2,7 @@ /* */ /* lynx.h */ /* */ -/* Lynx system specific definitions */ +/* Lynx system-specific definitions */ /* */ /* */ /* */ @@ -46,7 +46,7 @@ /*****************************************************************************/ -/* Data */ +/* Data */ /*****************************************************************************/ @@ -87,6 +87,20 @@ #define TGI_COLOR_LIGHTBLUE COLOR_LIGHTBLUE #define TGI_COLOR_WHITE COLOR_WHITE +/* Masks for joy_read */ +#define JOY_UP_MASK 0x80 +#define JOY_DOWN_MASK 0x40 +#define JOY_LEFT_MASK 0x20 +#define JOY_RIGHT_MASK 0x10 +#define JOY_BTN_1_MASK 0x01 +#define JOY_BTN_2_MASK 0x02 + +#define JOY_BTN_A_MASK JOY_BTN_1_MASK +#define JOY_BTN_B_MASK JOY_BTN_2_MASK + +#define JOY_BTN_A(v) ((v) & JOY_BTN_A_MASK) +#define JOY_BTN_B(v) ((v) & JOY_BTN_B_MASK) + /* No support for dynamically loadable drivers */ #define DYN_DRV 0 @@ -99,9 +113,9 @@ /* The addresses of the static drivers */ -extern void lynx_stdjoy[]; /* Referred to by joy_static_stddrv[] */ -extern void lynx_comlynx[]; -extern void lynx_160_102_16[]; /* Referred to by tgi_static_stddrv[] */ +extern void lynx_stdjoy_joy[]; /* Referred to by joy_static_stddrv[] */ +extern void lynx_comlynx_ser[]; +extern void lynx_160_102_16_tgi[]; /* Referred to by tgi_static_stddrv[] */ @@ -109,24 +123,31 @@ extern void lynx_160_102_16[]; /* Referred to by tgi_static_stddrv[] */ /* Sound support */ /*****************************************************************************/ -void lynx_snd_init (); + + +void lynx_snd_init (void); /* Initialize the sound driver */ -void lynx_snd_pause (); +void lynx_snd_pause (void); /* Pause sound */ -void lynx_snd_continue (); +void lynx_snd_continue (void); /* Continue sound after pause */ void __fastcall__ lynx_snd_play (unsigned char channel, unsigned char *music); /* Play tune on channel */ -void lynx_snd_stop (); +void lynx_snd_stop (void); /* Stop sound on all channels */ -unsigned char lynx_snd_active(); +void __fastcall__ lynx_snd_stop_channel (unsigned char channel); +/* Stop sound on all channels */ + +unsigned char lynx_snd_active(void); /* Show which channels are active */ + + /*****************************************************************************/ /* Accessing the cart */ /*****************************************************************************/ @@ -192,5 +213,6 @@ unsigned __fastcall__ lynx_eewrite (unsigned cell, unsigned val); #define SUZY (*(struct __suzy*)0xFC00) + /* End of lynx.h */ #endif