Skip to content

Commit 4e1fe0a

Browse files
committed
MMCE Support
1 parent 8d44c8c commit 4e1fe0a

File tree

4 files changed

+37
-11
lines changed

4 files changed

+37
-11
lines changed

.github/workflows/CI.yml

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
strategy:
1212
fail-fast: false
1313
matrix:
14-
opts: ["", "HDD=1", "EXFAT=1"]
14+
opts: ["", "HDD=1", "EXFAT=1", "MMCE=1"]
1515
runs-on: ubuntu-latest
1616
container: ps2dev/ps2dev:v1.0
1717
steps:
@@ -20,7 +20,7 @@ jobs:
2020
run: |
2121
apk add build-base git zip
2222
23-
- uses: actions/checkout@v3
23+
- uses: actions/checkout@v4
2424
- run: |
2525
git config --global --add safe.directory "$GITHUB_WORKSPACE"
2626
git fetch --prune --unshallow --tags
@@ -34,9 +34,9 @@ jobs:
3434
ls -R
3535
3636
- name: Upload artifact
37-
uses: actions/upload-artifact@v3
37+
uses: actions/upload-artifact@v4
3838
with:
39-
name: ${{ github.event.repository.name }}
39+
name: "${{ github.event.repository.name }}-${{ matrix.opts }}"
4040
path: release/*.zip
4141

4242
#######################################################
@@ -47,15 +47,19 @@ jobs:
4747
steps:
4848

4949
- name: Download all artifacts
50-
uses: actions/download-artifact@v3
50+
uses: actions/download-artifact@v4
51+
with:
52+
path: ${{ github.event.repository.name }}/
53+
pattern: "${{ github.event.repository.name }}-*"
54+
merge-multiple: true
5155

5256
- name: list
5357
run: |
5458
ls -R
5559
5660
- name: Create release
5761
if: github.ref == 'refs/heads/master'
58-
uses: marvinpinto/action-automatic-releases@latest
62+
uses: mathieucarbou/marvinpinto-action-automatic-releases@latest
5963
with:
6064
repo_token: "${{ secrets.GITHUB_TOKEN }}"
6165
automatic_release_tag: "latest"

Makefile

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ EXFAT ?= 0
88
HOMEBREW_IRX ?= 1 #wether to use or not homebrew IRX for pad, memcard and SIO2. if disabled. rom0: drivers will be used. wich is not a safe option. as it makes using the program on protokernel PS2 dangerous (at least for memcard I/O)
99
PRINTF = NONE
1010
RELDIR = release
11-
EE_BIN = CheatDevice$(HAS_EXFAT)$(HAS_HDD).ELF
11+
EE_BIN = CheatDevice$(HAS_EXFAT)$(HAS_HDD)$(HAS_MMCE).ELF
1212
# For minizip
1313
EE_CFLAGS += -DUSE_FILE32API
1414

@@ -28,6 +28,15 @@ OBJS += src/saveformats/util.o src/saveformats/cbs.o src/saveformats/psu.o src/s
2828
# IRX Modules
2929
IRX_OBJS += resources/usbd_irx.o
3030
IRX_OBJS += resources/iomanX_irx.o
31+
32+
33+
ifeq ($(MMCE),1)
34+
EE_CFLAGS += -DMMCE
35+
IRX_OBJS += resources/mmceman_irx.o
36+
HOMEBREW_IRX=1
37+
FILEXIO_NEED=1
38+
endif
39+
3140
ifeq ($(HOMEBREW_IRX),1)
3241
IRX_OBJS += resources/sio2man_irx.o resources/mcman_irx.o resources/mcserv_irx.o resources/padman_irx.o
3342
endif
@@ -102,6 +111,9 @@ all: modules version main
102111
$(info Build finished)
103112

104113
modules:
114+
ifeq ($(MMCE),1)
115+
bin2o iop/mmceman.irx resources/mmceman_irx.o _mmceman_irx
116+
endif
105117
bin2o $(PS2SDK)/iop/irx/iomanX.irx resources/iomanX_irx.o _iomanX_irx
106118
bin2o $(PS2SDK)/iop/irx/usbd.irx resources/usbd_irx.o _usbd_irx
107119
ifeq ($(EXFAT),1)

iop/mmceman.irx

30.8 KB
Binary file not shown.

src/util.c

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,10 @@ EXTERN_BIN2O(_padman_irx);
3333
EXTERN_BIN2O(_usbd_irx);
3434
EXTERN_BIN2O(_iomanX_irx);
3535

36+
#ifdef MMCE
37+
EXTERN_BIN2O(_mmceman_irx);
38+
#endif
39+
3640
#ifdef EXFAT
3741
EXTERN_BIN2O(_bdm_irx);
3842
EXTERN_BIN2O(_bdmfs_fatfs_irx);
@@ -103,7 +107,7 @@ void poweroffCallback(void *arg)
103107

104108
int loadModules(int booting_from_hdd)
105109
{
106-
int ID, RET, HDDSTAT, filexio_loaded=0, dev9_loaded=0;
110+
int ID, RET, HDDSTAT, filexio_loaded=0, dev9_loaded=0, mmceman_loaded=0;
107111
DPRINTF("\n ** Loading main modules **\n");
108112

109113
/* IOP reset routine taken from ps2rd */
@@ -139,11 +143,9 @@ int loadModules(int booting_from_hdd)
139143
sbv_patch_disable_prefix_check();
140144
LOAD_IRX_BUF_SILENT(_iomanX_irx);
141145
#ifdef FILEXIO
142-
if (booting_from_hdd) {
143146
ID = LOAD_IRX_BUF_NARG(_filexio_irx, &RET);
144147
filexio_loaded = IRX_LOAD_SUCCESS();
145-
if (filexio_loaded) fileXioInit(); else sprintf(error, "HDD Init error\n%s: ID:%d, RET_%d!", "FILEXIO.IRX", ID, RET);
146-
}
148+
if (filexio_loaded) fileXioInit(); else sprintf(error, "Error loading driver\n%s: ID:%d, RET:%d!", "FILEXIO.IRX", ID, RET);
147149
#endif
148150
#ifdef DEV9
149151
if (booting_from_hdd) {
@@ -163,6 +165,14 @@ int loadModules(int booting_from_hdd)
163165
SifLoadModule("rom0:MCMAN", 0, NULL);
164166
SifLoadModule("rom0:MCSERV", 0, NULL);
165167
#endif
168+
169+
170+
#ifdef MMCE
171+
ID = LOAD_IRX_BUF_NARG(_mmceman_irx, &RET); //needs fileXio and sio2man to run
172+
mmceman_loaded = IRX_LOAD_SUCCESS();
173+
if (!mmceman_loaded) sprintf(error, "Error loading driver\n%s: ID:%d, RET:%d!", "MMCEMAN.IRX", ID, RET);
174+
#endif
175+
166176
#ifdef EXFAT
167177
LOAD_IRX_BUF_SILENT(_bdm_irx);
168178
LOAD_IRX_BUF_SILENT(_bdmfs_fatfs_irx);

0 commit comments

Comments
 (0)