Skip to content

Commit

Permalink
add ioptrap.irx build option for debugging
Browse files Browse the repository at this point in the history
  • Loading branch information
israpps committed Jul 11, 2024
1 parent 249b6e2 commit 5b8876e
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 0 deletions.
5 changes: 5 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,11 @@ else
EE_CFLAGS += -DCUSTOM_COLORS
endif

ifeq ($(IOPTRAP),1)
EE_OBJS += ioptrap_irx.o
EE_CFLAGS += -DIOPTRAP
endif


EE_OBJS_DIR = obj/
EE_ASM_DIR = asm/
Expand Down
3 changes: 3 additions & 0 deletions embed.make
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,9 @@ iop/cdvd.irx: iop/oldlibs/libcdvd
$(EE_ASM_DIR)cdvd_irx.s: iop/cdvd.irx | $(EE_ASM_DIR)
$(BIN2S) $< $@ cdvd_irx

$(EE_ASM_DIR)ioptrap_irx.s: $(PS2SDK)/iop/irx/ioptrap.irx | $(EE_ASM_DIR)
$(BIN2S) $< $@ ioptrap_irx

$(EE_ASM_DIR)poweroff_irx.s: $(PS2SDK)/iop/irx/poweroff.irx | $(EE_ASM_DIR)
$(BIN2S) $< $@ poweroff_irx

Expand Down
9 changes: 9 additions & 0 deletions src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@ IMPORT_BIN2C(ps2netfs_irx);
IMPORT_BIN2C(ps2ftpd_irx);
#endif

#ifdef IOPTRAP
IMPORT_BIN2C(ioptrap_irx);
#endif

#ifdef SMB
IMPORT_BIN2C(smbman_irx);
#endif
Expand Down Expand Up @@ -1122,6 +1126,11 @@ static void loadBasicModules(void)
{
int ret, id;

#ifdef IOPTRAP
id = SifExecModuleBuffer(ioptrap_irx, size_ioptrap_irx, 0, NULL, &ret);
DPRINTF(" [IOP TRAP]: id=%d ret=%d\n", id, ret);
#endif

id = SifExecModuleBuffer(iomanx_irx, size_iomanx_irx, 0, NULL, &ret);
DPRINTF(" [IOMANX]: id=%d ret=%d\n", id, ret);
id = SifExecModuleBuffer(filexio_irx, size_filexio_irx, 0, NULL, &ret);
Expand Down

0 comments on commit 5b8876e

Please sign in to comment.