Skip to content

Commit

Permalink
initial mmce support
Browse files Browse the repository at this point in the history
  • Loading branch information
israpps committed Jan 3, 2025
1 parent 728e8ab commit 7cbae9b
Show file tree
Hide file tree
Showing 5 changed files with 37 additions and 3 deletions.
12 changes: 10 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#.SILENT:

# ---{ BUILD CONFIGURATION }--- #
SIO_DEBUG ?= 0
MMCE ?= 0
DS34 ?= 0
SMB ?= 0
TMANIP ?= 1
Expand All @@ -14,12 +14,13 @@ UDPTTY ?= 0
MX4SIO ?= 0
SIO2MAN ?= 0
PPC_UART ?= 0
SIO_DEBUG ?= 0
DEBUG ?= 0
LCDVD ?= LEGACY#or LATEST
# ----------------------------- #
.SILENT:

BIN_NAME = $(HAS_EXFAT)$(HAS_DS34)$(HAS_ETH)$(HAS_SMB)$(HAS_DVRP)$(HAS_XFROM)$(HAS_MX4SIO)$(HAS_EESIO)$(HAS_UDPTTY)$(HAS_PPCTTY)$(HAS_IOP_RESET)
BIN_NAME = $(HAS_EXFAT)$(HAS_DS34)$(HAS_ETH)$(HAS_SMB)$(HAS_DVRP)$(HAS_XFROM)$(HAS_MX4SIO)$(HAS_MMCE)$(HAS_EESIO)$(HAS_UDPTTY)$(HAS_PPCTTY)$(HAS_IOP_RESET)
ifeq ($(DEBUG), 0)
EE_BIN = UNC-BOOT$(BIN_NAME).ELF
EE_BIN_PKD = BOOT$(BIN_NAME).ELF
Expand Down Expand Up @@ -79,6 +80,13 @@ ifeq ($(DVRP),1)
HAS_DVRP = -DVRP
endif

ifeq ($(MMCE),1)
EE_OBJS += mmceman_irx.o
EE_CFLAGS += -DMMCE
HAS_DVRP = -MMCE
SIO2MAN = 1
endif

ifeq ($(MX4SIO),1)
ifneq ($(EXFAT),1)
$(error MX4SIO Requested on build without BDM)
Expand Down
4 changes: 3 additions & 1 deletion embed.make
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,12 @@ $(EE_ASM_DIR)mcserv_irx.s: $(MCSERV_SOURCE) | $(EE_ASM_DIR)

$(EE_ASM_DIR)sio2man.s: $(SIO2MAN_SOURCE) | $(EE_ASM_DIR)
$(BIN2S) $< $@ sio2man_irx


$(EE_ASM_DIR)mx4sio_bd.s: iop/__precompiled/mx4sio_bd.irx | $(EE_ASM_DIR)
$(BIN2S) $< $@ mx4sio_bd_irx

$(EE_ASM_DIR)mmceman_irx.s: iop/__precompiled/mmceman.irx | $(EE_ASM_DIR)
$(BIN2S) $< $@ mmceman_irx
#---{ USB }---#

$(EE_ASM_DIR)usbd_irx.s: $(PS2SDK)/iop/irx/usbd.irx | $(EE_ASM_DIR)
Expand Down
Binary file added iop/__precompiled/mmceman.irx
Binary file not shown.
10 changes: 10 additions & 0 deletions src/filer.c
Original file line number Diff line number Diff line change
Expand Up @@ -1541,6 +1541,10 @@ int getDir(const char *path, FILEINFO *info)
else if (!strncmp(path, "host", 4))
n = readHOST(path, info, max);
#endif
#ifdef MMCE
else if (!strncmp(path, "mmce", 4))
n = readGENERIC(path, info, max);
#endif
#ifdef XFROM
else if (!strncmp(path, "xfrom", 5))
n = readXFROM(path, info, max);
Expand Down Expand Up @@ -3498,6 +3502,12 @@ int setFileList(const char *path, const char *ext, FILEINFO *files, int cnfmode)
files[nfiles++].stats.AttrFile = sceMcFileAttrSubdir;
#ifdef MX4SIO
}
#endif
#ifdef MMCE
strcpy(files[nfiles].name, "mmce0:");
files[nfiles++].stats.AttrFile = sceMcFileAttrSubdir;
strcpy(files[nfiles].name, "mmce1:");
files[nfiles++].stats.AttrFile = sceMcFileAttrSubdir;
#endif
strcpy(files[nfiles].name, "hdd0:");
files[nfiles++].stats.AttrFile = sceMcFileAttrSubdir;
Expand Down
14 changes: 14 additions & 0 deletions src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,10 @@ IMPORT_BIN2C(dvrdrv_irx);
IMPORT_BIN2C(dvrfile_irx);
#endif

#ifdef MMCE
IMPORT_BIN2C(mmceman_irx);
#endif

// Mandatory IRX
IMPORT_BIN2C(iomanx_irx);
IMPORT_BIN2C(filexio_irx);
Expand Down Expand Up @@ -441,6 +445,11 @@ static void Show_build_info(void)
#else
" MX4SIO=0"
#endif
#ifdef MMCE
" MMCE=1"
#else
" MMCE=0"
#endif
, COLOR_TEXT);
#if defined(UDPTTY) || defined(SIO_DEBUG) || defined(POWERPC_UART) || defined(NO_IOP_RESET)

Expand Down Expand Up @@ -1173,6 +1182,11 @@ static void loadBasicModules(void)
id = SifLoadModule("rom0:PADMAN", 0, NULL);
DPRINTF(" [rom0:PADMAN]: id=%d\n", id);
#endif

#ifdef MMCE
id = SifExecModuleBuffer(mmceman_irx, size_mmceman_irx, 0, NULL, &ret); //Home
DPRINTF(" [MMCE]: id=%d ret=%d\n", id, ret);
#endif
}
//------------------------------
//endfunc loadBasicModules
Expand Down

0 comments on commit 7cbae9b

Please sign in to comment.