Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
91e9222
Add Capcom's Devil May Cry 3 HD .mod hexpat
haruse23 Jul 2, 2025
76b24fc
Update DMC3 HD Mod.hexpat
haruse23 Jul 2, 2025
7481fe5
Update DMC3 HD Mod.hexpat
haruse23 Jul 2, 2025
7b08f08
Update DMC3 HD Mod.hexpat
haruse23 Jul 2, 2025
e182d17
Add files via upload
haruse23 Jul 2, 2025
d2dfe0a
Update README.md
haruse23 Jul 3, 2025
7e8f603
Rename DMC3 HD Mod.hexpat to dmc3_hd_mod.hexpat
haruse23 Jul 3, 2025
a67765d
Delete patterns/dmc3_hd_mod.hexpat
haruse23 Jul 3, 2025
6de6f37
Delete tests/patterns/test_data/dmc3_hd_mod.hexpat.mod
haruse23 Jul 3, 2025
646057b
Add files via upload
haruse23 Jul 3, 2025
34341eb
Update dmc3_hd_mod.hexpat
haruse23 Jul 8, 2025
ff737c3
Add files via upload
haruse23 Sep 16, 2025
baf773f
Update README.md
haruse23 Sep 16, 2025
bee8802
Update README.md
haruse23 Sep 16, 2025
691c10c
Update README.md
haruse23 Sep 16, 2025
a5d4309
Add files via upload
haruse23 Sep 16, 2025
cba726f
Update ACU_FORGE.hexpat
haruse23 Sep 16, 2025
4279de2
Update README.md
haruse23 Sep 16, 2025
df54d67
Update and rename ACU_DATA_Compressed.hexpat to acu_data_compressed.h…
haruse23 Sep 16, 2025
dd23dfa
Update and rename ACU_FORGE.hexpat to acu_forge.hexpat
haruse23 Sep 16, 2025
400a06b
Update README.md
haruse23 Sep 16, 2025
7e0ab43
Update acu_data_compressed.hexpat
haruse23 Sep 17, 2025
caf1327
Update acu_data_compressed.hexpat
haruse23 Sep 18, 2025
556f813
Add files via upload
haruse23 Sep 18, 2025
f5aeb83
Update and rename ACU_DATA_Decompressed.hexpat to acu_data_decompress…
haruse23 Sep 18, 2025
32b762b
Update README.md
haruse23 Sep 18, 2025
7cb7460
Update acu_data_compressed.hexpat
haruse23 Sep 18, 2025
db46129
Update README.md
haruse23 Sep 18, 2025
7eabc06
Delete patterns/acu_data_compressed.hexpat
haruse23 Sep 21, 2025
ac54dcc
Delete patterns/acu_data_decompressed.hexpat
haruse23 Sep 21, 2025
2f586be
Delete patterns/acu_forge.hexpat
haruse23 Sep 21, 2025
f2cbf61
Create acu_forge.hexpat
haruse23 Sep 21, 2025
0ae3f28
Add files via upload
haruse23 Sep 21, 2025
aa84210
Update and rename ACU_DATA_Compressed.hexpat to acu_data_compressed.h…
haruse23 Sep 21, 2025
12f26f1
Update and rename ACU_DATA_Decompressed.hexpat to acu_data_decompress…
haruse23 Sep 21, 2025
dcbc606
Update README.md
haruse23 Sep 21, 2025
1890bf0
Delete patterns/dmc3_hd_mod.hexpat
haruse23 Sep 21, 2025
d5dd93b
Create dmc3_hd_mod.hexpat
haruse23 Sep 21, 2025
e481fee
Update README.md
haruse23 Sep 21, 2025
6c706f2
Update dmc3_hd_mod.hexpat
haruse23 Sep 21, 2025
d7a6dab
Update README.md
haruse23 Sep 21, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ Everything will immediately show up in ImHex's Content Store and gets bundled wi
| ARC | | [`patterns/arc.hexpat`](patterns/arc.hexpat) | Minecraft Legacy Console Edition ARC files |
| ARIA2 | | [`patterns/aria2.hexpat`](patterns/aria2.hexpat) | ARIA2 Download Manager Control files |
| ARM VTOR | | [`patterns/arm_cm_vtor.hexpat`](patterns/arm_cm_vtor.hexpat) | ARM Cortex M Vector Table Layout |
| Assassin's Creed: Unity | | [`patterns/Assassin's Creed: Unity`](patterns/Assassin's Creed: Unity) | Assassin's Creed: Unity archive files -- .forge & .data (compressed and decompressed) -- |
| Bastion | | [`patterns/bastion/*`](https://gitlab.com/EvelynTSMG/imhex-bastion-pats) | Various [Bastion](https://en.wikipedia.org/wiki/Bastion_(video_game)) files |
| BeyondCompare BCSS | | [`patterns/bcss.hexpat`](patterns/bcss.hexpat) | BeyondCompare Snapshot (BCSS) file |
| Bencode | `application/x-bittorrent` | [`patterns/bencode.hexpat`](patterns/bencode.hexpat) | Bencode encoding, used by Torrent files |
Expand All @@ -57,6 +58,7 @@ Everything will immediately show up in ImHex's Content Store and gets bundled wi
| CREDHIST | | [`patterns/credhist.hexpat`](patterns/credhist.hexpat) | CREDHIST Format |
| DDS | `image/vnd-ms.dds` | [`patterns/dds.hexpat`](patterns/dds.hexpat) | DirectDraw Surface |
| DEX | | [`patterns/dex.hexpat`](patterns/dex.hexpat) | Dalvik EXecutable Format |
| Devil May Cry HD Collection | | [`patterns/Devil May Cry HD Collection`](patterns/Devil May Cry HD Collection) | 3D Model files used in Devil May Cry 3 HD Collection |
| DICOM | `application/dicom` | [`patterns/dicom.hexpat`](patterns/dicom.hexpat) | DICOM image format |
| DMG | | [`patterns/dmg.hexpat`](patterns/dmg.hexpat) | Apple Disk Image Trailer (DMG) |
| DMP | | [`patterns/dmp64.hexpat`](patterns/dmp64.hexpat) | Windows Kernel Dump(DMP64) |
Expand Down Expand Up @@ -198,6 +200,8 @@ Everything will immediately show up in ImHex's Content Store and gets bundled wi
| ZLIB | `application/zlib` | [`patterns/zlib.hexpat`](patterns/zlib.hexpat) | ZLIB compressed data format |
| ZSTD | `application/zstd` | [`patterns/zstd.hexpat`](patterns/zstd.hexpat) | Zstandard compressed data format |



### Scripts

| Name | Path | Description |
Expand Down
47 changes: 47 additions & 0 deletions patterns/Assassin's Creed: Unity/acu_data_compressed.hexpat
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
#pragma description Assassin's Creed: Unity's Compressed .data file
#pragma author haru233

// many thanks to AxCut
// ImHex Hex Pattern File for Assassin's Creed: Unity's Compressed .data files


import std.core;
import std.mem;

enum CompressionType : u8 {
LZO1X_ = 0x00, // Both 0x00 and 0x01 mean LZO1X
LZO1X = 0x01,
LZO2A = 0x02,
xmemdecompress = 0x03,
LZO1C = 0x05
};

struct CHUNK {
u16 Uncompressed_Size;
u16 Compressed_Size;
};

struct CHUNK_Data {
u32 Hash;

u64 i = std::core::array_index();
u8 data[parent.chunk[i].Compressed_Size];
};

struct PACK {
u64 ID;
padding[2];
CompressionType Compression_Type;
padding[3];
u8 Version;
u16 CHUNK_Count;

CHUNK chunk[CHUNK_Count];
CHUNK_Data data[CHUNK_Count];


};



PACK pack[while(!std::mem::eof())] @0x00;
93 changes: 93 additions & 0 deletions patterns/Assassin's Creed: Unity/acu_data_decompressed.hexpat
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
#pragma description Assassin's Creed: Unity's Decompressed .data file
#pragma author haru233

// Thanks to yretenai on GitHub for helping with the Block Allocator part

import std.core;
import std.mem;

struct Block_Allocator_Type0 {
padding[4];
u32 Class_ID;
u32 Size;
};

struct Block_Allocator_Type1 {
padding[4];
u32 Type_ID;
u32 Size;
};

struct Block_Allocator {
u16 Version;

if (Version == 0) {
u32 Block_Allocator_Number;
Block_Allocator_Type0 block_allocator_type0[Block_Allocator_Number];
}

else if (Version == 1) {
u32 Block_Allocator_Number;
Block_Allocator_Type1 block_allocator_type1_[Block_Allocator_Number];
}

else if (Version == 2) {
bool Has_Secondary_Block_Allocator;
u32 Main_Block_Allocator_Number;

Block_Allocator_Type1 block_allocator_type1__[Main_Block_Allocator_Number];

if (Has_Secondary_Block_Allocator) {
u32 Secondary_Block_Allocator_Number;
Block_Allocator_Type1 block_allocator_type1___[Secondary_Block_Allocator_Number+1];
}
}


};

struct File {
u32 Object_Hash;
u32 File_Size;
u32 Filename_Length;

if (File_Size > 0) {
if (Filename_Length == 0) {
bool HasBlockAllocator;

if (HasBlockAllocator) {
Block_Allocator block_allocator;
u8 File_Data[File_Size];
}

else
u8 File_Data[File_Size];
}

else {
char Filename[Filename_Length];

bool HasBlockAllocator;

if (HasBlockAllocator) {
Block_Allocator block_allocator;
u8 File_Data[File_Size];
}

else
u8 File_Data[File_Size];


}

}

else
continue;



};


File file[while(!std::mem::eof())] @0x00;
64 changes: 64 additions & 0 deletions patterns/Assassin's Creed: Unity/acu_forge.hexpat
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
#pragma description Assassin's Creed: Unity's .forge archive file
#pragma author haru233

// many thanks to AxCut
// ImHex Hex Pattern File for Assassin's Creed: Unity's .forge files

import std.core;

struct Forge_Header {
char MAGIC[8];
padding[1];
u32 Version;
u32 File_Data_Header_Offset;
};

struct File_Data_Header {
u32 File_Count;
padding[32];
u64 File_Data_Header2_Offset;
};

struct File_Data_Header2 {
u32 File_Count2;
padding[4];
u64 File_Table_Offset;
padding[12];
u32 File_Count3;
u64 File_Name_Table_Offset;
padding[8];
};


struct File_Table {
u64 Raw_Data_Offset;
u64 File_ID;
u32 Raw_Data_Size;
};

struct File_Name_Table {
u32 Raw_Data_Size;
padding[40];
char Filename[128];
padding[20];
};


Forge_Header forge_header @0x00;

File_Data_Header file_data_header @(forge_header.File_Data_Header_Offset);

File_Data_Header2 file_data_header2 @(file_data_header.File_Data_Header2_Offset);

File_Table file_table[file_data_header.File_Count] @(file_data_header2.File_Table_Offset);

File_Name_Table file_name_table[file_data_header.File_Count] @(file_data_header2.File_Name_Table_Offset);


struct Raw_Data_Table {
u64 i = std::core::array_index();
u8 Raw_Data[file_table[i].Raw_Data_Size] @ file_table[i].Raw_Data_Offset;
};


Raw_Data_Table raw_data_table[file_data_header.File_Count] @0x00;
165 changes: 165 additions & 0 deletions patterns/Devil May Cry HD Collection/dmc3_hd_mod.hexpat
Original file line number Diff line number Diff line change
@@ -0,0 +1,165 @@
#pragma description Devil May Cry 3 HD .mod 3D model file
#pragma author haru233

// many thanks to AxCut
// ImHex Hex Pattern File for Capcom's Devil May Cry 3 HD .mod files


import std.core;


struct ModelHeader {
char ID[4];
float Version;
padding[8];
u8 objectCount;
u8 boneCount;
u8 numberTextures;
u8;
u32;
u64;
u64 skeletonOffset;
padding[24];
};

struct ObjectInfo {
u8 meshCount;
u8;
u16 numberVertices;
padding[4];
u64 meshOffset;
u32 flags;
padding[28];
float X, Y, Z;
float radius;
};

struct Positions {
float positions[3];
};


struct Normals {
float normal[3];
};


struct UVs {
s16 uv[2];
};

struct BoneIndices {
u8 boneindex[4];
};

struct Weights {
u16 weight[1];
};

struct MeshSCM {
u16 numberVertices;
u16 textureIndex;
padding[12];
u64 VerticesPositionsOffset;
u64 NormalsPositionsOffset;
u64 UVsPositionsOffset;

padding[16];
u64 unknownOffset;

u64;
padding[8];

Positions positions[numberVertices] @VerticesPositionsOffset;
Normals normals[numberVertices] @NormalsPositionsOffset;
UVs uvs[numberVertices] @UVsPositionsOffset;


};

struct Mesh {
u16 numberVertices;
u16 textureIndex;
padding[12];
u64 VerticesPositionsOffset;
u64 NormalsPositionsOffset;
u64 UVsPositionsOffset;

u64 BoneIndicesOffset;
u64 WeightsOffset;
padding[8];

u64;
padding[8];

Positions positions[numberVertices] @VerticesPositionsOffset;
Normals normals[numberVertices] @NormalsPositionsOffset;
UVs uvs[numberVertices] @UVsPositionsOffset;

BoneIndices b_index[numberVertices] @BoneIndicesOffset;
Weights weights[numberVertices] @WeightsOffset;


};


struct Hierarchy {
u8 hierarchy;
};

struct HierarchyOrder {
u8 hierarchyorder;
};

struct Unknown {
u8;
};

struct Transform {
float x;
float y;
float z;
float length; // sqrt(x*x + y*y + z*z)
padding[16];
};

struct Skeleton{
u32 hierarchyOffset;
u32 hierarchyOrderOffset;
u32 unknownOffset;
u32 transformsOffset;
};





ModelHeader modelheader @ 0x00;
ObjectInfo objects_info[modelheader.objectCount] @ 0x40;

u32 objectOffset;

struct Object {
u64 i = std::core::array_index();
if (modelheader.ID == "SCM ") {
objectOffset = objects_info[0].meshOffset;
MeshSCM meshscm[objects_info[i].meshCount] @ objects_info[i].meshOffset;


} else {
objectOffset = objects_info[0].meshOffset;
Mesh mesh[objects_info[i].meshCount] @ objects_info[i].meshOffset;
}
};

Object objects[modelheader.objectCount] @objectOffset;

Skeleton skeleton @modelheader.skeletonOffset;

Hierarchy hierarchy[modelheader.boneCount] @(modelheader.skeletonOffset + skeleton.hierarchyOffset);

HierarchyOrder hierarchyorder[modelheader.boneCount] @(modelheader.skeletonOffset + skeleton.hierarchyOrderOffset);

Unknown unknown[modelheader.boneCount] @(modelheader.skeletonOffset + skeleton.unknownOffset);

Transform transform[modelheader.boneCount] @(modelheader.skeletonOffset + skeleton.transformsOffset);
Loading