debugging state encoding
Signed-off-by: Mike Day <ncmike@ncultra.org>