Skip to content
This repository has been archived by the owner on Aug 31, 2024. It is now read-only.

Commit

Permalink
Merge branch 'end-of-2022' into smaller-steps-redsonbr-2
Browse files Browse the repository at this point in the history
  • Loading branch information
citronalco committed Sep 27, 2023
2 parents 9d91e04 + 785c6f2 commit 1beda88
Show file tree
Hide file tree
Showing 100 changed files with 1,792 additions and 4,624 deletions.
35 changes: 35 additions & 0 deletions .github/workflows/OPLTestISO.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: CI-OPLTestISO

on:
push:
paths:
- '.github/workflows/OPLTestISO.yml'
- 'labs/opltestiso/**'
workflow_dispatch:

jobs:
build-opltestiso:
runs-on: ubuntu-latest
container: ps2dev/ps2dev:latest
steps:
- name: Install dependencies
run: apk add build-base git zip cdrkit

- name: git checkout
uses: actions/checkout@v3

- run: |
git config --global --add safe.directory "$GITHUB_WORKSPACE"
git fetch --prune --unshallow
- name: make ISO
run: |
cd labs/opltestiso/
make iso
- name: Upload release artifact ISO
uses: actions/upload-artifact@v3
with:
name: OPLTESTISO
path: |
labs/opltestiso/*.iso
44 changes: 23 additions & 21 deletions .github/workflows/compilation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ name: CI-compile
on:
push:
pull_request:
workflow_dispatch:
repository_dispatch:
types: [run_build]

Expand Down Expand Up @@ -75,13 +76,13 @@ jobs:
# run: pip3 install -r requirements.txt

- name: Get version
id: version
run: echo "::set-output name=version::$(make oplversion)"
run: |
echo "OPL_VERSION=$(make oplversion)" >> $GITHUB_ENV
- name: Compile -> make ${{ matrix.t10k }} ${{ matrix.igs }} ${{ matrix.pademu }} ${{ matrix.rtl }} NOT_PACKED=1
run: |
make --trace ${{ matrix.t10k }} ${{ matrix.igs }} ${{ matrix.pademu }} ${{ matrix.rtl }} NOT_PACKED=1
mv opl.elf OPNPS2LD-${{ steps.version.outputs.version }}-${{ matrix.t10k }}-${{ matrix.igs }}-${{ matrix.pademu }}-${{ matrix.rtl }}.ELF
mv opl.elf OPNPS2LD-${{ env.OPL_VERSION }}-${{ matrix.t10k }}-${{ matrix.igs }}-${{ matrix.pademu }}-${{ matrix.rtl }}.ELF
- name: Create detailed changelog
run: sh ./make_changelog.sh
Expand Down Expand Up @@ -146,8 +147,8 @@ jobs:
# run: pip3 install -r requirements.txt

- name: Get version
id: version
run: echo "::set-output name=version::$(make oplversion)"
run: |
echo "OPL_VERSION=$(make oplversion)" >> $GITHUB_ENV
- name: Compile -> make debug
run: |
Expand All @@ -157,7 +158,7 @@ jobs:
- name: Upload variants artifact ELF
uses: actions/upload-artifact@v3
with:
name: opl-debug-${{ steps.version.outputs.version }}-${{ matrix.docker }}
name: opl-debug-${{ env.OPL_VERSION }}-${{ matrix.docker }}
path: opl-*.elf

release:
Expand All @@ -174,22 +175,23 @@ jobs:
- run: git fetch --prune --unshallow

- name: Get version
id: version
run: echo "::set-output name=version::$(make oplversion)"
run: |
echo "OPL_VERSION=$(make oplversion)" >> $GITHUB_ENV
- name: Download all artifacts
uses: actions/download-artifact@v3

- name: Prepare artifacts for release
run: |
echo packing release of OPL ${{ env.OPL_VERSION }}
cp INFO/* OPNPS2LD/
cp INFO/* OPNPS2LD-VARIANTS/
7z a -t7z OPNPS2LD-${{ steps.version.outputs.version }}.7z OPNPS2LD/*
7z a -t7z OPNPS2LD-VARIANTS-${{ steps.version.outputs.version }}.7z OPNPS2LD-VARIANTS/*
7z a -t7z OPNPS2LD-LANGS-${{ steps.version.outputs.version }}.7z OPNPS2LD-LANGS/*
cp -f OPNPS2LD-${{ steps.version.outputs.version }}.7z OPNPS2LD.7z
cp -f OPNPS2LD-VARIANTS-${{ steps.version.outputs.version }}.7z OPNPS2LD-VARIANTS.7z
cp -f OPNPS2LD-LANGS-${{ steps.version.outputs.version }}.7z OPNPS2LD-LANGS.7z
7z a -t7z OPNPS2LD-${{ env.OPL_VERSION }}.7z OPNPS2LD/*
7z a -t7z OPNPS2LD-VARIANTS-${{ env.OPL_VERSION }}.7z OPNPS2LD-VARIANTS/*
7z a -t7z OPNPS2LD-LANGS-${{ env.OPL_VERSION }}.7z OPNPS2LD-LANGS/*
cp -f OPNPS2LD-${{ env.OPL_VERSION }}.7z OPNPS2LD.7z
cp -f OPNPS2LD-VARIANTS-${{ env.OPL_VERSION }}.7z OPNPS2LD-VARIANTS.7z
cp -f OPNPS2LD-LANGS-${{ env.OPL_VERSION }}.7z OPNPS2LD-LANGS.7z
- name: Create prerelease
if: github.ref == 'refs/heads/master'
Expand All @@ -200,9 +202,9 @@ jobs:
automatic_release_tag: "latest"
title: "${{ steps.version.outputs.version }}"
files: |
OPNPS2LD-${{ steps.version.outputs.version }}.7z
OPNPS2LD-VARIANTS-${{ steps.version.outputs.version }}.7z
OPNPS2LD-LANGS-${{ steps.version.outputs.version }}.7z
OPNPS2LD-${{ env.OPL_VERSION }}.7z
OPNPS2LD-VARIANTS-${{ env.OPL_VERSION }}.7z
OPNPS2LD-LANGS-${{ env.OPL_VERSION }}.7z
OPNPS2LD.7z
OPNPS2LD-VARIANTS.7z
OPNPS2LD-LANGS.7z
Expand All @@ -213,11 +215,11 @@ jobs:
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
prerelease: "${{ contains(github.ref, '-rc') }}"
title: "${{ steps.version.outputs.version }}"
title: "${{ env.OPL_VERSION }}"
files: |
OPNPS2LD-${{ steps.version.outputs.version }}.7z
OPNPS2LD-VARIANTS-${{ steps.version.outputs.version }}.7z
OPNPS2LD-LANGS-${{ steps.version.outputs.version }}.7z
OPNPS2LD-${{ env.OPL_VERSION }}.7z
OPNPS2LD-VARIANTS-${{ env.OPL_VERSION }}.7z
OPNPS2LD-LANGS-${{ env.OPL_VERSION }}.7z
OPNPS2LD.7z
OPNPS2LD-VARIANTS.7z
OPNPS2LD-LANGS.7z
46 changes: 14 additions & 32 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ FRONTEND_OBJS = pad.o fntsys.o renderman.o menusys.o OSDHistory.o system.o lang.
elmsupport.o # OPL_DB tweak

IOP_OBJS = iomanx.o filexio.o ps2fs.o usbd.o bdmevent.o \
bdm.o bdmfs_vfat.o usbmass_bd.o iLinkman.o IEEE1394_bd.o mx4sio_bd.o \
bdm.o bdmfs_fatfs.o usbmass_bd.o iLinkman.o IEEE1394_bd.o mx4sio_bd.o \
ps2atad.o hdpro_atad.o poweroff.o ps2hdd.o xhdd.o genvmc.o lwnbdsvr.o \
ps2dev9.o smsutils.o ps2ip.o smap.o isofs.o nbns-iop.o \
sio2man.o padman.o mcman.o mcserv.o \
Expand Down Expand Up @@ -102,7 +102,7 @@ MISC_OBJS = icon_sys_A.o icon_sys_J.o icon_sys_C.o conf_theme_OPL.o

TRANSLATIONS = Albanian Arabic Bulgarian Cebuano Croatian Czech Danish Dutch Filipino French \
German Greek Hungarian Indonesian Italian Japanese Korean Laotian Persian Polish Portuguese \
Portuguese_BR Romana Russian SChinese Spanish Swedish TChinese Turkish Vietnamese
Portuguese_BR Romana Russian Ryukyuan SChinese Spanish Swedish TChinese Turkish Vietnamese

EE_BIN = opl.elf
EE_BIN_STRIPPED = opl_stripped.elf
Expand All @@ -119,7 +119,7 @@ PNG_ASSETS_DIR = gfx/
MAPFILE = opl.map
EE_LDFLAGS += -Wl,-Map,$(MAPFILE)

EE_LIBS = -L$(PS2SDK)/ports/lib -L$(GSKIT)/lib -L./lib -lgskit -ldmakit -lgskit_toolkit -lpoweroff -lfileXio -lpatches -ljpeg_ps2_addons -ljpeg -lpng -lz -ldebug -lm -lmc -lfreetype -lvux -lcdvd -lnetman -lps2ips -laudsrv -lpadx -lelf-loader
EE_LIBS = -L$(PS2SDK)/ports/lib -L$(GSKIT)/lib -L./lib -lgskit -ldmakit -lgskit_toolkit -lpoweroff -lfileXio -lpatches -ljpeg_ps2_addons -ljpeg -lpng -lz -ldebug -lm -lmc -lfreetype -lvux -lcdvd -lnetman -lps2ips -laudsrv -lvorbisfile -lvorbis -logg -lpadx -lelf-loader
EE_INCS += -I$(PS2SDK)/ports/include -I$(PS2SDK)/ports/include/freetype2 -I$(GSKIT)/include -I$(GSKIT)/ee/dma/include -I$(GSKIT)/ee/gs/include -I$(GSKIT)/ee/toolkit/include -Imodules/iopcore/common -Imodules/network/common -Imodules/hdd/common -Iinclude

BIN2C = $(PS2SDK)/bin/bin2c
Expand All @@ -136,11 +136,9 @@ endif
ifeq ($(DTL_T10000),1)
EE_CFLAGS += -D_DTL_T10000
EECORE_EXTRA_FLAGS += DTL_T10000=1
UDNL_SRC = modules/iopcore/udnl-t300
UDNL_OUT = modules/iopcore/udnl-t300/udnl.irx
UDNL_OUT = $(PS2SDK)/iop/irx/udnl-t300.irx
else
UDNL_SRC = modules/iopcore/udnl
UDNL_OUT = modules/iopcore/udnl/udnl.irx
UDNL_OUT = $(PS2SDK)/iop/irx/udnl.irx
endif

ifeq ($(IGS),1)
Expand Down Expand Up @@ -244,21 +242,13 @@ clean:
echo "Cleaning..."
echo "-Interface"
rm -fr $(MAPFILE) $(EE_BIN) $(EE_BIN_PACKED) $(EE_BIN_STRIPPED) $(EE_VPKD).* $(EE_OBJS_DIR) $(EE_ASM_DIR)
echo "-Language"
rm -fr $(LNG_SRC_DIR) $(LNG_DIR)lang_*.lng $(INTERNAL_LANGUAGE_C) $(INTERNAL_LANGUAGE_H)
echo "-EE core"
$(MAKE) -C ee_core clean
echo "-Elf Loader"
$(MAKE) -C elfldr clean
echo "-IOP core"
echo " -udnl-t300"
$(MAKE) -C modules/iopcore/udnl-t300 clean
echo " -udnl"
$(MAKE) -C modules/iopcore/udnl clean
echo " -imgdrv"
$(MAKE) -C modules/iopcore/imgdrv clean
echo " -eesync"
$(MAKE) -C modules/iopcore/eesync clean
echo " -cdvdman"
$(MAKE) -C modules/iopcore/cdvdman USE_BDM=1 clean
$(MAKE) -C modules/iopcore/cdvdman USE_SMB=1 clean
Expand Down Expand Up @@ -305,8 +295,6 @@ clean:
$(MAKE) -C modules/network/lwnbdsvr clean
echo " -udptty-ingame"
$(MAKE) -C modules/debug/udptty-ingame clean
echo " -ioptrap"
$(MAKE) -C modules/debug/ioptrap clean
echo " -ps2link"
$(MAKE) -C modules/debug/ps2link clean
echo " -ds34usb"
Expand All @@ -319,6 +307,10 @@ clean:
echo "-pc tools"
$(MAKE) -C pc clean

realclean: clean
echo "-Language"
rm -fr $(LNG_SRC_DIR) $(LNG_DIR)lang_*.lng $(INTERNAL_LANGUAGE_C) $(INTERNAL_LANGUAGE_H)

rebuild: clean all

run: $(EE_BIN_PACKED)
Expand Down Expand Up @@ -380,10 +372,6 @@ elfldr/elfldr.elf: elfldr
$(EE_ASM_DIR)elfldr.s: elfldr/elfldr.elf | $(EE_ASM_DIR)
$(BIN2S) $< $@ elfldr_elf

$(UDNL_OUT): $(UDNL_SRC)
echo "-IOP core"
$(MAKE) -C $<

$(EE_ASM_DIR)udnl.s: $(UDNL_OUT) | $(EE_ASM_DIR)
$(BIN2S) $(UDNL_OUT) $@ udnl_irx

Expand All @@ -393,10 +381,7 @@ modules/iopcore/imgdrv/imgdrv.irx: modules/iopcore/imgdrv
$(EE_ASM_DIR)imgdrv.s: modules/iopcore/imgdrv/imgdrv.irx | $(EE_ASM_DIR)
$(BIN2S) $< $@ imgdrv_irx

modules/iopcore/eesync/eesync.irx: modules/iopcore/eesync
$(MAKE) -C $<

$(EE_ASM_DIR)eesync.s: modules/iopcore/eesync/eesync.irx | $(EE_ASM_DIR)
$(EE_ASM_DIR)eesync.s: $(PS2SDK)/iop/irx/eesync-nano.irx | $(EE_ASM_DIR)
$(BIN2S) $< $@ eesync_irx

modules/iopcore/cdvdman/bdm_cdvdman.irx: modules/iopcore/cdvdman
Expand Down Expand Up @@ -483,7 +468,7 @@ modules/isofs/isofs.irx: modules/isofs
$(EE_ASM_DIR)isofs.s: modules/isofs/isofs.irx | $(EE_ASM_DIR)
$(BIN2S) $< $@ isofs_irx

$(EE_ASM_DIR)usbd.s: $(PS2SDK)/iop/irx/usbd.irx | $(EE_ASM_DIR)
$(EE_ASM_DIR)usbd.s: $(PS2SDK)/iop/irx/usbd_mini.irx | $(EE_ASM_DIR)
$(BIN2S) $< $@ usbd_irx

$(EE_ASM_DIR)libsd.s: $(PS2SDK)/iop/irx/libsd.irx | $(EE_ASM_DIR)
Expand Down Expand Up @@ -531,8 +516,8 @@ $(EE_ASM_DIR)usb_pademu.s: modules/pademu/usb_pademu.irx
$(EE_ASM_DIR)bdm.s: $(PS2SDK)/iop/irx/bdm.irx | $(EE_ASM_DIR)
$(BIN2S) $< $@ bdm_irx

$(EE_ASM_DIR)bdmfs_vfat.s: $(PS2SDK)/iop/irx/bdmfs_vfat.irx | $(EE_ASM_DIR)
$(BIN2S) $< $@ bdmfs_vfat_irx
$(EE_ASM_DIR)bdmfs_fatfs.s: $(PS2SDK)/iop/irx/bdmfs_fatfs.irx | $(EE_ASM_DIR)
$(BIN2S) $< $@ bdmfs_fatfs_irx

$(EE_ASM_DIR)iLinkman.s: $(PS2SDK)/iop/irx/iLinkman.irx | $(EE_ASM_DIR)
$(BIN2S) $< $@ iLinkman_irx
Expand Down Expand Up @@ -649,10 +634,7 @@ modules/debug/udptty-ingame/udptty.irx: modules/debug/udptty-ingame
$(EE_ASM_DIR)udptty-ingame.s: modules/debug/udptty-ingame/udptty.irx | $(EE_ASM_DIR)
$(BIN2S) $< $@ udptty_ingame_irx

modules/debug/ioptrap/ioptrap.irx: modules/debug/ioptrap
$(MAKE) -C $<

$(EE_ASM_DIR)ioptrap.s: modules/debug/ioptrap/ioptrap.irx | $(EE_ASM_DIR)
$(EE_ASM_DIR)ioptrap.s: $(PS2SDK)/iop/irx/ioptrap.irx | $(EE_ASM_DIR)
$(BIN2S) $< $@ ioptrap_irx

modules/debug/ps2link/ps2link.irx: modules/debug/ps2link
Expand Down
2 changes: 2 additions & 0 deletions ee_core/include/ee_core.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ extern int iop_reboot_count;

extern int padOpen_hooked;

extern int enforceLanguage;

enum ETH_OP_MODES {
ETH_OP_MODE_AUTO = 0,
ETH_OP_MODE_100M_FDX,
Expand Down
6 changes: 5 additions & 1 deletion ee_core/include/syshook.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@
#define SYSHOOK_H

#include <tamtypes.h>
#include <osd_config.h>

extern ConfigParam CustomOSDConfigParam;

void Install_Kernel_Hooks(void);
void Remove_Kernel_Hooks(void);
Expand All @@ -20,7 +23,8 @@ extern int (*Old_SifSetReg)(u32 register_num, int register_value);
extern int (*Old_ExecPS2)(void *entry, void *gp, int num_args, char *args[]);
extern int (*Old_CreateThread)(ee_thread_t *thread_param);
extern void (*Old_Exit)(s32 exit_code);

extern void (*Old_SetOsdConfigParam)(ConfigParam *config);
extern void (*Old_GetOsdConfigParam)(ConfigParam *config);
void sysLoadElf(char *filename, int argc, char **argv);
void sysExit(s32 exit_code);

Expand Down
2 changes: 1 addition & 1 deletion ee_core/src/cheat_api.c
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ void SetupCheats()
k++;
}
// Discard any false positives from being possible hooks
if ((code.addr & 0xf0000000) == 0x40000000 || 0x30000000) {
if ((code.addr & 0xf0000000) == 0x40000000 || (code.addr & 0xf0000000) == 0x30000000) {
nextCodeCanBeHook = 0;
} else {
nextCodeCanBeHook = 1;
Expand Down
17 changes: 16 additions & 1 deletion ee_core/src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@ int PadMacroSettings;
int EnableDebug;
int *gCheatList; // Store hooks/codes addr+val pairs

int enforceLanguage;

// This function is defined as weak in ps2sdkc, so how
// we are not using time zone, so we can safe some KB
void _ps2sdk_timezone_update() {}
Expand Down Expand Up @@ -109,7 +111,20 @@ static int eecoreInit(int argc, char **argv)

PadMacroSettings = _strtoi(_strtok(NULL, " "));
#endif

CustomOSDConfigParam.spdifMode = _strtoi(_strtok(NULL, " "));
CustomOSDConfigParam.screenType = _strtoi(_strtok(NULL, " "));
CustomOSDConfigParam.videoOutput = _strtoi(_strtok(NULL, " "));
CustomOSDConfigParam.japLanguage = _strtoi(_strtok(NULL, " "));
CustomOSDConfigParam.ps1drvConfig = _strtoi(_strtok(NULL, " "));
CustomOSDConfigParam.version = _strtoi(_strtok(NULL, " "));
CustomOSDConfigParam.language = _strtoi(_strtok(NULL, " "));
CustomOSDConfigParam.timezoneOffset = _strtoi(_strtok(NULL, " "));
enforceLanguage = _strtoi(_strtok(NULL, " "));

if (enforceLanguage)
DPRINTF("Enforcing language...\n\tCustomOSDConfig2Param: %d %d %d %d %d %d %d %d\n", PARAM.spdifMode, PARAM.screenType, PARAM.videoOutput, PARAM.japLanguage, PARAM.ps1drvConfig, PARAM.version, PARAM.language, PARAM.timezoneOffset);
else
DPRINTF("Language will not be manipulated\n");
i++;

eeloadCopy = (void *)_strtoui(_strtok(argv[i], " "));
Expand Down
Loading

0 comments on commit 1beda88

Please sign in to comment.