home *** CD-ROM | disk | FTP | other *** search
/ Amiga Developer CD v1.2 / amidev_cd_12.iso / inc&ad2.0 / text_autodocs / gameport.doc < prev    next >
Text File  |  1992-09-01  |  6KB  |  178 lines

  1. TABLE OF CONTENTS
  2.  
  3. gameport.device/GPD_ASKCTYPE
  4. gameport.device/GPD_ASKTRIGGER
  5. gameport.device/GPD_READEVENT
  6. gameport.device/GPD_SETCTYPE
  7. gameport.device/GPD_SETTRIGGER
  8. gameport.device/GPD_ASKCTYPE                     gameport.device/GPD_ASKCTYPE
  9.  
  10.    NAME
  11.     GPD_ASKCTYPE -- Acquire the current game port controller type
  12.  
  13.    FUNCTION
  14.     This command identifies the type of controller at the game
  15.     port, so that the signals at the port may be properly
  16.     interpreted.  The controller type has been set by a previous
  17.     SetCType.
  18.  
  19.     This command always executes immediately.
  20.  
  21.    IO REQUEST
  22.     io_Message    mn_ReplyPort set if quick I/O is not possible
  23.     io_Device    preset by the call to OpenDevice
  24.     io_Unit        preset by the call to OpenDevice
  25.     io_Command    GPD_ASKCTYPE
  26.     io_Flags    IOB_QUICK set if quick I/O is possible
  27.     io_Length    at least 1
  28.     io_Data        the address of the byte variable for the
  29.             result
  30.  
  31. gameport.device/GPD_ASKTRIGGER                 gameport.device/GPD_ASKTRIGGER
  32.  
  33.    NAME
  34.     GPD_ASKTRIGGER -- Inquire the conditions for a game port report
  35.  
  36.    FUNCTION
  37.     This command inquires what conditions must be met by a game
  38.     port unit before a pending Read request will be satisfied.
  39.     These conditions, called triggers, are independent -- that
  40.     any one occurs is sufficient to queue a game port report to
  41.     the Read queue.     These conditions are set by SetTrigger.
  42.  
  43.     This command always executes immediately.
  44.  
  45.    IO REQUEST
  46.     io_Message    mn_ReplyPort set if quick I/O is not possible
  47.     io_Device    preset by the call to OpenDevice
  48.     io_Unit        preset by the call to OpenDevice
  49.     io_Command    GPD_ASKTRIGGER
  50.     io_Flags    IOB_QUICK set if quick I/O is possible
  51.     io_Length    sizeof(gamePortTrigger)
  52.     io_Data        a structure of type GamePortTrigger, which
  53.             has the following elements
  54.         gpt_Keys -
  55.             GPTB_DOWNKEYS set if button down transitions
  56.             trigger a report, and GPTB_UPKEYS set if button up
  57.             transitions trigger a report
  58.         gpt_Timeout    -
  59.             a time which, if exceeded, triggers a report;
  60.             measured in vertical blank units (60/sec)
  61.         gpt_XDelta    -
  62.             a distance in x which, if exceeded, triggers a
  63.             report
  64.         gpt_YDelta    -
  65.             a distance in x which, if exceeded, triggers a
  66.             report
  67.  
  68. gameport.device/GPD_READEVENT                   gameport.device/GPD_READEVENT
  69.  
  70.    NAME
  71.     GPD_READEVENT -- Return the next game port event.
  72.  
  73.    FUNCTION
  74.     Read game port events from the game port and put them in the
  75.     data area of the iORequest.  If there are no pending game port
  76.     events, this command will not be satisfied, but if there are
  77.     some events, but not as many as can fill IO_LENGTH, the
  78.     request will be satisfied with those currently available.
  79.  
  80.    IO REQUEST
  81.     io_Message    mn_ReplyPort set if quick I/O is not possible
  82.     io_Device    preset by the call to OpenDevice
  83.     io_Unit        preset by the call to OpenDevice
  84.     io_Command    GPD_READEVENT
  85.     io_Flags    IOB_QUICK set if quick I/O is possible
  86.     io_Length    the size of the io_Data area in bytes: there
  87.             are sizeof(inputEvent) bytes per input event.
  88.     io_Data        a buffer area to fill with input events.  The
  89.             fields of the input event are:
  90.         ie_NextEvent
  91.             links the events returned
  92.         ie_Class
  93.             is IECLASS_RAWMOUSE
  94.         ie_SubClass
  95.             is 0 for the left, 1 for the right game port
  96.         ie_Code 
  97.             contains any gameport button reports.  No
  98.             report is indicated by the value 0xff.
  99.         ie_Qualifier 
  100.             only the relative and button bits are set
  101.         ie_X, ie_Y
  102.             the x and y values for this report, in either
  103.             relative or absolute device dependent units.
  104.         ie_TimeStamp 
  105.             the delta time since the last report, given
  106.             not as a standard timestamp, but as the frame
  107.             count in the TV_SECS field.
  108.  
  109.    RESULTS
  110.     This function sets the error field in the iORequest, and fills
  111.     the iORequest with the next game port events (but not partial
  112.     events).
  113.  
  114.    SEE ALSO
  115.     gameport.device/SetCType, gameport.device/SetTrigger
  116.  
  117. gameport.device/GPD_SETCTYPE                     gameport.device/GPD_SETCTYPE
  118.  
  119.    NAME
  120.     GPD_SETCTYPE -- Set the current game port controller type
  121.  
  122.    FUNCTION
  123.     This command sets the type of device at the game port, so that
  124.     the signals at the port may be properly interpreted.  The port
  125.     can also be turned off, so that no reports are generated.
  126.  
  127.     This command always executes immediately.
  128.  
  129.    IO REQUEST
  130.     io_Message    mn_ReplyPort set if quick I/O is not possible
  131.     io_Device    preset by the call to OpenDevice
  132.     io_Unit        preset by the call to OpenDevice
  133.     io_Command    GPD_SETCTYPE
  134.     io_Flags    IOB_QUICK set if quick I/O is possible
  135.     io_Length    1
  136.     io_Data        the address of the byte variable describing
  137.             the controller type, as per the equates in
  138.             the gameport include file
  139.  
  140. gameport.device/GPD_SETTRIGGER                 gameport.device/GPD_SETTRIGGER
  141.  
  142.    NAME
  143.     GPD_SETTRIGGER -- Set the conditions for a game port report
  144.  
  145.    FUNCTION
  146.     This command sets what conditions must be met by a game
  147.     port unit before a pending Read request will be satisfied.
  148.     These conditions, called triggers, are independent -- that
  149.     any one occurs is sufficient to queue a game port report to
  150.     the Read queue.     These conditions are inquired with
  151.     AskTrigger.
  152.  
  153.     This command always executes immediately.
  154.  
  155.    IO REQUEST
  156.     io_Message    mn_ReplyPort set if quick I/O is not possible
  157.     io_Device    preset by the call to OpenDevice
  158.     io_Unit        preset by the call to OpenDevice
  159.     io_Command    GPD_SETTRIGGER
  160.     io_Flags    IOB_QUICK set if quick I/O is possible
  161.     io_Length    sizeof(gamePortTrigger)
  162.     io_Data        a structure of type GamePortTrigger, which
  163.             has the following elements
  164.         gpt_Keys -
  165.             GPTB_DOWNKEYS set if button down transitions
  166.             trigger a report, and GPTB_UPKEYS set if button up
  167.             transitions trigger a report
  168.         gpt_Timeout    -
  169.             a time which, if exceeded, triggers a report;
  170.             measured in vertical blank units (60/sec)
  171.         gpt_XDelta    -
  172.             a distance in x which, if exceeded, triggers a
  173.             report
  174.         gpt_YDelta    -
  175.             a distance in x which, if exceeded, triggers a
  176.             report
  177.  
  178.