Improve memory usage (and change copy location to /Temp)
This commit is contained in:
parent
07aae05a55
commit
ecda8a2b19
|
@ -2,14 +2,14 @@
|
|||
<MonoDevelop.Ide.Workspace ActiveConfiguration="Release" />
|
||||
<MonoDevelop.Ide.Workbench ActiveDocument="dump\AppMain.cs">
|
||||
<Files>
|
||||
<File FileName="dump\AppMain.cs" Line="49" Column="73" />
|
||||
<File FileName="..\..\..\..\Program Files (x86)\MSBuild\Sce\Sce.Psm.Common.targets" Line="193" Column="8" />
|
||||
<File FileName="dump\AppMain.cs" Line="15" Column="51" />
|
||||
</Files>
|
||||
<Pads>
|
||||
<Pad Id="ProjectPad">
|
||||
<State expanded="True">
|
||||
<Node name="dump" expanded="True">
|
||||
<Node name="shaders" selected="True" />
|
||||
<Node name="References" expanded="True" />
|
||||
<Node name="AppMain.cs" selected="True" />
|
||||
</Node>
|
||||
</State>
|
||||
</Pad>
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -31,8 +31,6 @@
|
|||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Xml" />
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="Sce.PlayStation.Core" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
|
|
Binary file not shown.
|
@ -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.
|
|
@ -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
|
Reference in New Issue