#include "irx.h"
#include "types.h"
Go to the source code of this file.
|
void | WaitClearEvent (int eventflag, u32 bits, int mode, u32 *resbits_out) |
|
int | VblankStart (void *arg) |
|
int | VblankEnd (void *arg) |
|
s32 | padInit (void *ee_addr) |
|
s32 | padEnd (void) |
|
s32 | padPortClose (s32 port, s32 slot, s32 wait) |
|
s32 | padPortOpen (s32 port, s32 slot, s32 pad_area_ee_addr, u32 *buf) |
|
u32 | padSetMainMode (u32 port, u32 slot, u32 mode, u32 lock) |
|
u32 | padSetActDirect (u32 port, u32 slot, u8 *actData) |
|
u32 | padSetActAlign (u32 port, u32 slot, const u8 *actData) |
|
u32 | padGetButtonMask (u32 port, u32 slot) |
|
u32 | padSetButtonInfo (u32 port, u32 slot, u32 info) |
|
u32 | padSetVrefParam (u32 port, u32 slot, const u8 *vparam) |
|
s32 | padInfoAct (u32 port, u32 slot, s32 act, u32 val) |
|
s32 | padInfoComb (u32 port, u32 slot, s32 listno, u32 offs) |
|
s32 | padInfoMode (u32 port, u32 slot, s32 term, u32 offs) |
|
u32 | padGetPortMax (void) |
|
u32 | padGetSlotMax (u32 port) |
|
u32 | padGetModVersion (void) |
|
IOP pad driver
Definition in file freepad.h.
◆ vblankData_t
Definition at line 97 of file freepad.h.
Data Fields |
int |
padEnd |
|
int |
eventflag |
|
int |
init |
|
int |
stopTransfer |
|
int |
tid_1 |
|
int |
tid_2 |
|
◆ ee_paddata_t
Definition at line 107 of file freepad.h.
Data Fields |
u8 |
data[32] |
|
u32 |
actDirData[2] |
|
u32 |
actAlignData[2] |
|
u32 |
actData[4] |
|
u32 |
combData[4] |
|
u32 |
modeTable[2] |
|
u32 |
frame |
|
u32 |
findPadRetries |
|
u32 |
length |
|
u8 |
modeConfig |
|
u8 |
modeCurId |
|
u8 |
model |
|
u8 |
buttonDataReady |
|
u8 |
nrOfModes |
|
u8 |
modeCurOffs |
|
u8 |
nrOfActuators |
|
u8 |
numActComb |
|
u8 |
val_c6 |
|
u8 |
mode |
|
u8 |
lock |
|
u8 |
actDirSize |
|
u8 |
state |
|
u8 |
reqState |
|
u8 |
currentTask |
|
u8 |
runTask |
|
u8 |
stat70bit |
|
u8 |
padding[11] |
|
◆ ee_old_paddata_t
Definition at line 138 of file freepad.h.
Data Fields |
u32 |
frame |
|
u8 |
state |
|
u8 |
reqState |
|
u8 |
ok |
|
u8 |
unkn7 |
|
u8 |
data[32] |
|
u32 |
length |
|
u8 |
request |
|
u8 |
CTP |
CTP=1/no config; CTP=2/config, acts...
|
u8 |
model |
1, 2 or 3
|
u8 |
correction |
the data in the buffer is already corrected
|
u8 |
errorCount |
|
u8 |
unk49[15] |
|
◆ padState_t.actData
Definition at line 170 of file freepad.h.
Data Fields |
u8 |
data[4][4] |
|
u32 |
data32[4] |
|
◆ padState_t.combData
union padState_t.combData |
Definition at line 174 of file freepad.h.
Data Fields |
u8 |
data[4][4] |
|
u32 |
data32[4] |
|
◆ padState_t.modeTable
union padState_t.modeTable |
Definition at line 178 of file freepad.h.
Data Fields |
u16 |
data[4] |
|
u32 |
data32[2] |
|
◆ padState_t.ee_actDirectData
union padState_t.ee_actDirectData |
Definition at line 193 of file freepad.h.
Data Fields |
u8 |
data[8] |
|
u32 |
data32[8/sizeof(u32)] |
|
◆ padState_t.ee_actAlignData
union padState_t.ee_actAlignData |
Definition at line 198 of file freepad.h.
Data Fields |
u8 |
data[8] |
|
u32 |
data32[8/sizeof(u32)] |
|
◆ MODNAME
#define MODNAME "freepad" |
◆ M_PRINTF
#define M_PRINTF |
( |
|
format, |
|
|
|
args... |
|
) |
| printf(MODNAME ": " format, ## args) |
◆ M_KPRINTF
#define M_KPRINTF |
( |
|
format, |
|
|
|
args... |
|
) |
| Kprintf(MODNAME ": " format, ## args) |
◆ D_PRINTF
#define D_PRINTF |
( |
|
a... | ) |
(void)0 |
◆ PADMAN_THPRI_LO
#define PADMAN_THPRI_LO 46 |
◆ PADMAN_THPRI_HI
#define PADMAN_THPRI_HI 20 |
◆ SB_STAT
#define SB_STAT *((volatile unsigned int*)0xBD000040) |
◆ PAD_STATE_DISCONN
#define PAD_STATE_DISCONN 0x00 |
◆ PAD_STATE_FINDPAD
#define PAD_STATE_FINDPAD 0x01 |
◆ PAD_STATE_FINDCTP1
#define PAD_STATE_FINDCTP1 0x02 |
◆ PAD_STATE_EXECCMD
#define PAD_STATE_EXECCMD 0x05 |
◆ PAD_STATE_STABLE
#define PAD_STATE_STABLE 0x06 |
◆ PAD_STATE_ERROR
#define PAD_STATE_ERROR 0x07 |
◆ PAD_RSTAT_COMPLETE
#define PAD_RSTAT_COMPLETE 0x00 |
◆ PAD_RSTAT_FAILED
#define PAD_RSTAT_FAILED 0x01 |
◆ PAD_RSTAT_BUSY
#define PAD_RSTAT_BUSY 0x02 |
◆ PAD_TYPE_NEJICON
#define PAD_TYPE_NEJICON 0x2 |
◆ PAD_TYPE_KONAMIGUN
#define PAD_TYPE_KONAMIGUN 0x3 |
◆ PAD_TYPE_DIGITAL
#define PAD_TYPE_DIGITAL 0x4 |
◆ PAD_TYPE_ANALOG
#define PAD_TYPE_ANALOG 0x5 |
◆ PAD_TYPE_NAMCOGUN
#define PAD_TYPE_NAMCOGUN 0x6 |
◆ PAD_TYPE_DUALSHOCK
#define PAD_TYPE_DUALSHOCK 0x7 |
◆ PAD_MODEL_DUALSHOCK
#define PAD_MODEL_DUALSHOCK 0x1 |
◆ PAD_MODEL_DUALSHOCK2
#define PAD_MODEL_DUALSHOCK2 0x3 |
◆ MODE_CONFIG_NO_PAD
#define MODE_CONFIG_NO_PAD 0x0 |
◆ MODE_CONFIG_QUERY_PAD
#define MODE_CONFIG_QUERY_PAD 0x1 |
◆ MODE_CONFIG_READY
#define MODE_CONFIG_READY 0x2 |
◆ TASK_NONE
◆ TASK_UPDATE_PAD
#define TASK_UPDATE_PAD 1 |
◆ TASK_QUERY_PAD
◆ TASK_PORT_CLOSE
#define TASK_PORT_CLOSE 3 |
◆ TASK_SET_MAIN_MODE
#define TASK_SET_MAIN_MODE 4 |
◆ TASK_SET_ACT_ALIGN
#define TASK_SET_ACT_ALIGN 5 |
◆ TASK_SET_BUTTON_INFO
#define TASK_SET_BUTTON_INFO 6 |
◆ TASK_SET_VREF_PARAM
#define TASK_SET_VREF_PARAM 7 |
◆ EF_UPDATE_PAD
#define EF_UPDATE_PAD 0x0001 |
◆ EF_QUERY_PAD
#define EF_QUERY_PAD 0x0002 |
◆ EF_SET_MAIN_MODE
#define EF_SET_MAIN_MODE 0x0008 |
◆ EF_SET_ACT_ALIGN
#define EF_SET_ACT_ALIGN 0x0010 |
◆ EF_SET_SET_BUTTON_INFO
#define EF_SET_SET_BUTTON_INFO 0x0020 |
◆ EF_SET_VREF_PARAM
#define EF_SET_VREF_PARAM 0x0040 |
◆ EF_PAD_TRANSFER_START
#define EF_PAD_TRANSFER_START 0x0080 |
◆ EF_PAD_TRANSFER_DONE
#define EF_PAD_TRANSFER_DONE 0x0100 |
◆ EF_TASK_DONE
#define EF_TASK_DONE 0x0200 |
◆ EF_PORT_CLOSE
#define EF_PORT_CLOSE 0x0400 |
◆ EF_EXIT_THREAD
#define EF_EXIT_THREAD 0x1000 |
◆ EF_VB_TRANSFER
#define EF_VB_TRANSFER 0x0001 |
◆ EF_VB_TRANSFER_DONE
#define EF_VB_TRANSFER_DONE 0x0004 |
◆ EF_VB_WAIT_THREAD_EXIT
#define EF_VB_WAIT_THREAD_EXIT 0x0008 |
◆ WaitClearEvent()
void WaitClearEvent |
( |
int |
eventflag, |
|
|
u32 |
bits, |
|
|
int |
mode, |
|
|
u32 * |
resbits_out |
|
) |
| |
◆ VblankStart()
int VblankStart |
( |
void * |
arg | ) |
|
◆ VblankEnd()
int VblankEnd |
( |
void * |
arg | ) |
|
◆ padInit()
s32 padInit |
( |
void * |
ee_addr | ) |
|
◆ padEnd()
Ends all pad communication Note: PADMAN from release 1.3.4 does not have padPortInit implemented. As a result, it is impossible to reinitialize libpad after calling padEnd(). This was known as padClose in the really early official SDK releases.
- Returns
- == 1 => OK
Definition at line 374 of file libpad.c.
References padPortClose().
◆ padPortClose()
s32 padPortClose |
( |
s32 |
port, |
|
|
s32 |
slot, |
|
|
s32 |
wait |
|
) |
| |
◆ padPortOpen()
s32 padPortOpen |
( |
s32 |
port, |
|
|
s32 |
slot, |
|
|
s32 |
pad_area_ee_addr, |
|
|
u32 * |
buf |
|
) |
| |
◆ padSetMainMode()
u32 padSetMainMode |
( |
u32 |
port, |
|
|
u32 |
slot, |
|
|
u32 |
mode, |
|
|
u32 |
lock |
|
) |
| |
◆ padSetActDirect()
u32 padSetActDirect |
( |
u32 |
port, |
|
|
u32 |
slot, |
|
|
u8 * |
actData |
|
) |
| |
◆ padSetActAlign()
u32 padSetActAlign |
( |
u32 |
port, |
|
|
u32 |
slot, |
|
|
const u8 * |
actData |
|
) |
| |
◆ padGetButtonMask()
u32 padGetButtonMask |
( |
u32 |
port, |
|
|
u32 |
slot |
|
) |
| |
◆ padSetButtonInfo()
u32 padSetButtonInfo |
( |
u32 |
port, |
|
|
u32 |
slot, |
|
|
u32 |
info |
|
) |
| |
◆ padSetVrefParam()
u32 padSetVrefParam |
( |
u32 |
port, |
|
|
u32 |
slot, |
|
|
const u8 * |
vparam |
|
) |
| |
◆ padInfoAct()
s32 padInfoAct |
( |
u32 |
port, |
|
|
u32 |
slot, |
|
|
s32 |
act, |
|
|
u32 |
val |
|
) |
| |
◆ padInfoComb()
s32 padInfoComb |
( |
u32 |
port, |
|
|
u32 |
slot, |
|
|
s32 |
listno, |
|
|
u32 |
offs |
|
) |
| |
◆ padInfoMode()
s32 padInfoMode |
( |
u32 |
port, |
|
|
u32 |
slot, |
|
|
s32 |
term, |
|
|
u32 |
offs |
|
) |
| |
◆ padGetPortMax()
u32 padGetPortMax |
( |
void |
| ) |
|
Returns # slots on the PS2 (usally 2)
Definition at line 550 of file libpad.c.
◆ padGetSlotMax()
u32 padGetSlotMax |
( |
u32 |
port | ) |
|
◆ padGetModVersion()
u32 padGetModVersion |
( |
void |
| ) |
|
Returns the padman.irx version NOT SUPPORTED on module rom0:padman
Definition at line 575 of file libpad.c.