add xor addr translate, and fix some bugs