+/*****************************************************************************/
+/* Definitions */
+/*****************************************************************************/
+
+
+
+/* Error codes */
+#define JOY_ERR_OK 0 /* No error */
+#define JOY_ERR_NO_DRIVER 1 /* No driver available */
+#define JOY_ERR_CANNOT_LOAD 2 /* Error loading driver */
+#define JOY_ERR_INV_DRIVER 3 /* Invalid driver */
+#define JOY_ERR_NO_DEVICE 4 /* Device (hardware) not found */
+
+/* Argument for the joy_read function */
+#define JOY_1 0
+#define JOY_2 1
+
+/* Macros that evaluate the return code of joy_read */
+#define JOY_UP(v) ((v) & JOY_UP_MASK)
+#define JOY_DOWN(v) ((v) & JOY_DOWN_MASK)
+#define JOY_LEFT(v) ((v) & JOY_LEFT_MASK)
+#define JOY_RIGHT(v) ((v) & JOY_RIGHT_MASK)
+#define JOY_BTN_1(v) ((v) & JOY_BTN_1_MASK) /* Universally available */
+#define JOY_BTN_2(v) ((v) & JOY_BTN_2_MASK) /* Second button if available */
+#define JOY_BTN_3(v) ((v) & JOY_BTN_3_MASK) /* Third button if available */
+#define JOY_BTN_4(v) ((v) & JOY_BTN_4_MASK) /* Fourth button if available */
+
+/* The name of the standard joystick driver for a platform */
+extern const char joy_stddrv[];
+
+/* The address of the static standard joystick driver for a platform */
+extern const void joy_static_stddrv[];
+
+
+
+/*****************************************************************************/
+/* Functions */
+/*****************************************************************************/
+
+
+
+unsigned char __fastcall__ joy_load_driver (const char* driver);
+/* Load and install a joystick driver. Return an error code. */