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>;
Struct File Title Offset Size
struct musicdef music[0] No Track A46FCh 28
struct musicdef music[1] JHUB1 Hub Tribe 1 A4718h 28
struct musicdef music[2] KWATERFALL Waterfall A4734h 28
struct musicdef music[3] CBK2 Cannon Boat Keith A4750h 28
struct musicdef music[4] KBARREN3 Barren Three A476Ch 28
struct musicdef music[5] JMINE2 The Mine A4788h 28
struct musicdef music[6] KCAVE1 Cave One A47A4h 28
struct musicdef music[7] JICECAVE Ice Cave A47C0h 28
struct musicdef music[8] KJUNGLE3 Jungle Two A47DCh 28
struct musicdef music[9] JBARREN1 Barren Wheels One A47F8h 28
struct musicdef music[10] KDANTE1 Dante One A4814h 28
struct musicdef music[11] KCMCAVE Caveman Cave One A4830h 28
struct musicdef music[12] KSOVEENA Soveena A484Ch 28
struct musicdef music[13] KBARREN1 Barren Wheels Two A4868h 28
struct musicdef music[14] KGLIDE Glider A4884h 28
struct musicdef music[15] KLLLARRY Lava Lamp Larry A48A0h 28
struct musicdef music[16] JBARREN2 Forest Barren A48BCh 28
struct musicdef music[17] JICE2 Ice Land A48D8h 28
struct musicdef music[18] JJUNGLE3 Find The Key A48F4h 28
struct musicdef music[19] KSNOWBALL Snowball A4910h 28
struct musicdef music[20] JTHIEFJUNGLE Thief Jungle A492Ch 28
struct musicdef music[21] JTHIEFCAVE Thief Cave A4948h 28
struct musicdef music[22] JGOLDROCK Gold Rock Race A4964h 28
struct musicdef music[23] JICECAVE Ice Cave One A4980h 28
struct musicdef music[24] CHOOCAVE Choo Cave A499Ch 28
struct musicdef music[25] CHOOOUT Choo Outside A49B8h 28
struct musicdef music[26] KRIVERRACE River Race A49D4h 28
struct musicdef music[27] KDANTE2 Dante Two A49F0h 28
struct musicdef music[28] GTOWER Goo Manchoo Tower A4A0Ch 28
struct musicdef music[29] CBKLEAD CBK Lead Up A4A28h 28
struct musicdef music[30] KFLAVIO Flavio A4A44h 28
struct musicdef music[31] KDUNGEON Dungeon A4A60h 28
struct musicdef music[32] JINCA1 Inca Babies One A4A7Ch 28
struct musicdef music[33] JHUB2 Hub Tribe 4 A4A98h 28
struct musicdef music[34] JHUB1 Hub Tribe 3 A4AB4h 28
struct musicdef music[35] KMASHER Masher A4AD0h 28
struct musicdef music[36] JREDANT1 Red Ant Lair A4AECh 28
struct musicdef music[37] JREDANT120 Red Ant Bomb A4B08h 28
struct musicdef music[38] KINCACAVE Inca Babies Two A4B24h 28
struct musicdef music[39] JHUB2 Hub Tribe 2 A4B40h 28
struct musicdef music[40] JVENUS Venus A4B5Ch 28
struct musicdef music[41] JVENUSLEAD Venus Lead Up A4B78h 28
struct musicdef music[42] KMASHERLEAD Masher Lead Up A4B94h 28
struct musicdef music[43] JTITLE Croc’s Theme A4BB0h 28
struct musicdef music[44] KCMCAVE2 Caveman Cave Two A4BCCh 28
struct musicdef music[45] KSOVEENALEAD Soveena Lead Up A4BE8h 28
struct musicdef music[46] JREDANT25 Red Ant Fast Lair A4C04h 28

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:

Comparison picture of the Original and Encoded waveforms

For posterity, here’s links to the files:

Type Link
Original PACK6.STR[1].flac
Encoded PACK6.STR[1].ASF