Closed Jamiras closed 4 months ago
This will accept some files that PPSSPP will not, such as EBOOTs with PSX isos inside (which then won't run anyway, so maybe it doesn't matter). Otherwise looks good, maybe it's fine as-is really.
Is there some way to identify those sort of EBOOTs so we could exclude them from generating a hash? We already indirectly exclude UMD video discs because they don't have a PSP_GAME
folder, where we expect to find the EBOOT.BIN
.
Even if we don't explicitly exclude them from hashing, if the hash isn't registered on the server, it won't load achievements. And we have some policies around creating sets for the same game on alternate systems.
Had to go look at our somewhat messy identification code for the details :) link 1 link 2
After first checking that the first four bytes are "\x00PBP", then read four bytes at offset 0x24 to get the offset of the internal archive, then read 4 bytes at that offset to get a magic number to look at.
This can be "NPUM" which means an embedded UMD (this is a game demo, most likely), or "PSIS" which means it's a PSX ISO. Otherwise, go ahead and hash.
For an extra check can also look at the PARAM.SFO file embedded in the PBP (which has a simple structure), if it's "CATEGORY" field is "ME", it's a PSX ISO.
Up to you whether this is all worth checking!
This can be "NPUM" which means an embedded UMD (this is a game demo, most likely), or "PSIS" which means it's a PSX ISO. Otherwise, go ahead and hash.
Just wanted to quickly mention that there's a usecase for wanting to hash PSP game demos as well; there's some that have exclusive content not present in the full game they're a demo of e.g. the Locoroco Halloween and Christmas demos, so I'd recommend not excluding them from hashing.
For an extra check can also look at the PARAM.SFO file embedded in the PBP (which has a simple structure), if it's "CATEGORY" field is "ME", it's a PSX ISO.
Somewhat related, some people have expressed desire to be able to hash PSP PSX releases and link them to their respective PS1 entries and be able get achievements for them that way. I can see this making some sense (and there's some precedence with stuff like virtual console releases of games for Nintendo consoles getting linked), and while I'm not sure about it, there is always the possibility of a PSX rerelease having some exclusive and/or otherwise unavailable content. Might be worth considering as well.
Up to you whether this is all worth checking!
For now, I'm going to just let them hash and assume the hash won't resolve to a game on the server.
closes #244