RePod / psdle

Improving everyone's favorite online download list, one loop at a time.
https://repod.github.io/psdle
MIT License
194 stars 14 forks source link

Certain Vita and PS3 titles show as PSP. #28

Closed XFoxPrower closed 4 years ago

XFoxPrower commented 8 years ago

Browser: Firefox 44.0.2 and Chrome 48.0.2564.116 m Method: Userscript and Direct Online store version and language: Desktop, en-us Userscript version: 2.063 Monkey variant: Greasemonkey Problem: Certain titles are incorrectly listed as PSP. Examples: "Unit 13" (Vita), "Dante's Inferno™ Trials of St. Lucia" (PS3 DLC. The other DLCs show up as PS3). Could be related to Issue 11?

RePod commented 8 years ago

Is Catalog disabled? It's enabled by default on startup. I'm looking at a generated fake list with Catalog enabled using Trials of St. Lucia as a test and it's being marked as PS3.

Also, after running the direct method please run repod.psdle.debug.entitlement("stlucia") in the browser console (Firefox: Ctrl+Shift+K, Chrome: Ctrl+Shift+J) and paste the output here.

XFoxPrower commented 8 years ago

undefined

RePod commented 8 years ago

What about repod.psdle.debug.entitlement("unit13")?

XFoxPrower commented 8 years ago

Also undefined. The method exists though. Catalog being on or off doesn't seem to change the result. Tested in Firefox and Chrome.

RePod commented 8 years ago

I apologize, it seems at some point I defaulted it to searching by name instead of ID.

Try repod.psdle.debug.entitlement("unit 13") to search by the actual name.

XFoxPrower commented 8 years ago
578 Array [ "PS4" ] 0 {"active_date":"~","active_flag":false,"drm_def":{"active_flag":false,"autoDownload":false,"availableDate":"~","contentName":"Unit 13™","contentType":"GAME","downloadableStatus":"ready","drmContents":[{"bitrate":0,"contentId":"UP9000-PCSA00014_00-UNIT13ZIPPER0100","contentName":"Unit 13™","contentSize":1221039552,"contentUrl":"~","downloadType":0,"drmContentType":1,"drmType":2,"gracePeriod":1200,"platformIds":4262461440,"position":0,"spName":"Sony Computer Entertainment America","titleName":"Unit 13™"}],"duration":0,"entitlementId":"UP9000-PCSA00014_00-UNIT13ZIPPER0100","expiration":"~","firstPlayExpiration":0,"firstPlayExpirationHours":0,"image_url":"~","media_type":0,"productId":"UP9000-PCSA00014_00-UNIT13ZIPPER0100","release_date":0,"rewards":[{"available_count":0,"count_until_expiration":0,"expiration_date":"~","price_after_discount":0,"promo_sku_id":"IP9101-NPIA90005_01-PLUS1MONTHPACKAG-UF01","rewardType":2,"reward_id":"IP9101-NPIA90005_01-RWD-974","reward_status":1,"sku_name":"Product Voucher","time_until_expiration":720}],"runtime":0,"salesType":"own","startedStreaming":false,"year_release":0},"entitlement_type":2,"feature_type":0,"game_meta":{"name":"Unit 13™"},"id":"UP9000-PCSA00014_00-UNIT13ZIPPER0100","inactive_date":"~","is_consumable":false,"license":{"entitlement_id":"UP9000-PCSA00014_00-UNIT13ZIPPER0100","expiration":"~","feature_type":0,"infinite_duration":false,"start_date":"~"},"preorder_flag":false,"preorder_placeholder_flag":false,"product_id":"UP9000-PCSA00014_00-UNIT13ZIPPER0100","revision_id":1457161757588,"sku_id":"UP9000-PCSA00014_00-UNIT13ZIPPER0100-U002","subs_flag":false,"use_count":0,"use_limit":0}
RePod commented 8 years ago

Unit 13 has a platformIds attribute of 4262461440 which after being run through PSDLE's check (which should be accurate with the store's) returns a platform list of PS3, PSP, and PS Vita.

For all intents and purposes, PSDLE is correct in assuming this is a PSP game. However, the store might be doing something different. The Catalog response lists its only available platform as PS Vita. Unfortunately PSDLE only updates the system if it's a PS1/2 classic.

I'll continue looking into it. Also please run repod.psdle.debug.entitlement("stlucia","id") for the Dante DLC.

XFoxPrower commented 8 years ago

undefined on that one.

RePod commented 8 years ago

Try repod.psdle.debug.entitlement("st. lucia") for a name search.

XFoxPrower commented 8 years ago
260 Array [ "PS4" ] 0 {"active_date":"~","active_flag":false,"drm_def":{"active_flag":false,"autoDownload":false,"availableDate":"~","contentName":"Dante's Inferno™ Trials of St. Lucia","contentType":"GAME","downloadableStatus":"ready","drmContents":[{"bitrate":0,"contentId":"UP0006-BLUS30405_00-INFERNOARN000001","contentName":"Dante's Inferno™ Trials of St. Lucia","contentSize":1054402752,"contentUrl":"~","downloadType":0,"drmContentType":1,"drmType":2,"gracePeriod":0,"platformIds":4027580416,"position":0,"spName":"Electronic Arts Inc","titleName":"DANTE'S INFERNO DIGITAL"}],"duration":0,"entitlementId":"UP0006-BLUS30405_00-INFERNOARN000001","firstPlayExpiration":0,"firstPlayExpirationHours":0,"image_url":"~","media_type":0,"productId":"UP0006-NPUB30478_00-DANTESINFERNOBDL","release_date":0,"rewards":[{"available_count":0,"count_until_expiration":0,"expiration_date":"~","price_after_discount":0,"promo_sku_id":"IP9101-NPIA90005_01-PLUS1MONTHPACKAG-UF01","rewardType":2,"reward_id":"IP9101-NPIA90005_01-RWD-968","reward_status":1,"sku_name":"Product Voucher","time_until_expiration":720}],"runtime":0,"salesType":"own","startedStreaming":false,"year_release":0},"entitlement_type":2,"feature_type":0,"game_meta":{"name":"Dante's Inferno™ Trials of St. Lucia"},"id":"UP0006-BLUS30405_00-INFERNOARN000001","inactive_date":"~","is_consumable":false,"license":{"entitlement_id":"UP0006-BLUS30405_00-INFERNOARN000001","feature_type":0,"infinite_duration":true,"start_date":"~"},"preorder_flag":false,"preorder_placeholder_flag":false,"product_id":"UP0006-NPUB30478_00-DANTESINFERNOBDL","revision_id":1457161757588,"sku_id":"UP0006-NPUB30478_00-DANTESINFERNOBDL-U002","subs_flag":false,"use_count":0,"use_limit":0}
RePod commented 8 years ago

Its platformIds attribute 4027580416 returns PS3 and PSP. Thanks.

RePod commented 8 years ago

Just to confirm, and I hate to have you do this, is Unit 13 marked as only Vita on the original download list too? If you want PSDLE's approximation of what page it may be on, hover over the icon in PSDLE's list.

It is on the actual product page, but just want to know about the download list too.

XFoxPrower commented 8 years ago

Yep, only a 'Playable on: PS Vita' icon. https://store.playstation.com/#!/en-us/games/unit-13/cid=UP9000-PCSA00014_00-UNIT13ZIPPER0100

RePod commented 8 years ago

Yes, but specifically the download list. I'm rewriting PSDLE's hash checking and want to know exactly what the download list marks it as.

XFoxPrower commented 8 years ago

Not sure exactly what you mean. But on my Download List on the PS Store in Vita, it has a download link. And on PS3's Download History, this is the only entry for it. Not a cross-buy or anything. No other port.

RePod commented 8 years ago

I don't particularly have a solution for this problem. I made one tiny change to PSDLE's checking to improve accuracy but even then it doesn't obtain the "intended" result.

Using the store's own hash checking:

Drop everything from those not PS-related, and then run that through PSDLE's final system check (basically if it's on PS3 and PSP it's probably a PSP game) you can guess the end results.

Either there are (maybe a lot of) exceptions or the store is doing something else to obtain the platforms (like using Catalog).

I'll begin looking into the store's 35k lines of code.

In the meantime, you can aforementioned tiny change by running all of this in the browser console (without running PSDLE prior).


Technical break down/notes, stop reading here if not interested.

The platformIds attribute is an integer representation of a binary number used to determine applicable platforms. It does a bitwise AND check on it using a pre-determined mask for each possible platform.

Unit 13's platformIds of 4262461440 is 11111110000100000000000000000000 in binary (32 bits). The PSP's mask is 1073741824 or 1000000000000000000000000000000 in binary (31 bits). Therefore, Unit13 & mask checks if the 31st bit is on (not 0) to determine if it's intended for the PSP which in this case it is (according to Unit 13's platformIds).

PSP:
4262461440 11111110000100000000000000000000 &
1073741824  1000000000000000000000000000000 =
1073741824  1000000000000000000000000000000

Vita:
4262461440 11111110000100000000000000000000 &
 134217728     1000000000000000000000000000 =
 134217728     1000000000000000000000000000

Basically, either the platformIds is wrong (therefore an exception is being made somewhere) or we've been wrong this whole time!

XFoxPrower commented 8 years ago

Same results with the script above. Neat bitwise concept. I thought the script was doing something along the lines of fetching each game's page and examining the details in the 'Playable On: ' after their lengthy loading and mutation. If there's an easy modification to export my game list's platformIDs, maybe I can find more bit patterns. Got a big list to work with.

RePod commented 8 years ago

I just did something similar to what the store used, since I assumed it'd always be right. I already know legitimate alternatives to look at such as PSP/PS1 games that can't be downloaded to Vita. The bit for Vita is simply disabled and that's that.

Unit 13's Catalog info marks it as only playable on Vita though, which the store may fetch in-time to actually determine the platforms. Similar results could be obtained with PSDLE if using the Catalog, but I'd have to update it to do so first.

XFoxPrower commented 8 years ago

I can't vouch for the accuracy of those game pages either... https://store.playstation.com/#!/en-us/games/mega-man-legends-2/cid=UP0102-NPUP10010_00-MEGAMANLEGENDS20

RePod commented 8 years ago

For the previous user who commented, I got it via email so I'll still address it:

This thing also happens with certain PS1/PS2 titles. I have only two PS2 classics but only one appears as "PS2", the other is PS3. And all my PS1 titles but one appear as PSP.

The detection may be off for that item's Catalog entry. Hard to tell without knowing the game (and store region).
Same for the PS1 titles. I don't have a good idea of what the cause could be other than the data having been moved.

Also on issue #29 you mentioned Resogun, both the PS3 and Vita version appear as Vita as of today, but when you move the mouse over them, you can see different IDs.

My Resogun entries are still marked properly, with and without Catalog. What store region?

RePod commented 8 years ago

What are some of the games affected?

Necro-edit: RIP legacy consoles.