Skip to content
This repository was archived by the owner on Mar 18, 2023. It is now read-only.
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
45 changes: 45 additions & 0 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: Build

on:
workflow_dispatch:
push:
paths:
- '**Makefile'
- '**CheatDatabase.txt'
- '**CheatDevicePS2.ini'
- '.github/workflows/*.yml'
- 'bootstrap/*'
- 'engine/*'
- 'resources/*'
- 'src/*'
pull_request:

jobs:
build:
runs-on: ubuntu-latest
container: ps2dev/ps2dev:v1.0
steps:
- name: Install dependencies
run: |
apk add build-base git zip p7zip

- uses: actions/checkout@v2
- run: |
git config --global --add safe.directory "$GITHUB_WORKSPACE"
git fetch --prune --unshallow

- name: Compile
run: |
make clean all USE_HOMEBREW_IRX=1

- name: Upload artifacts
if: ${{ success() }}
uses: actions/upload-artifact@v2
with:
name: ELFS
path: |
cheatdevice.elf

- name: Get short SHA
id: slug
run: echo "::set-output name=sha8::$(echo ${GITHUB_SHA} | cut -c1-8)"
19 changes: 15 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,12 @@
# by root670
#

DTL_T10000 = 0
DTL_T10000 ?= 0
USE_HOMEBREW_IRX ?= 1

ifeq ($(DTL_T10000),1)
USE_HOMEBREW_IRX = 1
endif

EE_BIN = cheatdevice.elf

Expand Down Expand Up @@ -43,7 +48,7 @@ OBJS += src/saveformats/max.o
IRX_OBJS += resources/usbd_irx.o
IRX_OBJS += resources/usbhdfsd_irx.o
IRX_OBJS += resources/iomanX_irx.o
ifeq ($(DTL_T10000),1)
ifeq ($(USE_HOMEBREW_IRX),1)
IRX_OBJS += resources/sio2man_irx.o
IRX_OBJS += resources/mcman_irx.o
IRX_OBJS += resources/mcserv_irx.o
Expand Down Expand Up @@ -81,6 +86,9 @@ OBJS += bootstrap/bootstrap_elf.o

ifeq ($(DTL_T10000),1)
EE_CFLAGS += -D_DTL_T10000 -g
endif

ifeq ($(USE_HOMEBREW_IRX),1)
EE_LIBS += -lpadx
else
EE_LIBS += -lpad
Expand All @@ -105,7 +113,7 @@ modules:
@bin2o $(PS2SDK)/iop/irx/iomanX.irx resources/iomanX_irx.o _iomanX_irx
@bin2o $(PS2SDK)/iop/irx/usbd.irx resources/usbd_irx.o _usbd_irx
@bin2o $(PS2SDK)/iop/irx/usbhdfsd.irx resources/usbhdfsd_irx.o _usbhdfsd_irx
ifeq ($(DTL_T10000),1)
ifeq ($(USE_HOMEBREW_IRX),1)
@bin2o $(PS2SDK)/iop/irx/freesio2.irx resources/sio2man_irx.o _sio2man_irx
@bin2o $(PS2SDK)/iop/irx/mcman.irx resources/mcman_irx.o _mcman_irx
@bin2o $(PS2SDK)/iop/irx/mcserv.irx resources/mcserv_irx.o _mcserv_irx
Expand Down Expand Up @@ -145,7 +153,10 @@ endif
@bin2o bootstrap/bootstrap.elf bootstrap/bootstrap_elf.o _bootstrap_elf

version:
@./version.sh > src/version.h
@echo -n '#define GIT_VERSION "'> src/version.h
@git describe | tr -d '\n'>> src/version.h
@echo '"'>> src/version.h


main: $(EE_BIN)
rm -rf src/*.o src/libraries/*.o src/libraries/minizip/*.o src/saveformats/*.o
Expand Down
6 changes: 3 additions & 3 deletions src/util.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
#include <libmc.h>
#include <unistd.h>

#ifdef _DTL_T10000
#ifdef _USE_HOMEBREW_IRX
extern u8 _sio2man_irx_start[];
extern int _sio2man_irx_size;
extern u8 _mcman_irx_start[];
Expand Down Expand Up @@ -72,7 +72,7 @@ void loadModules()
sbv_patch_enable_lmb();
sbv_patch_disable_prefix_check();

#ifdef _DTL_T10000
#ifdef _USE_HOMEBREW_IRX
SifExecModuleBuffer(_sio2man_irx_start, _sio2man_irx_size, 0, NULL, &ret);
SifExecModuleBuffer(_padman_irx_start, _padman_irx_size, 0, NULL, &ret);
SifExecModuleBuffer(_mcman_irx_start, _mcman_irx_size, 0, NULL, &ret);
Expand All @@ -88,7 +88,7 @@ void loadModules()
SifExecModuleBuffer(_usbhdfsd_irx_start, _usbhdfsd_irx_size, 0, NULL, &ret);
sleep(1); // Allow USB devices some time to be detected

#ifdef _DTL_T10000
#ifdef _USE_HOMEBREW_IRX
mcInit(MC_TYPE_XMC);
#else
mcInit(MC_TYPE_MC);
Expand Down