Advertisement
DemonixAsTy

[解説] SPRX Projectについて

Apr 3rd, 2015
1,292
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.36 KB | None | 0 0
  1. [解説] SPRX Projectについて
  2.  
  3. ※面倒なのでまだしっかりとまとめてはいません。
  4.  
  5. 新しくSPRX作る場合は
  6. Visual C++ → SCE → PS3 → PS3 PPU Project
  7. Project typeはPPU PRX project
  8.  
  9. ++++++++++++++++++++++++++++++
  10.  
  11. Project立ち上げた後
  12. ソリューションエクスプローラーからprx.cppを開く
  13. エラーのどれでもいいので右クリックしてエラー元開く
  14. そのエラーページ上部に以下コード貼り付け
  15.  
  16. #include <sys/sys_time.h>
  17. #include <sys/syscall.h>
  18. #include <sys/ppu_thread.h>
  19. #include <string.h>
  20. #include <sys/syscall.h>
  21. #include <stdarg.h>
  22. #include <stddef.h>
  23. #include <sys/timer.h>
  24.  
  25. ++++++++++++++++++++++++++++++
  26.  
  27. SYS_MODULE_INFOを追加し、以下コード貼り付け
  28.  
  29. void sleep(usecond_t time)
  30. {
  31. sys_timer_usleep(time * 1000);
  32. }
  33.  
  34. int console_write(const char * s)
  35. {
  36. uint32_t len;
  37. system_call_4(403, 0, (uint64_t) s, 32, (uint64_t) &len);
  38. return_to_user_prog(int);
  39. }
  40.  
  41. sys_ppu_thread_t id;
  42. sys_ppu_thread_t create_thread(void (*entry)(uint64_t), int priority, size_t stacksize, const char* threadname)
  43. {
  44. if(sys_ppu_thread_create(&id, entry, 0, priority , stacksize, 0, threadname) != CELL_OK)
  45. {
  46. console_write("Thread creation failed\n");
  47. }
  48. else
  49. {
  50. console_write("Thread created\n");
  51. }
  52. return id;
  53. }
  54.  
  55. ++++++++++++++++++++++++++++++
  56.  
  57. PS3_PPU_Project1_prx_entryを追加し、以下コード貼り付け
  58.  
  59. void thread_entry(uint64_t arg)
  60. {
  61.  
  62. }
  63. //This is where all your mods will begin ^_^
  64.  
  65. ++++++++++++++++++++++++++++++
  66.  
  67. PS3_PPU_Project1_prx_entry内に以下コードを記述する
  68.  
  69. create_thread(thread_entry, 0x4AA, 0x6000, "Main_Thread");
  70. return 0;
  71.  
  72. ++++++++++++++++++++++++++++++
  73.  
  74. 情報
  75.  
  76. Writing the Memory//I'm not entirely sure if this is correct, but it should be.
  77. 1 byte - *(char*)0x0000000 = 0x01; //Yes this is literately how you write the memory in C++.
  78. 2 bytes - *(short*)0x00000000 = 0x01;
  79. 3 bytes - *(float*)0x00000000 = 0x01;
  80. 4 bytes - *(int*)0x00000000 = 0x01;
  81. 8 bytes - *(double*)0x00000000 = 0x01;
  82.  
  83.  
  84. for (;;)//Since the code practically runs once you'll need to add a loop
  85. {
  86. if (InGame())//Detects when it's InGame so it knows when to run and not every half a millisecond.
  87. {
  88. sleep(5000); //Sleeps for 5 seconds then executes your code below.
  89. *(char*)0x1786418 = 0x40; //Thanks to mango for the player speed offset, This sets your speed x2 so we'll know if it works or not ^_^
  90. }
  91. }
  92.  
  93. ++++++++++++++++++++++++++++++
  94.  
  95. 情報
  96.  
  97. Reading the Memory
  98. same concept
  99. 1 byte - *(char*)0x0000000;
  100. 2 bytes - *(short*)0x00000000;
  101. 3 bytes - *(float*)0x00000000;
  102. 4 bytes - *(int*)0x00000000;
  103. 8 bytes - *(double*)0x00000000;
  104.  
  105.  
  106. for (;;)//Since the code practically runs once you'll need to add a loop
  107. {
  108. if (InGame())//Detects when it's InGame so it knows when to run and not every half a millisecond.
  109. {
  110. sleep(5000); //Sleeps for 5 seconds then executes your code below.
  111. if (*(char*)0x1786418 == 63)
  112. {
  113. *(char*)0x1786418 = 0x40; //Thanks to mango for the player speed offset, This sets your speed x2 so we'll know if it works or not ^_^
  114. }
  115. else
  116. { *(char*)0x1786418 = 0x3F; /*Obviously this wouldn't work because it would turn it on and off every 5 seconds*/ }
  117. }
  118. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement