Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
1ba41bd
initial coh support
israpps Feb 20, 2024
97056d2
Merge branch 'master' into sys2x6
israpps Feb 20, 2024
60311bd
Update Makefile
israpps Feb 20, 2024
2218fd8
Update main.c
israpps Feb 20, 2024
99a4eb9
Update Makefile
israpps Feb 20, 2024
5bc61c9
Update Makefile
israpps Feb 20, 2024
5ec4b4f
Update Makefile
israpps Feb 20, 2024
bd7d389
Update Makefile
israpps Feb 20, 2024
ff92309
Update Makefile
israpps Feb 20, 2024
89c59f4
Update Makefile
israpps Feb 20, 2024
0933993
Update CI.yml
israpps Feb 20, 2024
b56c6ec
Update Makefile
israpps Feb 20, 2024
15dd06e
fix cd access?
israpps Feb 21, 2024
c434708
Update Makefile
israpps Feb 21, 2024
35347cd
crude on screen logging
israpps Feb 21, 2024
384aa0b
crude on screen logging
israpps Feb 21, 2024
4127163
Merge branch 'sys2x6' of https://github.com/israpps/CheatDevicePS2 in…
israpps Feb 21, 2024
69a1757
.
israpps Feb 21, 2024
f3f0e7e
tesst
israpps Feb 21, 2024
531c073
split mcman, mcser, sio2man and padman toggles
israpps Feb 21, 2024
53a17ef
seems like `sleep()` makes coh bios hang?
israpps Feb 21, 2024
ebbd299
use the appropiate sio2man version
israpps Feb 21, 2024
800888d
aaaa
israpps Feb 21, 2024
4236640
more tests
israpps Feb 21, 2024
79ab75f
Update util.c
israpps Feb 21, 2024
f35d289
Update Makefile
israpps Feb 21, 2024
87de05b
zaaadas
israpps Feb 21, 2024
b84d39a
Update main.c
israpps Feb 21, 2024
82ab153
I HATE THESE TYPOS
israpps Feb 21, 2024
98af510
Update Makefile
israpps Feb 21, 2024
34fa63d
test
israpps Feb 21, 2024
212efe8
Update util.c
israpps Feb 21, 2024
e65c97f
Update Makefile
israpps Feb 21, 2024
8587ffb
Update Makefile
israpps Feb 21, 2024
8c53ae0
im tired of this
israpps Feb 21, 2024
41a48a9
Update util.c
israpps Feb 21, 2024
d07e11e
dad
israpps Feb 21, 2024
69f2299
inform of padman or mcserv loading failures
israpps Feb 21, 2024
904a73f
remove unused buffer
israpps Feb 21, 2024
c5c4ac4
polish some stuff
israpps Apr 6, 2024
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
4 changes: 2 additions & 2 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
strategy:
fail-fast: false
matrix:
opts: ["", "HDD=1", "EXFAT=1"]
opts: ["", "HDD=1", "EXFAT=1", "COH=1 EXFAT=1"]
runs-on: ubuntu-latest
container: ps2dev/ps2dev:v1.0
steps:
Expand All @@ -27,7 +27,7 @@ jobs:

- name: Compile cheat device
run: |
make rebuild release ${{ matrix.opts }}
make rebuild release ${{ matrix.opts }} --trace

- name: list
run: |
Expand Down
70 changes: 54 additions & 16 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,13 @@

DTL_T10000 ?= 0
EXFAT ?= 0
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)
HOMEBREW_MCMAN ?= 1
HOMEBREW_MCSERV ?= 1
HOMEBREW_PADMAN ?= 1
HOMEBREW_SIO2MAN ?= 1
PRINTF = NONE
RELDIR = release
EE_BIN = CheatDevice$(HAS_EXFAT)$(HAS_HDD).ELF
EE_BIN = CheatDevice$(HAS_EXFAT)$(HAS_HDD)$(HAS_COH).ELF
# For minizip
EE_CFLAGS += -DUSE_FILE32API

Expand All @@ -28,9 +31,6 @@ OBJS += src/saveformats/util.o src/saveformats/cbs.o src/saveformats/psu.o src/s
# IRX Modules
IRX_OBJS += resources/usbd_irx.o
IRX_OBJS += resources/iomanX_irx.o
ifeq ($(HOMEBREW_IRX),1)
IRX_OBJS += resources/sio2man_irx.o resources/mcman_irx.o resources/mcserv_irx.o resources/padman_irx.o
endif

ifeq ($(EXFAT),1)
EE_CFLAGS += -DEXFAT
Expand All @@ -40,6 +40,19 @@ else
IRX_OBJS += resources/usbhdfsd_irx.o
endif

ifeq ($(COH),1)
PRINTF = EE_SIO
EE_CFLAGS += -DSUPPORT_SYSTEM_2X6
EE_LIBS += -liopreboot
HAS_COH = -COH
HOMEBREW_MCMAN = 1
HOMEBREW_MCSERV = 0
HOMEBREW_SIO2MAN = 0
HOMEBREW_PADMAN = 0
IRX_OBJS += resources/ioprp.o
EE_SIO = 1
endif

