Skip to content
This repository was archived by the owner on Mar 21, 2025. It is now read-only.

(Chihiro) Determining Platforms

RePod edited this page Nov 19, 2017 · 1 revision

Entitlement entries have a platformIds that 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. The store provides an array of masks for intended devices.

Item platformIds Binary (mask if console) Bits
PSP 1073741824 -1000000000000000000000000000000 31
Vita 134217728 ----1000000000000000000000000000 28
Unit 13 4262461440 11111110000100000000000000000000 32
PSP:
4262461440 11111110000100000000000000000000 &
1073741824  1000000000000000000000000000000 =
1073741824  1000000000000000000000000000000
The 31st bit is on, therefore this game is intended for PSP.

Vita:
4262461440 11111110000100000000000000000000 &
 134217728     1000000000000000000000000000 =
 134217728     1000000000000000000000000000
The 28th bit is on, therefore this game is intended for Vita.

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).

However, as for Unit 13 and possibly others, this may lead to false positives. Unit 13 is not a PSP game, only a Vita game. To resolve this, the Catalog must be used as it has actual information used by the store when presenting it normally.

Clone this wiki locally