]> git.sur5r.net Git - cc65/commitdiff
Added library reference joy_libref to JOY interface.
authorOliver Schmidt <ol.sc@web.de>
Fri, 31 May 2013 22:36:08 +0000 (00:36 +0200)
committerOliver Schmidt <ol.sc@web.de>
Fri, 31 May 2013 22:36:08 +0000 (00:36 +0200)
34 files changed:
asminc/joy-kernel.inc
libsrc/apple2/joy/a2.stdjoy.s
libsrc/apple2/libref.s
libsrc/atari/joy/atrmj8.s
libsrc/atari/joy/atrstd.s
libsrc/atari/libref.s
libsrc/atmos/joy/atmos-pase.s
libsrc/atmos/libref.s [new file with mode: 0644]
libsrc/c128/joy/c128-ptvjoy.s
libsrc/c128/joy/c128-stdjoy.s
libsrc/c128/libref.s
libsrc/c16/libref.s
libsrc/c64/joy/c64-hitjoy.s
libsrc/c64/joy/c64-numpad.s
libsrc/c64/joy/c64-ptvjoy.s
libsrc/c64/joy/c64-stdjoy.s
libsrc/c64/libref.s
libsrc/cbm510/joy/cbm510-std.s
libsrc/cbm510/libref.s
libsrc/geos-cbm/joy/geos-stdjoy.s
libsrc/geos-cbm/system/libref.s
libsrc/joystick/joy-kernel.s
libsrc/lynx/joy/lynx-stdjoy.s
libsrc/lynx/libref.s [new file with mode: 0644]
libsrc/nes/joy/nes-stdjoy.s
libsrc/nes/libref.s [new file with mode: 0644]
libsrc/pet/joy/pet-ptvjoy.s
libsrc/pet/joy/pet-stdjoy.s
libsrc/pet/libref.s [new file with mode: 0644]
libsrc/plus4/joy/plus4-stdjoy.s
libsrc/plus4/libref.s [new file with mode: 0644]
libsrc/vic20/joy/vic20-ptvjoy.s
libsrc/vic20/joy/vic20-stdjoy.s
libsrc/vic20/libref.s [new file with mode: 0644]

index 6c360dd43b363bc92d6dfb207c5247652d988287..da22662b5d0002ea84ac9f997e6a5c693405a0a1 100644 (file)
 .struct JOY_HDR
         ID      .byte   3       ; $6A, $6F, $79 ("joy")
         VERSION .byte   1       ; Interface version
+        LIBREF  .addr           ; Library reference
         MASKS   .byte   8       ; Joystick state mask array
         JUMPTAB .struct
-            INSTALL     .word   ; INSTALL routine
-            UNINSTALL   .word   ; UNINSTALL routine
-            COUNT       .word   ; COUNT routine
-            READ        .word   ; READ routine
-            IRQ         .word   ; IRQ routine
+            INSTALL     .addr   ; INSTALL routine
+            UNINSTALL   .addr   ; UNINSTALL routine
+            COUNT       .addr   ; COUNT routine
+            READ        .addr   ; READ routine
+            IRQ         .addr   ; IRQ routine
         .endstruct
 .endstruct
 
 ;------------------------------------------------------------------------------
 ; The JOY API version, stored in JOY_HDR::VERSION
 
-JOY_API_VERSION         = $01
+JOY_API_VERSION         = $02
 
 ;------------------------------------------------------------------------------
 ; Variables
@@ -82,4 +83,3 @@ JOY_API_VERSION         = $01
         .global _joy_read
 
         .global _joy_clear_ptr
-
index eecdd6a8ab3445f1a62a8eee38fd1690bb906b05..043b7814e331eee60e6b44e8dc3f586590d287ad 100644 (file)
@@ -36,6 +36,10 @@ PREAD   :=      $FB1E   ; Read paddle in X, return AD conv. value in Y
         .byte   $6A, $6F, $79   ; "joy"
         .byte   JOY_API_VERSION ; Driver API version number
 
+; Library reference
+
+        .addr   $0000
+
 ; Button state masks (8 values)
 
         .byte   $10
index 507c9887b5cbf7db429f471f67f324e7da9d01d0..933eb59111704297253e229ff5a3411d04b1dc01 100644 (file)
@@ -2,7 +2,8 @@
 ; Oliver Schmidt, 2013-05-31
 ;
 
