Originally posted by Helder
View Post
Anyway, I the video example was enough for me. In the case of Rumble Roses, the checksum is the last few bytes of the file. There's no MC02 or the like that stands out as a header, but I finally noticed the first 4 bytes of the file was the size of the file and searched for that in IDA. One of the results turned up a sub that was obviously the checksum. The checksum itself is just loading every byte, sign extending, and adding. I about shit myself when I got it to run and turn up the right value the first time. lol
I'll paste the PowerPC for the checksum below, just for reference. I have two other titles at the top of my list for modding (Juiced 2 and Smackdown 2011). After that, I'll have to figure out what other games I have that need edited and don't have editors/checksum fixes. I'm sure I have a shitload.
Code:
.text:820F4080 sub_820F4080: # CODE XREF: .text:820F499Cp .text:820F4080 # .text:820F49FCp .text:820F4080 lis r10, 2 # 0x2AA3C # Load Immediate Shifted .text:820F4084 li r9, 0 # Load Immediate .text:820F4088 addi r11, r3, 3 # Add Immediate .text:820F408C ori r10, r10, 0xAA3C # 0x2AA3C # OR Immediate .text:820F4090 .text:820F4090 loc_820F4090: # CODE XREF: sub_820F4080+58j .text:820F4090 lbz r7, -2(r11) # Load Byte and Zero .text:820F4094 addi r10, r10, -1 # Add Immediate .text:820F4098 lbz r8, -3(r11) # Load Byte and Zero .text:820F409C lbz r5, -1(r11) # Load Byte and Zero .text:820F40A0 extsb r6, r7 # Extend Sign Byte .text:820F40A4 extsb r8, r8 # Extend Sign Byte .text:820F40A8 lbz r4, 1(r11) # Load Byte and Zero .text:820F40AC extsb r7, r5 # Extend Sign Byte .text:820F40B0 lbz r3, 0(r11) # Load Byte and Zero .text:820F40B4 add r8, r8, r6 # Add .text:820F40B8 extsb r6, r4 # Extend Sign Byte .text:820F40BC add r8, r8, r7 # Add .text:820F40C0 extsb r7, r3 # Extend Sign Byte .text:820F40C4 add r8, r8, r6 # Add .text:820F40C8 addi r11, r11, 5 # Add Immediate .text:820F40CC add r8, r8, r7 # Add .text:820F40D0 cmplwi cr6, r10, 0 # Compare Logical Word Immediate .text:820F40D4 add r9, r8, r9 # Add .text:820F40D8 bne cr6, loc_820F4090 # Branch if not equal .text:820F40DC mr r3, r9 # Move Register .text:820F40E0 blr # Branch unconditionally
Comment