; C128 device manager external API jump table
;
; You need to call those functions in bank 10 (mmu config register: %00101000)
; all functions will clobber a, x and y registers, and may modify the current active device,
; current input and current output device. The later will be set to keyboard and screen
; on exit.


; header for identification
; header conists of the 3 letters 'ned' in petscii format
api_header          = $807b 

; api version: 16bit word, the current version as of this writing is $0003.
api_version         = $807e


; -------------------------------------------------------------------------------------------------
; api calls start here!
; -------------------------------------------------------------------------------------------------


ext_enable_io       = $8080

; re-enables hyperspeed io
; intended to be used after re-initializing the io vectors.


ext_get_drivetype   = $8083

; registers used: 
;     device to be tested in A
;     returns drive type in A, warning, this will change the 'current device' variable on the zp
;
; $01 : unknown type
; $02 : UII drive A (get_drivetype will not return this value)
; $03 : UII drive B (get_drivetype will not return this value)
; $04 : sd2iec (recognized by device init message)
; $05 : microIEC (sd2iec like, recognized by device init message)
; $06 : printer (yes.. those exist as well, simply recognized by using dev id 4 or 5)
; $07 : 1526 plotter (recognized by device id...)
; $08 : UII(+) software IEC (recognized by device init message)
; $09 : pi1541 (iec browser mode, recognized by device init message)
; $28 : 1540 (recognized by drive rom signature)
; $29 : 1541 (recognized by drive rom signature)
; $46 : 1570 (recognized by drive rom signature)
; $47 : 1571 (recognized by drive rom signature)
; $51 ; 1581 (recognized by drive rom signature)
; $80 : CMD RL type drive (recognized by drive rom signature)
; $c0 : CMD HD type drive (recognized by drive rom signature)
; $e0 : CMD FD type drive (recognized by drive rom signature)
; $f0 : CMD RD type drive (recognized by drive rom signature)


; returns the device ID for hyperspeed drive in A
; any 'negative' number (bit 7 = 1) means not present.
ext_get_hs_id       = $8086

; set the device ID for hyperspeed drive to value in A
ext_set_hs_id       = $8089

; run the file pointed at by a call to SETNAM in 128 mode
ext_run128          = $808c

; run the file pointed at by a call to SETNAM in 64 mode
ext_run64           = $808f

; restore snapshot
ext_restore_snapshot = $8092

; currently not implemented
ext_make_snapshot = $8095

; enable extended break handler/ram dump
ext_enable_brk_handler  = $8098 ; unused

; disable extended break handler/ram dump
ext_disable_brk_handler = $809b ; unused