-        .export         em_libref
+        .export         em_libref, joy_libref
         .import         _exit
 
 em_libref       := _exit
+joy_libref      := _exit
index 777a52615ea7226e184657c832a95cfaabfa4f64..04840fc993ba845405843cfed47a552409a4ba04 100644 (file)
         .byte   $6A, $6F, $79           ; "joy"
         .byte   JOY_API_VERSION         ; Driver API version number
 
+; Library reference
+
+        .addr   $0000
+
 ; Button state masks (8 values)
 
         .byte   $02                     ; JOY_UP
index caca34cc599e489014f0aa4bbc38b95987ecb517..34034b55409b1a03644a5c10c9847acb71280149 100644 (file)
         .byte   $6A, $6F, $79           ; "joy"
         .byte   JOY_API_VERSION         ; Driver API version number
 
+; Library reference
+
+        .addr   $0000
+
 ; Button state masks (8 values)
 
         .byte   $01                     ; JOY_UP
index 507c9887b5cbf7db429f471f67f324e7da9d01d0..933eb59111704297253e229ff5a3411d04b1dc01 100644 (file)
@@ -2,7 +2,8 @@
 ; Oliver Schmidt, 2013-05-31
 ;
 
-        .export         em_libref
+        .export         em_libref, joy_libref
         .import         _exit
 
 em_libref       := _exit
+joy_libref      := _exit
index 81dba394aa8cf5c76e84854bfbfc1d63451b13d5..c505a1b0fee0190c142bc3e29035cf1fcf4420cd 100644 (file)
         .byte   $6A, $6F, $79           ; "joy"
         .byte   JOY_API_VERSION         ; Driver API version number
 
+; Library reference
+
+        .addr   $0000
+
 ; Button state masks (8 values)
 
         .byte   $10                     ; JOY_UP
diff --git a/libsrc/atmos/libref.s b/libsrc/atmos/libref.s
new file mode 100644 (file)
index 0000000..e4afa7e
--- /dev/null
@@ -0,0 +1,8 @@
+;
+; Oliver Schmidt, 2013-05-31
+;
+
+        .export         joy_libref
+        .import         _exit
+
+joy_libref      := _exit
index 5763fbe2d7a84583084b84fac6936bd6fc2d90be..d128b0ee06780329719fa39e7caaca4a21718d20 100644 (file)
         .byte   $6A, $6F, $79           ; "joy"
         .byte   JOY_API_VERSION         ; Driver API version number
 
+; Library reference
+
+        .addr   $0000
+
 ; Button state masks (8 values)
 
         .byte   $01                     ; JOY_UP
index f86853a8150b28e394ba0f6bceb067243c563d11..860dab1ae03df9d6a7cd5eafde1891d1d014c5f8 100644 (file)
         .byte   $6A, $6F, $79           ; "joy"
         .byte   JOY_API_VERSION         ; Driver API version number
 
+; Library reference
+
+        .addr   $0000
+
 ; Button state masks (8 values)
 
         .byte   $01                     ; JOY_UP
index 507c9887b5cbf7db429f471f67f324e7da9d01d0..933eb59111704297253e229ff5a3411d04b1dc01 100644 (file)
@@ -2,7 +2,8 @@
 ; Oliver Schmidt, 2013-05-31
 ;
 
-        .export         em_libref
+        .export         em_libref, joy_libref
         .import         _exit
 
 em_libref       := _exit
+joy_libref      := _exit
index 507c9887b5cbf7db429f471f67f324e7da9d01d0..933eb59111704297253e229ff5a3411d04b1dc01 100644 (file)
@@ -2,7 +2,8 @@
 ; Oliver Schmidt, 2013-05-31
 ;
 
-        .export         em_libref
+        .export         em_libref, joy_libref
         .import         _exit
 
 em_libref       := _exit
+joy_libref      := _exit
index 637244b87c2cb4e160054317d41fe7fa6bee5f69..28495ee117d0ec2b4d081714b045209e19c848d6 100644 (file)
         .byte   $6A, $6F, $79   ; "joy"
         .byte   JOY_API_VERSION ; Driver API version number
 
+; Library reference
+
+        .addr   $0000
+
 ; Button state masks (8 values)
 
         .byte   $01                     ; JOY_UP
index 28fd7e2b090d98cde5a013293b5127cc3afe56e4..6eeebcc74e41453ab7e344d80eda252795e81310 100644 (file)
         .byte   $6A, $6F, $79           ; "joy"
         .byte   JOY_API_VERSION         ; Driver API version number
 
