mirror of
https://github.com/dschmenk/PLASMA.git
synced 2025-01-10 06:30:41 +00:00
Clean mouse init up
This commit is contained in:
parent
1783aaef7a
commit
3eb62ead0d
@ -19,6 +19,7 @@ const MOVE_INT_ENABLE = $02
|
|||||||
//
|
//
|
||||||
word rom
|
word rom
|
||||||
byte slot, index, page
|
byte slot, index, page
|
||||||
|
byte params[]
|
||||||
word setMouseFW, serveMouseFW, readMouseFW, clearMouseFW, posMouseFW, clampMouseFW, homeMouseFW, initMouseFW
|
word setMouseFW, serveMouseFW, readMouseFW, clearMouseFW, posMouseFW, clampMouseFW, homeMouseFW, initMouseFW
|
||||||
word minClamp, maxClamp, xMouse, yMouse, statMouse, modeMouse
|
word minClamp, maxClamp, xMouse, yMouse, statMouse, modeMouse
|
||||||
asm equates
|
asm equates
|
||||||
@ -104,11 +105,24 @@ export def mouseInit
|
|||||||
params:2 = @serviceMouse
|
params:2 = @serviceMouse
|
||||||
syscall($40, @params)
|
syscall($40, @params)
|
||||||
call(initMouseFW, $00, slot, page, $04)
|
call(initMouseFW, $00, slot, page, $04)
|
||||||
call(setMouseFW, $09, slot, page, $04)
|
call(setMouseFW, $07, slot, page, $04)
|
||||||
return 0
|
return 0
|
||||||
fin
|
fin
|
||||||
return -1
|
return -1
|
||||||
end
|
end
|
||||||
|
def printmouse#0
|
||||||
|
word x, y
|
||||||
|
byte stat
|
||||||
|
|
||||||
|
while ^$C000 < 128
|
||||||
|
x, y, stat = readMouse
|
||||||
|
^$24 = ^$20
|
||||||
|
puti(x); puts(", ")
|
||||||
|
puti(y); puts(", $")
|
||||||
|
putb(stat); puts(" ")
|
||||||
|
loop
|
||||||
|
^$C010
|
||||||
|
end
|
||||||
//
|
//
|
||||||
// Identify Mouse card/slot and initialize
|
// Identify Mouse card/slot and initialize
|
||||||
//
|
//
|
||||||
@ -142,6 +156,7 @@ for rom = $C100 to $C700 step $0100
|
|||||||
readMouse.1 = index
|
readMouse.1 = index
|
||||||
puts("Found Mouse in slot #"); putc('0' + ((rom >> 8) & $07)); putln
|
puts("Found Mouse in slot #"); putc('0' + ((rom >> 8) & $07)); putln
|
||||||
mouseInit
|
mouseInit
|
||||||
|
printmouse
|
||||||
return modkeep
|
return modkeep
|
||||||
fin
|
fin
|
||||||
next
|
next
|
||||||
|
Loading…
x
Reference in New Issue
Block a user