@database "gameport" @master "AMIDEV:NDK/Autodocs/gameport.doc" @Node Main "gameport.doc" @toc "Autodocs/AG/INDEX/Main" @{" GPD_ASKCTYPE " Link "GPD_ASKCTYPE"} @{" GPD_ASKTRIGGER " Link "GPD_ASKTRIGGER"} @{" GPD_READEVENT " Link "GPD_READEVENT"} @{" GPD_SETCTYPE " Link "GPD_SETCTYPE"} @{" GPD_SETTRIGGER " Link "GPD_SETTRIGGER"} @EndNode @Node "GPD_ASKCTYPE" "gameport.device/GPD_ASKCTYPE" @{b} NAME@{ub} GPD_ASKCTYPE -- Acquire the current game port controller type @{b} FUNCTION@{ub} This command identifies the type of controller at the game port, so that the signals at the port may be properly interpreted. The controller type has been set by a previous SetCType. This command always executes immediately. @{b} IO REQUEST@{ub} io_Message mn_ReplyPort set if quick I/O is not possible io_Device preset by the call to @{"OpenDevice" Link "trackdisk/OpenDevice()"} io_Unit preset by the call to @{"OpenDevice" Link "trackdisk/OpenDevice()"} io_Command GPD_ASKCTYPE io_Flags IOB_QUICK set if quick I/O is possible io_Length at least 1 io_Data the address of the byte variable for the result @EndNode @Node "GPD_ASKTRIGGER" "gameport.device/GPD_ASKTRIGGER" @{b} NAME@{ub} GPD_ASKTRIGGER -- Inquire the conditions for a game port report @{b} FUNCTION@{ub} This command inquires what conditions must be met by a game port unit before a pending @{"Read" Link "dos/Read()"} request will be satisfied. These conditions, called triggers, are independent -- that any one occurs is sufficient to queue a game port report to the @{"Read" Link "dos/Read()"} queue. These conditions are set by SetTrigger. This command always executes immediately. @{b} IO REQUEST@{ub} io_Message mn_ReplyPort set if quick I/O is not possible io_Device preset by the call to @{"OpenDevice" Link "trackdisk/OpenDevice()"} io_Unit preset by the call to @{"OpenDevice" Link "trackdisk/OpenDevice()"} io_Command GPD_ASKTRIGGER io_Flags IOB_QUICK set if quick I/O is possible io_Length sizeof(gamePortTrigger) io_Data a structure of type @{"GamePortTrigger" Link "INCLUDE:devices/gameport.h/Main" 34}, which has the following elements gpt_Keys - GPTB_DOWNKEYS set if button down transitions trigger a report, and GPTB_UPKEYS set if button up transitions trigger a report gpt_Timeout - a time which, if exceeded, triggers a report; measured in vertical blank units (60/sec) gpt_XDelta - a distance in x which, if exceeded, triggers a report gpt_YDelta - a distance in x which, if exceeded, triggers a report @EndNode @Node "GPD_READEVENT" "gameport.device/GPD_READEVENT" @{b} NAME@{ub} GPD_READEVENT -- Return the next game port event. @{b} FUNCTION@{ub} @{"Read" Link "dos/Read()"} game port events from the game port and put them in the data area of the iORequest. If there are no pending game port events, this command will not be satisfied, but if there are some events, but not as many as can fill IO_LENGTH, the request will be satisfied with those currently available. @{b} IO REQUEST@{ub} io_Message mn_ReplyPort set if quick I/O is not possible io_Device preset by the call to @{"OpenDevice" Link "trackdisk/OpenDevice()"} io_Unit preset by the call to @{"OpenDevice" Link "trackdisk/OpenDevice()"} io_Command GPD_READEVENT io_Flags IOB_QUICK set if quick I/O is possible io_Length the size of the io_Data area in bytes: there are sizeof(inputEvent) bytes per input event. io_Data a buffer area to fill with input events. The fields of the input event are: ie_NextEvent links the events returned ie_Class is IECLASS_RAWMOUSE ie_SubClass is 0 for the left, 1 for the right game port ie_Code contains any gameport button reports. No report is indicated by the value 0xff. ie_Qualifier only the relative and button bits are set ie_X, ie_Y the x and y values for this report, in either relative or absolute device dependent units. ie_TimeStamp the delta time since the last report, given not as a standard timestamp, but as the frame count in the TV_SECS field. @{b} RESULTS@{ub} This function sets the error field in the iORequest, and fills the iORequest with the next game port events (but not partial events). @{b} SEE ALSO@{ub} gameport.device/SetCType, gameport.device/SetTrigger @EndNode @Node "GPD_SETCTYPE" "gameport.device/GPD_SETCTYPE" @{b} NAME@{ub} GPD_SETCTYPE -- Set the current game port controller type @{b} FUNCTION@{ub} This command sets the type of device at the game port, so that the signals at the port may be properly interpreted. The port can also be turned off, so that no reports are generated. This command always executes immediately. @{b} IO REQUEST@{ub} io_Message mn_ReplyPort set if quick I/O is not possible io_Device preset by the call to @{"OpenDevice" Link "trackdisk/OpenDevice()"} io_Unit preset by the call to @{"OpenDevice" Link "trackdisk/OpenDevice()"} io_Command GPD_SETCTYPE io_Flags IOB_QUICK set if quick I/O is possible io_Length 1 io_Data the address of the byte variable describing the controller type, as per the equates in the gameport include file @EndNode @Node "GPD_SETTRIGGER" "gameport.device/GPD_SETTRIGGER" @{b} NAME@{ub} GPD_SETTRIGGER -- Set the conditions for a game port report @{b} FUNCTION@{ub} This command sets what conditions must be met by a game port unit before a pending @{"Read" Link "dos/Read()"} request will be satisfied. These conditions, called triggers, are independent -- that any one occurs is sufficient to queue a game port report to the @{"Read" Link "dos/Read()"} queue. These conditions are inquired with AskTrigger. This command always executes immediately. @{b} IO REQUEST@{ub} io_Message mn_ReplyPort set if quick I/O is not possible io_Device preset by the call to @{"OpenDevice" Link "trackdisk/OpenDevice()"} io_Unit preset by the call to @{"OpenDevice" Link "trackdisk/OpenDevice()"} io_Command GPD_SETTRIGGER io_Flags IOB_QUICK set if quick I/O is possible io_Length sizeof(gamePortTrigger) io_Data a structure of type @{"GamePortTrigger" Link "INCLUDE:devices/gameport.h/Main" 34}, which has the following elements gpt_Keys - GPTB_DOWNKEYS set if button down transitions trigger a report, and GPTB_UPKEYS set if button up transitions trigger a report gpt_Timeout - a time which, if exceeded, triggers a report; measured in vertical blank units (60/sec) gpt_XDelta - a distance in x which, if exceeded, triggers a report gpt_YDelta - a distance in x which, if exceeded, triggers a report @EndNode