PS2SDK
PS2 Homebrew Libraries
Loading...
Searching...
No Matches
sifcmd.h
Go to the documentation of this file.
1
/*
2
# _____ ___ ____ ___ ____
3
# ____| | ____| | | |____|
4
# | ___| |____ ___| ____| | \ PS2DEV Open Source Project.
5
#-----------------------------------------------------------------------
6
# (C)2001, Gustavo Scotti (gustavo@scotti.com)
7
# (c) 2003 Marcus R. Brown (mrbrown@0xd6.org)
8
# Licenced under Academic Free License version 2.0
9
# Review ps2sdk README & LICENSE files for further details.
10
*/
11
17
#ifndef __SIFCMD_H__
18
#define __SIFCMD_H__
19
20
#include <
tamtypes.h
>
21
22
typedef
struct
t_SifCmdHeader
23
{
25
u32
psize
: 8;
27
u32
dsize
: 24;
29
void
*
dest
;
31
int
cid
;
33
u32
opt
;
34
}
SifCmdHeader_t
;
35
37
#define SIF_CMD_ID_SYSTEM 0x80000000
38
39
#define SIF_CMD_CHANGE_SADDR (SIF_CMD_ID_SYSTEM | 0)
40
#define SIF_CMD_SET_SREG (SIF_CMD_ID_SYSTEM | 1)
41
#define SIF_CMD_INIT_CMD (SIF_CMD_ID_SYSTEM | 2)
42
#define SIF_CMD_RESET_CMD (SIF_CMD_ID_SYSTEM | 3)
43
#define SIF_CMD_RPC_END (SIF_CMD_ID_SYSTEM | 8)
44
#define SIF_CMD_RPC_BIND (SIF_CMD_ID_SYSTEM | 9)
45
#define SIF_CMD_RPC_CALL (SIF_CMD_ID_SYSTEM | 10)
46
#define SIF_CMD_RPC_RDATA (SIF_CMD_ID_SYSTEM | 12)
47
49
#define SIF_SREG_RPCINIT 0
50
54
typedef
struct
t_SifCmdSRegData
55
{
56
SifCmdHeader_t
header;
57
int
index;
58
unsigned
int
value;
59
}
SifCmdSRegData_t
;
60
61
#ifdef __cplusplus
62
extern
"C"
63
#endif
64
typedef
void (*SifCmdHandler_t)(
void
*data,
void
*harg);
65
66
typedef
struct
t_SifCmdHandlerData
67
{
68
SifCmdHandler_t handler;
69
void
*harg;
70
}
SifCmdHandlerData_t
;
71
73
#define RESET_ARG_MAX 79
74
75
typedef
struct
_iop_reset_pkt
76
{
77
struct
t_SifCmdHeader
header;
78
int
arglen;
79
int
mode;
80
char
arg[
RESET_ARG_MAX
+ 1];
81
}
SifCmdResetData_t
;
82
83
#ifdef __cplusplus
84
extern
"C"
{
85
#endif
86
87
unsigned
int
SifSendCmd(
int
cmd,
void
*packet,
int
packet_size,
void
*src_extra,
88
void
*dest_extra,
int
size_extra);
89
unsigned
int
iSifSendCmd(
int
cmd,
void
*packet,
int
packet_size,
void
*src_extra,
90
void
*dest_extra,
int
size_extra);
91
void
SifAddCmdHandler(
int
pos, SifCmdHandler_t handler,
void
*harg);
92
void
SifRemoveCmdHandler(
int
pos);
93
void
SifInitCmd(
void
);
94
void
SifExitCmd(
void
);
95
SifCmdHandlerData_t
*SifSetCmdBuffer(
SifCmdHandlerData_t
*db,
int
size);
96
int
SifGetSreg(
int
index);
97
98
void
SifWriteBackDCache(
void
*ptr,
int
size);
// EE only
99
100
// Send mode bits
102
#define SIF_CMD_M_INTR 0x01
104
#define SIF_CMD_M_WBDC 0x04
105
106
#ifdef __cplusplus
107
}
108
#endif
109
110
#endif
/* __SIFCMD_H__ */
RESET_ARG_MAX
#define RESET_ARG_MAX
Definition
sifcmd.h:73
SifCmdSRegData_t
struct t_SifCmdSRegData SifCmdSRegData_t
_iop_reset_pkt
Definition
sifcmd.h:76
t_SifCmdHeader::dest
void * dest
Definition
sifcmd.h:29
t_SifCmdHeader::opt
u32 opt
Definition
sifcmd.h:33
t_SifCmdHeader::psize
u32 psize
Definition
sifcmd.h:25
t_SifCmdHeader::dsize
u32 dsize
Definition
sifcmd.h:27
t_SifCmdHeader::cid
int cid
Definition
sifcmd.h:31
t_SifCmdHandlerData
Definition
sifcmd.h:67
t_SifCmdHeader
Definition
sifcmd.h:23
t_SifCmdSRegData
Definition
sifcmd.h:55
tamtypes.h
ee
kernel
include
sifcmd.h
Generated on Thu Nov 14 2024 05:25:24 for PS2SDK by
1.9.8