home *** CD-ROM | disk | FTP | other *** search
/ Vectronix 2 / VECTRONIX2.iso / FILES_07 / MARK_WC2.LZH / INCLUDE / XBIOS.H < prev   
C/C++ Source or Header  |  1988-04-27  |  7KB  |  159 lines

  1. /*
  2.  * xbios.h -- header file for Atari ST xbios functions.
  3.  *
  4.  * Copyright (c) 1986-1987, Mark Williams Company, Chicago
  5.  * This file and its contents may not be copied or distributed
  6.  * without permission.
  7.  */
  8. /* Bioskeys(): no information required */
  9. /* Cursconf() operation codes: */
  10. #define CC_HIDE    0        /* Hide cursor */
  11. #define CC_SHOW    1        /* Show cursor */
  12. #define CC_BLNK    2        /* Make cursor blink */
  13. #define CC_NBLNK 3        /* Make cursor not blink */
  14. #define CC_SET    4        /* Set cursor blink rate */
  15. #define CC_GET    5        /* Get cursor blink rate */
  16. /* Dosound() operation bytes */
  17. /* Flopfmt(), Floprd(), Flopver(), Flopwr() - no information required */
  18. /* Getrez() resolution codes: */
  19. #define GR_LOW    0        /* Low resolution */
  20. #define GR_MED    1        /* Medium resolution */
  21. #define GR_HIGH    2        /* High resolution */
  22. /* Gettime(), Settime(): see time.h */
  23. /* Giaccess() register names and values */
  24. /* Ikbdws() intelligent keyboard commands: */
  25. #define IK_MOUSEBUT    0x7    /* mouse button pragma, one byte */
  26.                 /* 1 - report press; 2 - report release;
  27.                  * 3 - report both; 4 - report as if keys,
  28.                  * left = 0x74, right = 0x75 */
  29. #define IK_MOUSEREL    0x8    /* mouse relative henceforth, three bytes */
  30. #define IK_MOUSEABS    0x9    /* mouse absolute henceforth, two words */
  31. #define IK_MOUSECUR    0xA    /* mouse returns cursor keys */
  32. #define IK_MOUSEHOPREL    0xB    /* mouse relative threshold */
  33. #define IK_MOUSEHOPABS    0xC    /* mouse absolute threshold */
  34. #define IK_CLOCKSET    0x1B    /* Set clock time:
  35.                  * takes yr, mo, da, hr, mi, se in bcd */
  36. #define IK_CLOCKGET    0x1C    /* Get the clock time: Returns 0xFC,
  37.                  * yr, mo, da, hr, mi, se in bcd */
  38. /* Initmouse() opcodes and parameter buffer */
  39. #define IM_OFF    0        /* Disable mouse */
  40. #define IM_REL    1        /* Enable mouse in relative mode */
  41. #define IM_ABS    2        /* Enable mouse in absolute mode */
  42. #define IM_KEY    4        /* Enable mouse in cursor key mode */
  43. struct initmouse {
  44.     char    im_left;    /* Coordinate handedness */
  45.     char    im_bset;    /* Button settings */
  46.     char    im_xwgt;    /* X axis threshold */
  47.     char    im_ywgt;    /* Y axis threshold */
  48.     short    im_xmax;    /* X maximum absolute position */
  49.     short    im_ymax;    /* Y maximum absolute position */
  50.     short    im_xabs;    /* X absolute position */
  51.     short    im_yabs;    /* Y absolute position */
  52. };
  53. /* Iorec() device handles and buffer structure */
  54. #define IO_AUX    0        /* Handle for auxiliary port buffers */
  55. #define IO_KBD    1        /* Handle for keyboard input buffer */
  56. #define IO_MID    2        /* Handle for midi input buffer */
  57. struct iorec {            /* Structure pointed to by Iorec return value */
  58.     char *io_buff;        /* Buffer */
  59.     short io_bufsiz;    /* Buffer size in bytes */
  60.     short io_head;        /* Current write pointer */
  61.     short io_tail;        /* Current read pointer */
  62.     short io_low;        /* Low water mark, unstop line */
  63.     short io_high;        /* High water mark, stop line */
  64. };
  65. /* Jdisint(), Jenabint(), Mfpint() interrupt identifications */
  66.                 /* Lowest priority */
  67. #define MFP_BIT0    0    /* I/O port bit 0 */
  68. #define MFP_BIT1    1
  69. #define MFP_BIT2    2
  70. #define MFP_BIT3    3
  71. #define MFP_TIMD    4    /* Timer D, RS232 baud rate generator */
  72. #define MFP_TIMC    5    /* Timer C, system 200hz clock */
  73. #define MFP_BIT4    6    /* I/O port bit 4 */
  74. #define MFP_BIT5    7
  75. #define MFP_TIMB    8    /* Timer B, graphics? */
  76. #define MFP_XERR    9    /* RS232 transmit error */
  77. #define MFP_EMPT    10    /* RS232 transmit buffer empty */
  78. #define MFP_RERR    11    /* RS232 receive error */
  79. #define MFP_FULL    12    /* RS232 receive buffer full */
  80. #define MFP_TIMA    13    /* Timer A, user programmable */
  81. #define MFP_BIT6    14    /* I/O port bit 6 */
  82. #define MFP_BIT7    15    /* I/O port bit 7 */
  83.                 /* Highest priority */
  84. /* Keytbl() returned vector */
  85. struct keytbl {
  86.     char *kt_normal;    /* Normal key mapping */
  87.     char *kt_shifted;    /* Shifted key mapping */
  88.     char *kt_capslock;    /* Caps Locked key mapping */
  89. };
  90. /* Kbdvbase() vector table structure */
  91. struct kbdvbase {
  92.     void    (*kb_midivec)();    /* Midi input data vector */
  93.     void    (*kb_vkbderr)();    /* Keyboard error vector */
  94.     void    (*kb_vmiderr)();    /* Midi error vector */
  95.     void    (*kb_statvec)();    /* Keyboard status packet */
  96.     void    (*kb_mousevec)();    /* Keyboard mouse packet */
  97.     void    (*kb_clockvec)();    /* Keyboard clock packet */
  98.     void    (*kb_joyvec)();        /* Keyboard joystick packet */
  99.     void    (*kb_midisys)();    /* System midi vector */
  100.     void    (*kb_kbdsys)();        /* System keyboard vector */
  101. };
  102. /* Kbrate() operation codes */
  103. /* Midiws() - info depends on midi devices */
  104. /* Offgibit(), Ongibit() bit assignments */
  105. /* Protobt() */
  106. /* Prtblk() argument structure */
  107. struct prtblk {
  108.     char *pb_blkptr;        /* Address of bit block
  109.                      * or text string */
  110.     int pb_offset;            /* Bit offset into block */
  111.     int pb_width;            /* Pixel width of block to dump */
  112.                     /* or length of text string */
  113.     int pb_height;            /* Pixel height of block to dump
  114.                      * or zero for text print */
  115.     int pb_left;            /* Pixels to left of block */
  116.     int pb_right;            /* Pixels to right of block:
  117.                      * enclosing bitmap is
  118.                      * pb_right+pb_width+pb_left wide */
  119.     int pb_srcres;            /* Source resolution, a la Getrez() */
  120.     int pb_dstres;            /* Output resolution */
  121.     int *pb_colpal;            /* Color palette, ala Setpalette() */
  122.     int pb_type;            /* Printer type */
  123.     int pb_port;            /* Printer port */
  124.     int *pb_masks;            /* Halftone dithers */
  125. };
  126. #define PB_DRAFT    0        /* Low density pb_dstres */
  127. #define PB_FINAL    1        /* High density pb_dstres */
  128. #define PB_MONO160    0        /* Dot matrix 1/160 inch pb_type */
  129. #define PB_COLOR160    1        /* Dot matrix 1/160 inch pb_type */
  130. #define PB_DAISY    2        /* Daisy wheel pb_type (text only) */
  131. #define PB_MONO120    3        /* Dot matrix 1/120 inch pb_type */
  132. #define PB_PRT        0        /* Parallel port pb_port */
  133. #define PB_AUX        1        /* Serial port pb_port */
  134. /* Rsconf() magic numbers */
  135. enum {                    /* Line speeds */
  136.     RS_B19600, RS_B9600, RS_B4800, RS_B3600, RS_B2400, RS_B2000,
  137.     RS_B1800, RS_B1200, RS_B600, RS_B300, RS_B200, RS_B150,
  138.     RS_B134, RS_B110, RS_B75, RS_B50
  139. };
  140. enum {                    /* Line protocols */
  141.     RS_NONE, RS_XONXOFF, RS_RTSCTS, RS_BOTH
  142. };
  143. /* Setprt() magic numbers */
  144. #define PR_MATRIX    0        /* Dot matrix printer */
  145. #define PR_DAISY    1        /* Daisy wheel printer */
  146. #define PR_POLY        0        /* Polychrome printer */
  147. #define PR_MONO        2        /* Monochrome printer */
  148. #define PR_ATARI    0        /* Atari printer */
  149. #define PR_EPSON    4        /* Epson printer */
  150. #define PR_DRAFT    0        /* Draft quality */
  151. #define PR_FINAL    8        /* Presentation quality */
  152. #define PR_PARALLEL    0        /* Parallel interface */
  153. #define PR_SERIAL    0x10        /* Serial interface */
  154. #define PR_TRACTOR    0        /* Tractor feed */
  155. #define PR_SHEET    0x20        /* Single sheet feed */
  156. /* Xbtimer() magic numbers */
  157.  
  158. /* End of xbios.h */
  159.