Croc 2 Notes


2021-02-22

Binary Hash

$ sha1sum Croc2.exe
c7e9ed848e311706dde83116fd122a0b28b99261  Croc2.exe

Embedded Music Table

croc2exemusictable.bt

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
LittleEndian();
FSeek(0xA46FC);

typedef struct {
    uint32 flags;
    char filename[12];
    uint32 unk;
    uint32 nameptr <format=hex>;

    local uint32 pos = FTell();

    FSeek(nameptr - 0x400000);
    string name;

    FSeek(pos);
    uint32 unk2<format=hex>;
} musicdef<read=xxread>;

string xxread(musicdef& d)
{
    string s;
    SPrintf(s, "[%s] - [%s]", d.filename, d.name);
    return s;
}

musicdef music[47]<optimize=false>;
StructFileTitleOffsetSize
struct musicdef music[0]No TrackA46FCh28
struct musicdef music[1]JHUB1Hub Tribe 1A4718h28
struct musicdef music[2]KWATERFALLWaterfallA4734h28
struct musicdef music[3]CBK2Cannon Boat KeithA4750h28
struct musicdef music[4]KBARREN3Barren ThreeA476Ch28
struct musicdef music[5]JMINE2The MineA4788h28
struct musicdef music[6]KCAVE1Cave OneA47A4h28
struct musicdef music[7]JICECAVEIce CaveA47C0h28
struct musicdef music[8]KJUNGLE3Jungle TwoA47DCh28
struct musicdef music[9]JBARREN1Barren Wheels OneA47F8h28
struct musicdef music[10]KDANTE1Dante OneA4814h28
struct musicdef music[11]KCMCAVECaveman Cave OneA4830h28
struct musicdef music[12]KSOVEENASoveenaA484Ch28
struct musicdef music[13]KBARREN1Barren Wheels TwoA4868h28
struct musicdef music[14]KGLIDEGliderA4884h28
struct musicdef music[15]KLLLARRYLava Lamp LarryA48A0h28
struct musicdef music[16]JBARREN2Forest BarrenA48BCh28
struct musicdef music[17]JICE2Ice LandA48D8h28
struct musicdef music[18]JJUNGLE3Find The KeyA48F4h28
struct musicdef music[19]KSNOWBALLSnowballA4910h28
struct musicdef music[20]JTHIEFJUNGLEThief JungleA492Ch28
struct musicdef music[21]JTHIEFCAVEThief CaveA4948h28
struct musicdef music[22]JGOLDROCKGold Rock RaceA4964h28
struct musicdef music[23]JICECAVEIce Cave OneA4980h28
struct musicdef music[24]CHOOCAVEChoo CaveA499Ch28
struct musicdef music[25]CHOOOUTChoo OutsideA49B8h28
struct musicdef music[26]KRIVERRACERiver RaceA49D4h28
struct musicdef music[27]KDANTE2Dante TwoA49F0h28
struct musicdef music[28]GTOWERGoo Manchoo TowerA4A0Ch28
struct musicdef music[29]CBKLEADCBK Lead UpA4A28h28
struct musicdef music[30]KFLAVIOFlavioA4A44h28
struct musicdef music[31]KDUNGEONDungeonA4A60h28
struct musicdef music[32]JINCA1Inca Babies OneA4A7Ch28
struct musicdef music[33]JHUB2Hub Tribe 4A4A98h28
struct musicdef music[34]JHUB1Hub Tribe 3A4AB4h28
struct musicdef music[35]KMASHERMasherA4AD0h28
struct musicdef music[36]JREDANT1Red Ant LairA4AECh28
struct musicdef music[37]JREDANT120Red Ant BombA4B08h28
struct musicdef music[38]KINCACAVEInca Babies TwoA4B24h28
struct musicdef music[39]JHUB2Hub Tribe 2A4B40h28
struct musicdef music[40]JVENUSVenusA4B5Ch28
struct musicdef music[41]JVENUSLEADVenus Lead UpA4B78h28
struct musicdef music[42]KMASHERLEADMasher Lead UpA4B94h28
struct musicdef music[43]JTITLECroc’s ThemeA4BB0h28
struct musicdef music[44]KCMCAVE2Caveman Cave TwoA4BCCh28
struct musicdef music[45]KSOVEENALEADSoveena Lead UpA4BE8h28
struct musicdef music[46]JREDANT25Red Ant Fast LairA4C04h28

Notes

Missing Track Restoration

The PSX version has an extra music track that’s missing from the PC version.

The plan was to change the track ID in the Caveman and Inca tribe maps to reference those of the Forest and Snow tribes which frees up two slots in the table. Then, replace one of the free slots with the missing track, update the respective map header, then encode the missing track to a format readable by the game.

However, I encountered some difficulties during encoding. The Argonaut ADPCM codec can’t accurately represent some parts of the waveform, manifesting as clicking and static noises during playback. This is probably the reason it was excluded originally.

For comparison, see below:

For posterity, here’s links to the files:

TypeLink
OriginalPACK6.STR[1].flac
EncodedPACK6.STR[1].ASF