Advertisement
BaSs_HaXoR

C# Unlockall, write a constant byte

Feb 25th, 2015
992
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 2.42 KB | None | 0 0
  1. /* ############################################################################################################################### */
  2. /*                       Unlock all algorithm I made for C#. Just replace values with the corresponding variables.                 */
  3. /*                                   C# Unlockall, write a constant byte to each location in an array                              */
  4. /* ############################################################################################################################### */
  5. /* So:
  6.     unlockRange => the size of the byte array you want to write too.
  7.     const byte MAXUNLOCK => The byte you want to set to all addresses in the array
  8.     byte[] Unlock1 = new byte[unlockRange] => assign the arraysize of Unlock1 to the unlockRange size
  9.     for(int i; i <= unlockRange; i++) => A c-style for loop that will iterate while incrementing by 1 each time the function is ran.
  10.     Unlock1[i] = MAXUnlock; => Set the byte in the byte array to the MAXUnlock byte.
  11.     PS3.SetMemory(unlockAddr, Unlock1); => Set's memory in the PS3's Memory for each time the
  12. */
  13. /* ############################################################################################################################### */
  14. private void unlockAll()
  15.         {
  16.             int unlockRange = 33968;
  17.             const byte MAXUNLOCK = 0xFF;
  18.             uint unlockAddr1 = 0x000000;
  19.         byte[] Unlock1 = new byte[unlockRange];
  20.            
  21.             for(int i; i <= unlockRange; i++)
  22.             {
  23.         Unlock1[i] = MAXUNLOCK;
  24.             }
  25.         PS3.SetMemory(unlockAddr1, Unlock1);
  26.         }
  27.  
  28. /* ############################################################################################################################### */
  29. // #REFERENCED INFOS:
  30.  
  31.  int unlockRange = 33968; //array Size; amount of bytes to write after the unlockAddr1
  32.             const byte MAXUNLOCK = 0xFF; //byte to write
  33.             uint unlockAddr1 = 0x000000; //start address
  34.         byte[] Unlock1 = new byte[unlockRange]; //Declare Unlock1 as byte array and size to unlockRange size
  35.            
  36.             for(int i; i <= unlockRange; i++) //iterate until unlockRange == i
  37.             {
  38.         Unlock1[i] = MAXUNLOCK; //set the current location 'i' in the byte array, to MAXUNLOCK byte (which is the constant byte 0xFF)
  39. /* ############################################################################################################################### */
  40. //BaSs_HaXoR
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement