#include <windows.h>
#include <windowsx.h>
#include "debug.h"
#include <winioctl.h>
#include "cbmioctl.h"
#include <stdlib.h>
#include "i_opencbm.h"
#include "archlib.h"
#include "arch.h"
#include "vice_comm.h"
Go to the source code of this file.
Defines | |
| #define | DBG_USERMODE |
| #define | DBG_DLL |
| #define | DBG_PROGNAME "OPENCBM.DLL" |
| #define | DBG_IS_DEBUG_C |
| #define | DLL |
| mark: We are building the DLL */ | |
| #define | VICE_ATN_OUT 0x08 |
| #define | VICE_CLK_IN 0x40 |
| #define | VICE_CLK_OUT 0x10 |
| #define | VICE_DATA_IN 0x80 |
| #define | VICE_DATA_OUT 0x20 |
Functions | |
| BOOL CBMAPIDECL | cbm_i_driver_install (OUT PULONG Buffer, IN ULONG BufferLen) |
| Complete driver installation, "external version". | |
| void | cbmarch_lock (CBM_FILE HandleDevice) |
| Lock the parallel port for the driver. | |
| void | cbmarch_unlock (CBM_FILE HandleDevice) |
| Unlock the parallel port for the driver. | |
| int | cbmarch_raw_write (CBM_FILE HandleDevice, const void *Buffer, size_t Count) |
| Write data to the IEC serial bus. | |
| int | cbmarch_raw_read (CBM_FILE HandleDevice, void *Buffer, size_t Count) |
| Read data from the IEC serial bus. | |
| int | cbmarch_listen (CBM_FILE HandleDevice, __u_char DeviceAddress, __u_char SecondaryAddress) |
| Send a LISTEN on the IEC serial bus. | |
| int | cbmarch_talk (CBM_FILE HandleDevice, __u_char DeviceAddress, __u_char SecondaryAddress) |
| Send a TALK on the IEC serial bus. | |
| int | cbmarch_open (CBM_FILE HandleDevice, __u_char DeviceAddress, __u_char SecondaryAddress) |
| Open a file on the IEC serial bus. | |
| int | cbmarch_close (CBM_FILE HandleDevice, __u_char DeviceAddress, __u_char SecondaryAddress) |
| Close a file on the IEC serial bus. | |
| int | cbmarch_unlisten (CBM_FILE HandleDevice) |
| Send an UNLISTEN on the IEC serial bus. | |
| int | cbmarch_untalk (CBM_FILE HandleDevice) |
| Send an UNTALK on the IEC serial bus. | |
| int | cbmarch_get_eoi (CBM_FILE HandleDevice) |
| Get EOI flag after bus read. | |
| int | cbmarch_clear_eoi (CBM_FILE HandleDevice) |
| Reset the EOI flag. | |
| int | cbmarch_reset (CBM_FILE HandleDevice) |
| RESET all devices. | |
| __u_char | cbmarch_pp_read (CBM_FILE HandleDevice) |
| Read a byte from a XP1541/XP1571 cable. | |
| void | cbmarch_pp_write (CBM_FILE HandleDevice, __u_char Byte) |
| Write a byte to a XP1541/XP1571 cable. | |
| int | cbmarch_iec_poll (CBM_FILE HandleDevice) |
| Read status of all bus lines. | |
| void | cbmarch_iec_set (CBM_FILE HandleDevice, int Line) |
| Activate a line on the IEC serial bus. | |
| void | cbmarch_iec_release (CBM_FILE HandleDevice, int Line) |
| Deactivate a line on the IEC serial bus. | |
| void | cbmarch_iec_setrelease (CBM_FILE HandleDevice, int Set, int Release) |
| Activate and deactive a line on the IEC serial bus. | |
| int | cbmarch_iec_wait (CBM_FILE HandleDevice, int Line, int State) |
| Wait for a line to have a specific state. | |
**************************************************************
Definition in file archlib_vice.c.
|
|
Mark: We are building the DLL Definition at line 28 of file archlib_vice.c. |
|
|
This file is "like" debug.c, that is, define some variables Definition at line 34 of file archlib_vice.c. |
|
|
The name of the executable Definition at line 31 of file archlib_vice.c. |
|
|
Mark: We are in user-space (for debug.h) Definition at line 25 of file archlib_vice.c. |
|
||||||||||||
|
Complete driver installation, "external version". This function performs anything that is needed to successfully complete the driver installation.
This version of this function is for exporting out of the DLL. Definition at line 213 of file archlib_vice.c. References cbm_i_i_driver_install(), FUNC_ENTER, and FUNC_LEAVE_INT. |
|
|
Reset the EOI flag. This function resets the EOI ("End of Information") flag which might be still set after reading the IEC serial bus.
Definition at line 729 of file archlib_vice.c. |
|
||||||||||||||||
|
Close a file on the IEC serial bus. This function closes a file on the IEC serial bus.
Definition at line 578 of file archlib_vice.c. |
|
|
Get EOI flag after bus read. This function gets the EOI ("End of Information") flag after reading the IEC serial bus.
If cbm_driver_open() did not succeed, it is illegal to call this function. Definition at line 690 of file archlib_vice.c. |
|
|
Read status of all bus lines. This function reads the state of all lines on the IEC serial bus.
If cbm_driver_open() did not succeed, it is illegal to call this function.
Definition at line 896 of file archlib_vice.c. |
|
||||||||||||
|
Deactivate a line on the IEC serial bus. This function deactivates (sets to 5V) a line on the IEC serial bus.
Definition at line 966 of file archlib_vice.c. |
|
||||||||||||
|
Activate a line on the IEC serial bus. This function activates (sets to 0V) a line on the IEC serial bus.
Definition at line 938 of file archlib_vice.c. |
|
||||||||||||||||
|
Activate and deactive a line on the IEC serial bus. This function activates (sets to 0V, L) and deactivates (set to 5V, H) lines on the IEC serial bus.
Definition at line 1013 of file archlib_vice.c. |
|
||||||||||||||||
|
Wait for a line to have a specific state. This function waits for a line to enter a specific state on the IEC serial bus.
Definition at line 1076 of file archlib_vice.c. |
|
||||||||||||||||
|
Send a LISTEN on the IEC serial bus. This function sends a LISTEN on the IEC serial bus. This prepares a LISTENer, so that it will wait for our bytes we will write in the future.
Definition at line 442 of file archlib_vice.c. |
|
|
Lock the parallel port for the driver. This function locks the driver onto the parallel port. This way, no other program or driver can allocate the parallel port and interfere with the communication.
Definition at line 245 of file archlib_vice.c. |
|
||||||||||||||||
|
Open a file on the IEC serial bus. This function opens a file on the IEC serial bus.
Definition at line 550 of file archlib_vice.c. |
|
|
Read a byte from a XP1541/XP1571 cable. This function reads a single byte from the parallel portion of an XP1541/1571 cable.
If cbm_driver_open() did not succeed, it is illegal to call this function.
Definition at line 803 of file archlib_vice.c. |
|
||||||||||||
|
Write a byte to a XP1541/XP1571 cable. This function writes a single byte to the parallel portion of a XP1541/1571 cable.
If cbm_driver_open() did not succeed, it is illegal to call this function.
Definition at line 850 of file archlib_vice.c. |
|
||||||||||||||||
|
Read data from the IEC serial bus. This function retrieves data after a cbm_talk().
If cbm_driver_open() did not succeed, it is illegal to call this function. Definition at line 384 of file archlib_vice.c. |
|
||||||||||||||||
|
Write data to the IEC serial bus. This function sends data after a cbm_listen().
If cbm_driver_open() did not succeed, it is illegal to call this function. Definition at line 313 of file archlib_vice.c. |
|
|
RESET all devices. This function performs a hardware RESET of all devices on the IEC serial bus.
Control is returned after a delay which ensures that all devices are ready again. If cbm_driver_open() did not succeed, it is illegal to call this function. Definition at line 761 of file archlib_vice.c. |
|
||||||||||||||||
|
Send a TALK on the IEC serial bus. This function sends a TALK on the IEC serial bus. This prepares a TALKer, so that it will prepare to send us some bytes in the future.
Definition at line 496 of file archlib_vice.c. |
|
|
Send an UNLISTEN on the IEC serial bus. This function sends an UNLISTEN on the IEC serial bus. Other than LISTEN and TALK, an UNLISTEN is not directed to just one device, but to all devices on that IEC serial bus.
If cbm_driver_open() did not succeed, it is illegal to call this function. Definition at line 613 of file archlib_vice.c. |
|
|
Unlock the parallel port for the driver. This function unlocks the driver from the parallel port. This way, other programs and drivers can allocate the parallel port and do their own communication with whatever device they use.
Definition at line 270 of file archlib_vice.c. |
|
|
Send an UNTALK on the IEC serial bus. This function sends an UNTALK on the IEC serial bus. Other than LISTEN and TALK, an UNTALK is not directed to just one device, but to all devices on that IEC serial bus.
If cbm_driver_open() did not succeed, it is illegal to call this function. Definition at line 651 of file archlib_vice.c. |
1.4.2