SHARE
TWEET

PS3 Image Image Injector

HlDE1 Apr 24th, 2019 (edited) 68 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. MW2 Offset : CDE7F800
  2. MW2 Resolution : 1280x720
  3. MW2 Format: .DDS DXT5
  4.  
  5. MW3 Offset : 0xCCC77000 , 0xCCD27900
  6. MW3 Resolution : 1280x720
  7. MW3 Format: .DDS DXT1
  8.  
  9. BO2 Offset : 0xCAD88480
  10. BO2 Resolution : 1024x1024
  11. BO2 Bytes Length :1000
  12. C#
  13. --------
  14. OpenFileDialog openFileDialog = new OpenFileDialog();
  15. openFileDialog.ShowDialog();
  16. byte[] array = File.ReadAllBytes(openFileDialog.FileName);
  17. PS3.SetMemory(CDE7F800 , array);
  18.  
  19. C++
  20. --------
  21. int getFileSize(char *file)
  22. {
  23.     int fd;
  24.     int ret;
  25.     uint64_t pos;
  26.     uint64_t nread;
  27.     ret = cellFsOpen(file, 0, &fd, NULL, 0);
  28.     if (!ret) {
  29.         CellFsStat sb;
  30.         ret = cellFsFstat(fd, &sb);
  31.         if (!ret) {
  32.             return sb.st_size;
  33.         }
  34.     }
  35.     return -1;
  36. }
  37. void readFile(char *file, char buf[], int size)
  38. {
  39.     int fd;
  40.     int ret;
  41.     uint64_t pos;
  42.     uint64_t nread;
  43.     ret = cellFsOpen(file, 0, &fd, NULL, 0);
  44.     if (!ret)
  45.     {
  46.         cellFsLseek(fd, 0, CELL_FS_SEEK_SET, &pos);
  47.         ret = cellFsRead(fd, buf, size, &nread);
  48.         if (!ret)
  49.         {
  50.             cellFsClose(fd);
  51.         }
  52.     }
  53. }
  54.  
  55. int ByteLength;
  56. unsigned int MALLOC = 0x100000; //‭921584‬
  57. unsigned int loc = 0xCDE7F800;
  58. void imginject(char *file)
  59. {
  60.     ByteLength = getFileSize(file);
  61.     if (ByteLength != -1)
  62.     {
  63.         readFile(file, (char*)loc, MALLOC);
  64.     }
  65.     else
  66.     {
  67.     //  DrawOkayMessageDialog("\nUnable to Inject Image\n");
  68.     }
  69. }
  70. bool imageinjected;
  71. bool imgfirst;
  72. void injectimagepls(uint64_t nothing)
  73. {
  74.     for (;;)
  75.     {
  76.         if (imgfirst == false)
  77.         {
  78.             Sleep(6000);
  79.             imginject("/dev_hdd0/tmp/SpaceMW2.dds");
  80.             imgfirst = true;
  81.         }
  82.         if (imageinjected == false && IsInGame == false)
  83.         {
  84.             imginject("/dev_hdd0/tmp/SpaceMW2.dds");
  85.             imageinjected = true;
  86.         }
  87.         Sleep(3000);
  88.     }
  89.     sys_ppu_thread_exit(nothing);
  90. }
  91.  
  92. Then Put this somewhere that constantly runs in game. (the image resets when you join a game)
  93. Code:
  94. if (DvarGetBool("cl_ingame")) {
  95.         imageinjected = false;
  96.     }
  97.  
  98. sys_ppu_thread_t startimageinject;
  99. sys_ppu_thread_create(&startimageinject, injectimagepls, 0, 10, 0x0A, 0, "imageInjector")
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top