cmpwi cr7, %r27, 0
ROM:00057430 beq cr7, loc_57458
ROM:00057434 lbz %r0, 0x60(%r28)
ROM:00057438 cmpwi cr7, %r0, 0
ROM:0005743C beq cr7, loc_57458
ROM:00057440 addi %r3, %sp, arg_72+1
ROM:00057444 addi %r4, %r28, 0x61
ROM:00057448 li %r5, 0xA
bl sub_4C454
ROM:00057450 cmpwi cr7, %r3, 0
ROM:00057454 b loc_574A8
ROM:00057458 loc_57458: # CODE XREF: sub_57214+1FCj
ROM:00057458 # sub_57214+21Cj ...
ROM:00057458 lis %r31, -0x7FFF # 0x8001003E
ROM:0005745C ori %r31, %r31, 0x

here are the actual checks, it checks if a pointer is null, if it is, it errors, then they check the first char in the game's title id buffer, if it's 0 it erros and later a special memcmp is called which compares the title ids from the patch's sfo with the one from the disc's sfo.

Anyway I felt like it is better to explain the actual check for people's educational purposes.

Reply · Report Post