home *** CD-ROM | disk | FTP | other *** search
/ Amiga CD! Magazine 3 / AUI_CoverDisk_3.bin / cd_project / utils / joytrap.doc < prev    next >
Encoding:
Text File  |  1993-11-15  |  4.1 KB  |  140 lines

  1.  
  2.  
  3. JoyTrap - An easier interface to the CD32 controller.
  4.           ===========================================
  5.  
  6. Written by Jezar at Image Technology.
  7.  
  8. Contact me via:
  9. email: jezar@cix.compulink.co.uk
  10. voice: UK (0204) 363688
  11. mail:
  12.     Jezar
  13.     Image Technology
  14.     c/o Multi Media Machine
  15.     59 Bridgeman Place
  16.     Bolton, Lancs BL2 1DE
  17.     England
  18.  
  19. This program is freely distributable to CD32 developers,
  20. provided that this documentation is goes with it.
  21. It is without warrantee. Don't blame me if it goes mad on 
  22. you and screws everything up - it is a free gift - treat it 
  23. as such. As far as I can tell though, it works very well, and
  24. has been thoroughly tested with debug tools.
  25.  
  26.  
  27. Background
  28. ==========
  29.     The CD32 controller has a low level interface to the system.
  30. This is great for games developers who need the speed, but not
  31. so good for MultiMedia designers with other things to think about.
  32. JoyTrap has been developed to ease the pain of this. It was inspired
  33. by the great "MouseTrap" program by Dave Parkinson, which provided
  34. a nice way of dealing with the CDTV remote control unit.
  35.  
  36. JoyTrap should be especially useful with AmigaVision or Scala.
  37.  
  38. What JoyTrap does is to provide RAWKEY presses which can be picked
  39. up in an intuition-friendly manner, and (if you wish), map the transport
  40. buttons to the same RAWKEY codes as on a CDTV controller, and mimick
  41. the daft behaviour of the CDTV's hardware transport buttons. 
  42. (except the bug about missing keypresses :-)
  43.  
  44.  
  45.  
  46. Technical notes
  47. ===============
  48.  
  49. JoyTrap is implemented as a VBlank interrupt that looks at the controller
  50. port, and then triggers the main task to ask the input device to write
  51. an event to the input stream. Therefore, when there is no input, the
  52. main task goes sleep completely. The memory allocations for the internal
  53. signalling messages are done using the SAS calloc() function which uses
  54. it's own pool (AFAIK) therefore during the first few input events, it
  55. might seem to "gulp" another chunk of memory,
  56. but this chunk is reused and returned to the system on exit. 
  57. Doing things this way reduces the fragmentation that might otherwise 
  58. occur and reduces overhead compared to constantly calling AllocMem() 
  59. every time. JoyTrap has been tested with various debugging tools and 
  60. appears to be behave perfectly.
  61.  
  62.  
  63. Usage:
  64. ======
  65. The simplest way to use JoyTrap is just to type:
  66.     
  67.     JoyTrap
  68.  
  69.  
  70. with no arguments. This will give you the following output:
  71.  
  72. left    - 'l'
  73. right   - 'r'
  74. up      - 'u'
  75. down    - 'd'
  76. reverse - 'v'
  77. forward - 'f'
  78.  
  79. The key repeat behaviour of the above matches normal keyboard
  80. keys. But note that the repeat speed is NOT affected by preference
  81. settings, although I *might* see fit to change this someday, so be
  82. warned!
  83.  
  84. red        - 'a' ('r' is used by right)
  85. blue       - 'b'
  86. yellow     - 'y'
  87. green      - 'g'
  88. play/pause - 'p'
  89.  
  90. The above keys do NOT repeat (for obvious reasons). They give you
  91. a key down when pressed, and as you would expect, a key up when
  92. released.
  93.  
  94. The following switches may be typed (in any order or case) after "JoyTrap"
  95.  
  96.     QUIET
  97.     
  98. Suppresses the "installed"/"removed" messages.
  99.  
  100.     CURSOR
  101.     
  102. Gives cursor keys (up/down etc) instead of letter keys (l,r,u,d)
  103. I prefer this, as it helps you make a consistent interface for
  104. keyboard users as well.
  105.  
  106.     CDTV
  107.     
  108. For CDTV compatability; when CDTV is given then the transport 
  109. keys - Play, Forward, Reverse are the same RAWKEY codes as on 
  110. the CDTV, and the key repeat behaviour of the transport keys 
  111. matches the CDTV exactly, with all it's odd quirks.
  112.  
  113.     ?
  114.     
  115. Displays the options, in case you forget.
  116.  
  117.  
  118. Known Bugs
  119. ==========
  120. If you hold down the blue button, the yellow and green auto-repeat.
  121. I suspect this is a hardware problem not in my logic, but I could be
  122. wrong about this. I'll 
  123.  
  124.  
  125.  
  126. To remove JoyTrap just run it again, and it will signal itself to unload.
  127. =========================================================================
  128.  
  129. JoyTrap is safe to run from the Workbench.
  130.  
  131. JoyTrap can be safely executed under 1.3, but it won't do anything except
  132. terminate with an error message (unless QUIET)
  133.  
  134. I hope this is of use to someone!
  135.  
  136. Best Wishes,
  137. Jezar.
  138.  
  139.  
  140.