Changes

Light pen driver

178 bytes added, Saturday at 16:37
add hl,de
l9cbd:
ld (0a410h),hl;; detected 'position'
pop bc
ld a,082h
sub_9cc1h:
call sub_9c40h;; detect
ld a,0ffh
cp h
ret z
 
;; detected.
ld de,00002h
call sub_9c94h
ld a,001h
call 0bbdeh ;; gra set pen
call sub_9cc1h;; get position
ld a,0ffh
cp h
push bc
call sub_9d35h
call sub_9c40h;;detect
pop bc
ld a,0ffh
ld a,000h
call 0bbdeh ;; gra set pen
call 09d35hsub_09d35h
ld a,001h
call 0bbdeh ;; gra set pen
l9db4h:
push bc
call sub_9cc1h;; get position
ld a,0ffh
cp h
ret
sub_9dbeh:
push hl
push de
pop hl
ret
 
sub_9de6h:
push hl
push de
pop hl
ret
 
sub_9e08h:
push de
ld de,00002h
push hl
ex de,hl
l9e52h:
ld de,(0a416h)
call sub_9c94h
ret
sub_9e1fh:
call 09c8ah
ld hl,(0a418h)
ex de,hl
pop hl
call 09dbehsub_09dbeh
call 0bbc0h ;; gra move absolute
call 09ed2hsub_09ed2h call sub_9de6hsub_9e98h:sub_09de6h
ld hl,(0a410h)
ld a,0ffh
ret z
jp l9e52h
 
l9ea9h:
call 09eb7hsub_09eb7h
ld a,02fh
call 0bb1eh ;; km test key
ld hl,(0a410h)
jr l9e7ah
 
sub_09e98h:
ld de,0ffech
ld hl,00000h
ld a,001h
call 0bbdeh ;; gra set pen
call 09d35hsub_09d35h
ld a,000h
call 0bbdeh ;; gra set pen
call sub_9cc1h;; get position
ld a,0ffh
cp h
pop de
ret
 
 
ld hl,(0a41ah)
ld de,(0a412h)
ld (l9e52h+1),hl
ret
 
 
call sub_9e98h
l9f15h:
2,590
edits