Skip to content

Commit c43022f

Browse files
committed
add arcade UART variant & allow opt file for kicking DAEMON in
1 parent 1bf2b27 commit c43022f

File tree

5 files changed

+40
-17
lines changed

5 files changed

+40
-17
lines changed

.github/workflows/compile.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@ jobs:
1515
fail-fast: false
1616
matrix:
1717
eth: ["ETH=0", "ETH=1"]
18-
bdmstuff: ["EXFAT=0", "EXFAT=1", "EXFAT=1 MX4SIO=1"]
19-
ds34: ["DS34=0", "DS34=1"]
20-
coh: ["COH=0", "COH=1"]
18+
bdmstuff: ["EXFAT=1", "EXFAT=1 MX4SIO=1"] #"EXFAT=0",
19+
#ds34: ["DS34=0", "DS34=1"]
20+
coh: ["COH=1", "COH=1 ACUART=1"] #"COH=0",
2121
exclude:
2222
- bdmstuff: "EXFAT=1 MX4SIO=1"
2323
coh: "COH=1"

Makefile

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ CDVDFSV ?= 1
2323
# ----------------------------- #
2424
.SILENT:
2525

26-
BIN_NAME = $(HAS_EXFAT)$(HAS_DS34)$(HAS_ETH)$(HAS_SMB)$(HAS_DVRP)$(HAS_XFROM)$(HAS_MX4SIO)$(HAS_COH)$(HAS_EESIO)$(HAS_UDPTTY)$(HAS_TTY2SIOR)$(HAS_IOP_RESET)
26+
BIN_NAME = $(HAS_EXFAT)$(HAS_DS34)$(HAS_ETH)$(HAS_SMB)$(HAS_DVRP)$(HAS_XFROM)$(HAS_MX4SIO)$(HAS_COH)$(HAS_EESIO)$(HAS_UDPTTY)$(HAS_ACUART)$(HAS_IOP_RESET)
2727
ifeq ($(DEBUG), 0)
2828
EE_BIN = UNC-BOOT$(BIN_NAME).ELF
2929
EE_BIN_PKD = BOOT$(BIN_NAME).ELF
@@ -65,6 +65,12 @@ ifeq ($(COH), 1)
6565
EE_CFLAGS += -DSUPPORT_SYSTEM_2X6
6666
HOMEBREW_DONGLEMAN = 1
6767
EE_OBJS += mcman_irx.o
68+
ifeq ($(ACUART), 1)
69+
$(info -- adding support for arcade UART)
70+
EE_OBJS += acuart_tty_irx.o
71+
EE_CFLAGS += -DACUART
72+
HAS_ACUART = -ACUART
73+
endif
6874
endif
6975

7076
ifeq ($(XFROM),1)

embed.make

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -171,8 +171,8 @@ $(EE_ASM_DIR)ps2kbd_irx.s: $(PS2SDK)/iop/irx/ps2kbd.irx | $(EE_ASM_DIR)
171171
$(EE_ASM_DIR)sior_irx.s: $(PS2SDK)/iop/irx/sior.irx | $(EE_ASM_DIR)
172172
$(BIN2S) $< $@ sior_irx
173173

174-
$(EE_ASM_DIR)tty2sior_irx.s:iop/__precompiled/tty2sior.irx | $(EE_ASM_DIR)
175-
$(BIN2S) $< $@ tty2sior_irx
174+
$(EE_ASM_DIR)acuart_tty_irx.s: iop/__precompiled/acuart_tty.irx | $(EE_ASM_DIR)
175+
$(BIN2S) $< $@ acuart_tty_irx
176176

177177
iop/AllowDVDV.irx: iop/AllowDVDV
178178
$(MAKE) -C $<

iop/__precompiled/acuart_tty.irx

6.52 KB
Binary file not shown.

src/main.c

Lines changed: 28 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,10 @@ IMPORT_BIN2C(dvrfile_irx);
6868
IMPORT_BIN2C(cdvd_irx);
6969
#endif
7070

