home *** CD-ROM | disk | FTP | other *** search
/ Millennium Time Capsule / AC2000.BIN / disks / ac14disk / ejp / masks.h
Encoding:
C/C++ Source or Header  |  1999-04-14  |  3.4 KB  |  100 lines

  1. /*
  2. **    masks.h
  3. **    ¯¯¯¯¯¯¯
  4. **    By Xav
  5. **    ¯¯¯¯¯¯
  6. **
  7. **    To accompany the series on Enhanced Joystick Ports in
  8. **    Atari Computing
  9. */
  10.  
  11.  
  12. /*
  13. **    Definitions of the write masks for standard joypad ports. 
  14. **
  15. **    Remember:    Group1    =    Fire A, Up, Down, Left, Right, Pause
  16. **                Group2    =    Fire B, *, 7, 4, 1
  17. **                Group3    =    Fire C, 0, 8, 5, 2
  18. **                Group4    =    Option, #, 9, 6, 3
  19. */
  20.  
  21.  
  22. #define    PORTA_GROUP1    0xFFFE    /*    ...11111110    */
  23. #define    PORTA_GROUP2    0xFFFD    /*    ...11111101    */
  24. #define    PORTA_GROUP3    0xFFFB    /*    ...11111011    */
  25. #define    PORTA_GROUP4    0xFFF7    /*    ...11110111    */
  26.  
  27. #define    PORTB_GROUP1    0xFFEF    /*    ...11101111    */
  28. #define    PORTB_GROUP2    0xFFDF    /*    ...11011111    */
  29. #define    PORTB_GROUP3    0xFFBF    /*    ...10111111    */
  30. #define    PORTB_GROUP4    0xFF7F    /*    ...01111111    */
  31.  
  32.  
  33. /*
  34. **    Definitions of the write masks for the Team Tap ports.
  35. **    
  36. **    Note that those beginning PORTAA_ are identical to those
  37. **    beginning PORTA_ above. If you are just writing your first
  38. **    EJP program, please use PORTAA_ because the others are just
  39. **    included so that this file can replace the old version from
  40. **    AC issue 5 without breaking any existing programs. Note that
  41. **    this also applies to the prefixes PORTAB_ and PORTB_
  42. **
  43. **    Please refer to the articles in Atari Computing to get a better
  44. **    idea of how best to incorporate the Team Tap into your own
  45. **    games. Also, _PLEASE_ write your programs to use any of the
  46. **    Team Tap ports, even if the logic of your game only requires
  47. **    one or two joypads.
  48. **
  49. **    Finally you should note that PORTAB_ refers to the first port
  50. **    on the computer or games console (port A on the STe and Falcon,
  51. **    port 1 on the Jaguar) and the second port on the Team Tap.
  52. **    Therefore the four prefixes for the Team Tap attached to the
  53. **    first port are PORTAA_, PORTAB_, PORTAC_ and PORTAD_. The
  54. **    prefixes for the Team Tap attached to the second port are
  55. **    PORTBA_, PORTBB_, PORTBC_ and PORTBD.
  56. **
  57. */
  58.  
  59. #define    PORTAA_GROUP4    0xFFFE    /*    ...11111110    */
  60. #define    PORTAA_GROUP3    0xFFFD    /*    ...11111101    */
  61. #define    PORTAA_GROUP2    0xFFFB    /*    ...11111011    */
  62. #define    PORTAA_GROUP1    0xFFF7    /*    ...11110111    */
  63.  
  64. #define    PORTAB_GROUP4    0xFFF0    /*    ...11110000    */
  65. #define    PORTAB_GROUP3    0xFFF1    /*    ...11110001    */
  66. #define    PORTAB_GROUP2    0xFFF2    /*    ...11110010    */
  67. #define    PORTAB_GROUP1    0xFFF3    /*    ...11110011    */
  68.  
  69. #define    PORTAC_GROUP4    0xFFF4    /*    ...11110100    */
  70. #define    PORTAC_GROUP3    0xFFF5    /*    ...11110101    */
  71. #define    PORTAC_GROUP2    0xFFF6    /*    ...11110110    */
  72. #define    PORTAC_GROUP1    0xFFF8    /*    ...11111000    */
  73.  
  74. #define    PORTAD_GROUP4    0xFFF9    /*    ...11111001    */
  75. #define    PORTAD_GROUP3    0xFFFA    /*    ...11111010    */
  76. #define    PORTAD_GROUP2    0xFFFC    /*    ...11111100    */
  77. #define    PORTAD_GROUP1    0xFFFF    /*    ...11111111    */
  78.  
  79.  
  80.  
  81. #define    PORTBA_GROUP4    0xFFEF    /*    ...11101111    */
  82. #define    PORTBA_GROUP3    0xFFDF    /*    ...11011111    */
  83. #define    PORTBA_GROUP2    0xFFBF    /*    ...10111111    */
  84. #define    PORTBA_GROUP1    0xFF7F    /*    ...01111111    */
  85.  
  86. #define    PORTBB_GROUP4    0xFF0F    /*    ...00001111    */
  87. #define    PORTBB_GROUP3    0xFF1F    /*    ...00011111    */
  88. #define    PORTBB_GROUP2    0xFF2F    /*    ...00101111    */
  89. #define    PORTBB_GROUP1    0xFF3F    /*    ...00111111    */
  90.  
  91. #define    PORTBC_GROUP4    0xFF4F    /*    ...01001111    */
  92. #define    PORTBC_GROUP3    0xFF5F    /*    ...01011111    */
  93. #define    PORTBC_GROUP2    0xFF6F    /*    ...01101111    */
  94. #define    PORTBC_GROUP1    0xFF8F    /*    ...10001111    */
  95.  
  96. #define    PORTBD_GROUP4    0xFF9F    /*    ...10011111    */
  97. #define    PORTBD_GROUP3    0xFFAF    /*    ...10101111    */
  98. #define    PORTBD_GROUP2    0xFFCF    /*    ...11001111    */
  99. #define    PORTBD_GROUP1    0xFFFF    /*    ...11111111    */
  100.