|
| 1 | +# efm-decoder-data |
| 2 | + |
| 3 | +**EFM Data24 to Binary Data Decoder** |
| 4 | + |
| 5 | +## Overview |
| 6 | + |
| 7 | +efm-decoder-data converts Data24 sections into ECMA-130 compliant binary data sectors. This tool handles data-mode EFM decoding for applications like Domesday LaserDiscs and CD-ROM data, performing Reed-Solomon Product Code (RSPC) error correction and producing raw binary output. |
| 8 | + |
| 9 | +## Usage |
| 10 | + |
| 11 | +```bash |
| 12 | +efm-decoder-data [options] <input.d24> <output.bin> |
| 13 | +``` |
| 14 | + |
| 15 | +## Options |
| 16 | + |
| 17 | +- `-h, --help` - Display help information |
| 18 | +- `-v, --version` - Display version information |
| 19 | +- `-d, --debug` - Show debug output |
| 20 | +- `-q, --quiet` - Suppress info and warning messages |
| 21 | +- `--output-metadata` - Output bad sector map metadata file |
| 22 | +- `--show-rawsector` - Show raw sector frame data |
| 23 | +- `--show-rawsector-debug` - Show Data24 to raw sector decoding debug |
| 24 | +- `--show-sector-debug` - Show raw sector to sector decoding debug |
| 25 | +- `--show-sector-correction-debug` - Show sector correction debug |
| 26 | +- `--show-all-debug` - Show all decoding debug |
| 27 | + |
| 28 | +### Arguments |
| 29 | + |
| 30 | +- `input` - Input Data24 section file (from efm-decoder-d24) |
| 31 | +- `output` - Output binary data file |
| 32 | + |
| 33 | +## Processing Pipeline |
| 34 | + |
| 35 | +The decoding sequence performed by efm-decoder-data: |
| 36 | + |
| 37 | +1. **Data24 Sections** → Input from efm-decoder-d24 (or stdin via Unix pipes, 2352 bytes per section) |
| 38 | +2. **Raw Sectors** → Extract 2048-byte data sectors from each section |
| 39 | +3. **RSPC Error Correction** → Reed-Solomon Product Code correction |
| 40 | +4. **Sector Validation** → Mark sectors as valid or invalid |
| 41 | +5. **Binary Output** → Continuous binary data stream |
| 42 | + |
| 43 | +**Unix Pipelining**: efm-decoder-data supports stdin/stdout using `-`, enabling direct data extraction from EFM processing pipelines. |
| 44 | + |
| 45 | +## Technical Details |
| 46 | + |
| 47 | +### Data Format Conversion |
| 48 | + |
| 49 | +- **Input**: Data24 sections (2352 bytes each, representing 1/75 second) |
| 50 | +- **Processing**: Strip EFM parity and error correction overhead |
| 51 | +- **Output**: Pure data sectors (2048 bytes each) |
| 52 | +- **Efficiency**: ~87% data efficiency (2048/2352) |
| 53 | + |
| 54 | +### RSPC Error Correction |
| 55 | + |
| 56 | +Implements Reed-Solomon Product Code correction according to ECMA-130: |
| 57 | +- **Q Parity**: Outer code correction |
| 58 | +- **P Parity**: Inner code correction |
| 59 | +- **Sector-level**: All-or-nothing correction per 2048-byte sector |
| 60 | +- **Unscrambling**: Data de-interleaving for error correction |
| 61 | + |
| 62 | +### Error Handling |
| 63 | + |
| 64 | +Unlike audio decoding, data decoding is binary: |
| 65 | +- **Valid sectors**: Fully corrected, guaranteed accuracy |
| 66 | +- **Invalid sectors**: Uncorrectable, flagged in metadata |
| 67 | +- **No concealment**: Corrupted data is not interpolated |
| 68 | + |
| 69 | +## Metadata Output |
| 70 | + |
| 71 | +### Bad Sector Map |
| 72 | + |
| 73 | +When `--output-metadata` is specified, creates a text file listing invalid sector addresses: |
| 74 | + |
| 75 | +``` |
| 76 | +28 |
| 77 | +29 |
| 78 | +30 |
| 79 | +31 |
| 80 | +``` |
| 81 | + |
| 82 | +Each number represents a 2048-byte sector that could not be corrected. |
| 83 | + |
| 84 | +### Format |
| 85 | + |
| 86 | +- One sector address per line |
| 87 | +- Addresses are sequential (starting from 0) |
| 88 | +- Only invalid/uncorrectable sectors are listed |
| 89 | +- Can be used by downstream tools for error handling |
| 90 | + |
| 91 | +## Pipeline Integration |
| 92 | + |
| 93 | +### Input Requirements |
| 94 | + |
| 95 | +- Data24 sections from efm-decoder-d24 |
| 96 | +- CIRC-corrected data (first-stage error correction completed) |
| 97 | + |
| 98 | +### Common Workflows |
| 99 | + |
| 100 | +#### Standard Data Extraction |
| 101 | + |
| 102 | +```bash |
| 103 | +# Complete pipeline for data using Unix pipes |
| 104 | +efm-decoder-f2 input.efm - | efm-decoder-d24 - - | efm-decoder-data - output.bin --output-metadata |
| 105 | + |
| 106 | +# Alternative: step by step with files |
| 107 | +efm-decoder-f2 input.efm temp.f2 |
| 108 | +efm-decoder-d24 temp.f2 temp.d24 |
| 109 | +efm-decoder-data temp.d24 output.bin --output-metadata |
| 110 | +``` |
| 111 | + |
| 112 | +#### Domesday LaserDisc Workflow |
| 113 | + |
| 114 | +```bash |
| 115 | +# Extract data then verify VFS structure |
| 116 | +efm-decoder-data domesday.d24 domesday.bin --output-metadata |
| 117 | +vfs-verifier domesday.bin domesday_metadata.txt |
| 118 | +``` |
| 119 | + |
| 120 | +#### Multi-Source Data Recovery |
| 121 | + |
| 122 | +```bash |
| 123 | +# Stack sources for better error correction |
| 124 | +efm-stacker-f2 disc1.f2 disc2.f2 disc3.f2 stacked.f2 |
| 125 | +efm-decoder-d24 stacked.f2 stacked.d24 |
| 126 | +efm-decoder-data stacked.d24 recovered.bin --output-metadata |
| 127 | +``` |
| 128 | + |
| 129 | +## Output Verification |
| 130 | + |
| 131 | +The extracted binary data can be verified using: |
| 132 | +- `vfs-verifier` - For Domesday LaserDisc VFS structures |
| 133 | +- Standard file analysis tools |
| 134 | +- Checksum verification (if reference data available) |
0 commit comments