Machsupport Forum

Mach Discussion => Mach Screens => Screen designer tips and tutorials => Topic started by: Andrey67 on May 26, 2011, 02:15:34 PM

Title: The .set file format
Post by: Andrey67 on May 26, 2011, 02:15:34 PM
Where can I find a full specification of the .set file format?
Title: Re: The .set file format
Post by: ger21 on May 26, 2011, 04:41:00 PM
Appendix 2
http://www.machsupport.com/docs/Mach2_6.11_Custom.pdf
Title: Re: The .set file format
Post by: Andrey67 on May 26, 2011, 05:50:57 PM
Thank you very much!
Title: Re: The .set file format
Post by: flyinglotus1983 on August 05, 2016, 10:17:29 PM
Sorry for digging up an old topic, but I've tried to parse the format out per the Mach2 PDF posted above (from the archive.org historical cache, as the file 404'd on machsupport.com).  My parser, I believe, is following the original Mach2 spec, but it's still throwing some pretty wild errors when it encounters strings longer than 255 bytes, which shouldn't be possible according to the old spec.  It seems quite common, however, for newer screens to use > 256 chars for visual basic macros.

My question is, is there a later version of this document that explains how strings > 256 chars are handled?  is there an escape sequence?
Title: Re: The .set file format
Post by: stirling on August 13, 2016, 07:24:54 AM
You may well have sorted this by now but if not...

AFAIK there is no later doc than the one you have. However many moons ago I reverse engineered the set file format in order to write my own screen designer.

So here you go. If the macro (or gcode) is less than 255 chars then the length byte indicates the length (as you know)

However if the length of the macro is 255 or greater then the length byte should be set to 255 and the following two bytes set to indicate the length. (hi, lo) IIRC.
Title: Re: The .set file format
Post by: flyinglotus1983 on August 13, 2016, 10:23:44 AM
You may well have sorted this by now but if not...

Nope, I've been playing around with my new UC100 motion controller and a new breakout board design.  Was pleasantly surprised to see your reply, I added a few lines of code to my parser per your instructions, and it works like a charm!  Thanks again for the help!


Quote
in order to write my own screen designer.
Would you be able to share any details about it?  Is it something you've made public or will make public?  Just curious.  I'm writing a screen designer as well; not sure how much overlap or similarities we'll have, but I'd be interested in hearing what you've done.
Title: Re: The .set file format
Post by: ger21 on August 13, 2016, 10:33:58 AM
What's the point of writing a screen designer when Mach3 is becoming obsolete, and there are already two other usable screen designers?
Title: Re: The .set file format
Post by: flyinglotus1983 on August 13, 2016, 11:00:19 AM
What's the point of writing a screen designer when Mach3 is becoming obsolete

Does Newfangled Solutions give away free upgrades to Mach4?  Because I already own Mach3 (my license is 10+ years old), and I don't really feel the need to upgrade if it already works.



Quote
and there are already two other usable screen designers?

The screen designer is half of it.  I'm generating the skinned graphics from a script so that they don't look as ugly as the default skin, or the (even uglier) aftermarket skins.  So apples and oranges really.
Title: Re: The .set file format
Post by: stirling on August 13, 2016, 11:41:29 AM
Thanks again for the help!

No worries.

Would you be able to share any details about it?  Is it something you've made public or will make public?  Just curious.  I'm writing a screen designer as well; not sure how much overlap or similarities we'll have, but I'd be interested in hearing what you've done.

I never finished it to anywhere near releasable. See this thread http://www.machsupport.com/forum/index.php/topic,25574.0.html

As you can see, there was clearly no interest so I moved on to other things.
Title: Re: The .set file format
Post by: GC on November 10, 2022, 09:04:22 AM
Newest working link that I could find:
https://www.machsupport.com/wp-content/uploads/2013/02/Mach2_6.11_Custom.pdf