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
{
15
u32
main_addr
;
16
u32
pad0[3];
17
u32
sub_addr
;
18
u32
pad1[3];
19
u32
ms_flag
;
20
u32
pad2[3];
21
u32
sm_flag
;
22
u32
pad3[3];
23
24
u32
reg_40
;
25
u32
pad4[3];
26
u32
reg_50
;
27
u32
pad5[3];
28
u32
reg_60
;
29
u32
pad6[3];
30
u32
reg_70
;
31
u32
pad7[3];
32
}
PS2_SBUS_Registers
;
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__ */
ee_regs.h
iop_regs.h
PS2_SBUS_Registers
Definition:
ps2_reg_defs.h:14
PS2_SBUS_Registers::reg_40
u32 reg_40
Definition:
ps2_reg_defs.h:24
PS2_SBUS_Registers::reg_60
u32 reg_60
Definition:
ps2_reg_defs.h:28
PS2_SBUS_Registers::reg_50
u32 reg_50
Definition:
ps2_reg_defs.h:26
PS2_SBUS_Registers::sub_addr
u32 sub_addr
Definition:
ps2_reg_defs.h:17
PS2_SBUS_Registers::ms_flag
u32 ms_flag
Definition:
ps2_reg_defs.h:19
PS2_SBUS_Registers::reg_70
u32 reg_70
Definition:
ps2_reg_defs.h:30
PS2_SBUS_Registers::sm_flag
u32 sm_flag
Definition:
ps2_reg_defs.h:21
PS2_SBUS_Registers::main_addr
u32 main_addr
Definition:
ps2_reg_defs.h:15
tamtypes.h
u32
unsigned int u32
Definition:
tamtypes.h:30
common
include
ps2_reg_defs.h
Generated on Thu Feb 11 2021 11:42:21 for ps2sdk by
1.9.2