(All functions except cbm_driver_open():
f must be a valid file
descriptor)
Opens the driver. port
isn't used by now and should be 0.
After successful completion, 0 is returned along with a valid CBM_FILE
descriptor in f
.
Closes the driver.
The equivalent to cbmctrl lock. Make sure the parallel port is kept locked even if the driver is closed with cbm_driver_close().
The equivalent to cbmctrl unlock. Unlock the parallel port as soon is the driver is closed with cbm_driver_close().
Retrieve data after cbm_talk();
. At most size
bytes are read.
Return value is the actual number of bytes read. < indicates an error.
Send data after cbm_listen();
. At most size
bytes are written,
Return value is the actual number of bytes written. < indicates an error.
Tell device dev to listen on secondary channel secadr. Return value is 0 on success, < 0 means error.
Tell device dev to talk on secondary channel secadr. Return value is 0 on success, < 0 means error.
Prepare device dev for opening a file. This device listens for the file name after this call which is normally sent by a call to the write()-function followed by an unlisten() call. Return value 0 on success, < 0 means error.
Close file associated with secondary address secadr on device dev. Return value 0 on success, < 0 means error.
Send unlisten on bus. Return value 0 on success, < 0 means error.
Send untalk on bus. Return value 0 on success, < 0 means error.
Get EOI flag after bus read, return value is 0 with no EOI, otherwise 1. When EOI is set to 1, the active talker has nothing more to send.
Reset EOI flag. Return value 0 on success, < 0 means error.
Do a hardware reset on all connected devices. Control is returned after a 5 second delay.
Read byte from XP1541/XP1571 bus. No handshaking or such involved.
Write byte to XP1541/XP1571 bus. No handshaking or such involved.
Read status of all bus lines. Return value is a combination of
IEC_ATN
, IEC_CLOCK
and IEC_DATA
.
Get (logical) status of line line.
Activate lines line (set to 0V). line can be one of or a combination with OR of any of IEC_DATA, IEC_CLOCK, IEC_ATN.
Release lines line (set to 5V). line can be one of or a combination with OR of any of IEC_DATA, IEC_CLOCK, IEC_ATN.
Set lines setline (set to 0V) and release line releaseline (set to 5V) setline and resetline can each be one of or a combination with OR of any of IEC_DATA, IEC_CLOCK, IEC_ATN. If a line is part of both setline and resetline, the outcome is undefined.
Experimental, do not use.
Write prog into device dev's memory space via a series of "M-W"
commands.
Read device status info buf, at most bufsize bytes are read. Returns atoi(buf).
Execute command cmd. Returns number of bytes actually written. if len is 0, cmd is considered a 0-terminated string.
Tries to identify the device drv. The hardware type is returned in t,
type_str contains a descriptive string which also includes the drives'
operating system. Both t and type_str may be NULL
in case the
caller is not interrested in any of both values.
The return value is 0
if the device responded to the "M-R"
command,
even if it could not be identified, < 0 indicates error.
Tries to identify the device drv. The hardware type is returned in t1,
t2 contains whether the drive has an parallel (XP1541) cable attached.
Both t1 and t2 may be NULL
in case the caller is not interrested
in any of both values.
The return value is 0
if the device responded to the "M-R"
command,
even if it could not be identified, < 0 indicates error.
Converts one character character from PetSCII to ASCII.
Converts one character character from ASCII to PetSCII.
Convert a null-terminated string str from PetSCII to ASCII.
Convert a null-terminated string str from ASCII to PetSCII.
Support function for mnib. Do not use.
Support function for mnib. Do not use.
Support function for mnib. Do not use.
Support function for mnib. Do not use.
Not documented yet. See libd64copy and d64copy source.
Types and prototypes are defined in d64copy.h
.
Not documented yet. See libcbmcopy and cbmcopy source.
Types and prototypes are defined in cbmcopy.h
.