Skip to content

Commit 0f60997

Browse files
authored
Merge pull request #651 from israpps/xparam
add xparam module
2 parents 849f337 + 99fe366 commit 0f60997

File tree

10 files changed

+2745
-0
lines changed

10 files changed

+2745
-0
lines changed

iop/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ SUBDIRS = \
1010
arcade \
1111
cdvd \
1212
debug \
13+
deckard \
1314
dev9 \
1415
dvrp \
1516
fs \

iop/deckard/Makefile

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# _____ ___ ____ ___ ____
2+
# ____| | ____| | | |____|
3+
# | ___| |____ ___| ____| | \ PS2DEV Open Source Project.
4+
#-----------------------------------------------------------------------
5+
# Copyright 2001-2024, ps2dev - http://www.ps2dev.org
6+
# Licenced under Academic Free License version 2.0
7+
# Review ps2sdk README & LICENSE files for further details.
8+
9+
SUBDIRS = \
10+
xparam
11+
12+
include $(PS2SDKSRC)/Defs.make
13+
include $(PS2SDKSRC)/Rules.make

iop/deckard/xparam/Makefile

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# _____ ___ ____ ___ ____
2+
# ____| | ____| | | |____|
3+
# | ___| |____ ___| ____| | \ PS2DEV Open Source Project.
4+
#-----------------------------------------------------------------------
5+
# Copyright 2001-2024, ps2dev - http://www.ps2dev.org
6+
# Licenced under Academic Free License version 2.0
7+
# Review ps2sdk README & LICENSE files for further details.
8+
9+
IOP_BIN = xparam.irx
10+
DATABASE ?= 0#0: Homebrew, 1: ROM 2.20, 2: ROM 2.50
11+
12+
IOP_OBJS = xparam.o imports.o
13+
14+
15+
IOP_INCS += $(addprefix -I$(PS2SDKSRC)/iop/system/, sysclib/include loadcore/include)
16+
17+
ifeq ($(DATABASE),0)
18+
IOP_OBJS += database_merged.o
19+
else ifeq ($(DATABASE),1)
20+
IOP_OBJS += database_0220_20050620.o
21+
else ifeq ($(DATABASE),2)
22+
IOP_OBJS += database_0250_20100415.o
23+
else
24+
$(error Unknown DB value)
25+
endif
26+
27+
include $(PS2SDKSRC)/Defs.make
28+
include $(PS2SDKSRC)/iop/Rules.bin.make
29+
include $(PS2SDKSRC)/iop/Rules.make
30+
include $(PS2SDKSRC)/iop/Rules.release
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
#ifndef XPARAM_H
2+
#define XPARAM_H
3+
4+
#include <stdint.h>
5+
6+
typedef enum xparam_types {
7+
PARAM_MDEC_DELAY_CYCLE = (0x00),
8+
PARAM_SPU_INT_DELAY_LIMIT = (0x01),
9+
PARAM_SPU_INT_DELAY_PPC_COEFF = (0x02),
10+
PARAM_SPU2_INT_DELAY_LIMIT = (0x03),
11+
PARAM_SPU2_INT_DELAY_PPC_COEFF = (0x04),
12+
PARAM_DMAC_CH10_INT_DELAY = (0x05),
13+
PARAM_CPU_DELAY = (0x06),
14+
PARAM_SPU_DMA_WAIT_LIMIT = (0x07),
15+
PARAM_GPU_DMA_WAIT_LIMIT = (0x08),
16+
PARAM_DMAC_CH10_INT_DELAY_DPC = (0x09),
17+
PARAM_CPU_DELAY_DPC = (0x0A),
18+
PARAM_USB_DELAYED_INT_ENABLE = (0x0B),
19+
PARAM_TIMER_LOAD_DELAY = (0x0C),
20+
PARAM_SIO0_DTR_SCK_DELAY = (0x0D),
21+
PARAM_SIO0_DSR_SCK_DELAY_C = (0x0E),
22+
PARAM_SIO0_DSR_SCK_DELAY_M = (0x0F),
23+
PARAM_MIPS_DCACHE_ON = (0x10),
24+
PARAM_CACHE_FLASH_CHANNELS = (0x11)
25+
} xparam_types_t;
26+
#define XPARAM_PARAMS_AMMOUNT (PARAM_CACHE_FLASH_CHANNELS+1)
27+
28+
typedef struct xparam {
29+
char name[12];
30+
uint32_t param;
31+
uint32_t value;
32+
} xparam_t;
33+
34+
extern const xparam_t XPARAMS[];
35+
36+
#define GET_XPARAM_DB_SIZE() (sizeof(*XPARAMS) / sizeof(XPARAMS[0]))
37+
38+
#endif

0 commit comments

Comments
 (0)