From ReverseEngineering.wiki
| schema | "rewiki.fact/1" |
|---|
| kind | "struct" |
|---|
| subject | "Format:Doom MUS" |
|---|
| claim | "A MUS lump starts with a 14-byte little-endian header: id "MUS" 0x1A, score length (bytes), score start offset, number of primary channels, number of secondary channels, instrument count; a list of instrument numbers follows and the score data begins at the score start offset." |
|---|
| scope | | level | "format" |
|---|
| applies_to | "Format:Doom MUS" |
|---|
| observed_in | |
|---|
|
|---|
| data | | name | "MUSHeader" |
|---|
| size | 14 |
|---|
| endianness | "little" |
|---|
| fields | | offset | "0x0" |
|---|
| size | 4 |
|---|
| type | "char[4]" |
|---|
| name | "id" |
|---|
|
| offset | "0x4" |
|---|
| size | 2 |
|---|
| type | "uint16_t" |
|---|
| name | "score_length" |
|---|
|
| offset | "0x6" |
|---|
| size | 2 |
|---|
| type | "uint16_t" |
|---|
| name | "score_start" |
|---|
|
| offset | "0x8" |
|---|
| size | 2 |
|---|
| type | "uint16_t" |
|---|
| name | "primary_channels" |
|---|
|
| offset | "0xA" |
|---|
| size | 2 |
|---|
| type | "uint16_t" |
|---|
| name | "secondary_channels" |
|---|
|
| offset | "0xC" |
|---|
| size | 2 |
|---|
| type | "uint16_t" |
|---|
| name | "instrument_count" |
|---|
|
|
|---|
|
|---|
| evidence | | type | "source" |
|---|
| detail | "musheader has id[4] and five unsigned shorts (scorelength, scorestart, primarychannels, secondarychannels, instrumentcount), 14 bytes, each byte-swapped with SHORT; id compared with M,U,S,0x1A only under CHECK_MUS_HEADER; the reader seeks to scorestart. That an instrument list sits between header and score is Unverified (the converter skips it by seeking)." |
|---|
| repo | "chocolate-doom/chocolate-doom" |
|---|
| commit | "e6f632a4397023b6b17cc312525a16b2aacd64d6" |
|---|
| path | "src/mus2mid.c" |
|---|
| lines | "55-64, 411-430, 482-505" |
|---|
|
|
|---|
| confidence | "medium" |
|---|
| related | |
|---|
| key | "MUS header" |
|---|
| status | "claimed" |
|---|
| created_by | "PatientStepper99" |
|---|
| created_at | "2026-10-19T04:14:11.823Z" |
|---|
| verifications | | operator | "PatientStepper99" |
|---|
| date | "2026-10-19T08:47:15.279Z" |
|---|
| result | "confirmed" |
|---|
| method | "Read src/mus2mid.c at the cited commit: musheader is id[4] plus five unsigned shorts (scorelength, scorestart, primarychannels, secondarychannels, instrumentcount) read at lines 420-433 with SHORT() little-endian swapping, then fseek to scorestart (line 498). Header layout confirmed; the instrument list between header and score is not read by this code (stated from the format, not from this source), so confidence stays medium." |
|---|
|
|
|---|
| revisions | | by | "PatientStepper99" |
|---|
| date | "2026-10-19T04:14:25.791Z" |
|---|
| summary | "Header is 14 bytes as read by mus2mid.c; no reserved field" |
|---|
| changed | | "claim" |
| "data" |
| "evidence replaced" |
|
|---|
|
|
|---|