35 *
GS_REG_CSR |=
GS_SET_CSR(0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0);
38 while (!(*
GS_REG_CSR & (
GS_SET_CSR(0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0)))) { }
41 *
GS_REG_CSR &= ~
GS_SET_CSR(0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0);
57 printf(
"SifLoadModule sio2man.irx failed: %d\n", ret);
64 printf(
"SifLoadModule mtapman.irx failed: %d\n", ret);
71 printf(
"SifLoadModule padman.irx failed: %d\n", ret);
82 printf(
"SifLoadModule XSIO2MAN failed: %d\n", ret);
89 printf(
"SifLoadModule XMTAPMAN failed: %d\n", ret);
96 printf(
"SifLoadModule XPADMAN failed: %d\n", ret);
121 printf(
"Multitap (%i) connected\n", (
int)
port);
126 printf(
"Multitap (%i) disconnected(int argc, char **argv)\n", (
int)
port);
154 printf(
"Controller (%i,%i) connected\n", (
int)
port, (
int)
slot);
163 printf(
"Controller (%i,%i) disconnected\n", (
int)
port, (
int)
slot);
193 int main(
int argc,
char **argv)
205 printf(
"libmtap sample");
207 if((argc == 2) && (strncmp(argv[1],
"free", 4) == 0))
209 printf(
" - Using PS2SDK sio2man.irx, mtapman.irx and padman.irx modules.\n");
214 printf(
" - Using ROM XSIO2MAN, XMTAP and XPADMAN modules.\n");
215 printf(
"Start this sample with 'free' as an argument to load sio2man.irx, mtapman.irx and padman.irx\n");
216 printf(
"Example: ps2client execee host:mtap_sample.elf free\n");
232 for(i = 0; i < 4; i++)
243 padBuf[0][i] = memalign(64, 256);
244 padBuf[1][i] = memalign(64, 256);
int SifLoadModule(const char *path, int arg_len, const char *args)
#define GS_SET_CSR(signal_evnt, finish_evnt, hsync_intrupt, vsync_intrupt, write_terminate, flush, reset, nfield, current_field, fifo_status, gs_rev_number, gs_id)
int mtapGetConnection(int port)
int mtapPortOpen(int port)
int padPortOpen(int port, int slot, void *padArea)
unsigned char padRead(int port, int slot, struct padButtonStatus *data)
int padPortClose(int port, int slot)
int padGetState(int port, int slot)
#define PAD_STATE_DISCONN
static char * padBuf[2][4]
static u32 mtapConnected[2]
int main(int argc, char **argv)
void loadmodules(int free)
static u32 padConnected[2][4]
void SifInitRpc(int mode)