SAV Format (Hocus Pocus)

From ModdingWiki
Jump to: navigation, search
SAV Format (Hocus Pocus)
Format typeSaved game and Configuration
StoringSound, Scores
Save locationsReturned to level start
Elements savedLevel, Difficulty, Score

Information from the shareware episode:

File format

The file HOCUS.SAV:

Save Game part

Offset Data type Description
0x1E SINT16LE valid[9] field indicating whether the each savegame can be loaded. -1 = no 0 = yes
0x30 INT16LE level[9] saved level of each savegame. 0 = first level. 1 = second level etc.
0x42 INT16LE difficulty[9] difficulty of each savegame 0 = easy, 1 = moderate, 2 = hard
0x54 ASCIZ [9][26] name of each savegame with trailing zero. (maximum 25 characters + trailing zero)
? ?? some rubbish 9 times 1 and 1 time zero. Episode number ?
0x148 INT32LE score[9] score of each savegame.


Small sample program(C++) to show information about the savegames: (start like this: app HOCUS.SAV) int assumed to be 32 bit, short to be 16 bit. Only for little endian machines.

 #include <iostream>
 #include <fstream>
 using namespace std;
 int main(int argc, char* argv[]) {
    if(argc != 2) return 1;
    ifstream input(argv[1]);
    short signed int valid[9];<char*>(&valid),2*9);
    short level[9];<char*>(&level),2*9);
    short difficulty[9];<char*>(&difficulty),2*9);
    char name[9][26];[0][0],9*26);
    int score[9];<char*>(&score),4*9);
    for(int i = 0;i < 9;i++) {
       cout << "save " << i+1 << " valid " << valid[i]
            << " level " << level[i] << " difficulty " << difficulty[i]
            << " name: "<< name[i] << " score " << score[i] << endl;
    return 0;

Highscore part

Offset Data type Description
0x16C ASCIZ Name1[5][26] Names of the people with highscores for episode 1
0x1EE ASCIZ Name2[5][26] Names of the people with highscores for episode 2
0x270 ASCIZ Name3[5][26] Names of the people with highscores for episode 3
0x2F2 ASCIZ Name4[5][26] Names of the people with highscores for episode 4
0x374 INT32LE Score[4][5] Highscores themselves. Listed by episode.

Sound Configuration

Stored at the bottom of the file. (less interesting as setup.exe can change those)


This file format was reverse engineered by Qbix. If you find this information helpful in a project you're working on, please give credit where credit is due. (A link back to this wiki would be nice too!)