]> git.sur5r.net Git - cc65/commitdiff
Removed IRQ support from joystick drivers.
authorOliver Schmidt <ol.sc@web.de>
Thu, 1 Feb 2018 21:38:36 +0000 (22:38 +0100)
committerOliver Schmidt <ol.sc@web.de>
Thu, 1 Feb 2018 21:38:36 +0000 (22:38 +0100)
All but one joystick drivers didn't use IRQs. Espsecially when the joystick driver kernel was the only .interruptor this meant quite some unnecessary overhead because it pulled in the whole IRQ infrastructure.

I was told that the one driver using IRQs (the DXS/HIT-4 Player joystick driver for the C64) can be reworked to not do it. Until this is done that driver is defunct.

27 files changed:
asminc/joy-kernel.inc
libsrc/apple2/joy/a2.stdjoy.s
libsrc/atari/joy/atrmj8.s
libsrc/atari/joy/atrstd.s
libsrc/atari5200/joy/atr5200std.s
libsrc/atmos/joy/atmos-ijk.s
libsrc/atmos/joy/atmos-pase.s
libsrc/c128/joy/c128-ptvjoy.s
libsrc/c128/joy/c128-stdjoy.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/cbm510/joy/cbm510-std.s
libsrc/creativision/joy/creativision-stdjoy.s
libsrc/gamate/joy/gamate-stdjoy.s
libsrc/joystick/joy-kernel.s
libsrc/joystick/joy_read.s
libsrc/lynx/joy/lynx-stdjoy.s
libsrc/nes/joy/nes-stdjoy.s
libsrc/pce/joy/pce-stdjoy.s
libsrc/pet/joy/pet-ptvjoy.s
libsrc/pet/joy/pet-stdjoy.s
libsrc/plus4/joy/plus4-stdjoy.s
libsrc/supervision/joy/supervision-stdjoy.s
libsrc/vic20/joy/vic20-ptvjoy.s
libsrc/vic20/joy/vic20-stdjoy.s

index c8cc298208a1a2a6837f9059e37c12ed3f8c2bc3..ef729fe3c351fed314487f8e6859d91a088d4b29 100644 (file)
             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         = $04
+JOY_API_VERSION         = $05
 
 ;------------------------------------------------------------------------------
 ; Variables
index ed208325504c6f353209931ebff3f2db7db66d9f..7e90f7b98226a710d56d67aa953c77083c17f1b7 100644 (file)
@@ -52,7 +52,6 @@ PREAD   :=      $FB1E   ; Read paddle in X, return AD conv. value in Y
         .addr   UNINSTALL
         .addr   COUNT
         .addr   READJOY
-        .addr   0               ; IRQ not used
 
 ; ------------------------------------------------------------------------
 
index 0e8cd2a0a020836c15b2381d3e31d29a2930948a..9b02485d6bfb8d39a18766aeadc1034649584258 100644 (file)
@@ -41,7 +41,6 @@
         .addr   UNINSTALL
         .addr   COUNT
         .addr   READJOY
-        .addr   0                       ; IRQ entry not used
 
 ; ------------------------------------------------------------------------
 ; Constants
index 0c8799e21bcf072140dd9fcc70a904c3c2aabb0d..0c49499f87d171e0317a73e122eb65bb9dbb4541 100644 (file)
@@ -40,7 +40,6 @@
         .addr   UNINSTALL
         .addr   COUNT
         .addr   READJOY
-        .addr   0                       ; IRQ entry not used
 
 ; ------------------------------------------------------------------------
 ; Constants
index 0b8b93b63d443a72c60ee85cf7f1ebfb0ab1d45f..041dc6830f8bc840100292137e01caa5f020f16c 100644 (file)
@@ -33,7 +33,6 @@
         .addr   UNINSTALL
         .addr   COUNT
         .addr   READJOY
-        .addr   0               ; IRQ entry not used
 
 .code
 
index f59f6b96af699f3832814a8c649c41c004fa74d3..6e75a3e0b6625c9afcceb4dac3564d3e0f4b4e60 100644 (file)
 
         .addr   $0000
 
-; Button state masks (8 values)
-
-        .byte   $10                     ; JOY_UP
-        .byte   $08                     ; JOY_DOWN
-        .byte   $01                     ; JOY_LEFT
-        .byte   $02                     ; JOY_RIGHT
-        .byte   $20                     ; JOY_FIRE
-        .byte   $00                     ; Future expansion
-        .byte   $00                     ; Future expansion
-        .byte   $00                     ; Future expansion
-
 ; Jump table.
 
         .addr   INSTALL
         .addr   UNINSTALL
         .addr   COUNT
         .addr   READ
-        .addr   0                       ; IRQ entry unused
 
 ; ------------------------------------------------------------------------
 ; Constants
index 637571c0461d2eece93190faf66b0be61c761f61..fd64901c9ef70dd4815614fc97f090dbdf18671e 100644 (file)
@@ -34,7 +34,6 @@
         .addr   UNINSTALL
         .addr   COUNT
         .addr   READ
-        .addr   0                       ; IRQ entry unused
 
 ; ------------------------------------------------------------------------
 ; Constants
index c9ae39a47734a271cb026a5af4d1ee3418fe6a54..180f7667dafe7aa0ff58519566b66c2ebef0de68 100644 (file)
@@ -36,7 +36,6 @@
         .addr   UNINSTALL
         .addr   COUNT
         .addr   READ
-        .addr   0                       ; IRQ entry unused
 
 ; ------------------------------------------------------------------------
 ; Constants
index 943361da5ee526d6333aab406f16248aa409099e..bf2e2fea7de08ce723874edc230ef380662834c4 100644 (file)
@@ -36,7 +36,6 @@
         .addr   UNINSTALL
         .addr   COUNT
         .addr   READ
-        .addr   0                       ; IRQ entry not used
 
 ; ------------------------------------------------------------------------
 ; Constants
index 10c936399563265f83d7268af333d14706e8171e..9f6c0b4dd5204d6fd966dd0ebe39c3237b8e80f8 100644 (file)
@@ -35,7 +35,6 @@
         .addr   UNINSTALL
         .addr   COUNT
         .addr   READ
-        .addr   IRQ
 
 ; ------------------------------------------------------------------------
 ; Constants
index 5ed7af18771100e1d6750d08d8f60e0edc4a046e..0ccdc4fcd051f49526fde28652f554a78349e2ed 100644 (file)
@@ -36,7 +36,6 @@
         .addr   UNINSTALL
         .addr   COUNT
         .addr   READ
-        .addr   0                       ; IRQ entry unused
 
 ; ------------------------------------------------------------------------
 ; Constants
index af5c27e134060dc8dd78532bede298b8afaadaf1..a772fb5f61266d81b42414f4a5bf59f9e62f1ef3 100644 (file)
@@ -35,7 +35,6 @@
         .addr   UNINSTALL
         .addr   COUNT
         .addr   READ
-        .addr   0                       ; IRQ entry unused
 
 ; ------------------------------------------------------------------------
 ; Constants
index 930ad6227138d2afab6151e30d7df33d6441ee7c..c983d81bbdc80d6203209a692a44935fdc006687 100644 (file)
@@ -35,7 +35,6 @@
         .addr   UNINSTALL
         .addr   COUNT
         .addr   READ
-        .addr   0                       ; IRQ entry unused
 
 ; ------------------------------------------------------------------------
 ; Constants
index 0c2efc12d3b2999395da8a813b8374e3daea11f6..4e47fc1a02f8ae9cfad20928c5a145615e972d41 100644 (file)
@@ -36,7 +36,6 @@
         .addr   UNINSTALL
         .addr   COUNT
         .addr   READ
-        .addr   0                       ; IRQ entry unused
 
 ; ------------------------------------------------------------------------
 ; Constants
index 9a5afc42bb4a2e996ace680b1ffb136a004294b7..5cf46c39fe7142a8eea6490b0d1a0abbdb2099c2 100644 (file)
@@ -33,7 +33,6 @@
                 .addr   UNINSTALL
                 .addr   COUNT
                 .addr   READJOY
-                .addr   0                       ; IRQ entry not used
 
 ; ------------------------------------------------------------------------
 ; Constants
index 801b40acd5e2deafcae1cb24ad5f9eb041677b5c..8f927cdf520f4cfae861ec389ff79f2d7fd47c92 100644 (file)
@@ -30,7 +30,6 @@
         .addr   UNINSTALL
         .addr   COUNT
         .addr   READJOY
-        .addr   0                       ; IRQ entry unused
 
 ; ------------------------------------------------------------------------
 ; Constants
index 0746709e9ba132385a4217455d081277a2ada353..c2d50c8d8b529f7e74b6973f1d9a8f7716851d6b 100644 (file)
@@ -6,7 +6,6 @@
 
         .import         joy_libref
         .importzp       ptr1
-        .interruptor    joy_irq         ; Export as IRQ handler
 
         .include        "joy-kernel.inc"
         .include        "joy-error.inc"
@@ -26,7 +25,6 @@ joy_install:    jmp     $0000
 joy_uninstall:  jmp     $0000
 joy_count:      jmp     $0000
 joy_read:       jmp     $0000
-joy_irq:        .byte   $60, $00, $00   ; RTS plus two dummy bytes
 
 ; Driver header signature
 .rodata
@@ -73,18 +71,7 @@ _joy_install:
         cpy     #(JOY_HDR::JUMPTAB + .sizeof(JOY_HDR::JUMPTAB))
         bne     @L1
 
-        jsr     joy_install             ; Call driver install routine
-        tay                             ; Test error code
-        bne     @L2                     ; Bail out if install had errors
-
-; Install the IRQ vector if the driver needs it. A/X contains the error code
-; from joy_install, so don't use it.
-
-        ldy     joy_irq+2               ; Check high byte of IRQ vector
-        beq     @L2                     ; Jump if vector invalid
-        ldy     #$4C                    ; JMP opcode
-        sty     joy_irq                 ; Activate IRQ routine
-@L2:    rts
+        jmp     joy_install             ; Call driver install routine
 
 ; Driver signature invalid
 
@@ -108,9 +95,6 @@ copy:   lda     (ptr1),y
 ; */
 
 _joy_uninstall:
-        lda     #$60                    ; RTS opcode
-        sta     joy_irq                 ; Disable IRQ entry point
-
         jsr     joy_uninstall           ; Call the driver routine
 
 _joy_clear_ptr:                         ; External entry point
index f76d9dfb747427fd6da1aefd8050739a60c6e4d0..151600aee798a313deab572634f181cf7ec33bdd 100644 (file)
@@ -8,5 +8,3 @@
         .include        "joy-kernel.inc"
 
         _joy_read       = joy_read              ; Use driver entry
-
-                                                
index 2e91cc43b103cca206f58abb65c30babba972d0a..c81a97dbf69e6097a731d5924b9d586f68a21cb9 100644 (file)
@@ -37,7 +37,6 @@
         .addr   UNINSTALL
         .addr   COUNT
         .addr   READ
-        .addr   0                       ; IRQ entry unused
 
 ; ------------------------------------------------------------------------
 ; Constants
index 3032e9330083bc5f10b43fc0f9781b0ddff5eac0..63caf364bc19d3ddaedff667643c64e50f09a8eb 100644 (file)
@@ -35,7 +35,6 @@
         .addr   UNINSTALL
         .addr   COUNT
         .addr   READJOY
-        .addr   0                       ; IRQ entry unused
 
 ; ------------------------------------------------------------------------
 ; Constants
index ab25134ddfe4eb3fa6ce3738e35f2d408906a9f5..c0f338f9085161adb45ba71862a593d0a567dc21 100644 (file)
@@ -30,7 +30,6 @@
         .addr   UNINSTALL
         .addr   COUNT
         .addr   READJOY
-        .addr   0                       ; IRQ entry unused
 
 ; ------------------------------------------------------------------------
 ; Constants
index 3bb36835576dd9880d5fe9602a7a3b9b902c8aba..7620013be28a34828e2a0a20653e5acfe8d71554 100644 (file)
@@ -34,7 +34,6 @@
         .addr   UNINSTALL
         .addr   COUNT
         .addr   READ
-        .addr   0                       ; IRQ entry unused
 
 ; ------------------------------------------------------------------------
 ; Constants
index 29c6de627c48db49ff0d157c0fa2e2173f8916a0..85b7423022c4fcd9dd61ff191cfc050c28698b23 100644 (file)
@@ -33,7 +33,6 @@
         .addr   UNINSTALL
         .addr   COUNT
         .addr   READ
-        .addr   0               ; IRQ entry unused
 
 ; ------------------------------------------------------------------------
 ; Constants
index d998b2699057f832e3fabb9fd15b88488e54f37f..e8e85fedcfb89fdb5f98d5b14c21165e8987f255 100644 (file)
@@ -37,7 +37,6 @@
         .addr   UNINSTALL
         .addr   COUNT
         .addr   READ
-        .addr   0                       ; IRQ entry unused
 
 ; ------------------------------------------------------------------------
 ; Constants
index f6a3257409d799a1552c1777c73e3c7ccfa22534..d233a8600d0b637e03eae47b580a5561d1593055 100644 (file)
@@ -29,7 +29,6 @@
         .addr   UNINSTALL
         .addr   COUNT
         .addr   READJOY
-        .addr   0                       ; IRQ entry unused
 
 ; ------------------------------------------------------------------------
 ; Constants
index 3b1db402afb885d06a9136daa52fea66caa8c05f..bf0ff128effe046578383f17569f4afb7ede7895 100644 (file)
@@ -36,7 +36,6 @@
         .addr   UNINSTALL
         .addr   COUNT
         .addr   READ
-        .addr   0                       ; IRQ entry unused
 
 ; ------------------------------------------------------------------------
 ; Constants
index 67299cc1a8e34bd272968159b3170c747104fc79..e5539c65355dc3c556329ef7b6a7b4719c49afeb 100644 (file)
@@ -36,7 +36,6 @@
         .addr   UNINSTALL
         .addr   COUNT
         .addr   READ
-        .addr   0                       ; IRQ entry unused
 
 ; ------------------------------------------------------------------------
 ; Constants