Skip to content

Commit efaef68

Browse files
committed
Added new features, fixes and optimizations.
Added following 7 commits from the master OPL branch: - USBExtreme format extended - Fixed USBExtreme issue - Revert size calculation for USBExtreme (can take more then 5 minutes) - "Pad macro" functionality - Use usbd_mini.irx instead of usbd.irx - ps2rd hook code detection - Fix OSD language settings Other changes: - Replaced graphics in /gfx with better compressed PNGs - Re-enabled PADEMU, RTL and IGS feature - Added 'all-variants' in Makefile - Removed some unnecessary files for this version
1 parent 6d30da0 commit efaef68

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

126 files changed

+1334
-1217
lines changed

.github/ISSUE_TEMPLATE/feature_request.md

Lines changed: 0 additions & 20 deletions
This file was deleted.

.github/ISSUE_TEMPLATE/issue-report.md

Lines changed: 0 additions & 38 deletions
This file was deleted.

.github/workflows/check-format.yml

Lines changed: 0 additions & 22 deletions
This file was deleted.

.github/workflows/compilation.yml

Lines changed: 0 additions & 145 deletions
This file was deleted.

Makefile

Lines changed: 55 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,11 @@ EXTRAVERSION = 0
2222
# You can also specify variables when executing make: "make RTL=1 IGS=1 PADEMU=1"
2323

2424
#Enables/disables Right-To-Left (RTL) language support
25-
RTL = 0
25+
RTL ?= 0
2626
#Enables/disables In Game Screenshot (IGS). NB: It depends on GSM and IGR to work
27-
IGS = 0
27+
IGS ?= 0
2828
#Enables/disables pad emulator
29-
PADEMU = 0
29+
PADEMU ?= 0
3030
#Enables/disables building of an edition of OPL that will support the DTL-T10000 (SDK v2.3+)
3131
DTL_T10000 = 0
3232
#Nor stripping neither compressing binary ELF after compiling.
@@ -186,6 +186,57 @@ else
186186
$(MAKE) $(EE_BIN)
187187
endif
188188

189+
all-variants:
190+
echo "Building Open PS2 Loader $(OPL_VERSION) with other variants."
191+
192+
ifneq ($(NOT_PACKED),1)
193+
$(MAKE) IGS=1 $(EE_BIN_PACKED)
194+
mv $(EE_BIN_PACKED) OPNPS2LD-IGS.ELF
195+
$(MAKE) clean
196+
echo "IGS Variant created: OPNPS2LD-IGS.ELF"
197+
198+
$(MAKE) RTL=1 $(EE_BIN_PACKED)
199+
mv $(EE_BIN_PACKED) OPNPS2LD-RTL.ELF
200+
$(MAKE) clean
201+
echo "RTL Variant created: OPNPS2LD-RTL.ELF"
202+
203+
$(MAKE) PADEMU=1 $(EE_BIN_PACKED)
204+
mv $(EE_BIN_PACKED) OPNPS2LD-PADEMU.ELF
205+
$(MAKE) clean
206+
echo "PADEMU Variant created: OPNPS2LD-PADEMU.ELF"
207+
208+
$(MAKE) IGS=1 RTL=1 PADEMU=1 $(EE_BIN_PACKED)
209+
mv $(EE_BIN_PACKED) OPNPS2LD-ALL.ELF
210+
$(MAKE) clean
211+
echo "ALL Variant created: OPNPS2LD-ALL.ELF"
212+
213+
$(MAKE) $(EE_BIN_PACKED)
214+
echo "Open PS2 Loader $(OPL_VERSION) build: OPNPS2LD.ELF"
215+
else
216+
$(MAKE) IGS=1 $(EE_BIN)
217+
mv $(EE_BIN) opl-IGS.elf
218+
$(MAKE) clean
219+
echo "IGS Variant created: opl-IGS.elf"
220+
221+
$(MAKE) RTL=1 $(EE_BIN)
222+
mv $(EE_BIN) opl-RTL.elf
223+
$(MAKE) clean
224+
echo "RTL Variant created: opl-RTL.elf"
225+
226+
$(MAKE) PADEMU=1 $(EE_BIN)
227+
mv $(EE_BIN) opl-PADEMU.elf
228+
$(MAKE) clean
229+
echo "PADEMU Variant created: opl-PADEMU.elf"
230+
231+
$(MAKE) IGS=1 RTL=1 PADEMU=1 $(EE_BIN)
232+
mv $(EE_BIN) opl-ALL.elf
233+
$(MAKE) clean
234+
echo "ALL Variant created: opl-ALL.elf"
235+
236+
$(MAKE) $(EE_BIN)
237+
echo "Open PS2 Loader $(OPL_VERSION) build: opl.elf"
238+
endif
239+
189240
release:
190241
echo "Building Open PS2 Loader $(OPL_VERSION)..."
191242
echo "-Interface"
@@ -449,7 +500,7 @@ modules/isofs/isofs.irx: modules/isofs
449500
$(EE_ASM_DIR)isofs.s: modules/isofs/isofs.irx | $(EE_ASM_DIR)
450501
$(BIN2S) $< $@ isofs_irx
451502

452-
$(EE_ASM_DIR)usbd.s: $(PS2SDK)/iop/irx/usbd.irx | $(EE_ASM_DIR)
503+
$(EE_ASM_DIR)usbd.s: $(PS2SDK)/iop/irx/usbd_mini.irx | $(EE_ASM_DIR)
453504
$(BIN2S) $< $@ usbd_irx
454505

455506
$(EE_ASM_DIR)libsd.s: $(PS2SDK)/iop/irx/libsd.irx | $(EE_ASM_DIR)

README.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
# Open PS2 Loader
22

3-
Copyright 2013, Ifcaro & jimmikaelkael
4-
Licenced under Academic Free License version 3.0
5-
Review LICENSE file for further details.
6-
7-
Forked from https://github.com/ps2homebrew/Open-PS2-Loader v1.0.0 source code.
3+
Copyright © 2013-2022, Ifcaro & jimmikaelkael.
4+
Licenced under AFL v3.0 - Review the LICENSE file for further details.
85

96
This updated version includes:
107
- OPL-Launcher support
11-
- HDL server support
12-
- NBD server support
8+
- HDL & NBD server support
139
- Controller Settings Menu
10+
- Gamepad Macros (Modification of Gamepads - Requires PADEMU)
1411
- OSD Language Configuration Menu
1512
- Apps Menu
1613
- Expanded SMB Ports
1714
- Various fixes + updates from the stable v1.1.0 Release + v1.2.0 Beta.
15+
16+
Forked from https://github.com/ps2homebrew/Open-PS2-Loader v1.0.0 source code.
17+
Thanks to bignaux, ackmax, israpps, uyjulian, AKuHAK, ...!

ee_core/include/ee_core.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,7 @@ extern int EnableCheatOp;
8383
#ifdef PADEMU
8484
extern int EnablePadEmuOp;
8585
extern int PadEmuSettings;
86+
extern int PadMacroSettings;
8687
#endif
8788

8889
extern int DisableDebug;

ee_core/include/util.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ int _toupper(int c);
2525
int _memcmp(const void *s1, const void *s2, unsigned int length);
2626
unsigned int _strtoui(const char *p);
2727
int _strtoi(const char *p);
28-
unsigned long int _strtoul(const char *p);
28+
u64 _strtoul(const char *p);
2929
void set_ipconfig(void);
3030
u32 *find_pattern_with_mask(u32 *buf, unsigned int bufsize, const u32 *pattern, const u32 *mask, unsigned int len);
3131
void CopyToIop(void *eedata, unsigned int size, void *iopptr);

ee_core/src/cheat_api.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ void SetupCheats()
6060
k++;
6161
}
6262
// Discard any false positives from being possible hooks
63-
if ((code.addr & 0xf0000000) == 0x40000000 || 0x30000000) {
63+
if ((code.addr & 0xf0000000) == 0x40000000 || (code.addr & 0xf0000000) == 0x30000000) {
6464
nextCodeCanBeHook = 0;
6565
} else {
6666
nextCodeCanBeHook = 1;

ee_core/src/igs_api.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -637,7 +637,7 @@ static u8 SaveBitmapFile(u16 width, u16 height, u8 pixel_size, void *buffer, u8
637637
if (ret != 2)
638638
BlinkColour(5, 0x0000FF, 1); //Red
639639
//(...then, write the remaining info!)
640-
bh = buffer + image_size;
640+
bh = (void *)((u8 *)buffer + image_size);
641641
bh->filesize = (u32)file_size;
642642
bh->reserved = (u32)0;
643643
bh->headersize = (u32)54;
@@ -663,7 +663,7 @@ static u8 SaveBitmapFile(u16 width, u16 height, u8 pixel_size, void *buffer, u8
663663
if (intffmd == 3) //Interlace Mode, FRAME Mode (Read every line)
664664
height >>= 1;
665665
for (i = 1; i <= height; i++) {
666-
addr = buffer + ((height - i) * lenght);
666+
addr = (void *)((u8 *)buffer + ((height - i) * lenght));
667667

668668
// Ensure that all the data has indeed been written back to main memory
669669
FlushCache(GS_WRITEBACK_DCACHE);

ee_core/src/iopmgr.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,10 @@ int New_Reset_Iop(const char *arg, int arglen)
170170

171171
#ifdef PADEMU
172172
if (iop_reboot_count >= 2 && EnablePadEmuOp) {
173-
LoadOPLModule(OPL_MODULE_ID_PADEMU, 0, 4, (char *)&PadEmuSettings);
173+
char args_for_pademu[8];
174+
memcpy(args_for_pademu, &PadEmuSettings, 4);
175+
memcpy(args_for_pademu + 4, &PadMacroSettings, 4);
176+
LoadOPLModule(OPL_MODULE_ID_PADEMU, 0, sizeof(args_for_pademu), args_for_pademu);
174177
}
175178
#endif
176179

0 commit comments

Comments
 (0)