controller
Simulates DualShock 2 button presses and analog stick movement on PS2 ports to test programs, with timed holds, releases, and poll-count checks.
Instructions
Presses buttons on a controller of the target's own making, a DualShock 2 in port
1 or 2, which the program finds there whatever is really plugged in. buttons are those
held down, all the others up: select, start, up, right, down, left, triangle, circle,
cross, square, l1, l2, l3, r1, r2, r3. The sticks are x and y from -1 to 1, right and
down positive, and are centred if not given.
With seconds the buttons are held that long and then let go, the call returning after:
a press. Without, they stay as set until the next call; an empty call lets everything
go. A program usually wants a button down for a few frames to notice it: 0.1 is a
press. unplug takes the controller out, and the port is as it really is again.
polls counts the times the port was asked what's pressed: one that isn't growing
means no program is reading it. A console reaches a program that reads the controller
through the IOP's sio2man, as the console's own padman and PS2SDK's do.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "controller"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| port | No | ||
| unplug | No | ||
| buttons | No | ||
| seconds | No | ||
| left_stick | No | ||
| right_stick | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||