Misc Functions and Constants
Functions that does not fit into others topics.
Related GPC Functions:
Special Constants:
1. get_rtime
Returns the elapsed time, in milliseconds, between the current and the previous interaction of the main procedure.
Prototype:
int get_rtime ( )
Parameters:
None
Return:
Elapsed time, in milliseconds
Example:
2. turn_off
If a wireless controller is in use this command turns it off.
Prototype:
turn_off ( )
Parameters:
None
Return:
None
Example:
3. get_slot
Returns the number of currently loaded slot.
Prototype:
int get_slot ( )
Parameters:
None
Return:
The index number of currently loaded slot. Range: 1~10, where 1 to 9 correspond to device's slots and 10 means the script was loaded by the "Build and Run" command
Example:
4. check_slot
Check if the specified slot can be loaded.
Prototype:
check_slot ( <slot index> )
Parameters:
<slot index> : index of the slot which script should be checked
Return:
TRUE if the slot can be loaded, FALSE otherwise
Example:
5. load_slot
Ends the execution of current script and loads the script from specified slot.
Prototype:
load_slot ( <slot index> )
Parameters:
<slot index> : index of the slot which script should be loaded
Return:
None
Example:
6. ps4_touchpad
Returns advanced information of the Dualshock 4 touchpad.
Prototype:
int ps4_touchpad ( <info_identifier> )
Parameters:
<info_identifier> : a Dualshock 4 touchpad info identifier:
Return:
The value related to the info_identifier supplied
Example:
7. ps4_set_touchpad
Touches the Dualshock 4 touchpad in a specific (X, Y) position.
Prototype:
ps4_set_touchpad ( <X Value>, <Y Value> )
Parameters:
<X Value> : X position in the Dualshock 4 touchpad, ranging from -100 to 100.
<Y Value> : Y position in the Dualshock 4 touchpad, ranging from -100 to 100.
Return:
None
Example:
8. ps4_authtimeout
Returns the PS4 authentication timeout status.
Prototype:
int ps4_authtimeout ( )
Parameters:
None
Return:
The PS4 authentication timeout status. The timeout status value is a decedent countdown, where 1 is the last readable value before the authentication timeout.
Example:
9. output_protocol
Forces the Titan One to change the output protocol (Output USB)
Prototype:
output_protocol ( <Protocol ID> )
Parameters:
<Protocol ID> : A valid output protocol ID: PIO_PS4, PIO_PS3, PIO_XB1 or PIO_XB360.
Return:
None
Example:
10. output_reconnection
Forces the Titan One to reconnect on the console (Output USB). Can be used to reset the PS4 authentication timeout.
Prototype:
output_reconnection ( )
Parameters:
None
Return:
None
Example:
11. wiir_offscreen
Tests if the IR sensor of Wiimote controller is off screen.
Prototype:
int wiir_offscreen ( )
Parameters:
None
Return:
TRUE if Wiimote IR is off screen, FALSE otherwise
Example:
12. get_battery
Returns the battery level of connected controller, if not applicable the returned value is 10 (Fully Charged).
Prototype:
int get_battery ( )
Parameters:
None
Return:
A value between 0 (dead) and 10 (fully charged)
Example:
13. get_console
Returns the currently connected console type, or 0 if there is no console connected.
Prototype:
int get_console ( )
Parameters:
None
Return:
0, PIO_PS4, PIO_PS3, PIO_XB1 or PIO_XB360
Example:
14. get_controller
Returns the currently connected controller type, or 0 if there is no controller connected.
Prototype:
int get_controller ( )
Parameters:
None
Return:
0, PIO_PS4, PIO_PS3, PIO_XB1, PIO_XB360 or PIO_WII
Example:
15. get_ctrlbutton
Returns the control button identifier. The control button is used to switch memory slots and to configure Gamepacks using the controller.
Prototype:
int get_ctrlbutton ( )
Parameters:
None
Return:
Example:
16. vm_tctrl
Sets the virtual machine timeout for the next iteration.
Prototype:
vm_tctrl ( <Value> )
Parameters:
<Value> : Numerical value ranging from -9 to 10. The value is added to the base Virtual Machine time (10ms).
Return:
None
Example:
|