PS2SDK
PS2 Homebrew Libraries
sifdma.h
Go to the documentation of this file.
1 /*
2 # _____ ___ ____ ___ ____
3 # ____| | ____| | | |____|
4 # | ___| |____ ___| ____| | \ PS2DEV Open Source Project.
5 #-----------------------------------------------------------------------
6 # Copyright 2001-2004, ps2dev - http://www.ps2dev.org
7 # Licenced under Academic Free License version 2.0
8 # Review ps2sdk README & LICENSE files for further details.
9 */
10 
16 #ifndef __SIFDMA_H__
17 #define __SIFDMA_H__
18 
19 #include <tamtypes.h>
20 
21 #define SIF_DMA_INT_I 0x2
22 #define SIF_DMA_INT_O 0x4
23 
24 #define SIF_DMA_ERT 0x40
25 
26 #define SIF_REG_ID_SYSTEM 0x80000000
27 
28 enum _sif_regs {
37 
38  // Used with the EE kernel. Not actually physical registers like the above, but are implemented in software.
39  SIF_SYSREG_SUBADDR = SIF_REG_ID_SYSTEM | 0,
40  SIF_SYSREG_MAINADDR,
41  SIF_SYSREG_RPCINIT,
42 };
43 
44 // Status bits for the SM and MS SIF registers
46 #define SIF_STAT_SIFINIT 0x10000
47 
48 #define SIF_STAT_CMDINIT 0x20000
49 
50 #define SIF_STAT_BOOTEND 0x40000
51 
52 typedef struct t_SifDmaTransfer
53 {
54  void *src,
55  *dest;
56  int size;
57  int attr;
59 
60 #ifdef __cplusplus
61 extern "C" {
62 #endif
63 
64 extern int sceSifDmaStat(int trid);
65 extern int sceSifSetDma(SifDmaTransfer_t *dmat, int count);
66 
67 #ifdef __cplusplus
68 }
69 #endif
70 
71 // For backwards compatibility
72 #define SifDmaStat(...) sceSifDmaStat(__VA_ARGS__)
73 #define SifSetDma(...) sceSifSetDma(__VA_ARGS__)
74 
75 #endif /* __SIFDMA_H__ */
SIF_REG_MSFLAG
@ SIF_REG_MSFLAG
Definition: sifdma.h:34
_sif_regs
_sif_regs
Definition: sifdma.h:28
SIF_REG_SMFLAG
@ SIF_REG_SMFLAG
Definition: sifdma.h:36
count
u32 count
start sector of fragmented bd/file
Definition: usbhdfsd-common.h:3
tamtypes.h
SIF_REG_SUBADDR
@ SIF_REG_SUBADDR
Definition: sifdma.h:32
t_SifDmaTransfer
Definition: sifdma.h:52
SIF_REG_MAINADDR
@ SIF_REG_MAINADDR
Definition: sifdma.h:30