Skip to content

NpScore#4140

Open
mikusp wants to merge 3 commits intoshadps4-emu:mainfrom
mikusp:score
Open

NpScore#4140
mikusp wants to merge 3 commits intoshadps4-emu:mainfrom
mikusp:score

Conversation

@mikusp
Copy link
Copy Markdown
Contributor

@mikusp mikusp commented Mar 17, 2026

Functions that puyo used in my testing are implemented. The general idea is to access the scoring server over HTTP, and as with matching, the server is in the works.

@mikusp mikusp force-pushed the score branch 3 times, most recently from 34d2eb0 to 5eb71fc Compare March 18, 2026 21:07
@mikusp mikusp marked this pull request as ready for review March 18, 2026 21:21
Copy link
Copy Markdown
Collaborator

@StevenMiller123 StevenMiller123 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A couple important issues here, I also see a distinct lack of proper "isPSNSignedIn" checks too.

OrbisNpScoreGameInfo* gameInfos, u64 gameInfosBytes, u64 ranksLen,
Rtc::OrbisRtcTick* lastUpdate, OrbisNpScoreRankNumber* totalRecords, void* option) {
// at least in 9.00 it's identical A vs non-A
return sceNpScoreGetRankingByRangeAsync(reqId, scoreBoardId, startRank, ranks, ranksBytes,
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Usually these "A" variants have different inputs. Given the inputs to this function, I believe you should double check to see if sceNpScoreGetRankingByRangeAsync uses the same OrbisNpScoreRankDataA input for ranks. I doubt it does.

static_assert(sizeof(OrbisNpScorePlayerRankDataA) == 0x98);

struct OrbisNpScoreRankData {
OrbisNpOnlineId onlineId;
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Based on the information I have, this struct uses an OrbisNpId, not OrbisNpOnlineId.

@StevenMiller123
Copy link
Copy Markdown
Collaborator

I've probably got more that uses this library, but here are logs from two easy to check titles. Puyo Puyo Tetris and WE ARE DOOMED log a couple stubs.

CUSA06509.log
CUSA01783.log

return PackReqId(libCtxId, req);
}

int PS4_SYSV_ABI sceNpScoreCreateTitleCtx() {
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Based on decomp, this should be
int PS4_SYSV_ABI sceNpScoreCreateTitleCtx(OrbisNpCommunicationId* np_comm_id, OrbisNpCommunicationPassphrase* np_comm_pass, OrbisNpId* np_id)

Should be relatively easy to handle if you want?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't really see a point if that function is never being called in retail games 🤔

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I mean, there's no reason not to 😄

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.

2 participants