tga->WpKey=0xAAAAAAAA Did the trick! Thanks everyone and as always it was in the software reference manual although I was being distracted by:
"Furthermore, in the Script environment, many elements are write-protected so user code cannot change their values, but these elements can be read at any time. In the C environment, any element for which you are provided access (that is, whose name is provided in the RtGpShm.h header file) can be written to. "
Which I wrongly assumed meant that the registers were not write-protected.