Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes, February 2019 (II) #198

Merged
merged 3 commits into from
Feb 13, 2019
Merged

Fixes, February 2019 (II) #198

merged 3 commits into from
Feb 13, 2019

Conversation

sp193
Copy link
Contributor

@sp193 sp193 commented Feb 13, 2019

Pull Request checklist

Note: these are not necessarily requirements

  • I reformatted the code with clang-format
  • I checked to make sure my submission worked
  • I am the author of submission or have permission from the original author
  • Requires update of the PS2SDK
  • Requires update of the gsKit
  • Others (please specify below)

Pull Request description

… used. Removed redundant memory free from tcpip_apimsg(). Moved call to sys_mbox_fetch() into tcpip_apimsg(), as every call to tcpip_apimsg() will be followed by a call to sys_mbox_fetch().
@Jay-Jay-OPL
Copy link
Contributor

Jay-Jay-OPL commented Feb 13, 2019

@sp193 -- okay here is my continuation to the report I made on PR #196

I compiled your fork and the branch: fix-feb19-2 -- which should be equivalent to PR #198

Open PS2 Loader 0.9.3+.1346-Beta-2184ece

The problem of not being able to load a PS2 Game via SMB still continues...

But at least with this one, I am able to see the PS2 Logo (a bit distorted -- Click Here to see picture), but then after a few more debug colors after that, it freeze on a light-green debug color.

NOTE: the PS2 LOGO distortion is the white rectangle square at the bottom half of the TEXT. It shouldn't look like that. It should be all white text with black background.

So at this point, let me know if I should update PS2SDK, my last update was: 04c067f

Or if you want me to find the commit that broke this? Let me know, I'm always happy to assist. :)

@ElPatas1 ElPatas1 merged commit df70a87 into ps2homebrew:master Feb 13, 2019
@sp193
Copy link
Contributor Author

sp193 commented Feb 14, 2019

Well, I did test that SMB was working, so this means I cannot replicate the problem anymore...
But you will have to mix and match commits, to get it working.

While updating the PS2SDK will bring you the enhancements that were made, there is no strict need for that here.

The funny thing about the PS2LOGO support was that it never worked on my SCPH-15000. I believe it is related to the fact that PS2LOGO was built with an earlier SDK and earlier specifications (where the buffers tended to be 16-byte aligned instead), which was always a problem for OPL. It does not support such a thing.
Here, it might be because the code for decrypting the PS2 logo was flawed. Compared to the original, this one is run twice.

@Jay-Jay-OPL
Copy link
Contributor

Jay-Jay-OPL commented Feb 14, 2019

Okay, going by this timeline: https://github.com/ifcaro/Open-PS2-Loader/commits/master

Here are my tests:

NOTE: I won't put the OPL build number since the funny thing is that several commits are given the same build numbers, so to avoid confusing anyone, I will just post the commits (from older to newer):

  • commit: 8894994 -- this is the last version that PS2 Logo displays correctly.
  • commit: 6d4af30 -- this is the commit that first breaks PS2 Logo, but SMB still works fine.
  • commit: a8630bb -- this commit is the first to break SMB, it will get stuck on the first debug color: magenta
  • commit: fe2d90c -- this commit is the first that gets passed the magenta debug color, but still shows the PS2 LOGO incorrectly, and eventually will get stuck on a light-green debug color for SMB games. So it never reaches to load the game. It's like this up to this most updated commit: df70a87

What did you mean by mix and match commits to get it working?

PS2LOGO has always worked fine for my SLIM SCPH-77001 -- as long as the game being loaded matches the same region as my console.

Okay, I will try again by updating PS2SDK, at this point, what do I have to lose? I figure you must be using that up-to-date environment to conduct your own tests? Right?

UPDATE:

Updating PS2SDK did not help: ps2dev/ps2sdk@747885c . Still same issues as posted above...

I haven't pushed these new versions at PS2-HOME, but do let me know if you want me to, to see if others can report that they are experiencing the same issue as myself?

