OpenCBM
archlib.h
1 /*
2  * This program is free software; you can redistribute it and/or
3  * modify it under the terms of the GNU General Public License
4  * as published by the Free Software Foundation; either version
5  * 2 of the License, or (at your option) any later version.
6  *
7  * Copyright 2005-2009 Spiro Trikaliotis
8  */
9 
10 #ifndef ARCHLIB_H
11 #define ARCHLIB_H
12 
13 #include "opencbm.h"
14 
15 #undef EXTERN
16 
17 #include "opencbm-plugin.h"
18 
19 #if defined WIN32
20 
21 # if defined OPENCBM_PLUGIN
22 # define EXTERN __declspec(dllexport)
23 # else
24 # define EXTERN __declspec(dllimport)
25 # endif
26 
27 #else
28 # define EXTERN extern
29 #endif
30 
56 
59 EXTERN opencbm_plugin_parallel_burst_read_n_t opencbm_plugin_parallel_burst_read_n;
60 EXTERN opencbm_plugin_parallel_burst_write_n_t opencbm_plugin_parallel_burst_write_n;
64 EXTERN opencbm_plugin_parallel_burst_read_t opencbm_plugin_srq_burst_read;
65 EXTERN opencbm_plugin_parallel_burst_write_t opencbm_plugin_srq_burst_write;
66 EXTERN opencbm_plugin_parallel_burst_read_n_t opencbm_plugin_srq_burst_read_n;
67 EXTERN opencbm_plugin_parallel_burst_write_n_t opencbm_plugin_srq_burst_write_n;
68 EXTERN opencbm_plugin_parallel_burst_read_track_t opencbm_plugin_srq_burst_read_track;
69 EXTERN opencbm_plugin_parallel_burst_write_track_t opencbm_plugin_srq_burst_write_track;
70 
71 EXTERN opencbm_plugin_tap_prepare_capture_t opencbm_plugin_tap_prepare_capture;
72 EXTERN opencbm_plugin_tap_prepare_write_t opencbm_plugin_tap_prepare_write;
73 EXTERN opencbm_plugin_tap_get_sense_t opencbm_plugin_tap_get_sense;
74 EXTERN opencbm_plugin_tap_wait_for_stop_sense_t opencbm_plugin_tap_wait_for_stop_sense;
75 EXTERN opencbm_plugin_tap_wait_for_play_sense_t opencbm_plugin_tap_wait_for_play_sense;
76 EXTERN opencbm_plugin_tap_motor_on_t opencbm_plugin_tap_motor_on;
77 EXTERN opencbm_plugin_tap_motor_off_t opencbm_plugin_tap_motor_off;
78 EXTERN opencbm_plugin_tap_start_capture_t opencbm_plugin_tap_start_capture;
79 EXTERN opencbm_plugin_tap_start_write_t opencbm_plugin_tap_start_write;
80 EXTERN opencbm_plugin_tap_get_ver_t opencbm_plugin_tap_get_ver;
81 EXTERN opencbm_plugin_tap_download_config_t opencbm_plugin_tap_download_config;
82 EXTERN opencbm_plugin_tap_upload_config_t opencbm_plugin_tap_upload_config;
83 EXTERN opencbm_plugin_tap_break_t opencbm_plugin_tap_break;
84 
93 
96 
97 EXTERN opencbm_plugin_init_t opencbm_plugin_init;
98 EXTERN opencbm_plugin_uninit_t opencbm_plugin_uninit;
99 
100 #endif // #ifndef ARCHLIB_H
void CBMAPIDECL opencbm_plugin_iec_release(CBM_FILE HandleDevice, int Line)
Deactivate a line on the IEC serial bus.
Definition: WINDOWS/iec.c:881
void CBMAPIDECL opencbm_plugin_driver_close(CBM_FILE HandleDevice)
Closes the driver.
Definition: i_opencbm.c:454
int CBMAPIDECL opencbm_plugin_pp_dc_read_n_t(CBM_FILE HandleDevice, unsigned char *data, unsigned int size)
read a block of data from the OpenCBM backend with protocol parallel/d64copy
const char *CBMAPIDECL opencbm_plugin_get_driver_name(const char *const Port)
Get the name of the driver for a specific parallel port.
Definition: i_opencbm.c:347
int CBMAPIDECL opencbm_plugin_driver_open(CBM_FILE *HandleDevice, const char *const Port)
Opens the driver.
Definition: i_opencbm.c:405
int CBMAPIDECL opencbm_plugin_open(CBM_FILE HandleDevice, unsigned char DeviceAddress, unsigned char SecondaryAddress)
Open a file on the IEC serial bus.
Definition: WINDOWS/iec.c:499
int CBMAPIDECL opencbm_plugin_s1_write_n(CBM_FILE HandleDevice, const unsigned char *data, unsigned int size)
Write data with serial1 protocol.
int CBMAPIDECL opencbm_plugin_pp_cc_read_n_t(CBM_FILE HandleDevice, unsigned char *data, unsigned int size)
read a block of data from the OpenCBM backend with protocol parallel/cbmcopy
void CBMAPIDECL opencbm_plugin_parallel_burst_write(CBM_FILE HandleDevice, unsigned char Value)
PARBURST: Write to the parallel port.
int CBMAPIDECL opencbm_plugin_raw_read_t(CBM_FILE HandleDevice, void *Buffer, size_t Count)
@@@
int CBMAPIDECL opencbm_plugin_iec_poll_t(CBM_FILE HandleDevice)
@@@
int CBMAPIDECL opencbm_plugin_raw_write_t(CBM_FILE HandleDevice, const void *Buffer, size_t Count)
@@@
int CBMAPIDECL opencbm_plugin_close(CBM_FILE HandleDevice, unsigned char DeviceAddress, unsigned char SecondaryAddress)
Close a file on the IEC serial bus.
Definition: WINDOWS/iec.c:543
void CBMAPIDECL opencbm_plugin_driver_close_t(CBM_FILE HandleDevice)
@@@
int CBMAPIDECL opencbm_plugin_listen_t(CBM_FILE HandleDevice, unsigned char DeviceAddress, unsigned char SecondaryAddress)
@@@
void CBMAPIDECL opencbm_plugin_iec_set(CBM_FILE HandleDevice, int Line)
Activate a line on the IEC serial bus.
Definition: WINDOWS/iec.c:849
int CBMAPIDECL opencbm_plugin_untalk_t(CBM_FILE HandleDevice)
@@@
unsigned char CBMAPIDECL opencbm_plugin_pp_read_t(CBM_FILE HandleDevice)
@@@
void CBMAPIDECL opencbm_plugin_pp_write_t(CBM_FILE HandleDevice, unsigned char Byte)
@@@
int CBMAPIDECL opencbm_plugin_s1_read_n_t(CBM_FILE HandleDevice, unsigned char *data, unsigned int size)
read a block of data from the OpenCBM backend with protocol serial-1
unsigned char CBMAPIDECL opencbm_plugin_parallel_burst_read(CBM_FILE HandleDevice)
PARBURST: Read from the parallel port.
int CBMAPIDECL opencbm_plugin_iec_dbg_read_t(CBM_FILE HandleDevice)
@@@
int CBMAPIDECL opencbm_plugin_iec_dbg_write(CBM_FILE HandleDevice, unsigned char Value)
Write a byte to the parallel port output register.
Definition: WINDOWS/iec.c:1070
void CBMAPIDECL opencbm_plugin_iec_release_t(CBM_FILE HandleDevice, int Line)
@@@
int CBMAPIDECL opencbm_plugin_pp_cc_write_n(CBM_FILE HandleDevice, const unsigned char *data, unsigned int size)
Write data with parallel protocol (cbmcopy)
int CBMAPIDECL opencbm_plugin_iec_poll(CBM_FILE HandleDevice)
Read status of all bus lines.
Definition: WINDOWS/iec.c:818
int CBMAPIDECL opencbm_plugin_unlisten(CBM_FILE HandleDevice)
Send an UNLISTEN on the IEC serial bus.
Definition: WINDOWS/iec.c:581
Plugin DLL interface.
int CBMAPIDECL opencbm_plugin_parallel_burst_read_track_var_t(CBM_FILE HandleDevice, unsigned char *Buffer, unsigned int Length)
@@@
void CBMAPIDECL opencbm_plugin_iec_set_t(CBM_FILE HandleDevice, int Line)
@@@
int CBMAPIDECL opencbm_plugin_talk_t(CBM_FILE HandleDevice, unsigned char DeviceAddress, unsigned char SecondaryAddress)
@@@
int CBMAPIDECL opencbm_plugin_raw_write(CBM_FILE HandleDevice, const void *Buffer, size_t Count)
Write data to the IEC serial bus.
Definition: WINDOWS/iec.c:323
int CBMAPIDECL opencbm_plugin_iec_dbg_read(CBM_FILE HandleDevice)
Read a byte from the parallel port input register.
Definition: WINDOWS/iec.c:1026
const char *CBMAPIDECL opencbm_plugin_get_driver_name_t(const char *const Port)
@@@
#define EXTERN
Definition: opencbm.h:84
int CBMAPIDECL opencbm_plugin_pp_cc_write_n_t(CBM_FILE HandleDevice, const unsigned char *data, unsigned int size)
write a block of data to the OpenCBM backend with protocol parallel/cbmcopy
int CBMAPIDECL opencbm_plugin_parallel_burst_write_n_t(CBM_FILE HandleDevice, unsigned char *Buffer, unsigned int Length)
@@@
int CBMAPIDECL opencbm_plugin_driver_open_t(CBM_FILE *HandleDevice, const char *const Port)
@@@
int CBMAPIDECL opencbm_plugin_listen(CBM_FILE HandleDevice, unsigned char DeviceAddress, unsigned char SecondaryAddress)
Send a LISTEN on the IEC serial bus.
Definition: WINDOWS/iec.c:421
int CBMAPIDECL opencbm_plugin_close_t(CBM_FILE HandleDevice, unsigned char DeviceAddress, unsigned char SecondaryAddress)
@@@
int CBMAPIDECL opencbm_plugin_open_t(CBM_FILE HandleDevice, unsigned char DeviceAddress, unsigned char SecondaryAddress)
@@@
int CBMAPIDECL opencbm_plugin_unlisten_t(CBM_FILE HandleDevice)
@@@
int CBMAPIDECL opencbm_plugin_parallel_burst_write_track_t(CBM_FILE HandleDevice, unsigned char *Buffer, unsigned int Length)
@@@
int CBMAPIDECL opencbm_plugin_iec_wait_t(CBM_FILE HandleDevice, int Line, int State)
@@@
void CBMAPIDECL opencbm_plugin_lock_t(CBM_FILE HandleDevice)
@@@
void CBMAPIDECL opencbm_plugin_unlock(CBM_FILE HandleDevice)
Unlock the parallel port for the driver.
Definition: WINDOWS/iec.c:289
int CBMAPIDECL opencbm_plugin_iec_dbg_write_t(CBM_FILE HandleDevice, unsigned char Value)
@@@
int CBMAPIDECL opencbm_plugin_parallel_burst_read_track(CBM_FILE HandleDevice, unsigned char *Buffer, unsigned int Length)
PARBURST: Read a complete track.
int CBMAPIDECL opencbm_plugin_s2_read_n_t(CBM_FILE HandleDevice, unsigned char *data, unsigned int size)
read a block of data from the OpenCBM backend with protocol serial-2
int CBMAPIDECL opencbm_plugin_reset(CBM_FILE HandleDevice)
RESET all devices.
Definition: WINDOWS/iec.c:706
unsigned char CBMAPIDECL opencbm_plugin_pp_read(CBM_FILE HandleDevice)
Read a byte from a XP1541/XP1571 cable.
Definition: WINDOWS/iec.c:748
int CBMAPIDECL opencbm_plugin_parallel_burst_read_track_var(CBM_FILE HandleDevice, unsigned char *Buffer, unsigned int Length)
PARBURST: Read a variable length track.
void CBMAPIDECL opencbm_plugin_iec_setrelease(CBM_FILE HandleDevice, int Set, int Release)
Activate and deactive a line on the IEC serial bus.
Definition: WINDOWS/iec.c:922
int CBMAPIDECL opencbm_plugin_s2_read_n(CBM_FILE HandleDevice, unsigned char *data, unsigned int size)
Read data with serial2 protocol.
void CBMAPIDECL opencbm_plugin_unlock_t(CBM_FILE HandleDevice)
@@@
int CBMAPIDECL opencbm_plugin_pp_dc_read_n(CBM_FILE HandleDevice, unsigned char *data, unsigned int size)
Read data with parallel protocol (d64copy)
int CBMAPIDECL opencbm_plugin_pp_cc_read_n(CBM_FILE HandleDevice, unsigned char *data, unsigned int size)
Read data with parallel protocol (cbmcopy)
int CBMAPIDECL opencbm_plugin_init_t(void)
@@@
int CBMAPIDECL opencbm_plugin_talk(CBM_FILE HandleDevice, unsigned char DeviceAddress, unsigned char SecondaryAddress)
Send a TALK on the IEC serial bus.
Definition: WINDOWS/iec.c:461
void CBMAPIDECL opencbm_plugin_iec_setrelease_t(CBM_FILE HandleDevice, int Set, int Release)
@@@
int CBMAPIDECL opencbm_plugin_untalk(CBM_FILE HandleDevice)
Send an UNTALK on the IEC serial bus.
Definition: WINDOWS/iec.c:613
int CBMAPIDECL opencbm_plugin_clear_eoi(CBM_FILE HandleDevice)
Reset the EOI flag.
Definition: WINDOWS/iec.c:673
int CBMAPIDECL opencbm_plugin_clear_eoi_t(CBM_FILE HandleDevice)
@@@
unsigned char CBMAPIDECL opencbm_plugin_parallel_burst_read_t(CBM_FILE HandleDevice)
@@@
DLL interface for accessing the driver.
int CBMAPIDECL opencbm_plugin_iec_wait(CBM_FILE HandleDevice, int Line, int State)
Wait for a line to have a specific state.
Definition: WINDOWS/iec.c:963
int CBMAPIDECL opencbm_plugin_s2_write_n_t(CBM_FILE HandleDevice, const unsigned char *data, unsigned int size)
write a block of data to the OpenCBM backend with protocol serial-2
int CBMAPIDECL opencbm_plugin_parallel_burst_write_track(CBM_FILE HandleDevice, unsigned char *Buffer, unsigned int Length)
PARBURST: Write a complete track.
void CBMAPIDECL opencbm_plugin_lock(CBM_FILE HandleDevice)
Lock the parallel port for the driver.
Definition: WINDOWS/iec.c:262
int CBMAPIDECL opencbm_plugin_get_eoi_t(CBM_FILE HandleDevice)
@@@
int CBMAPIDECL opencbm_plugin_pp_dc_write_n(CBM_FILE HandleDevice, const unsigned char *data, unsigned int size)
Write data with parallel protocol (d64copy)
int CBMAPIDECL opencbm_plugin_pp_dc_write_n_t(CBM_FILE HandleDevice, const unsigned char *data, unsigned int size)
write a block of data to the OpenCBM backend with protocol parallel/d64copy
int CBMAPIDECL opencbm_plugin_parallel_burst_read_track_t(CBM_FILE HandleDevice, unsigned char *Buffer, unsigned int Length)
@@@
int CBMAPIDECL opencbm_plugin_get_eoi(CBM_FILE HandleDevice)
Get EOI flag after bus read.
Definition: WINDOWS/iec.c:646
int CBMAPIDECL opencbm_plugin_raw_read(CBM_FILE HandleDevice, void *Buffer, size_t Count)
Read data from the IEC serial bus.
Definition: WINDOWS/iec.c:370
int CBMAPIDECL opencbm_plugin_reset_t(CBM_FILE HandleDevice)
@@@
int CBMAPIDECL opencbm_plugin_tap_prepare_capture_t(CBM_FILE HandleDevice, int *Status)
@@@
int CBMAPIDECL opencbm_plugin_s2_write_n(CBM_FILE HandleDevice, const unsigned char *data, unsigned int size)
Write data with serial2 protocol.
int CBMAPIDECL opencbm_plugin_parallel_burst_read_n_t(CBM_FILE HandleDevice, unsigned char *Buffer, unsigned int Length)
@@@
int CBMAPIDECL opencbm_plugin_s1_read_n(CBM_FILE HandleDevice, unsigned char *data, unsigned int size)
Read data with serial1 protocol.
void CBMAPIDECL opencbm_plugin_pp_write(CBM_FILE HandleDevice, unsigned char Byte)
Write a byte to a XP1541/XP1571 cable.
Definition: WINDOWS/iec.c:783
void CBMAPIDECL opencbm_plugin_uninit_t(void)
@@@
void CBMAPIDECL opencbm_plugin_parallel_burst_write_t(CBM_FILE HandleDevice, unsigned char Value)
@@@
int CBMAPIDECL opencbm_plugin_s1_write_n_t(CBM_FILE HandleDevice, const unsigned char *data, unsigned int size)
write a block of data to the OpenCBM backend with protocol serial-1