You can easily implement EnterMice compatibility with this simple Boxsoft routine arranged by Bruce Tanner. It must be called every frame, 1/50 seg. X_REL and Y_REL must be consecutive on memory.
ld hl, X_REL ;first byte, X displacement since last lecture
ld b,3 ;long delay
call READ_8BIT
inc hl ;Y_REL
ld b,2 ;short delay
call READ_8BIT ;leaves B=0
xor a
out (0B5h), a
in a, (0B6h)
and 6
xor 6
srl a ; here the status of J column is on carry, but is discarded
srl a
rl b ; K column is saved in b
ld (SECBUTT_STATUS), a ; L column is the Right Mouse Button
ld a,b
ld (MAINBUTT_STATUS), a ; K column is the Left Mouse Button
ld a, (HL) ;Y-rel
dec hl ;X-REL
or (hl) ;If a=0, no movement
ret
WAIT:
nop
nop
nop
dec b
jr nz, WAIT
ret
;
READ_8BIT: ld a,2 ;RTS low
out (0B7h), a
call WAIT_READ_4BIT ; read four higher bits
xor a ;RTS high
out (0B7h), a
ld b, 2 ;short delay
WAIT_READ_4BIT: call WAIT ;leaves B=0
READ_4BIT:
ld d, b ;d=0
ld b, 4
READ_LOOP:
ld a, b
out (0B5h), a
in a, (0B6h)
rra ;data is read from K column if EnterMice, J if Boxsoft
rra
rl d
djnz READ_LOOP
ld a, d
rld
ret