Advertisement
Guest User

Untitled

a guest
Jun 1st, 2011
9,241
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.69 KB | None | 0 0
  1.  
  2. RESPERGH COMPLETE
  3.  
  4. Step 1
  5.  
  6. The first thing I did was look for Ringo's stats. The game would have to read these stats to compare them to the evolutionary requirements, which can be traced back to... the evolutionary requirements. So I did a search for 871 or whatever his offense was at the time. I changed each instance of the number 871 in RAM and when I saw ringo's stats change, it meant I had found the 871 that was being used as Ringo's offense. Easy! (001557E0 in ram, 2 bytes per value little endian)
  7.  
  8. Step 2
  9.  
  10. When the game has to use these numbers, it reads them from memory, or else it can't draw ringo's stat page, perform battle calculations, save to the card, or evolve. So I went into pSX debugger and set a "read" breakpoint on ringo's offense, telling the debugger to stop once the game tried to read ringo's offense. It stopped immediately, because digimon try to evolve every single frame of the game, thus stopping the game as soon as the evolution routine read ringo's offense. This showed me exactly where the evolution routines were in the code. (they are around 000E2F8C)
  11.  
  12. Step 3
  13.  
  14. The hardest part is making sense of these routines. They are C code that has been mangled and spit out by a C compiler into cold unfeeling MIPS32 assembler. You can forget about all that C code with variable names and enumerations and all that "If (evoOk > 3 && statsOk)" stuff. Here's some MIPS32
  15.  
  16.  
  17. lh r2,0x0016(r17) ; lh = load 2 bytes, r2 = load them into register 2
  18. 0x0016(r17) = the address of the 2 bytes is
  19. the value of register 17 + 16 bytes forward
  20.  
  21. addiu r1,r0,0xffff ; put the value FFFF into register 1
  22.  
  23. beq r2,r1,0x000e2ab4 ; if register 2 and 1 are equal, jump to 000e2ab4
  24. otherwise keep going
  25.  
  26. FFFFFFFF is -1 in signed arithmetic and often used to indicate -1, Null, False, No, and such. 0x0016(r17) means the 16th element of the data at r17. The fact it's looking for the 16th element of something usually means that there is some type structured data block around there. If you go to the address at r17, you will see that it contains the data structures defining evolution requirements. It reads 2 bytes from there, and compares it to False, and if it is False, it branches to 000e2ab4, which is another stat reading branch. In other words, FFFF is the designers way of saying "this evolution doesn't use this stat", so this code is designed to skip over these. It then goes on to read the other data in the evo requirements block around 0x0016(r17).
  27.  
  28.  
  29. 000e2a84: 00000000 nop
  30. 000e2a88: 0044082a slt r1,r2,r4
  31. 000e2a8c: 14200009 bne r1,r0,0x000e2ab4
  32. 000e2a90: 00000000 nop
  33. 000e2a94: 10000007 beq r0,r0,0x000e2ab4
  34. 000e2a98: 24120001 addiu r18,r0,0x0001
  35. 000e2a9c: 84620054 lh r2,0x0054(r3)
  36. 000e2aa0: 00000000 nop
  37. 000e2aa4: 0082082a slt r1,r4,r2
  38. 000e2aa8: 14200002 bne r1,r0,0x000e2ab4
  39. 000e2aac: 00000000 nop
  40. 000e2ab0: 24120001 addiu r18,r0,0x0001
  41. 000e2ab4: 86220018 lh r2,0x0018(r17)
  42. 000e2ab8: 2401ffff addiu r1,r0,0xffff
  43. 000e2abc: 1041000a beq r2,r1,0x000e2ae8
  44. 000e2ac0: 00000000 nop
  45. 000e2ac4: 0c038d44 jal 0x000e3510
  46. 000e2ac8: 00000000 nop
  47. 000e2acc: 00021e00 sll r3,r2,0x18
  48. 000e2ad0: 86220018 lh r2,0x0018(r17)
  49. 000e2ad4: 00031e03 sra r3,r3,0x18
  50. 000e2ad8: 0062082a slt r1,r3,r2
  51. 000e2adc: 14200002 bne r1,r0,0x000e2ae8
  52. 000e2ae0: 00000000 nop
  53. 000e2ae4: 24120001 addiu r18,r0,0x0001
  54.  
  55. Yeah there's a whole lot more of that and it doesn't get any prettier. Suffice it to say, A number of conditions were verified.
  56.  
  57. The main one is HKAB's 0 battles or 40 techniques requirement. Either one of these needs to be filled. He also won't evolve unless the digimon has 0 deaths. He also requires at least 50 weight. Everyone knows about the plain stat requirements already.
  58.  
  59. That's it!
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement