Hey everyone,
I've written a program to convert the FreeBOOT patches back into a "re-compilable" format which can be used by Dashlaunch (mainly to further my knowledge of how the patches affect the system). I've been looking at how the FreeBOOT/Dashlaunch patches are formed and I just wanted to confirm a few details with anyone "in the know" since there seems to be such little resource for this sort of thing on any of the 360 hacking forums.
Basic structure:
VA (for Dashlaunch) -or- File Offset (for FreeBOOT) to patch - size int,
(Length of opcodes / 4) - size int,
PPC ASM opcodes - length divisible by 4 (I'm guessing all PPC opcodes are 4bytes minimum in length? ... that's weird coming from x86 ASM!!)
-- Repeated --
0xffffffff (To end a patch section)
C++ Interpretation:
struct patch {
long dwAddress;
long dwLength;
char* bData;
bool bEndBlock;
};
Example "re-compilable" format:
.set UnkFunc30, 0x00000948
# ============================================================================
# UnkFunc30 - VA: 818d0948, Offset: 00000948
# ============================================================================
.long UnkFunc30
.long (9f - 0f) / 4
0:
cmpwi cr6, %r11, 0xc # 2f 0b 00 0c
addi %r9, %r9, 0x3360 # 39 29 33 60
9:
The main thing I'm getting confused about with the patches is whether the "address to patch" specified in the
FreeBOOT patches is relative to the start of the executable (e.g. xam.xex), or the end of the PE header?
Any help would be really appreciated!