OpenCBM
|
Shared library / DLL for accessing the driver. More...
Go to the source code of this file.
Macros | |
#define | DBG_USERMODE |
#define | DBG_PROGNAME "OPENCBM.DLL" |
#define | DLL |
mark: We are building the DLL */ | |
Enumerations | |
enum | { TRANSFER_SIZE_DOWNLOAD = 0x100u } |
Download data from a floppy's drive memory. More... | |
Functions | |
int CBMAPIDECL | cbm_upload (CBM_FILE HandleDevice, unsigned char DeviceAddress, int DriveMemAddress, const void *Program, size_t Size) |
Upload a program into a floppy's drive memory. More... | |
int CBMAPIDECL | cbm_download (CBM_FILE HandleDevice, unsigned char DeviceAddress, int DriveMemAddress, void *const Buffer, size_t Size) |
#define DBG_PROGNAME "OPENCBM.DLL" |
#define DBG_USERMODE |
anonymous enum |
Download data from a floppy's drive memory.
This function reads data from the drive's memory via use of "M-R" commands.
HandleDevice | A CBM_FILE which contains the file handle of the driver. |
DeviceAddress | The address of the device on the IEC serial bus. This is known as primary address, too. |
DriveMemAddress | The address in the drive's memory where the program is to be stored. |
Buffer | Pointer to a byte buffer where the data from the drive's memory is stored. |
Size | The size of the data block to be stored, in bytes. |
If cbm_driver_open() did not succeed, it is illegal to call this function.
int CBMAPIDECL cbm_upload | ( | CBM_FILE | HandleDevice, |
unsigned char | DeviceAddress, | ||
int | DriveMemAddress, | ||
const void * | Program, | ||
size_t | Size | ||
) |
Upload a program into a floppy's drive memory.
This function writes a program into the drive's memory via use of "M-W" commands.
HandleDevice | A CBM_FILE which contains the file handle of the driver. |
DeviceAddress | The address of the device on the IEC serial bus. This is known as primary address, too. |
DriveMemAddress | The address in the drive's memory where the program is to be stored. |
Program | Pointer to a byte buffer which holds the program in the caller's address space. |
Size | The size of the program to be stored, in bytes. |
If cbm_driver_open() did not succeed, it is illegal to call this function.
Definition at line 133 of file upload.c.
References cbm_listen(), cbm_raw_write(), cbm_unlisten(), DBG_ASSERT, FUNC_ENTER, and FUNC_LEAVE_INT.
Referenced by vdd_upload().