From ecda8a2b19e45bc30ba99adddb5d9e7da6e3246c Mon Sep 17 00:00:00 2001 From: "AtelierWindows\\SilicaAndPina" Date: Thu, 18 Oct 2018 23:51:38 +1300 Subject: [PATCH] Improve memory usage (and change copy location to /Temp) --- IL/dump.userprefs | 6 +-- IL/dump/AppMain.cs | 100 +++++++++++++++++++++++++++++++++++--------- IL/dump/dump.csproj | 2 - IL/dump/dump.pidb | Bin 6570 -> 6513 bytes Native/LICENSE | 21 ---------- Native/README.md | 21 ---------- 6 files changed, 83 insertions(+), 67 deletions(-) delete mode 100644 Native/LICENSE delete mode 100644 Native/README.md diff --git a/IL/dump.userprefs b/IL/dump.userprefs index 4bc2fe2..3c9e820 100644 --- a/IL/dump.userprefs +++ b/IL/dump.userprefs @@ -2,14 +2,14 @@ - - + - + + diff --git a/IL/dump/AppMain.cs b/IL/dump/AppMain.cs index dd24d57..719daf8 100644 --- a/IL/dump/AppMain.cs +++ b/IL/dump/AppMain.cs @@ -3,14 +3,56 @@ using System; using Sce.PlayStation.Core; using Sce.PlayStation.Core.Environment; using Sce.PlayStation.Core.Graphics; -using Sce.PlayStation.Core.Input; - using System.IO; namespace dump { public class AppMain - { + { + public static void Copy(string inputFilePath, string outputFilePath) + { + SystemEvents.CheckEvents(); + graphics.SetClearColor(1.0f, 0.0f, 0.0f, 0.0f); + graphics.Clear(); + graphics.SwapBuffers(); + FileStream fileStream = File.Open(@outputFilePath,FileMode.CreateNew,FileAccess.Write); + FileStream fs = File.Open(@inputFilePath,FileMode.Open,FileAccess.Read); + long i = 0; + while(i < fs.Length) { + int toRead = (int)fs.Length - (int)i; + if(toRead > 1*(1000 * 1000)) + toRead = 1*(1000 * 1000); + byte[] buf = new byte[toRead]; + i += fs.Read(buf,0,toRead ); + fileStream.Write(buf,0,toRead ); + } + fs.Close(); + fileStream.Close(); + + } + + static void SaveMemoryCopy(string sDir) + { + SystemEvents.CheckEvents(); + graphics.SetClearColor(1.0f, 0.0f, 0.0f, 0.0f); + graphics.Clear(); + graphics.SwapBuffers(); + foreach (string d in Directory.GetDirectories(sDir)) + { + if(!Directory.Exists(d.Replace("Application","Temp"))) + { + Console.WriteLine("Creating: "+d.Replace("Application","Temp")); + Directory.CreateDirectory(d.Replace("Application","Temp")); + } + foreach (string f in Directory.GetFiles(d)) + { + Console.WriteLine("Creating: "+f.Replace("Application","Temp")); + Copy(f,f.Replace("Application","Temp")); + } + SaveMemoryCopy(d); + } + } + private static GraphicsContext graphics; public static void Main (string[] args) @@ -18,23 +60,48 @@ namespace dump Initialize (); - - String[] Dirs = Directory.GetDirectories("/Application","*",SearchOption.AllDirectories); - String[] Files = Directory.GetFiles("/Application","*",SearchOption.AllDirectories); - - foreach(String dir in Dirs) + FileStream ff = File.OpenRead("/Application/App.exe"); + + foreach(string f in Directory.GetFiles("/Application")) { + SystemEvents.CheckEvents(); + graphics.SetClearColor(1.0f, 0.0f, 0.0f, 0.0f); + graphics.Clear(); + graphics.SwapBuffers(); + Console.WriteLine("Copying: "+f+ " To: "+f.Replace("Application","Temp")); + Copy(f,f.Replace("Application","Temp")); + } + + SaveMemoryCopy("/Application"); + + + /* + foreach(String dir in Directory.GetDirectories("/Application","*",SearchOption.AllDirectories)) + { + SystemEvents.CheckEvents(); + Update(); + + // Clear the screen + graphics.SetClearColor (1.0f, 0.0f, 0.0f, 0.0f); + graphics.Clear (); + + // Present the screen + graphics.SwapBuffers (); + try{ Directory.CreateDirectory(dir.Replace("Application","Documents/Application")); } - catch(Exception) + finally { } - } + }*/ - foreach(String file in Files) + + + /* + foreach(String file in Directory.GetFiles("/Application","*",SearchOption.AllDirectories)) { SystemEvents.CheckEvents(); Update(); @@ -49,11 +116,10 @@ namespace dump File.WriteAllBytes(file.Replace("Application","Documents/Application"),ByteArray); - } + }*/ while(true) { SystemEvents.CheckEvents(); - Update(); Render(); } @@ -64,13 +130,7 @@ namespace dump // Set up the graphics system graphics = new GraphicsContext (); } - - public static void Update () - { - // Query gamepad for current state - var gamePadData = GamePad.GetData (0); - } - + public static void Render () { // Clear the screen diff --git a/IL/dump/dump.csproj b/IL/dump/dump.csproj index b9e4759..67b4c7e 100644 --- a/IL/dump/dump.csproj +++ b/IL/dump/dump.csproj @@ -31,8 +31,6 @@ - - diff --git a/IL/dump/dump.pidb b/IL/dump/dump.pidb index ad323d37c29fe8034f0a372bc0d93680d3e56a7b..9c150a699911ea9383f7e07d24ff4f72377b3186 100644 GIT binary patch delta 1082 zcmb7DO=uHA6yDjNq`PgCG_m=yw$}Jl=^5wG|!d0d^A`u7N1#p0ifZ_2W#dJ!}z!4>1Ff~Qi4Lz%l zS-Dx=Qk6yBRh5Zi_VTPOA6KSM(C1{74ALLuY*~QC27n(g*ri`vTU)mvU|ImUMct5? z1at$M099k*V**-r%PzVTx}nXgZr-0`eT_8w79dn8x_?V4Gt8i$4?_X-WOY%S*37~} zX}h3hoJXOCCLqxZ7y#7z1s(y|$T-LJ1^6-y>o48!`!LJ{_-R$QYDeA0Fhf8!oD~U_ zzD}>P9TAiX$R)?sOjLL1BetuIDRoU30%^+9U0pTwC9U4X8^AXRBe55-0{Bxi1ilqv z44l@ioVHMxxCvZ?1QNTMAj8}Nho`Gt7k$X_-cv452=l-(%`tj1e4joDo}uqUld&i)Xvq~#J2Ph6*eNmQ z9SkQ4+3?09Go;)O^Z)nS6jW1cYMHDf;)%#QY`*~rBq195=jR*4_ghs|Z98+-G{h8b zi=HDp>7}ScI%p+Y7T{KyEVZI@k?O@|a)u$qfIRFs;zDcETi-E4_H+WpV|9Tp@Pf4x z!DS@j6V%pUOApiecv|=fOxkB&wTtv+JRz*rnay}NsnAGbl*GML35g72o1Q)S+AAOZ z;QvwLJ|IM_fuvx-7KnKAzS3**qOY1GNjzrVCjOZA@e I&DCDeZ-v(SLjV8( delta 938 zcma)5O=uHQ5Z;%(-DYF{e>QDnnrbKp3$d+;P(`gRqE>5Zs1^z0(k$u1?q+RLsJR3@ zhzCXMc$#sct*ogd=3$w2V4s&4(>+S38CjWa}A&(i&Dr$@EW1zUxgNQU@2Ek#Br(l|k&LzIUnCQF`*Ilmbg7e7p z#lyzu$%F3BwY`RBt212plo}$*|^d|%Pcovk-Kp#+dwyRlzOom+19gY z8mYFOTQ=Q>oP?K=Ikpq}q7{~cyV1JXhgJ)q#4bn2%ZpmBXc&w-4;T7=X`_9{8zbMCy46&G*3VkPK%MYlmon7an?F)P~m@Z(7bGA=4pP r5*OMa(`*(>k9n!3@p?I_U?p)AzIKlX2C?`XU4t;%v(K~I`YZncCDq+o diff --git a/Native/LICENSE b/Native/LICENSE deleted file mode 100644 index 3302a93..0000000 --- a/Native/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) 2018 Silica - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/Native/README.md b/Native/README.md deleted file mode 100644 index d568338..0000000 --- a/Native/README.md +++ /dev/null @@ -1,21 +0,0 @@ -# IDUSpoof -This is a plugin that spoofs IDU Mode (vshSysconIsIduMode) to allways return 0x1 -this has the effect of tricking whatever application's its configured for into thinking its running in IDU mode. -in fact, if you do \*ALL it has the same effect as if you just enabled IDU mode! -the advantage to this plugin is ofcource that you can specify exactly what apps idu is set for. - -for example. if you want to enable the package installer. simply do -\*NPXS10031 -ux0:tai/iduSpoof.suprx - -or enable IDU settings without IDU Mode: - -\*NPXS10015 -ux0:tai/iduSpoof.suprx - -though keep in mind henkaku overwrites idu settings with its own. - - -!! WORKS ON 3.65 And 3.68!! - -Download: https://bitbucket.org/SilicaAndPina/iduspoof/downloads/iduSpoof.suprx \ No newline at end of file