Changes
or 0c0h
out (c),a
out (c),a;; BUG? No need to do this twice
inc b
ld a,092h
ld bc,0f649h ;; select keyboard line 9 (joystick)
out (c),c
out (c),c;; BUG? No need to do this twice.
ld b,0f4h
;; loop reading joystick until input seen or timeout
ld hl,0fa66h ;; timeoutis 0-FA66 because it counts up from this starting point. ;; timeout is 59A loops.
l9c68:
in a,(c)
inc h
jr nz,l9c68
;; timeout. not detected
ld hl,0ffffh
jr l9cbdh
l9c79:
;; detected.
ld de,00420h
add hl,de
l9cbd:
ld (0a410h),hl ;; detected 'position'or 'ffff' for not detected
pop bc
ld a,082h
and a
sbc hl,de
;; BUG? This is jumping just after 0x021 of LD HL and then executing two nops before LD DE,0000h ;;jr nc,$+32 jr nc,l9d06
ld hl,00000h
l9d06:
ld de,00000h
call 0bbc0h ;; gra move absolute
call 0bc32h ;; scr set ink
ld b,00ah
l9d1e:
call 0bd19h ;; mc wait flyback
;; BUG? this is jumping back to the 0x0a in LD B,0ah ;; djnz $-4 djnz l9d1e
ld b,020h
l9d65h: