make tpt.selected* and tpt.brushx/y writable (replaces simstate branch)