PS2SDK
PS2 Homebrew Libraries
Loading...
Searching...
No Matches
sifman.h File Reference
#include <types.h>
#include <irx.h>
+ Include dependency graph for sifman.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  t_SifDmaTransfer
 

Macros

#define SIF_DMA_FROM_IOP   0x0
 
#define SIF_DMA_TO_IOP   0x1
 
#define SIF_DMA_FROM_EE   0x0
 
#define SIF_DMA_TO_EE   0x1
 
#define SIF_DMA_INT_I   0x2
 
#define SIF_DMA_INT_O   0x4
 
#define SIF_DMA_SPR   0x8
 
#define SIF_DMA_BSN   0x10 /* ? what is this? */
 
#define SIF_DMA_TAG   0x20
 
#define SIF_REG_ID_SYSTEM   0x80000000
 
#define SIF_STAT_SIFINIT   0x10000
 
#define SIF_STAT_CMDINIT   0x20000
 
#define SIF_STAT_BOOTEND   0x40000
 
#define SifSetDChain   sceSifSetDChain
 
#define SifSetDma   sceSifSetDma
 
#define SifDmaStat   sceSifDmaStat
 
#define sifman_IMPORTS_start   DECLARE_IMPORT_TABLE(sifman, 1, 1)
 
#define sifman_IMPORTS_end   END_IMPORT_TABLE
 
#define I_sceSifDma2Init   DECLARE_IMPORT(4, sceSifDma2Init)
 
#define I_sceSifInit   DECLARE_IMPORT(5, sceSifInit)
 
#define I_sceSifSetDChain   DECLARE_IMPORT(6, sceSifSetDChain)
 
#define I_sceSifSetDma   DECLARE_IMPORT(7, sceSifSetDma)
 
#define I_sceSifDmaStat   DECLARE_IMPORT(8, sceSifDmaStat)
 
#define I_sceSifSetOneDma   DECLARE_IMPORT(9, sceSifSetOneDma);
 
#define I_sceSifSendSync   DECLARE_IMPORT(10, sceSifSendSync);
 
#define I_sceSifIsSending   DECLARE_IMPORT(11, sceSifIsSending);
 
#define I_sceSifDma0Transfer   DECLARE_IMPORT(12, sceSifDma0Transfer)
 
#define I_sceSifDma0Sync   DECLARE_IMPORT(13, sceSifDma0Sync)
 
#define I_sceSifDma0Sending   DECLARE_IMPORT(14, sceSifDma0Sending)
 
#define I_sceSifDma1Transfer   DECLARE_IMPORT(15, sceSifDma1Transfer)
 
#define I_sceSifDma1Sync   DECLARE_IMPORT(16, sceSifDma1Sync)
 
#define I_sceSifDma1Sending   DECLARE_IMPORT(17, sceSifDma1Sending)
 
#define I_sceSifDma2Transfer   DECLARE_IMPORT(18, sceSifDma2Transfer)
 
#define I_sceSifDma2Sync   DECLARE_IMPORT(19, sceSifDma2Sync)
 
#define I_sceSifDma2Sending   DECLARE_IMPORT(20, sceSifDma2Sending)
 
#define I_sceSifGetMSFlag   DECLARE_IMPORT(21, sceSifGetMSFlag)
 
#define I_sceSifSetMSFlag   DECLARE_IMPORT(22, sceSifSetMSFlag)
 
#define I_sceSifGetSMFlag   DECLARE_IMPORT(23, sceSifGetSMFlag)
 
#define I_sceSifSetSMFlag   DECLARE_IMPORT(24, sceSifSetSMFlag)
 
#define I_sceSifGetMainAddr   DECLARE_IMPORT(25, sceSifGetMainAddr)
 
#define I_sceSifGetSubAddr   DECLARE_IMPORT(26, sceSifGetSubAddr)
 
#define I_sceSifSetSubAddr   DECLARE_IMPORT(27, sceSifSetSubAddr)
 
#define I_sceSifIntrMain   DECLARE_IMPORT(28, sceSifIntrMain)
 
#define I_sceSifCheckInit   DECLARE_IMPORT(29, sceSifCheckInit)
 
#define I_sceSifSetDmaIntrHandler   DECLARE_IMPORT(30, sceSifSetDmaIntrHandler)
 
#define I_sceSifResetDmaIntrHandler   DECLARE_IMPORT(31, sceSifResetDmaIntrHandler)
 
#define I_sceSifSetDmaIntr   DECLARE_IMPORT(32, sceSifSetDmaIntr)
 

Typedefs

typedef struct t_SifDmaTransfer SifDmaTransfer_t
 

Enumerations