ifeq ($(HDD), 1)
EE_LIBS += -lpoweroff
IRX_OBJS += resources/ps2fs_irx.o resources/ps2hdd_irx.o resources/ps2atad_irx.o resources/poweroff_irx.o
Expand All @@ -59,8 +72,6 @@ ifeq ($(DEV9_NEED), 1)
EE_CFLAGS += -DDEV9
IRX_OBJS += resources/ps2dev9_irx.o
endif


# Graphic resources
OBJS += resources/background_png.o \
resources/check_png.o resources/hamburgerIcon_png.o resources/gamepad_png.o resources/cube_png.o \
Expand All @@ -75,13 +86,28 @@ OBJS += engine/engine_erl.o

# Bootstrap ELF
OBJS += bootstrap/bootstrap_elf.o

ifeq ($(HOMEBREW_IRX),1)
EE_LIBS += -lpadx
EE_CFLAGS += -DHOMEBREW_IRX
ifeq ($(HOMEBREW_PADMAN),1)
IRX_OBJS += resources/padman_irx.o
EE_LIBS += -lpadx
EE_CFLAGS += -DHOMEBREW_PADMAN
else ifeq ($(COH),1)#Because on COH, rom0:PADMAN has the RPC style of retail rom0:XPADMAN
EE_LIBS += -lpadx
else
EE_LIBS += -lpad
EE_LIBS += -lpad
endif
ifeq ($(HOMEBREW_MCMAN),1)
EE_CFLAGS += -DHOMEBREW_MCMAN
IRX_OBJS += resources/mcman_irx.o
endif
ifeq ($(HOMEBREW_SIO2MAN),1)
EE_CFLAGS += -DHOMEBREW_SIO2MAN
IRX_OBJS += resources/sio2man_irx.o
endif
ifeq ($(HOMEBREW_MCSERV),1)
EE_CFLAGS += -DHOMEBREW_MCSERV
IRX_OBJS += resources/mcserv_irx.o
endif

ifeq ($(DTL_T10000),1)
EE_CFLAGS += -D_DTL_T10000 -g
endif
Expand Down Expand Up @@ -111,10 +137,22 @@ ifeq ($(EXFAT),1)
else
bin2o $(PS2SDK)/iop/irx/usbhdfsd.irx resources/usbhdfsd_irx.o _usbhdfsd_irx
endif
ifeq ($(HOMEBREW_IRX),1)
bin2o $(PS2SDK)/iop/irx/freesio2.irx resources/sio2man_irx.o _sio2man_irx
ifeq ($(HOMEBREW_SIO2MAN),1)
bin2o $(PS2SDK)/iop/irx/sio2man.irx resources/sio2man_irx.o _sio2man_irx
endif
ifeq ($(HOMEBREW_MCMAN),1)
ifeq ($(COH),1)
bin2o iop/dongleman.irx resources/mcman_irx.o _mcman_irx
echo Using dongleman
else
bin2o $(PS2SDK)/iop/irx/mcman.irx resources/mcman_irx.o _mcman_irx
echo using homebrew MCMAN
endif
endif
ifeq ($(HOMEBREW_MCSERV),1)
bin2o $(PS2SDK)/iop/irx/mcserv.irx resources/mcserv_irx.o _mcserv_irx
endif
ifeq ($(HOMEBREW_PADMAN),1)
bin2o $(PS2SDK)/iop/irx/freepad.irx resources/padman_irx.o _padman_irx
endif
ifeq ($(FILEXIO_NEED), 1)
Expand All @@ -129,6 +167,7 @@ ifeq ($(HDD), 1)
bin2o $(PS2SDK)/iop/irx/ps2atad.irx resources/ps2atad_irx.o _ps2atad_irx
bin2o $(PS2SDK)/iop/irx/poweroff.irx resources/poweroff_irx.o _poweroff_irx
endif
@bin2o iop/IOPRP_FILEIO.IMG resources/ioprp.o _ioprp_img

@# Graphics
@bin2o resources/background.png resources/background_png.o _background_png
Expand Down Expand Up @@ -157,7 +196,6 @@ endif
@# Engine
@cd engine && $(MAKE)
@bin2o engine/engine.erl engine/engine_erl.o _engine_erl

@# Bootstrap
@cd bootstrap && $(MAKE)
@bin2o bootstrap/bootstrap.elf bootstrap/bootstrap_elf.o _bootstrap_elf
Expand All @@ -178,7 +216,7 @@ $(RELDIR): all
zip -q -9 $(RELDIR)/CheatDatabase.zip CheatDatabase.txt
cp CheatDevicePS2.ini LICENSE README.md $(RELDIR)
sed -i 's/CheatDatabase.txt/CheatDatabase.zip/g' $(RELDIR)/CheatDevicePS2.ini
cd $(RELDIR) && zip -q -9 CheatDevicePS2$(HAS_EXFAT)$(HAS_HDD).zip * extra_cheats/*.zip
cd $(RELDIR) && zip -q -9 CheatDevicePS2$(HAS_EXFAT)$(HAS_HDD)$(HAS_COH).zip * extra_cheats/*.zip

clean:
rm -rf src/*.o src/libraries/*.o src/libraries/minizip/*.o src/saveformats/*.o $(EE_BIN) $(RELDIR)/$(EE_BIN)
Expand Down
11 changes: 10 additions & 1 deletion bootstrap/Makefile
Original file line number Diff line number Diff line change
@@ -1,11 +1,17 @@
EE_BIN = bootstrap.elf
EE_OBJS = main.o

#ifeq ($(COH),1)
# EE_LIBS += -lpatches
# EE_CFLAGS += -DSUPPORT_SYSTEM_2X6
# EE_LIBS += -liopreboot
# EE_OBJS += ../ioprp.o
#endif

#EE_LDFLAGS = -s -Ttext 0x00090000
#EE_LDFLAGS = -s -Ttext 0x01900000
#EE_LDFLAGS = -s -Ttext 0x000F3000
#EE_LIBS += -lkernel -lpatches -lerl

EE_CFLAGS := -mips3 -ffreestanding -fno-builtin -G0 \
-fshort-double -mlong64 -mhard-float -mno-abicalls -O2 -EL -Wall \
$(EE_INCS) $(EE_CFLAGS)
Expand All @@ -27,5 +33,8 @@ all: $(EE_BIN)
clean:
rm -f *.o *.s *.elf

../ioprp.o: ../iop/IOPRP_FILEIO.IMG
@bin2o $< $@ _ioprp_img

include $(PS2SDK)/samples/Makefile.pref
include $(PS2SDK)/samples/Makefile.eeglobal
13 changes: 8 additions & 5 deletions bootstrap/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,12 @@
#include <string.h>
#include <stdio.h>

#ifdef SUPPORT_SYSTEM_2X6
#include <iopcontrol_special.h>
extern u8 _ioprp_img[];
extern int _ioprp_img_size;
#endif

/* Debug colors. Now NTSC Safe! At least I believe they are... */
int red = 0x1010B4; /* RED: Opening elf */
int green = 0x10B410; /* GREEN: Reading elf */
Expand Down Expand Up @@ -173,11 +179,8 @@ void MyLoadElf(char *elfpath)

/* IOP reboot routine from ps2rd */
SifInitRpc(0);

while (!SifIopReset("rom0:UDNL rom0:EELOADCNF", 0))
;
while (!SifIopSync())
;
while (!SifIopReset("", 0));
while (!SifIopSync());

/* exit services */
fioExit();
Expand Down
Binary file added iop/IOPRP_FILEIO.IMG
Binary file not shown.
Binary file added iop/dongleman.irx
Binary file not shown.
4 changes: 4 additions & 0 deletions src/graphics.c
Original file line number Diff line number Diff line change
Expand Up @@ -693,7 +693,11 @@ void graphicsDrawMainMenu(int activeItem)
void graphicsDrawDeviceMenu(int activeItem)
{
static const menuIcon_t icons[] = {
#ifndef SUPPORT_SYSTEM_2X6
{"Memory Card (Slot 1)", &memorycard1},
#else
{"Security Dongle (Slot 1)", &memorycard1},
#endif
{"Memory Card (Slot 2)", &memorycard2},
{"Flash Drive", &flashdrive}
};
Expand Down
5 changes: 4 additions & 1 deletion src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,8 @@ int main(int argc, char *argv[])
#endif

ret = loadModules(booting_from_hdd);
ON_SCREEN_INIT_PROGRESS("Initialize menu");
initMenus();
if (ret != 0) displayError(error);
#ifdef HDD
if (ret == 0) {
Expand All @@ -77,8 +79,9 @@ int main(int argc, char *argv[])
}
}
#endif

ON_SCREEN_INIT_PROGRESS("Initialize settings");
initSettings();
initMenus();

char *readOnlyPath = settingsGetReadOnlyDatabasePath();
if(readOnlyPath && !cheatsOpenDatabase(readOnlyPath, 1))
Expand Down
9 changes: 9 additions & 0 deletions src/saves.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,11 @@ static const char *HELP_TICKER_SAVES = \
"{CROSS} Copy "
"{CIRCLE} Device Menu";

#ifndef SUPPORT_SYSTEM_2X6
static const char *MEMORY_CARD_1_NAME = "Memory Card (Slot 1)";
#else
static const char *MEMORY_CARD_1_NAME = "Security Dongle (Slot 1)";
#endif
static const char *MEMORY_CARD_2_NAME = "Memory Card (Slot 2)";
static const char *FLASH_DRIVE_NAME = "Flash Drive";

Expand Down Expand Up @@ -108,7 +112,12 @@ static void drawDecorations(const menuItem_t *selected)
switch(s_currentDevice)
{
case MC_SLOT_1:

#ifndef SUPPORT_SYSTEM_2X6
deviceName = "Memory Card (Slot 1)";
#else
deviceName = "Security Dongle (Slot 1)";
#endif
freeSpace = s_mc1Free;
break;
case MC_SLOT_2:
Expand Down
Loading