Glitches can also be flagged as 'normal', in which case there is no highlight as in |2|. Finally the glitch could be flagged as an error, in which case it will be highlighted in red.
In order for the glitch explorer to receive the output value, you must insert the special code <code>$GLITCH$</code> into the ''Target Settings'' --> ''Output Format'' settings.
This will mean data is no longer sent to the terminal emulator when using the capture 1 or capture multi buttons, but instead is logged in the glitch explorer window.
=== The Main Settings ===
Details of the main settings:
The number of tuning parameters is set at |1|. This defines how many different parameters to adjust.
The response of the system during normal operation is set at
|2|. This defines what happens when no glitching or unexpected behavior happened.
The desired response of the system if the glitch was successful is set at
The expected and desired responses are expected to be Python expressions, where <code>s</code> is a str-type variable which contains the response of the system. The expression must evaulate to <code>True</code> or <code>False</code>. For example, the following shows examples of what you could use as possible expressions:
! Parameter Expression
| Check for "
hellon" exactly.| s == " hellon"
| Check for "
hellon" at end of string.| s.endswith(" hellon")
| Check for hex 0xAF in last byte position.
=== Parameter Settings ===
Details of the parameter settings :
The name of the parameter to be tuned is set at |1|. This name will be displayed in the table, so should be some useful reminder of the parameter name.
The ''Parameter Path'' at |2| defines what is modified. This string is simply copied from the ''Script Commands'' tab of the main window. This lets you modify ''any'' parameter of the GUI, but most likely you will want to modify some of the glitch settings. The numeric value in this string should be deleted.
The ''Data Format'' at |3| defines what type of data will be inserted into the parameter. For example for the ''Glitch Offset ( as % of period)'' used here, this would need to be set to ''Float'', meaning fractional values such as "4. 5" are allowed. The data format should match the data format expected.
The ''Range'' at |4| defines the range from the minimum to maximum that will be swept for the parameter. Valid values depend on the parameter being adjusted. For example if you are adjusting the ''Glitch Offset'' a negative and positive offset makes sense, but if you were adjusting the ''Repeat'' it would only make sense to adjust over the range <code>(1,255)</code>.
The ''Value'' at |5| defines the starting value of the sweep. This is '''NOT''' automatically set to the minimum value of your sweep. If you want to perform the full sweep, you must manually set this to the minimum of the range.
The ''Step'' at |6| defines the amount the value is incremented on each glitch attempt. When the value reaches the maximum defined by the range, it will loop around to the minimum and continue incrementing.
The ''Repeat'' at |7| defines how many times to perform the same value. This can be used to determine the reliability of each glitch value.
If using multiple parameters, they will be looped as shown in this pseudo-code:
pre> param_value_0 = starting_value_0 param_value_1 = starting_value_1
while capture_in_progress: while param_value_1 < param_value_1_max:
while param_value_0 < param_value_0_max: param_value_0 += param_value_0_incr run_glitch_here() param_value_0 = param_value_0_min param_value_1 += param_value_1_incr param_value_1 = param_value_1_min</pre> Note you can quickly cause very long captures to occur! To run the glitch explorer, you need to set the appropriate number of traces on the ''General Settings'' tab, and use the ''Capture Multi'' to run the glitch explorer.
== Example Running the Glitch Explorer ==