]> git.sur5r.net Git - cc65/blobdiff - asminc/joy-kernel.inc
Made the code that logs indirect-goto referals be a little more efficient.
[cc65] / asminc / joy-kernel.inc
index 4517767e2ee4ef617b08ee76e1b92ec1936bf2b3..ef729fe3c351fed314487f8e6859d91a088d4b29 100644 (file)
@@ -6,10 +6,10 @@
 ;/*                                                                           */
 ;/*                                                                           */
 ;/*                                                                           */
-;/* (C) 2002      Ullrich von Bassewitz                                       */
-;/*               Wacholderweg 14                                             */
-;/*               D-70597 Stuttgart                                           */
-;/* EMail:        uz@musoftware.de                                            */
+;/* (C) 2002-2006, Ullrich von Bassewitz                                      */
+;/*                Römerstraße 52                                             */
+;/*                D-70794 Filderstadt                                        */
+;/* EMail:         uz@cc65.org                                                */
 ;/*                                                                           */
 ;/*                                                                           */
 ;/* This software is provided 'as-is', without any expressed or implied       */
 ;------------------------------------------------------------------------------
 ; Driver header stuff
 
-JOY_HDR_ID              = 0                     ; $6A, $6F, $79 ("joy")
-JOY_HDR_VERSION         = 3                     ; Interface version
+.struct JOY_HDR
+        ID      .byte   3       ; $6A, $6F, $79 ("joy")
+        VERSION .byte   1       ; Interface version
+        LIBREF  .addr           ; Library reference
+        JUMPTAB .struct
+            INSTALL     .addr   ; INSTALL routine
+            UNINSTALL   .addr   ; UNINSTALL routine
+            COUNT       .addr   ; COUNT routine
+            READ        .addr   ; READ routine
+        .endstruct
+.endstruct
 
-JOY_MASKS               = 4                     ; Joystick state mask array
-JOY_MASK_COUNT          = 8                     ; Size of the array
-
-JOY_HDR_JUMPTAB         = 12
-JOY_HDR_INSTALL         = JOY_HDR_JUMPTAB+0     ; INSTALL routine
-JOY_HDR_UNINSTALL       = JOY_HDR_JUMPTAB+2     ; UNINSTALL routine
-JOY_HDR_COUNT           = JOY_HDR_JUMPTAB+4     ; COUNT routine
-JOY_HDR_READ            = JOY_HDR_JUMPTAB+6     ; READ routine
+;------------------------------------------------------------------------------
+; The JOY API version, stored in JOY_HDR::VERSION
 
-JOY_HDR_JUMPCOUNT       = 4                     ; Number of jump vectors
+JOY_API_VERSION         = $05
 
 ;------------------------------------------------------------------------------
 ; Variables
 
-               .global _joy_drv                        ; Pointer to driver
+        .global _joy_drv                        ; Pointer to driver
+        .global _joy_masks
 
 ;------------------------------------------------------------------------------
 ; Driver entry points
@@ -67,11 +71,13 @@ JOY_HDR_JUMPCOUNT       = 4                     ; Number of jump vectors
         .global joy_read
 
 ;------------------------------------------------------------------------------
-; ASM functions
+; C callable functions
 
-               .global _joy_install
-               .global _joy_uninstall
-               .global _joy_count
-               .global _joy_read
+        .global _joy_load_driver
+        .global _joy_unload
+        .global _joy_install
+        .global _joy_uninstall
+        .global _joy_count
+        .global _joy_read
 
-                       
+        .global _joy_clear_ptr