1
0
mirror of https://github.com/dschmenk/PLASMA.git synced 2024-10-18 07:24:16 +00:00

Prepare for event manager

This commit is contained in:
David Schmenk 2018-04-28 08:00:10 -07:00
parent d5f812d878
commit 67d0762272
2 changed files with 22 additions and 6 deletions

View File

@ -18,7 +18,7 @@ const MOVE_INT_ENABLE = $02
// Mouse driver
//
word rom
byte slot, index, page, vblInt, mouInt
byte slot, index, page, vblDiv, vblInt, mouInt
byte params[]
word setMouseFW, serveMouseFW, readMouseFW, clearMouseFW, posMouseFW, clampMouseFW, homeMouseFW, initMouseFW
word minClamp, maxClamp, xMouse, yMouse, statMouse, modeMouse
@ -93,9 +93,25 @@ asm chkEvt(addr)
STA ESTKH,X
RTS
end
//
// Convert VBL interrupts into millisecond timer increment
//
def chkTimer
return chkEvt(@vblInt)
byte count
word msec
msec = 0
count = chkEvt(@vblInt)
while count
msec = msec + (vblDiv & 2 ?? 16 :: 17)
vblDiv = (vblDiv + 1) % 3
count--
loop
return msec
end
//
// Check for mouse interrupt events
//
def chkMouse
return chkEvt(@mouInt)
end

View File

@ -791,11 +791,11 @@ def wizServiceIP
fin
wiz = wiz + t_channel
next
if ir & $80
if ir & $80
//
// IP conflict
//
pokereg(WIZ_IR, $80)
// IP conflict
//
pokereg(WIZ_IR, $80)
fin
if ir & $40
//