the xor with the 00010000 is always applied. it's sort of a "base" and then that formula is used to determine the 80000000 portion. i've tested this more against more IDs(some had mixed high tid/sid bits) and on both versions of the game and not had it fail once for any of them.



that formula you give at the end actually does seem to work, but is wrong for a lot of people(myself included). there was quite a bit of debate about it and whether there were 2 xors, because it seemed to work fine for some people and be the opposite for others. after doing a fair amount of reading, i was pretty sure there was only 1 xor, 80000000, and i started testing just xor-ing H16/L16 pid against tid and sid. that seemed to work, but failed a few times, so kaph added back in the high and low bit thing while assuming that PIDs have 2 "states", pre-80000000 testing and final. that worked every time across multiple IDs and both games, so it seems to be the right formula.