public void relocate32(int hunk_no, byte[] data, uint offset, uint hunk_addr) { var delta = LoadedImage.ReadBeUInt32(data, offset); var addr = hunk_addr + delta; LoadedImage.WriteBeUInt32(data, offset, addr); Debug.WriteIf(Trace.TraceVerbose, string.Format("#{0,2} + {1:X8}: {2:X6} (delta) + {3:X6} (hunk_addr) -> {4:X6}", hunk_no, offset, delta, hunk_addr, addr)); }
private PowerPcInstruction DisassembleX(uint op, uint rs, uint ra, uint rb, uint xo, uint rc) { uint w = (op << 26) | (rs << 21) | (ra << 16) | (rb << 11) | (xo << 1) | rc; LoadedImage img = new LoadedImage(Address.Ptr32(0x00100000), new byte[4]); img.WriteBeUInt32(0, w); return(Disassemble(img)); }