(Hackily) add code to read raw registers, both in the lib and the test prog