home *** CD-ROM | disk | FTP | other *** search
/ PC World Komputer 1999 March B / SCO_CASTOR4RRT.iso / uccs / root.14 / udk / usr / add-on / include / sys / iohw.h < prev    next >
Encoding:
C/C++ Source or Header  |  1998-08-19  |  4.8 KB  |  134 lines

  1. /*
  2.  * Copyright (c) 1998 The Santa Cruz Operation, Inc.. All Rights Reserved. 
  3.  *                                                                         
  4.  *        THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF THE               
  5.  *                   SANTA CRUZ OPERATION INC.                             
  6.  *                                                                         
  7.  *   The copyright notice above does not evidence any actual or intended   
  8.  *   publication of such source code.                                      
  9.  */
  10.  
  11. #ident    "@(#)libetitam:sys/iohw.h    1.1"
  12. /*    Convergent Technologies - System V - Jun 1983    */
  13.  
  14. #ifndef iohw_h
  15. #define iohw_h
  16.  
  17. #include <sys/types.h>
  18. #include <sys/target.h>
  19.  
  20. /*    Video Bitmap Definitions        */
  21.  
  22. #define VIDMEM        ((ushort *)0x420000)    /* mem addr    */
  23. #define VIDWIDTH    720                /* pixels    */
  24. #define VIDHEIGHT    348
  25. #define VIDBYTES    (VIDWIDTH/8)            /* bytes    */
  26.  
  27. /*  value to use in touching processor registers for some control functions */
  28. #define    ACTIVATE    (ushort)0
  29. /*
  30. ---------------------------------------------------------
  31. |    RS-232 Ports A + B Registers  - 8274        |
  32. |    Port A is used for RS-232, port B is used for    |
  33. |    the SCM modem.                    |
  34. |    Uses the least significant byte of 16 bit word    |
  35. ---------------------------------------------------------
  36. */
  37. #define A_DATA_ADDR        ((ushort *)0xE50000) /* R/W */
  38. #define B_DATA_ADDR        ((ushort *)0xE50002) /* R/W */
  39. #define A_CMND_ADDR        ((ushort *)0xE50004) /* R/W */
  40. #define B_CMND_ADDR        ((ushort *)0xE50006) /* R/W */
  41.  
  42. /*
  43. ---------------------------------------------------------
  44. |    Keyboard serial driver, using the Motorola 6850    |
  45. |    Uses the least significant byte of 16 bit word    |
  46. ---------------------------------------------------------
  47. */
  48. #define C_DATA_ADDR        ((ushort *)0xE70002) /* R/W */
  49. #define C_CMND_ADDR        ((ushort *)0xE70000) /* R/W */
  50.  
  51. /*
  52. ---------------------------------------------------------
  53. |    Baud generator for channel A, the lower 3    |
  54. |    nibble of the address is the counter value.    |
  55. |    No baud generator for modem channel, constant    |
  56. |    19.2k at clock input, use divide by 16 and     |
  57. |    divide by 64 logic of 8274 to obtain 1200 and    |
  58. |    300 baud.                    |
  59. ---------------------------------------------------------
  60. */
  61. #define A_BAUD_ADDR        ((ushort *)0x4B0000) /* WO */
  62.  
  63. /*
  64. ---------------------------------------------------------
  65. |    Phone Status Register                 |
  66. |    Handset offhook (b3 = 0)            |
  67. |    Line 1 ringing  (b2 = 0)            |
  68. |    Line 2 ringing  (b1 = 0)            |
  69. |    Message waiting (b0 is complemented every pulse    |
  70. ---------------------------------------------------------
  71. */
  72. #define PHONE_STATUS        ((ushort *) 0x450000)    /* RO */
  73.  
  74. /*
  75. ---------------------------------------------------------
  76. |    Parallel Line Printer Registers         |
  77. |    Uses the least significant byte of 16 bit word  |
  78. ---------------------------------------------------------
  79. */
  80. #define LP_STATUS_ADDR        ((ushort *)0x470000) /* R */
  81. #define LP_DATA_ADDR        ((ushort *)0x4F0000) /* WO */
  82. /*    bits in the status register on reading */
  83. #define LP_BUSY            0x80    /* LPB+     1 = lp busy */
  84. #define LP_SELECTED        0x40    /* LPS+     1 = lp selected */
  85. #define LP_OUT_PAPER        0x20    /* NP+      1 = lp out of paper */
  86. #define LP_ERR            0x10    /* LPERR-   0 = lp error */
  87. #define FDINTRQ            0x08    /* FDINTRQ+ 1 = floppy interrupt */
  88. #define HDINTRQ            0x04    /* HDINTRQ+ 1 = hard disk interrupt */
  89. #define PARITY_ERR        0x02    /* PERR-    0 = parity error */
  90. #define DTDET            0x01    /* DTDET-   0 = dial tone detected */
  91.  
  92. /*
  93. ---------------------------------------------------------
  94. |    DISK Bus interface registers            |
  95. |    Uses the least significant byte of 16 bit word  |
  96. ---------------------------------------------------------
  97. */
  98. #define HD_BASE            ((ushort *)0xE00000)
  99. #define FD_BASE            ((ushort *)0xE10000)
  100.  
  101. #define DMA_CNT             ((ushort *)0x460000) /* RW */
  102. #define DMA_LOADDR         ((unsigned char *)0x4D0000) /* W  */
  103. #define DMA_HIADDR        ((unsigned char *)0x4D4000) /* W  */
  104.  
  105. #define DISK_CNTRL         ((ushort *)0x4E0000) /* RW */
  106.  
  107. /* Bits in disk control register */
  108.  
  109. #define    NOT_FDRST        0x80    /* 0 = reset, 1 = not reset */
  110. #define    FDR0            0x40    /* 1 = floppy selected */
  111. #define    FDMTR            0x20    /* 1 = floppy motor on */
  112. #define    NOT_HDRST        0x10    /* 0 = hdc reset, 1 = hdc not reset */
  113. #define    HDR0            0x08    /* 1 = hard disk 0 selected */
  114. #define    HDSEL            0x07    /* Head select mask */
  115.  
  116. /* Note: Bit 7 of the general control register is used as hard disk 1
  117.  select in machines with this hardware modification. This is an otherwise
  118.  unused, bit-addressable bit at address 4c7000 */
  119.  
  120. /* Also note: All bits of the disk control register will be 0 after reset */
  121.  
  122. /* Bits in dma count register */
  123.  
  124. #define    DMA_ENABLE        0x8000    /* 0 = dma disable, 1 = dma enabled */
  125. #define    DMA_CNT_MASK        0x3fff    /* Bits 13...0 holds dma count */
  126. #define    DMA_ERROR        0x8000    /* dma error bit mask, 0 = error */
  127.  
  128. /* Masks for dma addresses */
  129.  
  130. #define DMA_LO_MASK        0x01fe
  131. #define    DMA_HI_MASK        0x3ffe
  132.  
  133. #endif iohw.h
  134.