Minor format fault with clddlp / photon files


formware produces files which are flagged as v2, but it doesn’t appear to write a valid machine_info struct; while it is currently fairly useless (containing only the name of the target machine model), I’m uncertain as to whether it is technically optional.


I think it should be there unless the format changed in the last 6 months. How do you determine it’s not there?


I noticed it while working on code for photon validator. The last two uints of the header in v2 should be offset and size for the struct, and it should be located after the parameters struct but before the first layer.
Looking at the files formware is writing, the last two uints of the header are empty and the parameter struct offset + the parameter struct size comes to the same as the layer offset, so it definitely isn’t there (this is with formware


I can see in the code it’s writing printParametersOffsetAddress and printParametersSize after thr projectType and before antiAliasingLevel.


The struct ‘printParameters’ is 60kb and is located before the layer definitions.
It ends with 4 empty uint’s.



Correct, except after printParameters there is then machineInfo which is 76 in size and then the machinename which is technically variable, but all the files I have looked at it is 15 in size (its contents that I have seen have always been ‘Anycubic Photon’), then the layer definition.

the machine info struct has the format:
type = struct PhotonMachineInfo {
int padding[7];
unsigned int name_address;
unsigned int name_size;
int padding2[10];

In all the files I’ve looked at so far, padding is empty and padding2 has some values in it, but I have not worked out what they are - an example from a current file is

(gdb) p p.machine_info
$2 = {padding = {0, 0, 0, 0, 0, 0, 0}, name_address = 16944, name_size = 15, padding2 = {8, 26469571, 4, 17171200, -1250480272, 32764, 1619426368, 342, 512, 342}}

The 8 could be referring to bottom layer count and the 4 to the AA level, but your guess would be as good as mine there.

This is found on files generated by Chitubox v1.6 with the target machine set to photon.