home *** CD-ROM | disk | FTP | other *** search
/ Amiga ACS 1998 #6 / amigaacscoverdisc1998-061998.iso / games / descent / source / main / coindev.h < prev    next >
Text File  |  1998-06-08  |  4KB  |  120 lines

  1. /*
  2. THE COMPUTER CODE CONTAINED HEREIN IS THE SOLE PROPERTY OF PARALLAX
  3. SOFTWARE CORPORATION ("PARALLAX").  PARALLAX, IN DISTRIBUTING THE CODE TO
  4. END-USERS, AND SUBJECT TO ALL OF THE TERMS AND CONDITIONS HEREIN, GRANTS A
  5. ROYALTY-FREE, PERPETUAL LICENSE TO SUCH END-USERS FOR USE BY SUCH END-USERS
  6. IN USING, DISPLAYING,  AND CREATING DERIVATIVE WORKS THEREOF, SO LONG AS
  7. SUCH USE, DISPLAY OR CREATION IS FOR NON-COMMERCIAL, ROYALTY OR REVENUE
  8. FREE PURPOSES.  IN NO EVENT SHALL THE END-USER USE THE COMPUTER CODE
  9. CONTAINED HEREIN FOR REVENUE-BEARING PURPOSES.  THE END-USER UNDERSTANDS
  10. AND AGREES TO THE TERMS HEREIN AND ACCEPTS THE SAME BY USE OF THIS FILE.  
  11. COPYRIGHT 1993-1998 PARALLAX SOFTWARE CORPORATION.  ALL RIGHTS RESERVED.
  12. */
  13. /*
  14.  * $Source: f:/miner/source/main/rcs/coindev.h $
  15.  * $Revision: 2.0 $
  16.  * $Author: john $
  17.  * $Date: 1995/02/27 11:30:38 $
  18.  * 
  19.  * Routines to read the coin counter.
  20.  * 
  21.  * $Log: coindev.h $
  22.  * Revision 2.0  1995/02/27  11:30:38  john
  23.  * New version 2.0, which has no anonymous unions, builds with
  24.  * Watcom 10.0, and doesn't require parsing BITMAPS.TBL.
  25.  * 
  26.  * Revision 1.2  1994/09/16  16:15:10  john
  27.  * Added acrade sequencing.
  28.  * 
  29.  * Revision 1.1  1994/09/16  12:56:24  john
  30.  * Initial revision
  31.  * 
  32.  * 
  33.  */
  34.  
  35.  
  36.  
  37. #ifndef _COINDEV_H
  38. #define _COINDEV_H
  39.  
  40. /* Header file to define the JoyStick access functions */
  41. /* and bit-masks.                                      */
  42. /*                                                     */
  43. /* Updates:                                            */
  44. /*                                                     */
  45. /*    + Reworked the conio.h check to work with both   */
  46. /*      Borland and Watcom compilers.                  */
  47. /*    + Added UPDATE_JOYSTICK_VALUE and global value   */
  48. /*      JoyStickValue to allow for a stable state of   */
  49. /*      joystick condition.  This means that once at   */
  50. /*      the begining of each game loop (frame) you     */
  51. /*      should execute UPDATE_JOYSTICK_VALUE, then     */
  52. /*      use JoyStickValue for the remainder of that    */
  53. /*      entire loop to determine joystick settings.    */
  54. /*    + Added values needed by the CoinMech section    */
  55. /*      of the digital I/O card.                       */
  56.  
  57. #define IOCARD_BASEPORT         0x2A0
  58.  
  59. //#define JOYSTICK_PORT           (IOCARD_BASEPORT + 1)
  60. //#define JS_TRIGGER              0x0001
  61. //#define JS_BUTTONLEFT           0x0002
  62. //#define JS_BUTTONRIGHT          0x0004
  63. //#define JS_BUTTONCENTER         0x0008
  64. //#define JS_UP                   0x0010
  65. //#define JS_DOWN                 0x0020
  66. //#define JS_LEFT                 0x0040
  67. //#define JS_RIGHT                0x0080
  68.  
  69. #define COINMECH_CMDPORT        (IOCARD_BASEPORT + 7)
  70. #define COINMECH_ADJPORT        (IOCARD_BASEPORT + 3)
  71.  
  72. #define COINMECH1_PORT          (IOCARD_BASEPORT + 4)
  73. #define COINMECH2_PORT          (IOCARD_BASEPORT + 5)
  74. #define COINMECH3_PORT          (IOCARD_BASEPORT + 6)
  75.  
  76. #define COINMECH1_ADJMASK       0x10
  77. #define COINMECH2_ADJMASK       0x20
  78. #define COINMECH3_ADJMASK       0x40
  79.  
  80. #define COINMECH1_CTRLMASK      0x30
  81. #define COINMECH2_CTRLMASK      0x70
  82. #define COINMECH3_CTRLMASK      0xB0
  83.  
  84.  
  85. // Include file for use with gameport coin mech interface and parallel
  86. // port joystick interface
  87.  
  88. //#define GAMEPORT_ADDR 0x201
  89.  
  90. //#define PARALLEL_ADDR 0x378
  91.  
  92. #define MECH1   16
  93. #define MECH2   32
  94. #define MECH3   64
  95. // #define MECH4          // Not supported yet.
  96.  
  97. //#define FIRE    1
  98. //#define LBUTTON 2
  99. //#define RBUTTON 4
  100. //#define CBUTTON 8
  101.  
  102. //#define UP      16
  103. //#define DOWN    32
  104. //#define LEFT    64
  105. //#define RIGHT   128
  106.  
  107. //#define JOY_GAMEPORT  0
  108. //#define JOY_PARALLEL  1
  109. //#define JOY_IODEV     2
  110.  
  111. int coindev_init(int CoinMechNumber);
  112. unsigned int coindev_read(int CoinMechNumber);
  113. unsigned int coindev_count(int CoinMechNumber);
  114.  
  115. #define ARCADE_FIRST_SECONDS         120
  116. #define ARCADE_CONTINUE_SECONDS    60
  117.  
  118. #endif
  119. 
  120.