lightningbolt/bolt.hexpat

53 lines
964 B
Plaintext

// Copyright 2023 The LightningBolt Authors
// SPDX-License-Identifier: MIT
struct BoltHdr {
char magic[6]; // BOLT\r\n
// have no idea what these are yet
u8 unk2;
u8 unk3;
// or these, they don't seem to be
// directly referenced by bolt stuff
u8 unk5;
u8 unk6;
u8 unk7;
u8 groupCount;
// in bytes
u32 libSize;
};
struct BoltGroupEnt {
u32 unk;
u32 fileSize;
u32 fileOffset;
u32 unk3;
u8 fileData[4] @ fileOffset;
};
struct BoltGroupDesc {
// flags?
u8 unk;
u8 unk2;
u8 unk3;
u8 groupEntCount;
// in bytes
u32 groupSize;
u32 groupOffset;
// ptr padding for ps2 code
u32 resolvedptr;
if(groupEntCount == 0)
BoltGroupEnt groupEntries[0x100] @ groupOffset;
else
BoltGroupEnt groupEntries[groupEntCount] @ groupOffset;
};
BoltHdr hdr @0;
BoltGroupDesc groupDescs[hdr.groupCount] @ $;