OpenCBM
Macros | Functions
xa1541/WINDOWS/parburst.c File Reference

Shared library / DLL for accessing the mnib driver functions, windows specific code. More...

#include <windows.h>
#include <windowsx.h>
#include <mmsystem.h>
#include "debug.h"
#include <winioctl.h>
#include "cbmioctl.h"
#include <stdlib.h>
#include "i_opencbm.h"
#include "archlib.h"

Go to the source code of this file.

Macros

#define DBG_USERMODE
 
#define DBG_PROGNAME   "OPENCBM-XA1541.DLL"
 
#define OPENCBM_PLUGIN
 mark: We are building the DLL */
 

Functions

unsigned char CBMAPIDECL opencbm_plugin_parallel_burst_read (CBM_FILE HandleDevice)
 PARBURST: Read from the parallel port. More...
 
void CBMAPIDECL opencbm_plugin_parallel_burst_write (CBM_FILE HandleDevice, unsigned char Value)
 PARBURST: Write to the parallel port. More...
 
int CBMAPIDECL opencbm_plugin_parallel_burst_read_track (CBM_FILE HandleDevice, unsigned char *Buffer, unsigned int Length)
 PARBURST: Read a complete track. More...
 
int CBMAPIDECL opencbm_plugin_parallel_burst_read_track_var (CBM_FILE HandleDevice, unsigned char *Buffer, unsigned int Length)
 PARBURST: Read a variable length track. More...
 
int CBMAPIDECL opencbm_plugin_parallel_burst_write_track (CBM_FILE HandleDevice, unsigned char *Buffer, unsigned int Length)
 PARBURST: Write a complete track. More...
 

Detailed Description

Shared library / DLL for accessing the mnib driver functions, windows specific code.



Author
Tim Schürmann, Spiro Trikaliotis, Arnd

Definition in file xa1541/WINDOWS/parburst.c.

Macro Definition Documentation

#define DBG_PROGNAME   "OPENCBM-XA1541.DLL"

The name of the executable

Definition at line 30 of file xa1541/WINDOWS/parburst.c.

#define DBG_USERMODE

Mark: We are in user-space (for debug.h)

Definition at line 27 of file xa1541/WINDOWS/parburst.c.

Function Documentation

unsigned char CBMAPIDECL opencbm_plugin_parallel_burst_read ( CBM_FILE  HandleDevice)

PARBURST: Read from the parallel port.

This function is a helper function for parallel burst: It reads from the parallel port.

Parameters
HandleDeviceA CBM_FILE which contains the file handle of the driver.
Returns
The value read from the parallel port

If cbm_driver_open() did not succeed, it is illegal to call this function.

Definition at line 63 of file xa1541/WINDOWS/parburst.c.

References CBMT_SINGLEBYTE::Byte, cbm_ioctl(), CBMCTRL, FUNC_ENTER, and FUNC_LEAVE_UCHAR.

int CBMAPIDECL opencbm_plugin_parallel_burst_read_track ( CBM_FILE  HandleDevice,
unsigned char *  Buffer,
unsigned int  Length 
)

PARBURST: Read a complete track.

This function is a helper function for parallel burst: It reads a complete track from the disk

Parameters
HandleDeviceA CBM_FILE which contains the file handle of the driver.
BufferPointer to a buffer which will hold the bytes read.
LengthThe length of the Buffer.
Returns
!= 0 on success.

If cbm_driver_open() did not succeed, it is illegal to call this function.

Definition at line 125 of file xa1541/WINDOWS/parburst.c.

References cbm_ioctl(), CBMCTRL, DBG_PREFIX, DBG_WARN, FUNC_ENTER, and FUNC_LEAVE_INT.

int CBMAPIDECL opencbm_plugin_parallel_burst_read_track_var ( CBM_FILE  HandleDevice,
unsigned char *  Buffer,
unsigned int  Length 
)

PARBURST: Read a variable length track.

This function is a helper function for parallel burst: It reads a variable length track from the disk

Parameters
HandleDeviceA CBM_FILE which contains the file handle of the driver.
BufferPointer to a buffer which will hold the bytes read.
LengthThe length of the Buffer.
Returns
!= 0 on success.

If cbm_driver_open() did not succeed, it is illegal to call this function.

Definition at line 165 of file xa1541/WINDOWS/parburst.c.

References cbm_ioctl(), CBMCTRL, DBG_PREFIX, DBG_WARN, FUNC_ENTER, and FUNC_LEAVE_INT.

void CBMAPIDECL opencbm_plugin_parallel_burst_write ( CBM_FILE  HandleDevice,
unsigned char  Value 
)

PARBURST: Write to the parallel port.

This function is a helper function for parallel burst: It writes to the parallel port.

Parameters
HandleDeviceA CBM_FILE which contains the file handle of the driver.
ValueThe value to be written to the parallel port

If cbm_driver_open() did not succeed, it is illegal to call this function.

Definition at line 90 of file xa1541/WINDOWS/parburst.c.

References CBMT_SINGLEBYTE::Byte, cbm_ioctl(), CBMCTRL, FUNC_ENTER, and FUNC_LEAVE.

int CBMAPIDECL opencbm_plugin_parallel_burst_write_track ( CBM_FILE  HandleDevice,
unsigned char *  Buffer,
unsigned int  Length 
)

PARBURST: Write a complete track.

This function is a helper function for parallel burst: It writes a complete track to the disk

Parameters
HandleDeviceA CBM_FILE which contains the file handle of the driver.
BufferPointer to a buffer which hold the bytes to be written.
LengthThe length of the Buffer.
Returns
!= 0 on success.

If cbm_driver_open() did not succeed, it is illegal to call this function.

Definition at line 205 of file xa1541/WINDOWS/parburst.c.

References cbm_ioctl(), CBMCTRL, DBG_PREFIX, DBG_WARN, FUNC_ENTER, and FUNC_LEAVE_INT.