From 55e4283432e2a4178e4c323c706b7cf865f6f602 Mon Sep 17 00:00:00 2001 From: luisfilipe23lol <87547903+luisfilipe23lol@users.noreply.github.com> Date: Mon, 19 Jun 2023 13:22:17 +0100 Subject: [PATCH] patterns/cda: Added CDA pattern (#133) * Create cda.hexpat pattern language created for .cda files * added test file for cda pattern * Delete cda.hexpat.cda.cda * Add test file cda test file for cda pattern * Update README.md Add cda file in read.me --- README.md | 1 + patterns/cda.hexpat | 29 ++++++++++++++++++++++++ tests/patterns/test_data/cda.hexpat.cda | Bin 0 -> 44 bytes 3 files changed, 30 insertions(+) create mode 100644 patterns/cda.hexpat create mode 100644 tests/patterns/test_data/cda.hexpat.cda diff --git a/README.md b/README.md index 5f7a7c3..83a6ec4 100644 --- a/README.md +++ b/README.md @@ -32,6 +32,7 @@ Everything will immediately show up in ImHex's Content Store and gets bundled wi | CCHVA | | [`patterns/cchva.hexpat`](patterns/cchva.hexpat) | Command and Conquer Voxel Animation | | CCVXL | | [`patterns/ccvxl.hexpat`](patterns/ccvxl.hexpat) | Command and Conquer Voxel Model | | CCPAL | | [`patterns/ccpal.hexpat`](patterns/ccpal.hexpat) | Command and Conquer Voxel Palette | +| CDA | | [`patterns/cda.hexpat`](patterns/cda.hexpat) | Compact Disc Audio track | | CHM | | [`patterns/chm.hexpat`](patterns/chm.hexpat) | Windows HtmlHelp Data (ITSF / CHM) | | COFF | `application/x-coff` | [`patterns/coff.hexpat`](patterns/coff.hexpat) | Common Object File Format (COFF) executable | | CPIO | `application/x-cpio` | [`patterns/cpio.hexpat`](patterns/cpio.hexpat) | Old Binary CPIO Format | diff --git a/patterns/cda.hexpat b/patterns/cda.hexpat new file mode 100644 index 0000000..0df588f --- /dev/null +++ b/patterns/cda.hexpat @@ -0,0 +1,29 @@ +struct Header { +u32 RIFF; +s32 size; +u32 CDDA; +u32 fmt; +u32 lenghtofthechunck; +u16 versionofcdformat; +u16 numberofrange; +u32 identifier; +}; + + +struct DataInfo { + +u32 range; +u32 duration; +u8 rangepositionframes; +u8 rangepositionseconds; +u8 rangepositionminutes; +u8 nullbyte; +u8 durationtrackframes; +u8 durationtrackseconds; +u8 durationtrackminutes; +u8 nullbytee; +}; + + +Header header @ 0; +DataInfo data @ 0x1C; diff --git a/tests/patterns/test_data/cda.hexpat.cda b/tests/patterns/test_data/cda.hexpat.cda new file mode 100644 index 0000000000000000000000000000000000000000..08b7b2858000c7879cf0fb050fa458d0f42ed059 GIT binary patch literal 44 ycmWIYbaPW-U|?`|adAw`Em4pFvKbke7(Sgl#aQFRz%bX8fq_+=g@J*YnE?RMM+hYV literal 0 HcmV?d00001