+; Library reference
+
+        .addr   $0000
+
 ; Button state masks (8 values)
 
         .byte   $02                     ; JOY_UP        "8"
index 0b0e80e626710deea04e9828d99ebeeb3ba98417..bb1ba0982da3f30b9d06af375ea508d0d1d0dca7 100644 (file)
         .byte   $6A, $6F, $79   ; "joy"
         .byte   JOY_API_VERSION ; Driver API version number
 
+; Library reference
+
+        .addr   $0000
+
 ; Button state masks (8 values)
 
         .byte   $01                     ; JOY_UP
index dc9434f4c2db74cc206412cb07b79011d1e49cae..18722032a697f2bd9887789fedbec58020d9d4ca 100644 (file)
         .byte   $6A, $6F, $79           ; "joy"
         .byte   JOY_API_VERSION         ; Driver API version number
 
+; Library reference
+
+        .addr   $0000
+
 ; Button state masks (8 values)
 
         .byte   $01                     ; JOY_UP
index 507c9887b5cbf7db429f471f67f324e7da9d01d0..933eb59111704297253e229ff5a3411d04b1dc01 100644 (file)
@@ -2,7 +2,8 @@
 ; Oliver Schmidt, 2013-05-31
 ;
 
-        .export         em_libref
+        .export         em_libref, joy_libref
         .import         _exit
 
 em_libref       := _exit
+joy_libref      := _exit
index 8a24dcbbb5d31ce538db97342192e3658f9edd66..1d8b242a66bbe37489ecc73c6bb24568463b4779 100644 (file)
         .byte   $6A, $6F, $79           ; "joy"
         .byte   JOY_API_VERSION         ; Driver API version number
 
+; Library reference
+
+        .addr   $0000
+
 ; Button state masks (8 values)
 
         .byte   $01                     ; JOY_UP
index 507c9887b5cbf7db429f471f67f324e7da9d01d0..933eb59111704297253e229ff5a3411d04b1dc01 100644 (file)
@@ -2,7 +2,8 @@
 ; Oliver Schmidt, 2013-05-31
 ;
 
-        .export         em_libref
+        .export         em_libref, joy_libref
         .import         _exit
 
 em_libref       := _exit
+joy_libref      := _exit
index 7cfd0ad08a5d6f7359086dec9d7b80bbcc298a35..9fb5461bbf4cd4d562fcd0fc1ab1730b4ef2609f 100644 (file)
         .byte $6A, $6F, $79     ; "joy"
         .byte JOY_API_VERSION   ; Driver API version number
 
+; Library reference
+
+        .addr   $0000
+
 ; Button state masks (8 values)
 
         .byte $01               ; JOY_UP
index 507c9887b5cbf7db429f471f67f324e7da9d01d0..933eb59111704297253e229ff5a3411d04b1dc01 100644 (file)
@@ -2,7 +2,8 @@
 ; Oliver Schmidt, 2013-05-31
 ;
 
-        .export         em_libref
+        .export         em_libref, joy_libref
         .import         _exit
 
 em_libref       := _exit
+joy_libref      := _exit
index 71f94133ad32c26c2151a0279c6d8ec2cdc426d2..d21727089a8fe87bc7bd8d59f4e9ec86d7ec6c87 100644 (file)
@@ -4,6 +4,7 @@
 ; Common functions of the joystick API.
 ;
 
+        .import         joy_libref
         .importzp       ptr1
         .interruptor    joy_irq         ; Export as IRQ handler
 
@@ -55,6 +56,15 @@ _joy_install:
         dey
         bpl     @L0
 
+; Set the library reference
+
+        ldy     #JOY_HDR::LIBREF
+        lda     #<joy_libref
+        sta     (ptr1),y
+        iny
+        lda     #>joy_libref
+        sta     (ptr1),y
+
 ; Copy the mask array
 
         ldy     #JOY_HDR::MASKS + .sizeof(JOY_HDR::MASKS) - 1
index 9c5165a7713a9f5d43b9feb0c156278ca7a7c7ec..da7b4612c3da96c3503d388c552e2545a71eddb3 100644 (file)
         .byte   $6A, $6F, $79           ; "joy"
         .byte   JOY_API_VERSION         ; Driver API version number
 
+; Library reference
+
+        .addr   $0000
+
 ; Button state masks (8 values)
 
 joy_mask:
diff --git a/libsrc/lynx/libref.s b/libsrc/lynx/libref.s
new file mode 100644 (file)
index 0000000..e4afa7e
--- /dev/null
@@ -0,0 +1,8 @@
+;
+; Oliver Schmidt, 2013-05-31
+;
+
+        .export         joy_libref
+        .import         _exit
+
+joy_libref      := _exit
index 76ca9600533705395609344ed7cc30aa67dd403c..1ff8395c95a04047b815e57677952760c2c0bac5 100644 (file)
         .byte   $6A, $6F, $79           ; "joy"
         .byte   JOY_API_VERSION         ; Driver API version number
 
+; Library reference
+
+        .addr   $0000
+
 ; Button state masks (8 values)
 
         .byte   $10                     ; JOY_UP
diff --git a/libsrc/nes/libref.s b/libsrc/nes/libref.s
new file mode 100644 (file)
index 0000000..e4afa7e
--- /dev/null
@@ -0,0 +1,8 @@
+;
+; Oliver Schmidt, 2013-05-31
+;
+
+        .export         joy_libref
+        .import         _exit
+
+joy_libref      := _exit
index 997352f06ce275bde8fe3ebc6442698674ed8f82..19c2ca87620cd3957b5bd317a07d9a2a92085c01 100644 (file)
@@ -24,6 +24,10 @@ VIA_DDRA        := $E843                ; Data direction register A
         .byte   $6A, $6F, $79   ; "joy"
         .byte   JOY_API_VERSION ; Driver API version number
 
+; Library reference
+
+        .addr   $0000
+
 ; Button state masks (8 values)
 
         .byte   $01                     ; JOY_UP
index 155dbbdf7e54cd1407fd06e23110f7799b069635..3377c8f81a8e54da0e061f72c00816c290aab2ba 100644 (file)
         .byte   $6A, $6F, $79           ; "joy"
         .byte   JOY_API_VERSION         ; Driver API version number
 
+; Library reference
+
+        .addr   $0000
+
 ; Button state masks (8 values)
 
         .byte   $01             ; JOY_UP
diff --git a/libsrc/pet/libref.s b/libsrc/pet/libref.s
new file mode 100644 (file)
index 0000000..e4afa7e
--- /dev/null
@@ -0,0 +1,8 @@
+;
+; Oliver Schmidt, 2013-05-31
+;
+
+        .export         joy_libref
+        .import         _exit
+
+joy_libref      := _exit
index 74dbc52e4027c189339273685c778e36fb13ff21..f67487781cbcfbe96a028acf70554c408db13a4b 100644 (file)
         .byte   $6A, $6F, $79           ; "joy"
         .byte   JOY_API_VERSION         ; Driver API version number
 
+; Library reference
+
+        .addr   $0000
+
 ; Button state masks (8 values)
 
         .byte   $01                     ; JOY_UP
diff --git a/libsrc/plus4/libref.s b/libsrc/plus4/libref.s
new file mode 100644 (file)
index 0000000..e4afa7e
--- /dev/null
@@ -0,0 +1,8 @@
+;
+; Oliver Schmidt, 2013-05-31
+;
+
+        .export         joy_libref
+        .import         _exit
+
+joy_libref      := _exit
index fabb802f61282cfd732048869535d400e2246721..533726c7b22e5c359c0daaad8883ae55f9680cb3 100644 (file)
         .byte   $6A, $6F, $79   ; "joy"
         .byte   JOY_API_VERSION ; Driver API version number
 
+; Library reference
+
+        .addr   $0000
+
 ; Button state masks (8 values)
 
         .byte   $01                     ; JOY_UP
index e49cd38f4f925ff5921f0246467eff723abed9a6..722aa8ea50b0f54aede54b3a6e1a27ce8900b158 100644 (file)
         .byte   $6A, $6F, $79           ; "joy"
         .byte   JOY_API_VERSION         ; Driver API version number
 
+; Library reference
+
+        .addr   $0000
+
 ; Button state masks (8 values)
 
         .byte   $02                     ; JOY_UP
diff --git a/libsrc/vic20/libref.s b/libsrc/vic20/libref.s
new file mode 100644 (file)
index 0000000..e4afa7e
--- /dev/null
@@ -0,0 +1,8 @@
+;
+; Oliver Schmidt, 2013-05-31
+;
+
+        .export         joy_libref
+        .import         _exit
+
+joy_libref      := _exit