OpenCBM
xu1541/s1_s2_pp.c
Go to the documentation of this file.
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 1999-2001 Michael Klein <michael(dot)klein(at)puffin(dot)lb(dot)shuttle(dot)de>
8  * Copyright 2001-2005,2007 Spiro Trikaliotis
9  *
10 */
11 
20 #ifdef WIN32
21 #include <windows.h>
22 #include <windowsx.h>
23 
25 #define DBG_USERMODE
26 
28 // #define DBG_DLL
29 
31 #define DBG_PROGNAME "OPENCBM-XU1541.DLL"
32 
34 // #define DBG_IS_DEBUG_C
35 
36 #include "debug.h"
37 #endif
38 
39 #include <stdlib.h>
40 
42 #define OPENCBM_PLUGIN
43 //#include "i_opencbm.h"
44 #include "archlib.h"
45 
46 #include "xu1541.h"
47 
48 
49 /*-------------------------------------------------------------------*/
50 /*--------- OPENCBM ARCH FUNCTIONS ----------------------------------*/
51 
66 int CBMAPIDECL
67 opencbm_plugin_s1_read_n(CBM_FILE HandleDevice, unsigned char *data, unsigned int size)
68 {
69  return xu1541_special_read(XU1541_S1, data, size);
70 }
71 
86 int CBMAPIDECL
87 opencbm_plugin_s1_write_n(CBM_FILE HandleDevice, const unsigned char *data, unsigned int size)
88 {
89  return xu1541_special_write(XU1541_S1, data, size);
90 }
91 
106 int CBMAPIDECL
107 opencbm_plugin_s2_read_n(CBM_FILE HandleDevice, unsigned char *data, unsigned int size)
108 {
109  return xu1541_special_read(XU1541_S2, data, size);
110 }
111 
126 int CBMAPIDECL
127 opencbm_plugin_s2_write_n(CBM_FILE HandleDevice, const unsigned char *data, unsigned int size)
128 {
129  return xu1541_special_write(XU1541_S2, data, size);
130 }
131 
146 int CBMAPIDECL
147 opencbm_plugin_pp_dc_read_n(CBM_FILE HandleDevice, unsigned char *data, unsigned int size)
148 {
149  return xu1541_special_read(XU1541_PP, data, size);
150 }
151 
166 int CBMAPIDECL
167 opencbm_plugin_pp_dc_write_n(CBM_FILE HandleDevice, const unsigned char *data, unsigned int size)
168 {
169  return xu1541_special_write(XU1541_PP, data, size);
170 }
171 
186 int CBMAPIDECL
187 opencbm_plugin_pp_cc_read_n(CBM_FILE HandleDevice, unsigned char *data, unsigned int size)
188 {
189  return xu1541_special_read(XU1541_P2, data, size);
190 }
191 
206 int CBMAPIDECL
207 opencbm_plugin_pp_cc_write_n(CBM_FILE HandleDevice, const unsigned char *data, unsigned int size)
208 {
209  return xu1541_special_write(XU1541_P2, data, size);
210 }
int CBMAPIDECL opencbm_plugin_s1_write_n(CBM_FILE HandleDevice, const unsigned char *data, unsigned int size)
Write data with serial1 protocol.
int xu1541_special_read(int mode, unsigned char *data, size_t size)
"special" read data from the xu1541 device
Definition: xu1541.c:636
Define makros for debugging purposes.
#define CBMAPIDECL
Definition: opencbm.h:85
int CBMAPIDECL opencbm_plugin_pp_cc_write_n(CBM_FILE HandleDevice, const unsigned char *data, unsigned int size)
Write data with parallel protocol (cbmcopy)
#define CBM_FILE
Definition: opencbm.h:87
int xu1541_special_write(int mode, const unsigned char *data, size_t size)
"special" write data to the xu1541 device
Definition: xu1541.c:588
int CBMAPIDECL opencbm_plugin_s2_read_n(CBM_FILE HandleDevice, unsigned char *data, unsigned int size)
Read data with serial2 protocol.
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_pp_dc_write_n(CBM_FILE HandleDevice, const unsigned char *data, unsigned int size)
Write data with parallel protocol (d64copy)
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_s1_read_n(CBM_FILE HandleDevice, unsigned char *data, unsigned int size)
Read data with serial1 protocol.