Perhaps nobody has reported yet this issue, since not everyone has access to these early bird tests.

Can you also provide me a compiled version with the following modules enabled:

make IGS=1 PADEMU=1

Just for me to verify if it works on my end...

NOTE: even compiling without all those options enabled, the problem still exists.

@sp193 sp193 deleted the fix-feb19-2 branch February 15, 2019 14:39
@sp193
Copy link
Contributor Author

sp193 commented Feb 15, 2019

The range of possible commits is restricted from a8630bb - fe2d90c. A few of them were for correcting defects in the select() function, which is not used for OPL in-game.
So I think there are 3 possibilities:

The real problem behind 0dcf2f1 was poorly-understood. But they knew that there was a problem.

ec4a5ed addresses a design flaw, but it could perhaps cause an undetected transmission failure to become visible. It was always possible for sending to become deadlocked because our memory settings are too restrictive.

So for your experimentation:
Without 0dcf2f1: https://www.sendspace.com/file/com5kg
Without 68d3aa9: https://www.sendspace.com/file/tn6n81
Without ec4a5ed: https://www.sendspace.com/file/lvnu91

BTW, IGS stands for In-Game Screenshot. It's not required for IGR and it's also not complete. Once used, gameplay cannot continue.

Regarding PS2LOGO: I know it worked on newer PS2 models. My point was that it likely always had some problem, with the deciding factor being whether the 2nd reading phase begun with the right byte or not. For the logo to be unscrambled properly, both passes must have the same byte at position 0, which must represent a black pixel.
The de-scrambling exploited the characteristic that a logical XOR with a black pixel resulted in the original value used for scrambling being recorded. Most of the PS2 logo is black, which includes the upper left-hand corner (0,0).

@Jay-Jay-OPL
Copy link
Contributor

Jay-Jay-OPL commented Feb 15, 2019

Okay, here are the results to those three experimental version:

  • Without 0dcf2f1 : - distorted PS2 LOGO / freezes after light-green debug color = SMB (BROKEN)
  • Without 68d3aa9 : - distorted PS2 LOGO / freezes after light-green debug color = SMB (BROKEN)
  • Without ec4a5ed : - does not load, black screen after I attempt to launch this OPL ELF from mass (MD5: f7b2013ee880b9656c375fd445279077)

The last one above, I could not run / test. Can you check if your MD5 checksum on your side also matches with the one I provide above? Or runs on your setup? Perhaps a bad compile or a bad transfer to sendspace.com?

Standing by in case you want to provide more test versions.

UPDATE:

Forgot to mention something.

In OPL Network Config, I am using both DHCP and NetBIOS to establish the connection. You said you didn't experience this problem via SMB. Could you tell me what you are using? Perhaps the issue could be there??

@sp193
Copy link
Contributor Author

sp193 commented Feb 16, 2019

It appears that ps2-packer has some problem with generating a working file. Anyway, ec4a5ed only affected UDP, so it could not have made a difference.

Instead, I think a8630bb did not cover all calls to sys_mbox_post() that involve conn->mbox. It could be getting stuck, once the message box becomes full, since nothing is receiving the messages anymore.

I have also attempted to correct the PS2 logo unscrambling code.

Please try this file: https://www.sendspace.com/file/1t3urf

DHCP & the NetBIOS Name Service (NBNS) are only used for obtaining IP addresses. Once you get the address (for the PS2 and the SMB server's), there is no difference.

@Jay-Jay-OPL
Copy link
Contributor

Okay, it seems we are out of the woods (for now)...

This test version successfully loads a PS2 Game via SMB without a problem and also the PS2 LOGO now displays correctly. :-)

I'll be on standby in case you still want me to test something else.

@sp193
Copy link
Contributor Author

sp193 commented Feb 17, 2019

I see. Thanks for your help.

AKuHAK pushed a commit that referenced this pull request Sep 30, 2021
citronalco pushed a commit to citronalco/OPL-Daily-Builds that referenced this pull request Sep 10, 2023
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants