home *** CD-ROM | disk | FTP | other *** search
/ Magazyn Amiga 13 / MA_Cover_13.bin / source / c / stefanb_src / private_projects / yath / yath.h < prev    next >
Encoding:
C/C++ Source or Header  |  1992-09-06  |  1.9 KB  |  75 lines

  1. /*
  2.  * yath.h   V0.06 (beta)
  3.  *
  4.  * main include file
  5.  *
  6.  * (c) 1992 by Stefan Becker
  7.  *
  8.  */
  9.  
  10. /* Version string */
  11. #define YATH_VERSION "$VER: yatape-handler 0.06 (18.01.1992)"
  12.  
  13. /* System includes */
  14. #include <exec/types.h>
  15. #include <exec/memory.h>
  16. #include <dos/dos.h>
  17. #include <dos/dosextens.h>
  18. #include <dos/filehandler.h>
  19. #include <devices/scsidisk.h>
  20. #include <string.h>
  21. #include <stdlib.h>
  22. #include <stdio.h>
  23.  
  24. /* Prototypes for system functions */
  25. #include <clib/exec_protos.h>
  26. #include <clib/dos_protos.h>
  27. #include <clib/alib_protos.h>
  28.  
  29. /* Prototypes for program functions */
  30. LONG DoSCSICmd(WORD, ULONG, ULONG, ULONG);
  31.  
  32. /* Debugging */
  33. #ifdef DEBUG
  34. #define MPORTNAME "YATH Monitor Port"
  35. #define MONITOR(a,b,c) {if (MonitorPort) SendMonitor((a),(b),(c));}
  36. void SendMonitor(ULONG, ULONG, ULONG);
  37.  
  38. struct MonitorMessage {
  39.                        struct Message mm_msg;
  40.                        ULONG          mm_cmd;
  41.                        ULONG          mm_arg1;
  42.                        ULONG          mm_arg2;
  43.                       };
  44.  
  45. /* Monitor commands */
  46. #define YATH_OPEN    1   /* Arg1 = BOOLEAN Read/Write */
  47. #define YATH_CLOSE   2   /* No arguments */
  48. #define YATH_READ    3   /* Arg1 = Bytes to read */
  49. #define YATH_WRITE   4   /* Arg1 = Bytes to write */
  50. #define YATH_FLUSH   5   /* No arguments */
  51. #define YATH_IOERR   6   /* Arg1 = io_Error, Arg2 = scsi_Status */
  52. #define YATH_SCSI    7   /* Arg1 = SCSI Cmd, Arg2 = BOOLEAN Asynch I/O */
  53.  
  54. #else
  55. #define MONITOR(a,b,c) /* Undefine debug function */
  56. #endif
  57.  
  58. /* Global defines */
  59. #define ID_BUSY (0x42555359)    /* 'BUSY' */
  60. #define SENSELEN 254
  61. #define SCSI_WAIT  0
  62. #define SCSI_READ  1
  63. #define SCSI_WRITE 2
  64. #define SCSI_WEOFM 3
  65. #define SCSI_REWND 4
  66. #define SCSI_SENSE 5
  67. #define SCSI_SPACE 6
  68.  
  69. /* Global data structure definitions */
  70. struct SCSIStuff {
  71.                   struct SCSICmd scmd;
  72.                   UBYTE command[6];
  73.                   UBYTE sense[SENSELEN];
  74.                  };
  75.