enum  _sif_regs { SIF_REG_MAINADDR = 1 , SIF_REG_SUBADDR , SIF_REG_MSFLAG , SIF_REG_SMFLAG }
 

Functions

void sceSifDma2Init ()
 
void sceSifInit ()
 
void sceSifSetDChain ()
 
int sceSifSetDma (SifDmaTransfer_t *dmat, int count)
 
int sceSifDmaStat (int trid)
 
void sceSifSetOneDma (SifDmaTransfer_t dmat)
 
void sceSifSendSync ()
 
int sceSifIsSending ()
 
void sceSifDma0Transfer (void *addr, int size, int mode)
 
void sceSifDma0Sync ()
 
int sceSifDma0Sending ()
 
void sceSifDma1Transfer (void *addr, int size, int mode)
 
void sceSifDma1Sync ()
 
int sceSifDma1Sending ()
 
void sceSifDma2Transfer (void *addr, int size, int mode)
 
void sceSifDma2Sync ()
 
int sceSifDma2Sending ()
 
u32 sceSifGetMSFlag ()
 
u32 sceSifSetMSFlag (u32 val)
 
u32 sceSifGetSMFlag ()
 
u32 sceSifSetSMFlag (u32 val)
 
u32 sceSifGetMainAddr ()
 
u32 sceSifGetSubAddr ()
 
u32 sceSifSetSubAddr (u32 addr)
 
void sceSifIntrMain ()
 
int sceSifCheckInit ()
 
void sceSifSetDmaIntrHandler (void(*handler)(void *), void *arg)
 
void sceSifResetDmaIntrHandler ()
 
unsigned int sceSifSetDmaIntr (SifDmaTransfer_t *dmat, int count, void(*completioncb)(void *userdata), void *userdata)
 

Detailed Description

Low-level SIF DMA.

Definition in file sifman.h.


Data Structure Documentation

◆ t_SifDmaTransfer

struct t_SifDmaTransfer

Definition at line 52 of file sifdma.h.

Data Fields
void * src
void * dest
int size
int attr

Macro Definition Documentation

◆ SIF_DMA_FROM_IOP

#define SIF_DMA_FROM_IOP   0x0

Definition at line 35 of file sifman.h.

◆ SIF_DMA_TO_IOP

#define SIF_DMA_TO_IOP   0x1

Definition at line 36 of file sifman.h.

◆ SIF_DMA_FROM_EE

#define SIF_DMA_FROM_EE   0x0

Definition at line 37 of file sifman.h.

◆ SIF_DMA_TO_EE

#define SIF_DMA_TO_EE   0x1

Definition at line 38 of file sifman.h.

◆ SIF_DMA_INT_I

#define SIF_DMA_INT_I   0x2

Definition at line 40 of file sifman.h.

◆ SIF_DMA_INT_O

#define SIF_DMA_INT_O   0x4

Definition at line 41 of file sifman.h.

◆ SIF_DMA_SPR

#define SIF_DMA_SPR   0x8

Definition at line 42 of file sifman.h.

◆ SIF_DMA_BSN

#define SIF_DMA_BSN   0x10 /* ? what is this? */

Definition at line 43 of file sifman.h.

◆ SIF_DMA_TAG

#define SIF_DMA_TAG   0x20

Definition at line 44 of file sifman.h.

◆ SIF_REG_ID_SYSTEM

#define SIF_REG_ID_SYSTEM   0x80000000

Definition at line 46 of file sifman.h.

◆ SIF_STAT_SIFINIT

#define SIF_STAT_SIFINIT   0x10000

SIF initialized

Definition at line 61 of file sifman.h.

◆ SIF_STAT_CMDINIT

#define SIF_STAT_CMDINIT   0x20000

SIFCMD initialized

Definition at line 63 of file sifman.h.

◆ SIF_STAT_BOOTEND

#define SIF_STAT_BOOTEND   0x40000

Bootup completed

Definition at line 65 of file sifman.h.

◆ SifSetDChain

#define SifSetDChain (   void)    sceSifSetDChain

Definition at line 86 of file sifman.h.

◆ SifSetDma

#define SifSetDma   sceSifSetDma

Definition at line 87 of file sifman.h.

◆ SifDmaStat

#define SifDmaStat   sceSifDmaStat

Definition at line 88 of file sifman.h.

◆ sifman_IMPORTS_start

#define sifman_IMPORTS_start   DECLARE_IMPORT_TABLE(sifman, 1, 1)

Definition at line 146 of file sifman.h.

◆ sifman_IMPORTS_end

#define sifman_IMPORTS_end   END_IMPORT_TABLE

Definition at line 147 of file sifman.h.

◆ I_sceSifDma2Init

#define I_sceSifDma2Init   DECLARE_IMPORT(4, sceSifDma2Init)

