28 static char padBuf[256] __attribute__((aligned(64)));
49 printf(
"sifLoadModule sio failed: %d\n", ret);
55 printf(
"sifLoadModule pad failed: %d\n", ret);
72 if (state != lastState) {
74 printf(
"Please wait, pad(%d,%d) is in state %s\n",
81 if (lastState != -1) {
104 printf(
"The device has %d modes\n", modes);
108 for (i = 0; i < modes; i++) {
114 printf(
"It is currently using mode %d\n",
120 printf(
"This is a digital controller?\n");
132 printf(
"This is no Dual Shock controller\n");
140 printf(
"This is no Dual Shock controller??\n");
144 printf(
"Enabling dual shock functions\n");
157 printf(
"# of actuators: %d\n",
actuators);
168 printf(
"padSetActAlign: %d\n",
172 printf(
"Did not find any actuators.\n");
195 "Very welcome to this small and stupid pad test application\n"
196 "Hope you will find the source useful though =)\n"
197 "Please, use & abuse the code, but I would not mind \n"
198 "a small greeting when you do :)\n"
199 "I myself would like to leave a special thanks to Gustavo "
200 "S:\nWithout your psx2lib this would've been impossible\n\n"
218 printf(
"padOpenPort failed: %d\n", ret);
223 printf(
"pad initalization failed!\n");
233 printf(
"Pad(%d, %d) is disconnected\n",
port,
slot);
238 printf(
"Pad: OK!\n");
283 printf(
"CROSS - Enter press mode\n");
287 printf(
"CIRCLE - Exit press mode\n");
291 printf(
"TRIANGLE (press mode disabled, see code)\n");
296 printf(
"R1 - Start little engine\n");
301 printf(
"L1 - Stop little engine\n");
337 printf(
"Goto sleep!\n");
int SifLoadModule(const char *path, int arg_len, const char *args)
int padPortOpen(int port, int slot, void *padArea)
unsigned char padRead(int port, int slot, struct padButtonStatus *data)
int padInfoMode(int port, int slot, int infoMode, int index)
int padExitPressMode(int port, int slot)
#define PAD_MMODE_DUALSHOCK
int padSetActAlign(int port, int slot, char act_align[6])
int padSetActDirect(int port, int slot, char act_align[6])
#define PAD_TYPE_DUALSHOCK
int padGetState(int port, int slot)
unsigned char padInfoAct(int port, int slot, int word, int byte)
int padInfoPressMode(int port, int slot)
#define PAD_STATE_DISCONN
void padStateInt2String(int state, char buf[16])
int padSetMainMode(int port, int slot, int mode, int lock)
int padEnterPressMode(int port, int slot)
int padGetSlotMax(int port)
#define PAD_STATE_FINDCTP1
static int initializePad(int port, int slot)
static void loadModules(void)
static int waitPadReady(int port, int slot)
void SifInitRpc(int mode)