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

Region Detection of Games #12639

Closed
NABN00B opened this issue Feb 23, 2020 · 5 comments
Closed

Region Detection of Games #12639

NABN00B opened this issue Feb 23, 2020 · 5 comments

Comments

@NABN00B
Copy link
Contributor

NABN00B commented Feb 23, 2020

I've collected all information from the discussion between iota97, Abbannon and me at #12637 relevant to region detection of game roms.




Currently the emulator doesn't read the REGION property from PARAM.SFO:

// region = paramSFO.GetValueInt("REGION"); // Always seems to be 32768?

Instead a workaround is used by checking the 3rd letter of DISC_ID as this:
U - USA
E - Europe
J - Japan
A - Asia
H - Hong Kong
K - Korea
If the letter doesn't match any of those the region will be "other" and no region will be written on game info screen (and no flag will be displayed)

switch (regStr[2]) {

There is also commented out code that checks all 4 letters of DISC_ID

if (regStr == "NPEZ" || regStr == "NPEG" || regStr == "ULES" || regStr == "UCES" ||

Abbannon found the following DISC_ID substrings for 5 regions.
US can have: ULUS, UCUS, NPUZ, NPUX, NPUF, NPUH, NPUG
EU can have: ULES, UCES, NPEZ, NPEX, NPEH, NPEG
JP can have: ULJS, ULJM, UCJS, UCJM, UCJB, NPJJ, NPJH, NPJG
KO can have: ULKS, UCKS, NPHH, NPHG
AS can have: ULAS, UCAS, NPHZ
(Not sure if that's all of them, but it's all that he could find.)




However, according to a database the disc ID of some releases do not follow the regional convention. In one case a region has a disc ID of a different region.
kép
In another case disc ID's of the same region belong to different regions.
kép
Based on this information, region can't be obviously determined from disc id.




I've suggested taking a look at UMDGen to see how it determines the REGION of property.
Abbannon had a look:

I didn't notice this before, but among the PARAM.SFO information it explicitly states the region.
NPHH shows up as N/A
Meanwhile,
ULUS shows Ntsc,
ULES shows Pal,
ULJS shows Japan, and
ULKS shows Korea
I have no idea how it determines this based on data, however.
Untitled

@Abbanon
Copy link
Contributor

Abbanon commented Feb 23, 2020

And don't forget, there's the information found in #12469 that could prove beneficial.
(As of this time I've made a recent post there.)

@LunaMoo
Copy link
Collaborator

LunaMoo commented Feb 23, 2020

Region param is not used because it's ALWAYS the same as in the comment in that code, aka it's actually unused by games and it was likely only used for region-lock which was only viable for UMDVideos, we don't care to support anyway(since they're low res/bad and most of it is porn to begin with).

Also some regions doesn't get their own version, but instead are using some other major region that's why in some database you can see it as game released from region X, but it has an ID from region Y, there's no point for us to distinguish the two just to match some online database as they're identical copies anyway.

The "workaround" as you call it IS the proper way of obtaining region as third letter of game ID IS the region, just because some regions aren't getting their own separate copies, it doesn't mean we should work around it by some lenghty code to match some online database.

Edit: also the convention of third letter actually matches regions in Re-Dump database and that's the only site Henrik considered to use for crc check. If some strictly warez databases have other region copies made illegally and they don't follow the convention, it's not our problem to begin with.

@NABN00B
Copy link
Contributor Author

NABN00B commented Feb 23, 2020

That clears up a lot of the confusion. So the way the region was determined had been decided by every application on their own, in which case this label is unreliable to begin with and explains the mismatch between the region and disc id value characters on the databases.

Edit: also the convention of third letter actually matches regions in Re-Dump database and that's the only site Henrik considered to use for crc check. If some strictly warez databases have other region copies made illegally and they don't follow the convention, it's not our problem to begin with.

These database sites were all born with the same purpose at the time. It's easy to see that the redump also relies on data from warez copies. The disc id is on the UMD and not something the dumpers come up with themselves. If you don't trust one catalogue there's no reason you should trust another, which would be a mistake, given that none of them are complete and each of them are missing records of different releases.

@unknownbrackets
Copy link
Collaborator

My perspective is that the region information displayed in PPSSPP and in the reporting UI is the region the game was licensed under. That's how it gets the game ID. It's the closest information we have from the game.

Where it was sold, what language it's actually in, etc. is information we just don't have. Add to this: what about fan translations? If a Japanese-only release is translated to German, what should region show? Is it Europe now?

Even if we were to implement some form of database (#12469), it's inevitable it would be missing some PSP games, so we'll always need a fall back. I think this is better than trying to rely on REGION in PARAM.SFO. Not sure if there are other options? We could remove the information since it's sometimes wrong, but it's still useful to tell releases apart.

-[Unknown]

@NABN00B NABN00B closed this as completed May 17, 2020
@wad11656
Copy link

wad11656 commented Jan 2, 2023

@NABN00B What website did you take those first 2 screenshots on?

I'm looking for a complete list of Game ID's and psxdatacenter.com is missing Asia (HK/Korea), and redump.org can be incomplete

edit: renascene.com

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

No branches or pull requests

5 participants