Removed IRQ support from joystick drivers.
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.
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -8,5 +8,3 @@
|
||||
.include "joy-kernel.inc"
|
||||
|
||||
_joy_read = joy_read ; Use driver entry
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user