l_oliveira

Untitled

Dec 24th, 2018
100
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. ; ix = this
  2. ; f <- c: found
  3. Franky_Detect:
  4.     xor a
  5.     out (40H),a  ; make sure no known switched I/O device is listening
  6.     di
  7.     ld a,0C0h
  8.     ld b,081h
  9.     call WR_VDP_Franky      ; MASK Franky VDP IRQ
  10.     ld a,007h
  11.     ld b,080h
  12.     call WR_VDP_Franky      ; Set Franky VDP into M4 mode, EXTVID active
  13.     in a,(89h)
  14.     in a,(89h)
  15.     and 060h
  16.     ret nz
  17.     in a,(48h)
  18.     cp 0D5h
  19.     ret nz
  20.     ld a,006h
  21.     ld b,080h
  22.     call WR_VDP_Franky      ; Disable Franky VDP EXTVID mode
  23.     ei
  24.     scf
  25.     ret
  26.  
  27. WR_VDP_Franky:
  28.     out (89h),a
  29.     ld a,b
  30.     out (89h),a
  31.     ret
Add Comment
Please, Sign In to add comment