Advertisement
namofure

PMDTOKI xorshift32

Aug 4th, 2024 (edited)
350
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
ARM 1.61 KB | None | 0 0
  1. [0x020A88B8]
  2. initial rand = (0x020A9390 &= 0x00FFFFFF) + (0x020A7690)
  3. rand = PMDTOKI 0x020A88B8 xorshift32????
  4. [0x020A9390 16bitLCG???]
  5. inital rand = 0x348C
  6. rand = (rand * 0x6D + 0x3FD) % 0xFFFF
  7. //「つづきから」が表示されるタイミングで決定(1F毎に変動)
  8. [0x020A7690 16bitLCG??]
  9. inital rand = 0x348C
  10. rand = (rand * 0x6D + 0x3FD) % 0xFFFF
  11. //ゲーム内1F毎に変動?
  12. ------------------------------------------------------------------------------------
  13. :020435E4 E59F1034 ldr r1,[r15, #+0x34]     ;r15+0x34=*(02043620)=#34244780(0x020a88ac)
  14. r1:020A88AC
  15. :020435E8 E59F2038 ldr r2,[r15, #+0x38]     ;r15+0x38=*(02043628)=#34244792(0x020a88b8)
  16. r2:020A88B8
  17. :020435EC E5913000 ldr r3,[r1, #+0x0]       ;r1+0x0=*(020a88ac)=#625(0x00000271)
  18. r3:0
  19. :020435F0 E59F003C ldr r0,[r15, #+0x3c]     ;r15+0x3c=*(02043634)=#-1658038656(0x9d2c5680)
  20. r0:9D2C5680
  21. :020435F4 E7922103 ldr r2,[r2,+r3, lsl #0x2]
  22. r2 =19292256(0x020A88B8)
  23. :020435F8 E283C001 add  r12,r3,#0x1
  24. [r0:9D2C5680 r1:020A88AC r2:19292256 r3:0]
  25. :020435FC E02235A2 eor  r3,r2,r2,lsr #0xb
  26. [r3:192A0772]
  27. :02043600 E0002383 and  r2,r0,r3,lsl #0x7
  28. [r2:95001000]
  29. :02043604 E59F002C ldr r0,[r15, #+0x2c]     ;r15+0x2c=*(02043638)=#-272236544(0xefc60000)
  30. r0:EFC60000
  31. :02043608 E0232002 eor  r2,r3,r2
  32. r2:8C2A1772
  33. :0204360C E0000782 and  r0,r0,r2,lsl #0xf
  34. r0:0B800000
  35. :02043610 E0220000 eor  r0,r2,r0
  36. r0:87AA1772
  37. :02043614 E581C000 str r12,[r1, #+0x0]      ;r1+0x0=*(020a88ac)=#625(0x00000271)
  38. :02043618 E0200920 eor  r0,r0,r0,lsr #0x12
  39. r0:87AA3698 ←XORが合わない???
  40. :022D9FEC E3C004FF bic  r0,r0,#0xFF000000
  41. r0:00AA3698 ←dungeon initial seed (0x02350C78)
  42.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement