Skip to content

Commit

Permalink
a
Browse files Browse the repository at this point in the history
  • Loading branch information
israpps committed Feb 6, 2025
1 parent 3d94667 commit 07e2d77
Show file tree
Hide file tree
Showing 6 changed files with 35 additions and 4 deletions.
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ DS34 ?= 0
SMB ?= 0
TMANIP ?= 1
ETH ?= 1
EXFAT ?= 0
EXFAT ?= 1
DVRP ?= 0
IOP_RESET ?= 1
XFROM ?= 0
Expand Down Expand Up @@ -62,12 +62,12 @@ ifeq ($(COH), 1)
EE_LIBS += -liopreboot
LIBPAD = 2
HAS_COH = -COH
EE_CFLAGS += -DSUPPORT_SYSTEM_2X6
EE_CFLAGS += -DSUPPORT_SYSTEM_2X6 -DCOMMON_PRINTF
HOMEBREW_DONGLEMAN = 1
EE_OBJS += mcman_irx.o
ifeq ($(ACUART), 1)
$(info -- adding support for arcade UART)
EE_OBJS += acuart_tty_irx.o
EE_OBJS += acuart_tty_irx.o accore_irx.o
EE_CFLAGS += -DACUART
HAS_ACUART = -ACUART
endif
Expand Down
5 changes: 5 additions & 0 deletions docs/IOPBOOT.CNF
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# example of custom IOP Boot list. these modules are executed in order before program UI is ready
ACCORE = mc0:accore.irx
ACUART = mc0:acuart.irx
ACTTY = mc0:actty.irx
LED = rom:LED
3 changes: 3 additions & 0 deletions embed.make
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,9 @@ $(EE_ASM_DIR)sior_irx.s: $(PS2SDK)/iop/irx/sior.irx | $(EE_ASM_DIR)

$(EE_ASM_DIR)acuart_tty_irx.s: iop/__precompiled/acuart_tty.irx | $(EE_ASM_DIR)
$(BIN2S) $< $@ acuart_tty_irx

$(EE_ASM_DIR)accore_irx.s: iop/__precompiled/accore.irx | $(EE_ASM_DIR)
$(BIN2S) $< $@ accore_irx

iop/AllowDVDV.irx: iop/AllowDVDV
$(MAKE) -C $<
Expand Down
Binary file added iop/__precompiled/accore.irx
Binary file not shown.
Binary file modified iop/__precompiled/acuart_tty.irx
Binary file not shown.
25 changes: 24 additions & 1 deletion src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ IMPORT_BIN2C(cdvd_irx);

#ifdef ACUART
IMPORT_BIN2C(acuart_tty_irx);
IMPORT_BIN2C(accore_irx);
#endif

// Mandatory IRX
Expand Down Expand Up @@ -2491,6 +2492,8 @@ static void Reset()
#endif
#ifdef ACUART
int i, d;
i = SifExecModuleBuffer(&accore_irx, size_accore_irx, 0, NULL, &d);
DPRINTF(" [ACCORE]: id=%d, ret=%d\n", i, d);
i = SifExecModuleBuffer(&acuart_tty_irx, size_acuart_tty_irx, 0, NULL, &d);
DPRINTF(" [ACUART]: id=%d, ret=%d\n", i, d);
#endif
Expand Down Expand Up @@ -2796,6 +2799,10 @@ int main(int argc, char *argv[])
sprintf(mainMsg, "%s", LNG(Loaded_Config));

#ifdef SUPPORT_SYSTEM_2X6
if (ROMVER_data[4] != 'T' || ROMVER_data[5] != 'Z') {
drawMsg("ERR: Console is not arcade system. use regular wLaunchELF instead");
SleepThread();
}
#define ACJV_PATHCNT 5
int id, ret;

Check warning on line 2807 in src/main.c

View check run for this annotation

codefactor.io / CodeFactor

src/main.c#L2807

Buffer copy without checking size of input (CWE-120) (flawfinder7-sprintf)
const char* ACJVPATHS[ACJV_PATHCNT] = {"./ACJVLOAD.IRX", "mc0:/ACJVLOAD.IRX", "mc1:/ACJVLOAD.IRX", "mass0:/ACJVLOAD.IRX", "mass1:/ACJVLOAD.IRX"};
Expand All @@ -2817,9 +2824,25 @@ int main(int argc, char *argv[])
) {
DPRINTF("Starting watchdog\n");
id = SifLoadStartModule("rom0:DAEMON", 0, NULL, &ret);
sprintf(mainMsg + strlen(mainMsg), (id > 0 && ret != 1) ? " | watchdog running" : " | watchdog error");
sprintf(mainMsg + strlen(mainMsg), (id > 0 && ret != 1) ? " | watch OK" : " | watch NG");

Check warning on line 2827 in src/main.c

View check run for this annotation

codefactor.io / CodeFactor

src/main.c#L2827

Buffer copy without checking size of input (CWE-120) (flawfinder7-sprintf)
}
DPRINTF("%s\n",mainMsg);

{
int var_cnt;
char *RAM_p, *CNF_p, *name, *value;
if ((RAM_p = preloadCNF("mc1:IOPBOOT.CNF"))) {
CNF_p = RAM_p;
for (var_cnt = 0; get_CNF_string(&CNF_p, &name, &value); var_cnt++) {
id = SifLoadStartModule(value, 0, NULL, &ret);
printf("%s:%s %d %d\n", name, value, id, ret);
if (ret != 0 || id < 0) {drawMsg(value); sleep(2);}
// ((i & 3) != 0)
}
free(RAM_p);
}
sprintf(mainMsg + strlen(mainMsg), (RAM_p) ? " | IOPLS OK" : " | IOPLS NG");

Check warning on line 2844 in src/main.c

View check run for this annotation

codefactor.io / CodeFactor

src/main.c#L2844

Buffer copy without checking size of input (CWE-120) (flawfinder7-sprintf)
}
#endif

//Here nearly everything is ready for the main menu event loop
Expand Down

0 comments on commit 07e2d77

Please sign in to comment.