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

Notes #3

Open
citronalco opened this issue Sep 25, 2023 · 24 comments
Open

Notes #3

citronalco opened this issue Sep 25, 2023 · 24 comments

Comments

@citronalco
Copy link
Owner

citronalco commented Sep 25, 2023

Compiles with gkbmdz/ps2dev:latest, which is ps2sdk from 2021-10-16 (ps2sdk:v1.3.0 is from 2021-06-18), until including:

commit 26be1af9657d691a0dcbbbf4ba285eb231a53c76
Author: Maximus32 <[email protected]>
Date:   Mon Jun 6 21:49:01 2022 +0200

    Dynamically check fakemodule list, fixes PADEMU on SMB/HDD with some games

Jay-Jay's last commit is aa531a8

TODO: Test ELM. If it works: Switch to a slightly newer ps2sdk, try again, if it still works: Move forward!
DONE! Result: Yes, works, including ELM/popstarter. In PCSX2 and on real hardware. Branch: "smaller-steps", Commit cf7215d

Next commit would be 49e383c ("Fix: rename __NR__Exit to __NR_KExit"), which works around a syscall renaming in ps2sdk in 2022/05/31 (ps2dev/ps2sdk@00a4a9a) - means I have to either skip that patch, or move to a newer toolchain.

When skipping this patch and (reverting this commit) and merging all commits until end of 2022 (see branch smaller-steps-2), building fails with
make[1]: Entering directory '/project'

In file included from src/supportbase.c:8:
./modules/iopcore/common/cdvd_config.h:82:5: error: unknown type name ‘bd_fragment_t’
   82 |     bd_fragment_t frags[BDM_MAX_FRAGS];
      |     ^~~~~~~~~~~~~
make[1]: *** [Makefile:744: obj/supportbase.o] Error 1
make[1]: Leaving directory '/project'
make: *** [Makefile:218: all] Error 2

This was introduced in 8f04d00 at 2022-06-15.

TODO: Try building with a newer ps2sdk and try again
DONE!:

  • ps2sdk "redsonbr/ps2dev:latest" (2023-03-23)
  • apk add make git python3 py3-yaml bash
  • required additional commits to get it building:
  • Applied changes from a98ee6b also at elfldr's Makefile and elfldr.c
    -> Works, including ELM/popstarter - but only in pcsx2, not on real hardware! (Branch: smaller-steps-redsonbr)

** TODO:** Apply more commits and try again
DONE!:

  • ps2sdk "redsonbr/ps2dev:latest" (2023-03-23)
  • apk add make git python3 py3-yaml bash
  • Applied all commits until end of 2022
    -> Works, including ELM/popstarter - but only in pcsx2, not on real hardware! (Branch: end-of-2022)

** TODO:** Apply more commits and try again
DONE!:

  • ps2sdk "redsonbr/ps2dev:latest" (2023-03-23)
  • apk add make git python3 py3-yaml bash
  • Applied all commits until 2023-03-31
    -> OPL hangs on start with blinking network activity icon, probably while populating ETH games list (Branch: 2023-03-31)

** TODO:** Ignore last failure, but apply more commits and try again
DONE!:

  • ps2sdk "redsonbr/ps2dev:latest" (2023-03-23)
  • apk add make git python3 py3-yaml bash
  • Applied all commits until 2023-08-19
    -> Works, including ELM/popstarter! (Branch: 2023-08-19)

** TODO:** ps2homebrew switched from ps2dev/ps2dev:latest to ghcr.io/ps2homebrew/ps2homebrew:main (c276b43). Try with that!
DONE!: Works, including ELM/popstarter! (Branch: 2023-08-19)

TODO:

  • Check "About" screen (and add myself)
  • Change CI to use ghcr.io/ps2homebrew/ps2homebrew:main
  • elfldr Makefile: "-G8192" or "-G0"? -> both works on pcsx2, so stick with "-G8129"
  • Test on PS2 -> failed!
  • Clean up commits -> done
  • Overwrite master branch -> done
  • Update PR at Jay-jay

** TODO**: ??? Clueless... ????


Here's another commit that looks helpful for elfldr: fb847e6

