Advertisement
SciresM

shuffleshop.c

Feb 24th, 2015
7,974
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 1.70 KB | None
  1. #include "spider.h"
  2.  
  3. int (*GX_SetTextureCopy)(void *input_buffer, void *output_buffer, unsigned int size, int in_x, int in_y, int out_x, int out_y, int flags) = 0x0011DD48;
  4. int (*GSPGPU_FlushDataCache)(void *addr, unsigned int len) = 0x00191504;
  5.  
  6. int uvl_entry()
  7. {
  8.     unsigned int addr;
  9.     int *buf = 0x18410000;
  10.     unsigned int offset;
  11.     int i;
  12.     int j;
  13.     int FOUND = 0;
  14.  
  15.     addr = 0x17200000;
  16.     offset = 0;
  17.  
  18.     for (j = 0; j < 0x20 && offset == 0; j++)
  19.     {
  20.         GSPGPU_FlushDataCache(addr, 0x10000);
  21.         GX_SetTextureCopy(addr, buf, 0x10000, 0, 0, 0, 0, 8);
  22.         GSPGPU_FlushDataCache(buf, 0x10000);
  23.         svcSleepThread(0x400000LL);
  24.         for (i = 0; i < 0x4000; i++)
  25.         {
  26.             if (buf[i+1] == 0x6D657449 && buf[i] == 0x706F6853){
  27.                 offset = i+0x1C/4;
  28.                 int it;
  29.                 for (it = 0;it<8;it++){
  30.                     buf[offset+it*3] = 0;
  31.                 }
  32.                 svcSleepThread(0x400000LL);
  33.                 GSPGPU_FlushDataCache(buf, 0x10000);
  34.                 GX_SetTextureCopy(buf, addr, 0x10000, 0, 0, 0, 0, 8);
  35.                 GSPGPU_FlushDataCache(addr, 0x10000);
  36.                 svcSleepThread(0x400000LL);
  37.                 j = 0x21;
  38.                 i = 0x20000;
  39.                 FOUND = 1;
  40.             }
  41.         }
  42.         addr += 0x10000;
  43.     }  
  44.    
  45.     if (FOUND != 0)
  46.     {  
  47.         //Green - Success!
  48.         for(i = 0; i < 0xE100; i+=3)
  49.         {
  50.             buf[i] = 0x0000FF00;
  51.             buf[i+1] = 0xFF0000FF;
  52.             buf[i+2] = 0x00FF0000;
  53.         }
  54.     }
  55.     else
  56.     {
  57.         //Red - Failure!
  58.         for (i = 0; i < 0xE100; i+=3)
  59.         {
  60.             buf[i] = 0x00FF0000;
  61.             buf[i+1] = 0x0000FF00;
  62.             buf[i+2] = 0xFF0000FF;
  63.         }
  64.     }
  65.  
  66.     GSPGPU_FlushDataCache(buf, 0x00038400);
  67.     GX_SetTextureCopy(buf, 0x1F48F000, 0x00038400, 0, 0, 0, 0, 8);
  68.     svcSleepThread(0x400000LL);
  69.     GSPGPU_FlushDataCache(buf, 0x00038400);
  70.     GX_SetTextureCopy(buf, 0x1F4C7800, 0x00038400, 0, 0, 0, 0, 8);
  71.     svcSleepThread(0x400000LL);
  72.  
  73.     return 0;
  74. }
Advertisement
RAW Paste Data Copied
Advertisement