COINDEV.H 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120
  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. #ifndef _COINDEV_H
  35. #define _COINDEV_H
  36. /* Header file to define the JoyStick access functions */
  37. /* and bit-masks. */
  38. /* */
  39. /* Updates: */
  40. /* */
  41. /* + Reworked the conio.h check to work with both */
  42. /* Borland and Watcom compilers. */
  43. /* + Added UPDATE_JOYSTICK_VALUE and global value */
  44. /* JoyStickValue to allow for a stable state of */
  45. /* joystick condition. This means that once at */
  46. /* the begining of each game loop (frame) you */
  47. /* should execute UPDATE_JOYSTICK_VALUE, then */
  48. /* use JoyStickValue for the remainder of that */
  49. /* entire loop to determine joystick settings. */
  50. /* + Added values needed by the CoinMech section */
  51. /* of the digital I/O card. */
  52. #define IOCARD_BASEPORT 0x2A0
  53. //#define JOYSTICK_PORT (IOCARD_BASEPORT + 1)
  54. //#define JS_TRIGGER 0x0001
  55. //#define JS_BUTTONLEFT 0x0002
  56. //#define JS_BUTTONRIGHT 0x0004
  57. //#define JS_BUTTONCENTER 0x0008
  58. //#define JS_UP 0x0010
  59. //#define JS_DOWN 0x0020
  60. //#define JS_LEFT 0x0040
  61. //#define JS_RIGHT 0x0080
  62. #define COINMECH_CMDPORT (IOCARD_BASEPORT + 7)
  63. #define COINMECH_ADJPORT (IOCARD_BASEPORT + 3)
  64. #define COINMECH1_PORT (IOCARD_BASEPORT + 4)
  65. #define COINMECH2_PORT (IOCARD_BASEPORT + 5)
  66. #define COINMECH3_PORT (IOCARD_BASEPORT + 6)
  67. #define COINMECH1_ADJMASK 0x10
  68. #define COINMECH2_ADJMASK 0x20
  69. #define COINMECH3_ADJMASK 0x40
  70. #define COINMECH1_CTRLMASK 0x30
  71. #define COINMECH2_CTRLMASK 0x70
  72. #define COINMECH3_CTRLMASK 0xB0
  73. // Include file for use with gameport coin mech interface and parallel
  74. // port joystick interface
  75. //#define GAMEPORT_ADDR 0x201
  76. //#define PARALLEL_ADDR 0x378
  77. #define MECH1 16
  78. #define MECH2 32
  79. #define MECH3 64
  80. // #define MECH4 // Not supported yet.
  81. //#define FIRE 1
  82. //#define LBUTTON 2
  83. //#define RBUTTON 4
  84. //#define CBUTTON 8
  85. //#define UP 16
  86. //#define DOWN 32
  87. //#define LEFT 64
  88. //#define RIGHT 128
  89. //#define JOY_GAMEPORT 0
  90. //#define JOY_PARALLEL 1
  91. //#define JOY_IODEV 2
  92. int coindev_init(int CoinMechNumber);
  93. unsigned int coindev_read(int CoinMechNumber);
  94. unsigned int coindev_count(int CoinMechNumber);
  95. #define ARCADE_FIRST_SECONDS 120
  96. #define ARCADE_CONTINUE_SECONDS 60
  97. #endif
  98.