sdk-core v2026.11.05
PS2 SDK - core tier (build-critical EE/IOP modules)
Loading...
Searching...
No Matches
ps2_reg_defs.h
Go to the documentation of this file.
1
6
7#ifndef __PS2_REG_DEFS_H__
8#define __PS2_REG_DEFS_H__
9
10#include <tamtypes.h>
11#include <ee_regs.h>
12#include <iop_regs.h>
13
15{
16 vu32 main_addr;
17 vu32 pad0[3];
18 vu32 sub_addr;
19 vu32 pad1[3];
20 vu32 ms_flag;
21 vu32 pad2[3];
22 vu32 sm_flag;
23 vu32 pad3[3];
24
25 vu32 reg_40;
26 vu32 pad4[3];
27 vu32 reg_50;
28 vu32 pad5[3];
29 vu32 reg_60;
30 vu32 pad6[3];
31 vu32 reg_70;
32 vu32 pad7[3];
33} PS2_SBUS_Registers;
34
35// "modes" for SIF transfers.
36#define SIF_XFER_MODE_IN (0 << 0)
37#define SIF_XFER_MODE_OUT (1 << 0)
38
39// IRQ bits for "PS2_IRQ" register.
40#define PS2_IRQ_UNK0 (0)
41#define PS2_IRQ_SBUS (1)
42#define PS2_IRQ_UNK2 (2)
43#define PS2_IRQ_UNK3 (3)
44#define PS2_IRQ_UNK4 (4)
45#define PS2_IRQ_SIF0 (5)
46#define PS2_IRQ_SIF1 (6)
47#define PS2_IRQ_SIF2 (7)
48#define PS2_IRQ_UNK8 (8)
49#define PS2_IRQ_UNK9 (9)
50#define PS2_IRQ_UNK10 (10)
51
53#define SBUS_CTRL_PGPU_INT (1 << 0)
54
56#define SBUS_CTRL_MSCLK (1 << 8)
57
59#define SBUS_CTRL_MSINT (1 << 18)
60
62#define SBUS_CTRL_PS1_RESET (1 << 19)
63
64#define R_PS2_SBUS(__base_addr, __reg_no) ((vu32 *)((u32)(__base_addr) + (__reg_no * 0x10)))
65
66#define R_EE_SBUS(__reg_no) R_PS2_SBUS(A_EE_SBUS_REG_BASE, (__reg_no))
67#define R_IOP_SBUS(__reg_no) R_PS2_SBUS(A_IOP_SBUS_REG_BASE, (__reg_no))
68
69#define PS2_SBUS_MS_ADDR (0)
70#define PS2_SBUS_SM_ADDR (1)
71#define PS2_SBUS_MS_FLAG (2)
72#define PS2_SBUS_SM_FLAG (3)
73#define PS2_SBUS_REG4 (4)
74#define PS2_SBUS_REG5 (5)
75#define PS2_SBUS_REG6 (6)
76#define PS2_SBUS_REG7 (7)
77
78// DMA related
79#define PS2_DMA_TO_MEM (0)
80#define PS2_DMA_FROM_MEM (1)
81
82// SIF..
83#define SIF_FLAG_INIT (1 << 16)
84
85#endif /* __PS2_REG_DEFS_H__ */