Definition at line 149 of file sifman.h.

◆ I_sceSifInit

#define I_sceSifInit   DECLARE_IMPORT(5, sceSifInit)

Definition at line 150 of file sifman.h.

◆ I_sceSifSetDChain

#define I_sceSifSetDChain   DECLARE_IMPORT(6, sceSifSetDChain)

Definition at line 151 of file sifman.h.

◆ I_sceSifSetDma

#define I_sceSifSetDma   DECLARE_IMPORT(7, sceSifSetDma)

Definition at line 152 of file sifman.h.

◆ I_sceSifDmaStat

#define I_sceSifDmaStat   DECLARE_IMPORT(8, sceSifDmaStat)

Definition at line 153 of file sifman.h.

◆ I_sceSifSetOneDma

#define I_sceSifSetOneDma   DECLARE_IMPORT(9, sceSifSetOneDma);

Definition at line 154 of file sifman.h.

◆ I_sceSifSendSync

#define I_sceSifSendSync   DECLARE_IMPORT(10, sceSifSendSync);

Definition at line 155 of file sifman.h.

◆ I_sceSifIsSending

#define I_sceSifIsSending   DECLARE_IMPORT(11, sceSifIsSending);

Definition at line 156 of file sifman.h.

◆ I_sceSifDma0Transfer

#define I_sceSifDma0Transfer   DECLARE_IMPORT(12, sceSifDma0Transfer)

Definition at line 157 of file sifman.h.

◆ I_sceSifDma0Sync

#define I_sceSifDma0Sync   DECLARE_IMPORT(13, sceSifDma0Sync)

Definition at line 158 of file sifman.h.

◆ I_sceSifDma0Sending

#define I_sceSifDma0Sending   DECLARE_IMPORT(14, sceSifDma0Sending)

Definition at line 159 of file sifman.h.

◆ I_sceSifDma1Transfer

#define I_sceSifDma1Transfer   DECLARE_IMPORT(15, sceSifDma1Transfer)

Definition at line 160 of file sifman.h.

◆ I_sceSifDma1Sync

#define I_sceSifDma1Sync   DECLARE_IMPORT(16, sceSifDma1Sync)

Definition at line 161 of file sifman.h.

◆ I_sceSifDma1Sending

#define I_sceSifDma1Sending   DECLARE_IMPORT(17, sceSifDma1Sending)

Definition at line 162 of file sifman.h.

◆ I_sceSifDma2Transfer

#define I_sceSifDma2Transfer   DECLARE_IMPORT(18, sceSifDma2Transfer)

Definition at line 163 of file sifman.h.

◆ I_sceSifDma2Sync

#define I_sceSifDma2Sync   DECLARE_IMPORT(19, sceSifDma2Sync)

Definition at line 164 of file sifman.h.

◆ I_sceSifDma2Sending

#define I_sceSifDma2Sending   DECLARE_IMPORT(20, sceSifDma2Sending)

Definition at line 165 of file sifman.h.

◆ I_sceSifGetMSFlag

#define I_sceSifGetMSFlag   DECLARE_IMPORT(21, sceSifGetMSFlag)

Definition at line 166 of file sifman.h.

◆ I_sceSifSetMSFlag

#define I_sceSifSetMSFlag   DECLARE_IMPORT(22, sceSifSetMSFlag)

Definition at line 167 of file sifman.h.

◆ I_sceSifGetSMFlag

#define I_sceSifGetSMFlag   DECLARE_IMPORT(23, sceSifGetSMFlag)

Definition at line 168 of file sifman.h.

◆ I_sceSifSetSMFlag

#define I_sceSifSetSMFlag   DECLARE_IMPORT(24, sceSifSetSMFlag)

Definition at line 169 of file sifman.h.

◆ I_sceSifGetMainAddr

#define I_sceSifGetMainAddr   DECLARE_IMPORT(25, sceSifGetMainAddr)

Definition at line 170 of file sifman.h.

◆ I_sceSifGetSubAddr

#define I_sceSifGetSubAddr   DECLARE_IMPORT(26, sceSifGetSubAddr)

Definition at line 171 of file sifman.h.

◆ I_sceSifSetSubAddr

#define I_sceSifSetSubAddr   DECLARE_IMPORT(27, sceSifSetSubAddr)

Definition at line 172 of file sifman.h.

◆ I_sceSifIntrMain

#define I_sceSifIntrMain   DECLARE_IMPORT(28, sceSifIntrMain)

Definition at line 173 of file sifman.h.

◆ I_sceSifCheckInit

#define I_sceSifCheckInit   DECLARE_IMPORT(29, sceSifCheckInit)

