mirror of
https://github.com/WerWolv/ImHex-Patterns.git
synced 2026-03-27 23:37:04 -05:00
pattern: Add Assassin's Creed: Unity's Forge files and Data files (Compressed and Decompressed) (#448)
* Add Capcom's Devil May Cry 3 HD .mod hexpat Hex Pattern file for Capcom's Devil May Cry 3 HD Collection's .mod (3D Models) files * Update DMC3 HD Mod.hexpat * Update DMC3 HD Mod.hexpat * Update DMC3 HD Mod.hexpat * Add files via upload * Update README.md * Rename DMC3 HD Mod.hexpat to dmc3_hd_mod.hexpat * Delete patterns/dmc3_hd_mod.hexpat * Delete tests/patterns/test_data/dmc3_hd_mod.hexpat.mod * Add files via upload * Update dmc3_hd_mod.hexpat * Add files via upload * Update README.md * Update README.md * Update README.md * Add files via upload * Update ACU_FORGE.hexpat * Update README.md * Update and rename ACU_DATA_Compressed.hexpat to acu_data_compressed.hexpat * Update and rename ACU_FORGE.hexpat to acu_forge.hexpat * Update README.md * Update acu_data_compressed.hexpat * Update acu_data_compressed.hexpat * Add files via upload * Update and rename ACU_DATA_Decompressed.hexpat to acu_data_decompressed.hexpat * Update README.md * Update acu_data_compressed.hexpat * Update README.md * Delete patterns/acu_data_compressed.hexpat * Delete patterns/acu_data_decompressed.hexpat * Delete patterns/acu_forge.hexpat * Create acu_forge.hexpat * Add files via upload * Update and rename ACU_DATA_Compressed.hexpat to acu_data_compressed.hexpat * Update and rename ACU_DATA_Decompressed.hexpat to acu_data_decompressed.hexpat * Update README.md * Delete patterns/dmc3_hd_mod.hexpat * Create dmc3_hd_mod.hexpat * Update README.md * Update dmc3_hd_mod.hexpat * Update README.md --------- Co-authored-by: Nik <werwolv98@gmail.com>
This commit is contained in:
@@ -36,6 +36,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 |
|
| 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 |
|
| 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 |
|
| 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 |
|
| 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 |
|
| 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 |
|
| Bencode | `application/x-bittorrent` | [`patterns/bencode.hexpat`](patterns/bencode.hexpat) | Bencode encoding, used by Torrent files |
|
||||||
@@ -61,6 +62,7 @@ Everything will immediately show up in ImHex's Content Store and gets bundled wi
|
|||||||
| CREDHIST | | [`patterns/credhist.hexpat`](patterns/credhist.hexpat) | CREDHIST Format |
|
| CREDHIST | | [`patterns/credhist.hexpat`](patterns/credhist.hexpat) | CREDHIST Format |
|
||||||
| DDS | `image/vnd-ms.dds` | [`patterns/dds.hexpat`](patterns/dds.hexpat) | DirectDraw Surface |
|
| DDS | `image/vnd-ms.dds` | [`patterns/dds.hexpat`](patterns/dds.hexpat) | DirectDraw Surface |
|
||||||
| DEX | | [`patterns/dex.hexpat`](patterns/dex.hexpat) | Dalvik EXecutable Format |
|
| 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 |
|
| DICOM | `application/dicom` | [`patterns/dicom.hexpat`](patterns/dicom.hexpat) | DICOM image format |
|
||||||
| DISK_PARSER (DFIR) | `application/x-ima` | [`patterns/DFIR/DISK_PARSER.hexpat`](patterns/DFIR/DISK_PARSER.hexpat) | Recursive Disk/Volume/Filesystem parsing |
|
| DISK_PARSER (DFIR) | `application/x-ima` | [`patterns/DFIR/DISK_PARSER.hexpat`](patterns/DFIR/DISK_PARSER.hexpat) | Recursive Disk/Volume/Filesystem parsing |
|
||||||
| DMG | | [`patterns/dmg.hexpat`](patterns/dmg.hexpat) | Apple Disk Image Trailer (DMG) |
|
| DMG | | [`patterns/dmg.hexpat`](patterns/dmg.hexpat) | Apple Disk Image Trailer (DMG) |
|
||||||
@@ -227,6 +229,8 @@ Everything will immediately show up in ImHex's Content Store and gets bundled wi
|
|||||||
| Atari XEX | | [`xex.hexpat`](patterns/xex.hexpat) | Atari 8-bit binary format |
|
| Atari XEX | | [`xex.hexpat`](patterns/xex.hexpat) | Atari 8-bit binary format |
|
||||||
| Terminfo | `application/x-terminfo` and `application/x-terminfo2` | [`patterns/terminfo.hexpat`](patterns/terminfo.hexpat) | Compiled *(legacy and extended)* term info entry |
|
| Terminfo | `application/x-terminfo` and `application/x-terminfo2` | [`patterns/terminfo.hexpat`](patterns/terminfo.hexpat) | Compiled *(legacy and extended)* term info entry |
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
### Scripts
|
### Scripts
|
||||||
|
|
||||||
| Name | Path | Description |
|
| Name | Path | Description |
|
||||||
|
|||||||
47
patterns/Assassin's Creed: Unity/acu_data_compressed.hexpat
Normal file
47
patterns/Assassin's Creed: Unity/acu_data_compressed.hexpat
Normal file
@@ -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;
|
||||||
@@ -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
patterns/Assassin's Creed: Unity/acu_forge.hexpat
Normal file
64
patterns/Assassin's Creed: Unity/acu_forge.hexpat
Normal file
@@ -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
patterns/Devil May Cry HD Collection/dmc3_hd_mod.hexpat
Normal file
165
patterns/Devil May Cry HD Collection/dmc3_hd_mod.hexpat
Normal file
@@ -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);
|
||||||
Reference in New Issue
Block a user