@citronalco
Copy link
Owner Author

citronalco commented Nov 2, 2023

ps2sdk docker images:

  • ps2sdk:v1.3.0 (2021-06-18)
  • gkbmdz/ps2dev:latest (2021-10-16)
  • fjtrujy/ps2dev:latest (2022-06-22)
  • zie87/ps2dev:latest (2022-11-09)
  • redsonbr/ps2dev:latest (2023-03-23)
  • ghcr.io/ps2homebrew/ps2homebrew:main (current)

Last three build current master of my opl-db, but none works on ps2 hardware. Neither with -G0 not with -G8129

@10522
Copy link

10522 commented Nov 6, 2023

@citronalco, i found that @Jay-Jay-OPL wrote about OPL DB 2202:

these OPL versions were compiled via GIT's Workflow feature with the changes made to PS2SDK DEV Development up to date: 2021-11-14.

Also maybe these forks (1, 2, 3) will help you. And also check the SDK folder in PS2 AIO Project, you can find a lot of useful stuff there.

@citronalco
Copy link
Owner Author

citronalco commented Nov 16, 2023

With "smaller-steps" branch (includes commits until 2022-06-06), POPS gets started on a real PS2 when compiled with:

  • gkbmdz/ps2dev:latest (2021-10-16): YES (branch "smaller-steps") -> TODO: Test again, to be 100% sure
  • fjtrujy/ps2dev:latest (2022-06-22): NO (branch "smaller-steps-fjtrujy")
  • ghcr.io/ps2homebrew/ps2homebrew:main (current): NO (branch "smaller-steps-ps2homebrew")

Quickly scrolling through ps2sdk's commits between 2021-10-16 and 2022-06-06, there's no commit that obviously could do any harm here.

@10522
Copy link

10522 commented Jan 21, 2024

@citronalco, here (elfldr.zip) and here there is information about how POPS was added to PS2NETBOX (a fork of OPL with closed source code). Also in POPSLoader there is code for launching VCD files using a single POPSTARTER.ELF file. You can also contact crt0, who merged OPL with neutrino. Maybe he can help you or for example he can add POPS to OPLNEUTRINO. Also I found that @Jay-Jay-OPL wrote about OPL DB 2158:

this OPL version was compiled with the changes made to:
gsKit a44b884
newlib 415fdd4
ps2-packer 02c99f3
ps2client 211df54
ps2dev 08eb341
ps2eth 791126f
ps2link 86e1d8c
PS2SDK e4f6dfb
ps2sdk-ports 9565ff9
ps2toolchain 69c557e
ps2toolchain-dvp 1b0054c
ps2toolchain-ee a1d264b
ps2toolchain-iop d82437e

@citronalco
Copy link
Owner Author

citronalco commented Jan 24, 2024

@10522 Thanks a lot, that could be helpful indeed!
I'm going to look into those projects.

@10522
Copy link

10522 commented Mar 22, 2024

@citronalco, in this OPL fork an additional BDM page has been added, you might find this useful. Also take a look at this OPL fork and check this and this information. By the way, here someone is trying to merge the official OPL with the OPL DB.

@10522
Copy link

10522 commented Jun 10, 2024

@citronalco, maybe this, this or this information may be useful to you.

@citronalco
Copy link
Owner Author

citronalco commented Jun 10, 2024

