Added library reference mouse_libref to MOU interface.

This commit is contained in:
Oliver Schmidt 2013-06-01 00:53:17 +02:00
parent 23650cb946
commit 744abda24f
12 changed files with 52 additions and 12 deletions

View File

@ -56,6 +56,7 @@
.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
@ -96,7 +97,7 @@
;------------------------------------------------------------------------------
; 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.

View File

@ -2,8 +2,9 @@
; 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

View File

@ -34,7 +34,10 @@ status := $0778
.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

View File

@ -2,8 +2,9 @@
; 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

View File

@ -23,7 +23,11 @@ HEADER:
.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

View File

@ -22,7 +22,11 @@ HEADER:
.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

View File

@ -23,7 +23,11 @@ HEADER:
.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

View File

@ -2,8 +2,9 @@
; 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

View File

@ -42,7 +42,11 @@ HEADER:
.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

View File

@ -41,7 +41,11 @@ HEADER:
.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

View File

@ -23,7 +23,11 @@ HEADER:
.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

View File

@ -4,7 +4,7 @@
; 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
@ -64,6 +64,15 @@ _mouse_install:
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