29 IEC_CABLETYPE_UNSPEC = -2,
30 IEC_CABLETYPE_AUTO = -1, IEC_CABLETYPE_XM = 0, IEC_CABLETYPE_XA = 1,
38 #define CBM_REGKEY_SERVICE "System\\CurrentControlSet\\Services\\opencbm"
42 #define CBM_REGKEY_SERVICE_DEFAULTLPT "DefaultLpt"
46 #define CBM_REGKEY_SERVICE_IECCABLE "CableType"
50 #define CBM_REGKEY_SERVICE_PERMLOCK "PermanentlyLock"
53 #define CBM_REGKEY_SERVICE_DEBUGFLAGS "DebugFlags"
56 #define CBM_REGKEY_SERVICE_DLL_DEBUGFLAGS "DllDebugFlags"
59 #define OPENCBM_DRIVERNAME "opencbm"
65 #define CBMDEVICENAME_MAINPART "\\\\.\\" OPENCBM_DRIVERNAME
71 DEFINE_GUID(GUID_OPENCBM, 0x9c3b5b5e, 0x558e, 0x47cc, 0x9c, 0x5, 0xf1, 0xfc, 0xf5, 0x17, 0x54, 0x7);
74 #define IEC_LINE_DATA 0x01
76 #define IEC_LINE_CLOCK 0x02
78 #define IEC_LINE_ATN 0x04
80 #define IEC_LINE_RESET 0x08
146 #define CBMT_I_INSTALL_OUT_GET_VERSION_MAJOR(_x) (((_x) >> 24) & 0xFF)
148 #define CBMT_I_INSTALL_OUT_GET_VERSION_MINOR(_x) (((_x) >> 16) & 0xFF)
150 #define CBMT_I_INSTALL_OUT_GET_VERSION_SUBMINOR(_x) (((_x) >> 8) & 0xFF)
152 #define CBMT_I_INSTALL_OUT_GET_VERSION_DEVEL(_x) (((_x) >> 0) & 0xFF)
155 #define CBMT_I_INSTALL_OUT_MAKE_VERSION(_x, _y, _z, _w) \
156 (((((_x) << 8 | (_y)) << 8 | (_z)) << 8 | (_w)))
160 #define CBMT_I_INSTALL_OUT_GET_VERSION_EX_BUGFIX(_x) (((_x) >> 0) & 0xFF)
163 #define CBMT_I_INSTALL_OUT_MAKE_VERSION_EX(_w) \
254 #define CBMCTRL_BASE 0x0000A424
256 #define OPENCBM_IOCTL_INDEX 0x823
259 #define _CBMIO(_a,_b) CTL_CODE(CBMCTRL_BASE, (OPENCBM_IOCTL_INDEX+(_b)), \
260 METHOD_BUFFERED, FILE_ANY_ACCESS)
264 #define CBMCTRL_TALK _CBMIO(CBMCTRL_BASE, 0) // CBMT_TALK_IN -
265 #define CBMCTRL_LISTEN _CBMIO(CBMCTRL_BASE, 1) // CBMT_LISTEN_IN -
267 #define CBMCTRL_UNTALK _CBMIO(CBMCTRL_BASE, 2) // - -
269 #define CBMCTRL_UNLISTEN _CBMIO(CBMCTRL_BASE, 3) // - -
271 #define CBMCTRL_OPEN _CBMIO(CBMCTRL_BASE, 4) // CBMT_OPEN_IN -
273 #define CBMCTRL_CLOSE _CBMIO(CBMCTRL_BASE, 5) // CBMT_CLOSE_IN -
275 #define CBMCTRL_RESET _CBMIO(CBMCTRL_BASE, 6) // - -
277 #define CBMCTRL_GET_EOI _CBMIO(CBMCTRL_BASE, 7) // - CBMT_GET_EOI_OUT
279 #define CBMCTRL_CLEAR_EOI _CBMIO(CBMCTRL_BASE, 8) // - -
283 #define CBMCTRL_PP_READ _CBMIO(CBMCTRL_BASE, 10) // - CBMT_PP_READ_OUT
284 #define CBMCTRL_PP_WRITE _CBMIO(CBMCTRL_BASE, 11) // CBMT_PP_WRITE_IN -
286 #define CBMCTRL_IEC_POLL _CBMIO(CBMCTRL_BASE, 12) // - CBMT_IEC_POLL_OUT
288 #define CBMCTRL_IEC_SET _CBMIO(CBMCTRL_BASE, 13) // CBMT_IEC_SET_IN -
290 #define CBMCTRL_IEC_RELEASE _CBMIO(CBMCTRL_BASE, 14) // CBMT_IEC_RELEASE_IN -
292 #define CBMCTRL_IEC_WAIT _CBMIO(CBMCTRL_BASE, 15) // CBMT_IEC_WAIT_IN CBMT_IEC_WAIT_OUT
296 #define CBMCTRL_I_INSTALL _CBMIO(CBMCTRL_BASE, 16) // - CBMT_I_INSTALL_OUT (or an array of it)
299 #define CBMCTRL_I_READDBG _CBMIO(CBMCTRL_BASE, 17) // - char array which will be filled
304 #define CBMCTRL_IEC_SETRELEASE _CBMIO(CBMCTRL_BASE, 18) // CBMT_IEC_SETRELEASE_IN -
307 #define CBMCTRL_PARBURST_READ \
308 _CBMIO(CBMCTRL_BASE, 19) // CBMT_IEC_PARBURST_PREAD_IN -
311 #define CBMCTRL_PARBURST_WRITE \
312 _CBMIO(CBMCTRL_BASE, 20) // - CBMT_IEC_PARBURST_PWRITE_OUT
315 #define CBMCTRL_PARBURST_READ_TRACK \
316 _CBMIO(CBMCTRL_BASE, 21) // - CBMT_PARBURST_READ_TRACK_OUT
319 #define CBMCTRL_PARBURST_WRITE_TRACK \
320 _CBMIO(CBMCTRL_BASE, 22) // CBMT_PARBURST_WRITE_TRACK_IN -
323 #define CBMCTRL_PARPORT_LOCK \
324 _CBMIO(CBMCTRL_BASE, 23) // - -
327 #define CBMCTRL_PARPORT_UNLOCK \
328 _CBMIO(CBMCTRL_BASE, 24) // - -
331 #define CBMCTRL_UPDATE \
332 _CBMIO(CBMCTRL_BASE, 25) // - -
335 #define CBMCTRL_TEST_IRQ \
336 _CBMIO(CBMCTRL_BASE, 26) // - -
339 #define CBMCTRL_IEC_DBG_READ _CBMIO(CBMCTRL_BASE, 27) // CBMT_IEC_DBG_READ -
342 #define CBMCTRL_IEC_DBG_WRITE _CBMIO(CBMCTRL_BASE, 28) // - CBMT_IEC_DBG_WRITE
346 #define CBMCTRL_PARBURST_READ_TRACK_VAR \
347 _CBMIO(CBMCTRL_BASE, 29) // - CBMT_PARBURST_READ_TRACK_OUT
352 #define CBM_I_DRIVER_INSTALL_0_FAILED 0xFFFFFFFF
353 #define CBM_I_DRIVER_INSTALL_0_IOCTL_FAILED 0xFFFFFFFE
355 #define CBM_I_DRIVER_INSTALL_0M_NO_INTERRUPT 0x80000000
CBMT_IECADDRESS CBMT_OPEN_IN
CBMT_IEC_DBG_VALUE CBMT_IEC_DBG_READ
struct CBMT_IEC_DBG_VALUE CBMT_IEC_DBG_VALUE
CBMT_IECADDRESS CBMT_LISTEN_IN
enum iec_cabletype IEC_CABLETYPE
struct CBMT_I_INSTALL_OUT CBMT_I_INSTALL_OUT
CBMT_SINGLEBYTE CBMT_PP_READ_OUT
CBMT_LINE_STATE CBMT_IEC_SETRELEASE_IN
CBMT_LINE_STATE CBMT_IEC_WAIT_IN
CBMT_LINE CBMT_IEC_RELEASE_IN
CBMT_SINGLEBYTE CBMT_PARBURST_PWRITE_IN
struct CBMT_I_TESTIRQ CBMT_I_TESTIRQ
DEFINE_GUID(GUID_OPENCBM, 0x9c3b5b5e, 0x558e, 0x47cc, 0x9c, 0x5, 0xf1, 0xfc, 0xf5, 0x17, 0x54, 0x7)
CBMT_SINGLEBYTE CBMT_PP_WRITE_IN
struct CBMT_SINGLEBYTE CBMT_SINGLEBYTE
CBMT_IECADDRESS CBMT_CLOSE_IN
CBMT_LINE CBMT_IEC_SET_IN
CBMT_SINGLEBYTE CBMT_PARBURST_PREAD_OUT
struct CBMT_BOOLEAN CBMT_BOOLEAN
CBMT_LINE CBMT_IEC_WAIT_OUT
struct CBMT_LINESTATE CBMT_LINE_STATE
CBMT_BOOLEAN CBMT_GET_EOI_OUT
struct CBMT_LINE CBMT_LINE
CBMT_IEC_DBG_VALUE CBMT_IEC_DBG_WRITE
CBMT_IECADDRESS CBMT_TALK_IN
struct CBMT_IECADDRESS CBMT_IECADDRESS
CBMT_LINE CBMT_IEC_POLL_OUT