Compilation is no problem: It builds without issues, even on current ps2sdk (though I haven't tried for a while).
The problem is: The resulting binary only works in PCSX2, but not on my PS2 slim.

@10522
Copy link

10522 commented Aug 4, 2024

@citronalco, maybe this, this, this or this (real hardware fix) information may be useful to you.

@citronalco
Copy link
Owner Author

@10522 I give up.

Current state is:

  • All changes from official OPL up to last week are merged
  • It compiles with latest ps2sdk
  • It does neither work in pcsx2 nor on a real PS2. I do not know why.

If you want to give it a try: Easiest way to compile is either here with Github Actions (only last step, publishing the release, fails for obvious reasons: I do not have permissions to publish that as official OPL release), or to use docker:

  1. check out the repo to i.e. /path/to/OPL-Daily-Builds
  2. docker run -it -w /path/to/OPL-Daily-Builds -v /path/to/OPL-Daily-Builds:/project -u $(id -u):$(id -g) ghcr.io/ps2homebrew/ps2homebrew:main sh
  3. cd /project; make clean; make

@10522
Copy link

10522 commented Aug 19, 2024

@citronalco

Maybe the issue is that a lot of things have been changed in OPL DB, but we just need to add PS1 page or replace APPS page. Please try making a fork of the official OPL with these changes. You can add some code from OPL DB and if the fork breaks, it will be immediately clear which code affects it. You might also find this and this new PR helpful, as well as this updated OPL DB theme.

By the way, in this post you wrote that you already had a fully working OPL DB, so you can try adding one commit to it at a time to understand on which commit it broke.

Also, after I read this, I had thoughts that maybe something was specifically added to OPL or PS2SDK to make it harder for @Jay-Jay-OPL to update the OPL DB.

By the way, maybe @YAGAMI55 can help with this, since he recently wrote about your fork on the Russian PS2 scene.

@citronalco
Copy link
Owner Author

citronalco commented Aug 19, 2024

You can't add one commit after the other. I tried that. OPL and ps2sdk evolved in parallel, so every few commits in OPL you have to update ps2sdk. But you can't compile ps2sdk in the state of i.e. 2023-11-17. The best you can do is trying to find some forgotten old docker images, that may or may not be built correctly.

OPL-DB basically adds an extra page to OPL, and adds a patched elfldr that is able to run popstarter in a proper/convenient way. Eventually elfldr got integrated into ps2sdk, but without the patches.
I believe the best way to get all this working is to add OPL-DB's elfldr modifications into ps2sdk. But that is way over my knowledge.

I asked for help in some forums, but as soon as I mentioned OPL-DB, people got angry. Some things must have gone very bad in the past. Naming the thing confusingly "OPL Daily Builds" was probably not helpful, too. "OPL-POP" for example would have been much clearer and less confrontational.

If someone else wants to give it a try, be sure to also fork this repo: https://github.com/citronalco/OPL-Daily-Builds-lang
This is required for building OPL-DB, and contains the updated language files. This is where Jay-Jay gave up, but was not that complicated with some bash scripting.

I will continue to use an old OPL-DB build for now. It works quite well for me. If somewhere in the future OPL allows me to have my PS1 games on a separate page and lets me run them conveniently over SMB, just like OPL-DB is doing, I'm going to update for sure.

I'm going to set this and the "lang" repo to "archived" in some days. Further comments won't be possible then.

@10522
Copy link

10522 commented Aug 20, 2024

With "smaller-steps" branch (includes commits until 2022-06-06), POPS gets started on a real PS2 when compiled with:
gkbmdz/ps2dev:latest (2021-10-16): YES (branch "smaller-steps") -> TODO: Test again, to be 100% sure

Then can you please compile this fully working version or the original OPL DB 2203 with this fix and make it save the config files to the OPL DB folder and not to the OPL folder. Alternatively, instead of renaming the folder, you can change the names of the config files so that there is no conflict with the official OPL. It would be great if you posted this version in Releases, but you can do it here.

Also, maybe you shouldn't close this PR and repositories, as then more people will be able to learn and continue your work. I have seen this link posted many times on the Internet and Pull requests 1 attracts attention much better.

By the way, I found a commit named Remove embedded ELF loader but it looks like it wasn't included in the official OPL.

Also, I will mention some people who can probably help:

@YAGAMI55 @TnA-Plastic @KrahJohlito @JoseAaronLopezGarcia @CosmicScale @tihmstar @Wolf3s @grimdoomer @AppCakeLtd @projectZEUS01010101 @danielb7390 @Haaroon @DDinghoya @lusk352 @SkullDeath @RickyL1213
@PaPer-DJ @leileiwe @JGH-GOU @jakubn551 @einsteinx2 @Druidblack @cmm129 @4gordi @ProjectZEUS010101

@Wolf3s
Copy link

Wolf3s commented Aug 20, 2024

You can't add one commit after the other. I tried that. OPL and ps2sdk evolved in parallel, so every few commits in OPL you have to update ps2sdk. But you can't compile ps2sdk in the state of i.e. 2023-11-17. The best you can do is trying to find some forgotten old docker images, that may or may not be built correctly.

OPL-DB basically adds an extra page to OPL, and adds a patched elfldr that is able to run popstarter in a proper/convenient way. Eventually elfldr got integrated into ps2sdk, but without the patches. I believe the best way to get all this working is to add OPL-DB's elfldr modifications into ps2sdk. But that is way over my knowledge.

I asked for help in some forums, but as soon as I mentioned OPL-DB, people got angry. Some things must have gone very bad in the past. Naming the thing confusingly "OPL Daily Builds" was probably not helpful, too. "OPL-POP" for example would have been much clearer and less confrontational.

If someone else wants to give it a try, be sure to also fork this repo: https://github.com/citronalco/OPL-Daily-Builds-lang This is required for building OPL-DB, and contains the updated language files. This is where Jay-Jay gave up, but was not that complicated with some bash scripting.

I will continue to use an old OPL-DB build for now. It works quite well for me. If somewhere in the future OPL allows me to have my PS1 games on a separate page and lets me run them conveniently over SMB, just like OPL-DB is doing, I'm going to update for sure.

I'm going to set this and the "lang" repo to "archived" in some days. Further comments won't be possible then.

OPL-DB Caused many troble for our comunity due to popstarter private code... You could try to do a opl that integrantes the ps1 games pages but with the offiicial method by the real ps2devs instead of ressurceting this...

@danielb7390
Copy link

danielb7390 commented Aug 20, 2024

Hi,
Sorry, I'm not going to come back to this, even tho i "lost" hours of my life getting it to work and always thought it was a very cool solution to run everything from one place. But that battle was lost. Gotta move on.

@CosmicScale
Copy link

CosmicScale commented Aug 20, 2024

There's a much easier solution. Why don't you just automate OPL's current implementation?

  1. Create a fork of the latest OPL
  2. Create a PS1 page that lists all '.VCD' files on HDD, USB and SMB
  3. When a PS1 game is selected 'popstarter.elf' is automatically renamed to match the '.VCD' and the elf file is then launched

The logic to find 'popstarter.elf' would be something like this:
Search hdd:/__common/POPS/ for .elf file that's not POPS.ELF, if found rename
else search mass:/POPS/ for *.elf file, if found rename

@Wolf3s
Copy link

Wolf3s commented Aug 20, 2024

There's a much easier solution. Why don't you just automate OPL's current implementation?

  1. Create a fork of the latest OPL
  2. Create a PS1 page that lists all '.VCD' files on HDD, USB and SMB
  3. When a PS1 game is selected 'popstarter.elf' is automatically renamed to match the '.VCD' and the elf file is then launched

The logic to find 'popstarter.elf' would be something like this: Search hdd:/__common/POPS/ for .elf file that's not POPS.ELF, if found rename else search mass:/POPS/ for *.elf file, if found rename

Why not use this POPS.ELF on the pops folder and use ps1 games in the cd folder? I think it's better since ps1 games are CD.

@citronalco
Copy link
Owner Author

citronalco commented Aug 20, 2024

There's a much easier solution. Why don't you just automate OPL's current implementation?

1. Create a fork of the latest OPL

2. Create a PS1 page that lists all '.VCD' files on HDD, USB and SMB

3. When a PS1 game is selected 'popstarter.elf' is automatically renamed to match the '.VCD' and the elf file is then launched

The logic to find 'popstarter.elf' would be something like this: Search hdd:/__common/POPS/ for .elf file that's not POPS.ELF, if found rename else search mass:/POPS/ for *.elf file, if found rename

If you look at the code, you will see that OPL-DB is exactly what you describe.
Step 3 is done with the patched elfldr. Instead of renaming popstarter.elf on mc/hdd/smb, this is done in mem.

@Wolf3s
Copy link

Wolf3s commented Aug 20, 2024

There's a much easier solution. Why don't you just automate OPL's current implementation?

1. Create a fork of the latest OPL

2. Create a PS1 page that lists all '.VCD' files on HDD, USB and SMB

3. When a PS1 game is selected 'popstarter.elf' is automatically renamed to match the '.VCD' and the elf file is then launched

The logic to find 'popstarter.elf' would be something like this: Search hdd:/__common/POPS/ for .elf file that's not POPS.ELF, if found rename else search mass:/POPS/ for *.elf file, if found rename

If you look at the code, you will see that OPL-DB is exactly what you describe. Step 3 is done with the patched elfldr. Instead of renaming popstarter.elf on mc/hdd/smb, this is done in mem.

I mean to use pops as a core to all games as a external plugin/loader instead of renaming...

@Wolf3s
Copy link

Wolf3s commented Aug 20, 2024

Hi, Sorry, I'm not going to come back to this, even tho i "lost" hours of my life getting it to work and always thought it was a very cool solution to run everything from one place. But that battle was lost. Gotta move on.

Days more exactly, days that the project could go in a good way.

@CosmicScale
Copy link

There's a much easier solution. Why don't you just automate OPL's current implementation?

1. Create a fork of the latest OPL

2. Create a PS1 page that lists all '.VCD' files on HDD, USB and SMB

3. When a PS1 game is selected 'popstarter.elf' is automatically renamed to match the '.VCD' and the elf file is then launched

The logic to find 'popstarter.elf' would be something like this: Search hdd:/__common/POPS/ for .elf file that's not POPS.ELF, if found rename else search mass:/POPS/ for *.elf file, if found rename

If you look at the code, you will see that OPL-DB is exactly what you describe. Step 3 is done with the patched elfldr. Instead of renaming popstarter.elf on mc/hdd/smb, this is done in mem.

Isn't the problem that the patched elfldr is not working on the modern PS2SDK? Simply renaming the file would be a quick and easy solution and practically indistinguishable to the end user. Instead of trying to resurrect OPL-DB it would be far easier to add a new implementation for launching popstarter to the latest OPL build.

@pedrowarlock
Copy link

pedrowarlock commented Aug 20, 2024

the official opl has gone through several years of updates, you will suffer resurrecting the opl db of the official version, besides that the developer of the official opl will be whining again threatening to end the project just because he doesn't put the damn ps1 tab, do you want me to add the ps1 tab? Just help me compile the official version

@10522
Copy link

10522 commented Aug 21, 2024

Just help me compile the official version

Probably @CosmicScale can help with this as he recently made his own fork of the official OPL.

Simply renaming the file would be a quick and easy solution and practically indistinguishable to the end user

Do you mean that there is a way with renaming and using only one POPSTARTER.ELF file? Can you please help with this? It's just that in the recently released RETROLauncher the POPSTARTER.ELF file is renamed and copied to the POPS folder on the USB. This creates an infinite number of copies of the POPSTARTER.ELF file and it doesn't make any sense. Only uLE_kHn, POPSLoader and OPL DB can launch VCD files using only one POPSTARTER.ELF file. Moreover, only OPL DB can do this via SMB and therefore it still does not have any analogue.

By the way, I forgot to mention @SvenGDK in the previous post.

@CosmicScale
Copy link

Just help me compile the official version

Probably @CosmicScale can help with this as he recently made his own fork of the official OPL.

You don't need help with that. It's very straightforward. Install the Development build of PS2DEV.

Then clone the OPL repository and build

git clone https://github.com/ps2homebrew/Open-PS2-Loader.git
cd Open-PS2-Loader
make

Do you mean that there is a way with renaming and using only one POPSTARTER.ELF file? Can you please help with this? It's just that in the recently released RETROLauncher the POPSTARTER.ELF file is renamed and copied to the POPS folder on the USB. This creates an infinite number of copies of the POPSTARTER.ELF file and it doesn't make any sense.

That's a very convoluted way of doing it. POPSTARTER.ELF doesn't care where it's located, only what it's named. It would be really easy to rename the same 'elf' file again and again so only one file is needed. Like I said before:

The logic to find 'popstarter.elf' would be something like this: Search 'hdd:/__common/POPS/' for '.elf' file that's not 'POPS.ELF', if found rename else search 'mass:/POPS/' for '*.elf' file, if found rename

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants