PS2SDK
PS2 Homebrew Libraries
Loading...
Searching...
No Matches
sifcmd.c File Reference
#include <tamtypes.h>
#include <kernel.h>
#include <sifcmd.h>
+ Include dependency graph for sifcmd.c:

Go to the source code of this file.

Data Structures

struct  cmd_data
 

Macros

#define CMD_PACKET_MAX   128
 
#define CMD_PACKET_DATA_MAX   112
 
#define SYS_CMD_HANDLER_MAX   32
 
#define DMAC_COMM_STAT   0x1000e010
 
#define DMAC_SIF0_CHCR   0x1000c000
 
#define CHCR_STR   0x100
 
#define STAT_SIF0   0x20
 

Functions

int _SifCmdIntHandler (int channel)
 

Variables

int _iop_reboot_count
 
struct cmd_data _sif_cmd_data
 

Detailed Description

EE SIF commands MRB: This file now contains the SIF routines included with libpsware. Bug reports welcome.

Definition in file sifcmd.c.


Data Structure Documentation

◆ cmd_data

struct cmd_data

Even though I'm reluctant to do this, I've made this structure binary compatible with the SCE libs and ps2lib. In all implementations, a pointer to this data is stored in SIF register 0x80000001. Each routine that relies on this data can then use the data referenced from that register, so that even if a SIF library is initialized after this one, we should still work exactly as expected.

Definition at line 39 of file sifcmd.c.

+ Collaboration diagram for cmd_data:
Data Fields
void * pktbuf

Command packet received from the IOP

void * unused
void * iopbuf

Address of IOP SIF DMA receive address

SifCmdHandlerData_t * sys_cmd_handlers
u32 nr_sys_handlers
SifCmdHandlerData_t * usr_cmd_handlers
u32 nr_usr_handlers
int * sregs

Macro Definition Documentation

◆ CMD_PACKET_MAX

#define CMD_PACKET_MAX   128

Definition at line 23 of file sifcmd.c.

◆ CMD_PACKET_DATA_MAX

#define CMD_PACKET_DATA_MAX   112

Definition at line 24 of file sifcmd.c.

◆ SYS_CMD_HANDLER_MAX

#define SYS_CMD_HANDLER_MAX   32

Definition at line 25 of file sifcmd.c.

◆ DMAC_COMM_STAT

#define DMAC_COMM_STAT   0x1000e010

Definition at line 28 of file sifcmd.c.

◆ DMAC_SIF0_CHCR

#define DMAC_SIF0_CHCR   0x1000c000

Definition at line 29 of file sifcmd.c.

◆ CHCR_STR

#define CHCR_STR   0x100

Definition at line 30 of file sifcmd.c.

◆ STAT_SIF0

#define STAT_SIF0   0x20

Definition at line 31 of file sifcmd.c.