Post Reply 
 
Thread Rating:
  • 1 Votes - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[Bug(?)] Phantasy Star Portable 2 and the Port Offset Conundrum
10-24-2016, 07:26 AM (This post was last modified: 10-24-2016 08:32 AM by AdamN.)
Post: #14
RE: [Bug(?)] Phantasy Star Portable 2 and the Port Offset Conundrum
Okay, i managed to fix the issue with PSP2 when PortOffset is non-zero (and probably other games with similar issue), and yes it was because of Port 0 was offseted in PtpOpen function Big Grin

Here is the windows build (based on my old adhocstuff refork, since i need to be able to run multiple instance in a single PC for testing)
Win32 build: https://www.dropbox.com/s/iowb4kr00nzbs7...s.zip?dl=0
Win64 build: https://www.dropbox.com/s/dujdrcnec3nryr...4.zip?dl=0

Here is the fix (i forgot how to use github, silly me Big Grin )
   
You'll need to add that line 1647 in screenshot
Code:
if (sport == 0) sport = -(int)portOffset; //making sure sport is 0 when shifted


(10-22-2016 08:32 AM)Wishdream Wrote:  
(10-20-2016 12:20 PM)AdamN Wrote:  It's not replacing it entirely, binded/listened ports is being shifted by 3000 correctly, while sockets who connection gets established to binded port will get a random port which is normal for client socket.
But i think i can see the issue, its the one with port 3000 i think, or may be not Big Grin

I guess port 0 shouldn't be shifted and remain 0 so the system will assign any available port randomly (port 0 usually used for client socket anyway, and not being used to bind/listen)

Btw, do you have a working windows build? the one on the latest nightly build at orphis doesn't seem to work with PSP2

PS: the "un-readable bits" in function parameters usually MAC address bytes shown as byte string instead of hex string Big Grin

Now that you mentioned it, yeah port 0 should remain port 0 to assign a random port.

Well, that's pretty clever to show the MAC address as a byte string. Kind of a way to obscufate the MAC address. Anyways, I got a working copy of the latest nightly build at orphis recently that works with PSP2.
no intention to obscufate the MAC address, i'm just being lazy, that's all Big Grin it's not even a real MAC address (generated randomly)
Anyway it should be replaced with an easy-to-see MAC address just like shown by AdhocServer Smile

My Modified PPSSPP :
==============
Win32&64: https://www.dropbox.com/s/2t3mtdhb0f045cn/PPSSPP_1.11-testbuild_Win32x64.zip?dl=0
Android(ARMv7): https://www.dropbox.com/s/b41bm43mtn1gpnn/PPSSPP_1.11-testbuild_ARMv7.apk?dl=0
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: [Bug(?)] Phantasy Star Portable 2 and the Port Offset Conundrum - AdamN - 10-24-2016 07:26 AM

Forum Jump: