PS2 mini-OPL v1.0

You cannot use it just like that. :P Cut the ELF header and sign it using kelftool GUI made by @alexparrado.HDD OSD/PSBBN/DESR will not boots ELF, only XLF (KELF).
 
I forgot argv[0] needs to be path to file anyway and tried to use it for something else so the args are all off for that OPL and the launcher itself so that one won't work.. I think it's doable but it's a lot of f*kn around just to test, I'll see what happens time wise if I cbf
 
This is from the readme of AKuHAK's hdl_dump.

modify_header

Code:
hdl_dump.exe modify_header 192.168.0.10 PP.TEST

This command will inject header attributes in any already existing partition.
It can operate such files:
system.cnf
icon.sys
list.ico
del.ico
boot.kelf
boot.elf
boot.kirx
Any file can be skipped. Program first of all tries to inject boot.kelf.
If it is not found it will try to inject boot.elf.

Now icon.sys can be in any of 2 formats: Memory Card format or HDD format.

del.ico injection address: 0x041000
If del.ico is used list.ico maximum size 260 096bytes.
boot.elf (or boot.kelf) injection address - 0x111000
boot.elf size limit - 2 026 464 bytes (thanks to kHn)
boot.kelf size limit - 3 076 096 bytes (if boot.kirx not used)
boot.kelf size limit - 2 031 616 bytes (if boot.kirx is used)
boot.kirx injection address - 0x301000
boot.kirx size limit - 1 044 480 bytes

I have been using this for years now to inject mini-OPL/diskload to games and it works.
 
Procedure of injecting is ok, but file is not ok. It must be physically XLF, not ELF. How You name it, doesn't matter (matter only for HDL Dump because he seeking specified filenames).

BTW: You can also injecting files into APA on PS2 using uLE ISR HDD.
 
yea the launcher is just an uncompressed elf, I figured anyone willing to test would already be familiar with converting to kelf.. or is miniOPL already distributed as kelf? I've never used it.. currently still won't work though cause I needa fix the args
 
Ok I've made significant changes to both the launcher and the opl version.. the launcher will check hdd0:__common/OPL/conf_hdd.cfg to read the OPL partition and boot OPL from there it defaults to +OPL if it fails to get opl partition info eg hdd0:+OPL/OPNPS2LD.ELF..

Again though the launcher I'm uploading is an uncompressed elf (perhaps @krHACKen would be so kind once more to convert?).

I'm much more confident with the OPL side code than I am with the launcher itself as its just a modified version of miniOPL (credit to sp193 & l_oliveira) which instead of launching the game just collects info and sends it as args to a modified version of OPL. While I understand the injected file must be XLF, does that mean the same for the version of OPL? or will it be fine since the launcher uses an ELF loader to then boot it? I do not know I've never messed with APA or HDDOSD before.

Here are the changes made to OPL & Here is the launcher.. if we can get it working, I would move the launcher to ps2homebrew projects and open a PR for mainstream OPL so it could be better maintained and perhaps, partly rewritten :P
 

Attachments

While I understand the injected file must be XLF, does that mean the same for the version of OPL?
Only executable written in APA space or point by system.cnf in APA to PFS must be signed elf (because this is how HDD OSD launching executables). The rest depend of programmers will.

PS: Why You attaching not only OPL-Launcher but also "OPNPS2LD.ELF"? This is standard OPL or just some special build of OPL-Mini? If OPL-Mini, then why we need it? Isn't OPL-Launcher is the launched application from "PP." APAs, which launching standard full OPL which automatically read games config and launching game? Or that's impossible and we need OPL-Mini? If so, then IMO it's name is confusing with standard OPL (as normal builds are named "OPNPS2LD.ELF") and should be named differently like i.e just "OPL-Mini.elf".
 
Last edited:
@Berion I think it is exactly that.
  • Launcher for the header, signed by kHn above.
  • "special" OPL which can understand and act upon the "arguments" passed from the Launcher.
Yea that's right, idea being that all (future) versions of OPL could be used for booting games direct from HDDOSD that way we don't have the problem of miniOPL needing to be updated and also being able to use pademu, gsm, cheats, vmc etc etc.

Thank you krHACKen.
 
Yea that's right, idea being that all (future) versions of OPL could be used for booting games direct from HDDOSD that way we don't have the problem of miniOPL needing to be updated and also being able to use pademu, gsm, cheats, vmc etc etc.

Thank you krHACKen.
Yes, I mentioned exactly that in the beginning of the thread @Krah! :D

That's actually a good idea, BUT also requires that a partition is mendatory where OPL could be stored.

So... If OPL could support starting a game via arguments, a Loader for OPL could "simply" retrieve the partition/path it was loaded/started from and could execute OPL with the path passed as arg.

Pro:
  • OPL could be updated very simply (only 1 file) and it wouldn't need to update every partition-info. Additionally this replacement is done on a filesystem-level, which might be "safer".
  • OPL could use the normal settings (modes, GSM, PADEMU, VMCs, etc.) for the game, if it knows which one it is.
  • Loader-Payload could be quite small and simple and hence be used in multiple "limited Payload size"-scenarios.
  • etc.
Con:
  • Mendatory partition, but some partitions are USUALLY set up anyway. Simplest solution is +OPL or a system-partition.
  • etc.?
 
Doesn't work for me.

What I did:
1. Installed Ico game into "hdd0:/PP.SCUS-97113.HDL.Ico".
2. Using HDL Dump, injected XLF into APA of this partition:
Code:
"HDL Dump (mod by AKuHAK) v0.9.2 Rev47.exe" modify_header hdd1: "PP.SCUS-97113.HDL.Ico"
BTW: This address is not proper (+0x111000) but XLF fits into it and is pointed there from "jump address" so in theory should works anyway.
3. I have put on "hdd0:/__common/conf_hdd.cfg" with:
Code:
hdd_partition=__common
4. In addition I've put: "hdd0:/__common/OPL/OPNPS2LD.ELF" which is special build attached in in earlier post.
5. I goes to HDD OSD and tried to launch Ico and it back to storage browser...


@Fanhais Above You have step by step guide and in attachment files example to inject into APA ("boot.kelf" is OPL-Launcher R2 of course).

"hdd0:/PP.OPL" was for R1. Revision 2 should works from path found in "hdd0:/__common/OPL/conf_hdd.cfg". At least, this is how I understood @Krah comment.
 

Attachments

@Berion
Well that's disappointing, your setup looks correct as far as OPL location.. since the game is already installed would you mind replacing the "special" OPL with a normal build.. that way if there is something wrong with the arg parsing it'll just boot to OPL GUI but if it's the launcher it'll not even show logo and just goto browser.. my moneys on the launcher.

Since miniOPL would've been compiled with an older sdk I'll move back to ps2dev v1.0 and try use an embedded elf loader rather than the elf-loader library from sdk.. I know newlib can have issues with fileXio so perhaps compiling the launcher with ps2dev:latest isn't helping.. I'll PM you with r3 when I can.
 

Similar threads

Back
Top