STUB_START "sceCtrl",0x40010000,0x00030005 STUB_FUNC 0x6a2774f3,CtrlInit STUB_FUNC 0x1f4011e6,CtrlSetAnalogMode STUB_FUNC 0x1f803938,CtrlRead STUB_END STUB_START "IoFileMgrForUser",0x40010000,0x00050005 STUB_FUNC 0x6a638d83,sceIoRead STUB_FUNC 0x42ec03ac,sceIoWrite STUB_FUNC 0x27eb27b8,sceIoLseek STUB_FUNC 0x810c4bc3,sceIoClose STUB_FUNC 0x109f50bc,sceIoOpen STUB_FUNC 0xF27A9C51,sceIoRemove STUB_FUNC 0x6A70004,sceIoMkdir STUB_FUNC 0x1117C65F,sceIoRmdir STUB_FUNC 0x54F5FB11,sceIoDevctl STUB_FUNC 0x779103A0,sceIoRename STUB_END STUB_START "IoFileMgrForUser",0x40010000,0x00030005 STUB_FUNC 0xb29ddf9c,IoDopen STUB_FUNC 0xe3eb004c,IoDread STUB_FUNC 0xeb092469,IoDclose STUB_END
/* Index for the two analog directions */ #define CTRL_ANALOG_X 0 #define CTRL_ANALOG_Y 1 /* Button bit masks */ #define CTRL_SQUARE 0x8000 #define CTRL_TRIANGLE 0x1000 #define CTRL_CIRCLE 0x2000 #define CTRL_CROSS 0x4000 #define CTRL_UP 0x0010 #define CTRL_DOWN 0x0040 #define CTRL_LEFT 0x0080 #define CTRL_RIGHT 0x0020 #define CTRL_START 0x0008 #define CTRL_SELECT 0x0001 #define CTRL_LTRIGGER 0x0100 #define CTRL_RTRIGGER 0x0200 /* Returned control data */ typedef struct _ctrl_data { u32 frame; u32 buttons; u8 analog[4]; u32 unused; } ctrl_data_t; /* Not 100% sure on this, init with 0 */ void CtrlInit(int unknown); /* Pass 1 to enable analogue mode */ void CtrlSetAnalogMode(int on); /* Read in the controller data. Unknown should be set to 1 */ void CtrlRead(ctrl_data_t* paddata, int unknown); enum { TYPE_DIR=0x10, TYPE_FILE=0x20 }; struct dirent { u32 unk0; u32 type; u32 size; u32 unk[19]; char name[0x108]; }; int IoDopen(const char *fn); int IoDread(int fd, struct dirent *de); void IoDclose(int fd); #define O_RDONLY 0x0001 #define O_WRONLY 0x0002 #define O_RDWR 0x0003 #define O_NBLOCK 0x0010 #define O_APPEND 0x0100 #define O_CREAT 0x0200 #define O_TRUNC 0x0400 #define O_NOWAIT 0x8000 int sceIoOpen(const char* file, int mode); void sceIoClose(int fd); int sceIoRead(int fd, void *data, int size); int sceIoWrite(int fd, void *data, int size); int sceIoLseek(int fd, int offset, int whence); int sceIoRemove(const char *file); int sceIoMkdir(const char *dir, int mode); int sceIoRmdir(const char *dir); int sceIoRename(const char *oldname, const char *newname); int sceIoDevctl(const char *name int cmd, void *arg, size_t arglen, void *buf, size_t *buflen);