I've gone through my PlayHistory.dat file and I think I've mostly figured out the format.
First off, the timestamp value isn't measuring seconds since 2000-01-01, it's measuring
minutes. The reason you seemingly needed to multiply the timestamp by 3.75 is because the lower 4 bits of the timestamp aren't part of the timestamp at all - they're 4 flags that tell you what the event is representing. Right shifting those 4 bits off gets you a division by 16, and 60 / 16 = 3.75. This also explains why the logged events were seemingly out of order sometimes.
As for what the bits mean normally (least significant bit to highest):
- Bit 1 = Whether the event represents an opening of something or the closing. 0 = open, 1 = close
- Bit 2 = Whether the app in question is a HOME menu applet (e.g. the menu itself, game notes, etc.) or a full application (e.g. any game, system settings, etc). 0 = full app, 1 = applet
- Bit 3 = Whether the event corresponds to a resume/suspend or a launch/quit (suspend here means going to the HOME menu without quitting an app). 0 = launch/quit, 1 = resume/suspend
- Bit 4 = Only ever set when TitleID is equal to FFFFFFFFFFFFFFFF. Part of a set of alternate meanings with that TitleID.
Entries with TitleID FFFFFFFFFFFFFFFF seem to be some sort of special logging system, and change the meaning of the 4 bits. They should be interpreted as one number here, not as flags. Here's all of the combinations of 4 bits with the special logs that I can find in my file:
- 0000 = DS Mode start
- 0001 = DS Mode end
- 0111 = unknown, occurs just before "SAFE_MODE System Updater" launches it seems, only occurs once in my whole file
- 1000 = sleep mode start
- 1001 = sleep mode end
- 1010 = 3DS services stopped (happens at shutdown and also when launching DS Mode apps)
- 1011 = start of system clock change (stores original time)
- 1100 = end of system clock change (stores new time)
All of this should be enough information to extract all the information that the Activity Log does.