Specifically,
here's the live_run function that I don't know how to set up. It looks like all the data is shifted by one bit, (instead of $FF followed by six bytes of $00 as a sync gap in the sector, I get $F8 $07 $00 $00 $00 $00 $00...) so I'm not synced properly? How do I adjust that to the image's clock?