.struct MOUSE_HDR
ID .byte 3 ; Contains 0x6D, 0x6F, 0x75 ("mou")
VERSION .byte 1 ; Interface version
+ LIBREF .addr ; Library reference
JUMPTAB .struct
INSTALL .addr
UNINSTALL .addr
;------------------------------------------------------------------------------
; The mouse API version, stored in MOUSE_HDR::VERSION
-MOUSE_API_VERSION = $02
+MOUSE_API_VERSION = $03
;------------------------------------------------------------------------------
; Bitmapped mouse driver flags, stored in MOUSE_HDR::FLAGS.
; Oliver Schmidt, 2013-05-31
;
- .export em_libref, joy_libref
+ .export em_libref, joy_libref, mouse_libref
.import _exit
em_libref := _exit
joy_libref := _exit
+mouse_libref := _exit
.byte $6D, $6F, $75 ; "mou"
.byte MOUSE_API_VERSION ; Mouse driver API version number
- ; Jump table.
+ ; Library reference
+ .addr $0000
+
+ ; Jump table
.addr INSTALL
.addr UNINSTALL
.addr HIDE
; Oliver Schmidt, 2013-05-31
;
- .export em_libref, joy_libref
+ .export em_libref, joy_libref, mouse_libref
.import _exit
em_libref := _exit
joy_libref := _exit
+mouse_libref := _exit
.byte $6d, $6f, $75 ; "mou"
.byte MOUSE_API_VERSION ; Mouse driver API version number
-; Jump table.
+; Library reference
+
+ .addr $0000
+
+; Jump table
.addr INSTALL
.addr UNINSTALL
.byte $6d, $6f, $75 ; "mou"
.byte MOUSE_API_VERSION ; Mouse driver API version number
-; Jump table.
+; Library reference
+
+ .addr $0000
+
+; Jump table
.addr INSTALL
.addr UNINSTALL
.byte $6d, $6f, $75 ; "mou"
.byte MOUSE_API_VERSION ; Mouse driver API version number
-; Jump table.
+; Library reference
+
+ .addr $0000
+
+; Jump table
.addr INSTALL
.addr UNINSTALL
; Oliver Schmidt, 2013-05-31
;
- .export em_libref, joy_libref
+ .export em_libref, joy_libref, mouse_libref
.import _exit
em_libref := _exit
joy_libref := _exit
+mouse_libref := _exit
.byte $6d, $6f, $75 ; "mou"
.byte MOUSE_API_VERSION ; Mouse driver API version number
-; Jump table.
+; Library reference
+
+ .addr $0000
+
+; Jump table
.addr INSTALL
.addr UNINSTALL
.byte $6d, $6f, $75 ; "mou"
.byte MOUSE_API_VERSION ; Mouse driver API version number
-; Jump table.
+; Library reference
+
+ .addr $0000
+
+; Jump table
.addr INSTALL
.addr UNINSTALL
.byte $6d, $6f, $75 ; "mou"
.byte MOUSE_API_VERSION ; Mouse driver API version number
-; Jump table.
+; Library reference
+
+ .addr $0000
+
+; Jump table
.addr INSTALL
.addr UNINSTALL
; Common functions of the mouse driver API.
;
- .import return0, popsreg, incsp2
+ .import return0, popsreg, incsp2, mouse_libref
.importzp sreg, ptr1, tmp1, tmp2
.interruptor mouse_irq ; Export as IRQ handler
dey
bpl @L0
+; Set the library reference
+
+ ldy #MOUSE_HDR::LIBREF
+ lda #<mouse_libref
+ sta (ptr1),y
+ iny
+ lda #>mouse_libref
+ sta (ptr1),y
+
; Reset flags
lda #1