Introduction
The program decides between its two hybrid blocks by the first byte of the block
(LoadHAddonFromStream in FileHandling.pas): from 16 to 99 it is the new
THeaderCustomAddon of 1,136 bytes, which is what the current files have; anything else
makes it read the old THeaderCustomAddonOld of 1,016 bytes. A record of MandId
20 or later whose hybrid block is the old one is 840 + 1,016 = 1,856 bytes: the same 840-byte main
header as the current record, then the old block.
No file of this kind was available, and the source does not say which program
version would write it; the explorer reads it from the source and tests it only on built files, so the
viewer is partial for this variant. A file is taken as this layout when it is exactly 1,856 bytes, its
MandId is 20 or more and the byte at 0x348 is not from 16 to 99.
Layout
0x000 to 0x347: the main header, TMandHeader10, field for field as on the page for
MandId 20 and later, including the 408-byte lighting block from 0x1B0.
From 0x348 the old hybrid block:
| Offset | Size | Field | Type | Meaning |
|---|---|---|---|---|
| 0x348 | 4 | iHCAversion | i32 | The version of the block (its first byte is not 16 to 99) |
| 0x34C | 4 | iCustomCount | i32 | The number of custom formulas |
| 0x350 | 24 | iItCounts[0..5] | 6 × i32 | The iteration count of each formula |
| 0x368 | 24 | iFormula[0..5] | 6 × i32 | The formula of each slot: below 20 a built-in formula, 20 and above a .m3f file |
| 0x380 | 192 | CustomFname[0..5] | 6 × 32 bytes | The names of the formulas, each ending at the first zero byte |
| 0x440 | 768 | dOptionValues[0..5] | 6 × 16 × f64 | The 16 option values of each formula |
The block ends at 0x740 = 1,856. It has no option kinds and no hybrid flags: the program takes the
kinds from the formulas and converts the block to the new one when it loads
(UpdateFormulaOptionTo20).
Not described
What this page and the explorer leave out or only infer for this layout.
Known, not yet covered
- Reference: the conversion to the new hybrid block – in the program’s open source (
FileHandling.pas,UpdateFormulaOptionTo20), not written up; the main header’s own gaps are listed on the current layout’s page. - Viewer: option kinds and labels of the old block – formula names, numbers and iteration counts are listed; option values are shown as plain doubles.
Unknown
- Reference and viewer: this layout on a real file – none was available, so it follows from the source only and is shown as a built test file shows it.
- Reference: which program version wrote it, and the values of
iHCAversionandiCustomCount– the source does not say.
Variants
- MandId 0 to 3 – the oldest record, TMandHeaderOld, 200 bytes
- MandId 4 to 6 – TMandHeader4, 272 bytes, with the field of view and shadow settings
- MandId 7 – the 580-byte record with four lights
- MandId 8 to 19 – TMandHeader9, 704 bytes, with the old hybrid block from MandId 16
- MandId 20 and later – the current record, 1,976 bytes
- MandId 20 and later with the old hybrid block – 1,856 bytes
Links
Software
- Mandelbulb 3D – the Windows program that reads these files (Windows)
Developers
- thargor6/mb3d – the program’s Delphi source under the GNU LGPL 2.1, with THeaderCustomAddonOld and the loader (Delphi)
Reference
- M3P, MandId 20 and later – the current record, with every field’s meaning