mirror of
https://github.com/dschmenk/PLASMA.git
synced 2025-01-09 13:33:26 +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
|
||||
byte slot, index, page
|
||||
byte params[]
|
||||
word setMouseFW, serveMouseFW, readMouseFW, clearMouseFW, posMouseFW, clampMouseFW, homeMouseFW, initMouseFW
|
||||
word minClamp, maxClamp, xMouse, yMouse, statMouse, modeMouse
|
||||
asm equates
|
||||
@ -104,11 +105,24 @@ export def mouseInit
|
||||
params:2 = @serviceMouse
|
||||
syscall($40, @params)
|
||||
call(initMouseFW, $00, slot, page, $04)
|
||||
call(setMouseFW, $09, slot, page, $04)
|
||||
call(setMouseFW, $07, slot, page, $04)
|
||||
return 0
|
||||
fin
|
||||
return -1
|
||||
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
|
||||
//
|
||||
@ -142,6 +156,7 @@ for rom = $C100 to $C700 step $0100
|
||||
readMouse.1 = index
|
||||
puts("Found Mouse in slot #"); putc('0' + ((rom >> 8) & $07)); putln
|
||||
mouseInit
|
||||
printmouse
|
||||
return modkeep
|
||||
fin
|
||||
next
|
||||
|
Loading…
x
Reference in New Issue
Block a user