Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion .github/workflows/compile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,12 @@ jobs:
strategy:
fail-fast: false
matrix:
eth: ["ETH=0", "ETH=1"]
eth: ["ETH=0", "ETH=0 UDPBD=1", "ETH=1"]
bdmstuff: ["EXFAT=0", "EXFAT=1", "EXFAT=1 MX4SIO=1"]
ds34: ["DS34=0", "DS34=1"]
exclude:
- eth: "ETH=0 UDPBD=1"
bdmstuff: "EXFAT=0"
runs-on: ubuntu-latest
container: ps2dev/ps2dev:v1.0
steps:
Expand Down
20 changes: 18 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,11 @@ MX4SIO ?= 0
SIO2MAN ?= 0
TTY2SIOR ?= 0
DEBUG ?= 0
UDPBD ?= 0
# ----------------------------- #
.SILENT:

BIN_NAME = $(HAS_EXFAT)$(HAS_DS34)$(HAS_ETH)$(HAS_SMB)$(HAS_DVRP)$(HAS_XFROM)$(HAS_MX4SIO)$(HAS_EESIO)$(HAS_UDPTTY)$(HAS_TTY2SIOR)$(HAS_IOP_RESET)
BIN_NAME = $(HAS_EXFAT)$(HAS_DS34)$(HAS_ETH)$(HAS_SMB)$(HAS_DVRP)$(HAS_XFROM)$(HAS_MX4SIO)$(HAS_EESIO)$(HAS_UDPTTY)$(HAS_TTY2SIOR)$(HAS_IOP_RESET)$(HAS_UDPBD)
ifeq ($(DEBUG), 0)
EE_BIN = UNC-BOOT$(BIN_NAME).ELF
EE_BIN_PKD = BOOT$(BIN_NAME).ELF
Expand Down Expand Up @@ -78,6 +79,21 @@ ifeq ($(MX4SIO),1)
endif
endif

ifeq ($(UDPBD), 1)
ifneq ($(EXFAT),1)
$(error UDPBD Requested on build without BDM)
endif
$(info UDPBD enabled, disabling any other network feature)
EE_OBJS += smap_udpbd.o
HAS_UDPBD = -UDPBD
EE_CFLAGS += -DUDPBD -DCOMMON_PRINTF
ifeq ($(UDPTTY),1)
$(error UDPBD and UDPTTY Cannot co-exist. only use UDPBD, since it can do the same thing too)
endif
ETH = 0 # UDPBD cant coexist with common network crap
SMB = 0
endif

ifeq ($(SIO2MAN),1)
EE_OBJS += sio2man.o padman.o
EE_CFLAGS += -DHOMEBREW_SIO2MAN
Expand Down Expand Up @@ -107,7 +123,7 @@ ifeq ($(ETH),1)
EE_OBJS += ps2smap_irx.o ps2ftpd_irx.o ps2host_irx.o ps2netfs_irx.o ps2ip_irx.o
EE_CFLAGS += -DETH
else
HAS_ETH = -NO_NETWORK

endif

ifeq ($(UDPTTY),1)
Expand Down
3 changes: 3 additions & 0 deletions embed.make
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,9 @@ iop/vmc_fs.irx: iop/vmc_fs
$(EE_ASM_DIR)vmc_fs_irx.s: iop/vmc_fs.irx | $(EE_ASM_DIR)
$(BIN2S) $< $@ vmc_fs_irx

$(EE_ASM_DIR)smap_udpbd.s: iop/__precompiled/smap_udpbd.irx | $(EE_ASM_DIR)
$(BIN2S) $< $@ smap_udpbd_irx

loader/loader.elf: loader
$(MAKE) -C $<

Expand Down
Binary file modified iop/__precompiled/bdm.irx
Binary file not shown.
Binary file modified iop/__precompiled/bdmfs_fatfs.irx
Binary file not shown.
Binary file added iop/__precompiled/smap_udpbd.irx
Binary file not shown.
12 changes: 9 additions & 3 deletions src/filer.c
Original file line number Diff line number Diff line change
Expand Up @@ -950,6 +950,7 @@ int genFixPath(const char *inp_path, char *gen_path)
//--------------------------------------------------------------
int genRmdir(char *path)
{
DPRINTF("RMDIR: '%s'\n", path);
int ret;

genLimObjName(path, 0);
Expand All @@ -963,7 +964,7 @@ int genRmdir(char *path)
//--------------------------------------------------------------
int genRemove(char *path)
{
DPRINTF("%s: '%s'\n", __FUNCTION__, path);
DPRINTF("REMOVE: '%s'\n", path);
int ret;

genLimObjName(path, 0);
Expand All @@ -977,7 +978,7 @@ int genRemove(char *path)
//--------------------------------------------------------------
int genOpen(char *path, int mode)
{
DPRINTF("%s: '%s' @ %d\n", __FUNCTION__, path, mode);
DPRINTF("OPEN: '%s' mode:%d\n", path, mode);
genLimObjName(path, 0);
return fileXioOpen(path, mode, fileMode);
}
Expand All @@ -986,7 +987,7 @@ int genOpen(char *path, int mode)
//--------------------------------------------------------------
int genDopen(char *path)
{
DPRINTF("%s: '%s'\n", __FUNCTION__, path);
DPRINTF("DOPEN: '%s'\n", path);
int fd;

if (!strncmp(path, "pfs", 3) || !strncmp(path, "vmc", 3)) {
Expand All @@ -1007,34 +1008,39 @@ int genDopen(char *path)
//--------------------------------------------------------------
int genLseek(int fd, int where, int how)
{
DPRINTF("SEEK: fd:%d, where:%d, how:%d\n", fd, where, how);
return fileXioLseek(fd, where, how);
}
//------------------------------
//endfunc genLseek
//--------------------------------------------------------------
int genRead(int fd, void *buf, int size)
{
DPRINTF("READ: fd:%d, buf_ptr:0x%p, size:%d\n", fd, buf, size);
return fileXioRead(fd, buf, size);
}
//------------------------------
//endfunc genRead
//--------------------------------------------------------------
int genWrite(int fd, void *buf, int size)
{
DPRINTF("WRITE: fd:%d, buf_ptr:0x%p, size:%d\n", fd, buf, size);
return fileXioWrite(fd, buf, size);
}
//------------------------------
//endfunc genWrite
//--------------------------------------------------------------
int genClose(int fd)
{
DPRINTF("CLOSE: fd:%d\n", fd);
return fileXioClose(fd);
}
//------------------------------
//endfunc genClose
//--------------------------------------------------------------
int genDclose(int fd)
{
DPRINTF("DCLOSE: fd:%d\n", fd);
return fileXioDclose(fd);
}
//------------------------------
Expand Down
19 changes: 17 additions & 2 deletions src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@ IMPORT_BIN2C(ps2ftpd_irx);
IMPORT_BIN2C(smbman_irx);
#endif

#ifdef UDPBD
IMPORT_BIN2C(smap_udpbd_irx);
#endif

#ifdef UDPTTY
IMPORT_BIN2C(udptty_irx);
#endif
Expand Down Expand Up @@ -396,9 +400,13 @@ static void Show_build_info(void)
" SMB:0"
#endif
#ifdef ETH
" ETH:1"
" ETH:1"
#else
" ETH:0"
#ifdef UDPBD
" ETH:UDPBD"
#else
" ETH:0"
#endif
#endif
, COLOR_TEXT);
PrintPos(-1, hpos,
Expand Down Expand Up @@ -2672,6 +2680,13 @@ int main(int argc, char *argv[])
DPRINTF("Getting IPCONFIG\n");
getIpConfig();

#ifdef UDPBD
int ID, ret;
load_ps2dev9();
ID = SifExecModuleBuffer(smap_udpbd_irx, size_smap_udpbd_irx, 0, NULL, &ret);
DPRINTF(" [UDPBD] ID=%d, ret=%d\n", ID, ret);
#endif

WaitTime = Timer();
DPRINTF("setup pad\n");
setupPad(); //Comment out this line when using early setupPad above
Expand Down