Definition at line 174 of file sifman.h.

◆ I_sceSifSetDmaIntrHandler

#define I_sceSifSetDmaIntrHandler   DECLARE_IMPORT(30, sceSifSetDmaIntrHandler)

Definition at line 175 of file sifman.h.

◆ I_sceSifResetDmaIntrHandler

#define I_sceSifResetDmaIntrHandler   DECLARE_IMPORT(31, sceSifResetDmaIntrHandler)

Definition at line 176 of file sifman.h.

◆ I_sceSifSetDmaIntr

#define I_sceSifSetDmaIntr   DECLARE_IMPORT(32, sceSifSetDmaIntr)

Definition at line 177 of file sifman.h.

Enumeration Type Documentation

◆ _sif_regs

enum _sif_regs
Enumerator
SIF_REG_MAINADDR 

Main -> sub-CPU command buffer (MSCOM)

SIF_REG_SUBADDR 

Sub -> main-CPU command buffer (SMCOM)

SIF_REG_MSFLAG 

Main -> sub-CPU flag (MSFLAG)

SIF_REG_SMFLAG 

Sub -> main-CPU flag (SMFLAG)

Definition at line 48 of file sifman.h.

Function Documentation

◆ sceSifDma2Init()

void sceSifDma2Init ( )

Definition at line 124 of file sifman.c.

◆ sceSifInit()

void sceSifInit ( )

Definition at line 138 of file sifman.c.

◆ sceSifSetDChain()

void sceSifSetDChain ( )

Definition at line 191 of file sifman.c.

◆ sceSifSetDma()

int sceSifSetDma ( SifDmaTransfer_t dmat,
int  count 
)

Definition at line 378 of file sifman.c.

◆ sceSifDmaStat()

int sceSifDmaStat ( int  trid)

Definition at line 406 of file sifman.c.

◆ sceSifSetOneDma()

void sceSifSetOneDma ( SifDmaTransfer_t  dmat)

Definition at line 419 of file sifman.c.

◆ sceSifSendSync()

void sceSifSendSync ( )

Definition at line 448 of file sifman.c.

◆ sceSifIsSending()

int sceSifIsSending ( )

Definition at line 456 of file sifman.c.

◆ sceSifDma0Transfer()

void sceSifDma0Transfer ( void *  addr,
int  size,
int  mode 
)

Definition at line 463 of file sifman.c.

◆ sceSifDma0Sync()

void sceSifDma0Sync ( )

Definition at line 485 of file sifman.c.

◆ sceSifDma0Sending()

int sceSifDma0Sending ( )

Definition at line 493 of file sifman.c.

◆ sceSifDma1Transfer()

void sceSifDma1Transfer ( void *  addr,
int  size,
int  mode 
)

Definition at line 500 of file sifman.c.

◆ sceSifDma1Sync()

void sceSifDma1Sync ( )

Definition at line 525 of file sifman.c.

◆ sceSifDma1Sending()

int sceSifDma1Sending ( )

Definition at line 533 of file sifman.c.

◆ sceSifDma2Transfer()

void sceSifDma2Transfer ( void *  addr,
int  size,
int  mode 
)

Definition at line 540 of file sifman.c.

◆ sceSifDma2Sync()

void sceSifDma2Sync ( )

Definition at line 579 of file sifman.c.

◆ sceSifDma2Sending()

int sceSifDma2Sending ( )

Definition at line 587 of file sifman.c.

◆ sceSifGetMSFlag()

u32 sceSifGetMSFlag ( )

Definition at line 594 of file sifman.c.

◆ sceSifSetMSFlag()

u32 sceSifSetMSFlag ( u32  val)

Definition at line 599 of file sifman.c.

◆ sceSifGetSMFlag()

u32 sceSifGetSMFlag ( )

Definition at line 607 of file sifman.c.

◆ sceSifSetSMFlag()

u32 sceSifSetSMFlag ( u32  val)

Definition at line 612 of file sifman.c.

◆ sceSifGetMainAddr()

u32 sceSifGetMainAddr ( )

Definition at line 620 of file sifman.c.

◆ sceSifGetSubAddr()

u32 sceSifGetSubAddr ( )

Definition at line 627 of file sifman.c.

◆ sceSifSetSubAddr()

u32 sceSifSetSubAddr ( u32  addr)

Definition at line 634 of file sifman.c.

◆ sceSifIntrMain()

void sceSifIntrMain ( )

Definition at line 642 of file sifman.c.

◆ sceSifCheckInit()

int sceSifCheckInit ( )

Definition at line 186 of file sifman.c.

◆ sceSifResetDmaIntrHandler()

void sceSifResetDmaIntrHandler ( )

Definition at line 209 of file sifman.c.