71+
#ifdef ACUART
72+
IMPORT_BIN2C(acuart_tty_irx);
73+
#endif
74+
7175
// Mandatory IRX
7276
IMPORT_BIN2C(iomanx_irx);
7377
IMPORT_BIN2C(filexio_irx);
@@ -440,7 +444,7 @@ static void Show_build_info(void)
440444
" MX4SIO=0"
441445
#endif
442446
, COLOR_TEXT);
443-
#if defined(UDPTTY) || defined(SIO_DEBUG) || defined(TTY2SIOR) || defined(NO_IOP_RESET)
447+
#if defined(UDPTTY) || defined(SIO_DEBUG) || defined(ACUART) || defined(NO_IOP_RESET)
444448

445449

446450
PrintPos(-1, hpos, "Debug Features:", COLOR_SELECT);
@@ -462,10 +466,10 @@ static void Show_build_info(void)
462466
#else
463467
" SIO_DEBUG=0"
464468
#endif
465-
#ifdef TTY2SIOR
466-
" TTY2SIOR=1"
469+
#ifdef ACUART
470+
" ACUART=1"
467471
#else
468-
" TTY2SIOR=0"
472+
" ACUART=0"
469473
#endif
470474
, COLOR_TEXT);
471475
#endif
@@ -1188,11 +1192,6 @@ static void loadBasicModules(void)
11881192
DPRINTF(" [rom0:PADMAN]: id=%d, ret=%d\n", id, ret);
11891193
#endif
11901194

1191-
#if defined(LOAD_DAEMON) && defined(SUPPORT_SYSTEM_2X6)
1192-
id = SifLoadStartModule("rom0:DAEMON", 0, NULL, &ret);
1193-
DPRINTF(" [DAEMON]: id=%d ret=%d\n", id, ret);
1194-
#endif
1195-
11961195
#if defined(LOAD_LED) && defined(SUPPORT_SYSTEM_2X6) && !defined(LOAD_DOGBAIT)
11971196
SifLoadStartModule("rom0:LED", 0, NULL, NULL); //
11981197
#endif
@@ -2480,12 +2479,19 @@ static void Reset()
24802479
#ifdef XFROM
24812480
have_Flash_modules = 0;
24822481
#endif
2482+
24832483
#ifdef UDPTTY
2484-
int i, d;
2484+
int i, d;
24852485
load_ps2ip();
24862486
i = SifExecModuleBuffer(&udptty_irx, size_udptty_irx, 0, NULL, &d);
24872487
DPRINTF(" [UDPTTY]: id=%d, ret=%d\n", i, d);
24882488
#endif
2489+
#ifdef ACUART
2490+
int i, d;
2491+
i = SifExecModuleBuffer(&acuart_tty_irx, size_acuart_tty_irx, 0, NULL, &d);
2492+
DPRINTF(" [ACUART]: id=%d, ret=%d\n", i, d);
2493+
#endif
2494+
24892495
loadBasicModules();
24902496
#ifndef SUPPORT_SYSTEM_2X6
24912497
loadCdModules();
@@ -2798,7 +2804,18 @@ int main(int argc, char *argv[])
27982804
break;
27992805
}
28002806
}
2801-
sprintf(mainMsg + strlen(mainMsg), (i == -1) ? " | ACJVLOAD.IRX loaded" : " | ACJVLOAD.IRX not found");
2807+
sprintf(mainMsg + strlen(mainMsg), (i == -1) ? " | ACJVLOAD loaded" : " | ACJVLOAD not found");
2808+
if (
2809+
#ifdef LOAD_DAEMON
2810+
1
2811+
#else
2812+
exists("mass:/watchdog.opt") || exists("mc0:/watchdog.opt") || exists("mc1:/watchdog.opt") || exists("host:/watchdog.opt")
2813+
#endif
2814+
) {
2815+
DPRINTF("Starting watchdog\n");
2816+
id = SifLoadStartModule("rom0:DAEMON", 0, NULL, &ret);
2817+
sprintf(mainMsg + strlen(mainMsg), (id > 0 && ret != 1) ? " | watchdog running" : " | watchdog error");
2818+
}
28022819
DPRINTF("%s\n",mainMsg);
28032820
#endif
28042821

0 commit comments

Comments
 (0)