ps2sdk  1.1
A collection of Open Source libraries used for developing applications on Sony's PlayStation 2® (PS2).
ps2_reg_defs.h
Go to the documentation of this file.
1 
6 #ifndef __PS2_REG_DEFS_H__
7 #define __PS2_REG_DEFS_H__
8 
9 #include <tamtypes.h>
10 #include <ee_regs.h>
11 #include <iop_regs.h>
12 
13 typedef volatile struct st_PS2_SBUS_Registers
14 {
16  u32 pad0[3];
18  u32 pad1[3];
20  u32 pad2[3];
22  u32 pad3[3];
23 
25  u32 pad4[3];
27  u32 pad5[3];
29  u32 pad6[3];
31  u32 pad7[3];
33 
34 // "modes" for SIF transfers.
35 #define SIF_XFER_MODE_IN (0 << 0)
36 #define SIF_XFER_MODE_OUT (1 << 0)
37 
38 // IRQ bits for "PS2_IRQ" register.
39 #define PS2_IRQ_UNK0 (0)
40 #define PS2_IRQ_SBUS (1)
41 #define PS2_IRQ_UNK2 (2)
42 #define PS2_IRQ_UNK3 (3)
43 #define PS2_IRQ_UNK4 (4)
44 #define PS2_IRQ_SIF0 (5)
45 #define PS2_IRQ_SIF1 (6)
46 #define PS2_IRQ_SIF2 (7)
47 #define PS2_IRQ_UNK8 (8)
48 #define PS2_IRQ_UNK9 (9)
49 #define PS2_IRQ_UNK10 (10)
50 
52 #define SBUS_CTRL_PGPU_INT (1 << 0)
53 
55 #define SBUS_CTRL_MSCLK (1 << 8)
56 
58 #define SBUS_CTRL_MSINT (1 << 18)
59 
61 #define SBUS_CTRL_PS1_RESET (1 << 19)
62 
63 #define R_PS2_SBUS(__base_addr, __reg_no) ((vu32 *) ((u32) (__base_addr) + (__reg_no * 0x10)))
64 
65 #define R_EE_SBUS(__reg_no) R_PS2_SBUS(A_EE_SBUS_REG_BASE, (__reg_no))
66 #define R_IOP_SBUS(__reg_no) R_PS2_SBUS(A_IOP_SBUS_REG_BASE, (__reg_no))
67 
68 #define PS2_SBUS_MS_ADDR (0)
69 #define PS2_SBUS_SM_ADDR (1)
70 #define PS2_SBUS_MS_FLAG (2)
71 #define PS2_SBUS_SM_FLAG (3)
72 #define PS2_SBUS_REG4 (4)
73 #define PS2_SBUS_REG5 (5)
74 #define PS2_SBUS_REG6 (6)
75 #define PS2_SBUS_REG7 (7)
76 
77 // DMA related
78 #define PS2_DMA_TO_MEM (0)
79 #define PS2_DMA_FROM_MEM (1)
80 
81 // SIF..
82 #define SIF_FLAG_INIT (1 << 16)
83 
84 #endif /* __PS2_REG_DEFS_H__ */
unsigned int u32
Definition: tamtypes.h:30