Fix PS1 Parse Issue
Fixed a bug where sometimes PS1 games wouldnt be listed ..
This commit is contained in:
parent
60a2f5a7c1
commit
c8a04679fe
18
CHOVY-TRANSFER/CHOVYTRANSFER.Designer.cs
generated
18
CHOVY-TRANSFER/CHOVYTRANSFER.Designer.cs
generated
|
@ -42,8 +42,10 @@
|
||||||
this.progressBar = new System.Windows.Forms.ProgressBar();
|
this.progressBar = new System.Windows.Forms.ProgressBar();
|
||||||
this.progressStatus = new System.Windows.Forms.Label();
|
this.progressStatus = new System.Windows.Forms.Label();
|
||||||
this.pictureBox1 = new System.Windows.Forms.PictureBox();
|
this.pictureBox1 = new System.Windows.Forms.PictureBox();
|
||||||
|
this.dexToggle = new System.Windows.Forms.PictureBox();
|
||||||
this.groupBox1.SuspendLayout();
|
this.groupBox1.SuspendLayout();
|
||||||
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit();
|
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit();
|
||||||
|
((System.ComponentModel.ISupportInitialize)(this.dexToggle)).BeginInit();
|
||||||
this.SuspendLayout();
|
this.SuspendLayout();
|
||||||
//
|
//
|
||||||
// driveLetterSrc
|
// driveLetterSrc
|
||||||
|
@ -224,7 +226,7 @@
|
||||||
//
|
//
|
||||||
// progressBar
|
// progressBar
|
||||||
//
|
//
|
||||||
this.progressBar.Location = new System.Drawing.Point(202, 297);
|
this.progressBar.Location = new System.Drawing.Point(202, 302);
|
||||||
this.progressBar.Name = "progressBar";
|
this.progressBar.Name = "progressBar";
|
||||||
this.progressBar.Size = new System.Drawing.Size(441, 23);
|
this.progressBar.Size = new System.Drawing.Size(441, 23);
|
||||||
this.progressBar.TabIndex = 7;
|
this.progressBar.TabIndex = 7;
|
||||||
|
@ -243,18 +245,28 @@
|
||||||
//
|
//
|
||||||
this.pictureBox1.BackgroundImage = global::CHOVY_TRANSFER.Properties.Resources.chovytrans;
|
this.pictureBox1.BackgroundImage = global::CHOVY_TRANSFER.Properties.Resources.chovytrans;
|
||||||
this.pictureBox1.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
|
this.pictureBox1.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
|
||||||
this.pictureBox1.Location = new System.Drawing.Point(9, 3);
|
this.pictureBox1.Location = new System.Drawing.Point(9, 8);
|
||||||
this.pictureBox1.Name = "pictureBox1";
|
this.pictureBox1.Name = "pictureBox1";
|
||||||
this.pictureBox1.Size = new System.Drawing.Size(144, 317);
|
this.pictureBox1.Size = new System.Drawing.Size(144, 317);
|
||||||
this.pictureBox1.TabIndex = 9;
|
this.pictureBox1.TabIndex = 9;
|
||||||
this.pictureBox1.TabStop = false;
|
this.pictureBox1.TabStop = false;
|
||||||
//
|
//
|
||||||
|
// dexToggle
|
||||||
|
//
|
||||||
|
this.dexToggle.Location = new System.Drawing.Point(781, 0);
|
||||||
|
this.dexToggle.Name = "dexToggle";
|
||||||
|
this.dexToggle.Size = new System.Drawing.Size(16, 16);
|
||||||
|
this.dexToggle.TabIndex = 10;
|
||||||
|
this.dexToggle.TabStop = false;
|
||||||
|
this.dexToggle.Click += new System.EventHandler(this.dexToggle_Click);
|
||||||
|
//
|
||||||
// CHOVYTRANSFER
|
// CHOVYTRANSFER
|
||||||
//
|
//
|
||||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||||
this.BackColor = System.Drawing.Color.Black;
|
this.BackColor = System.Drawing.Color.Black;
|
||||||
this.ClientSize = new System.Drawing.Size(796, 332);
|
this.ClientSize = new System.Drawing.Size(796, 332);
|
||||||
|
this.Controls.Add(this.dexToggle);
|
||||||
this.Controls.Add(this.pictureBox1);
|
this.Controls.Add(this.pictureBox1);
|
||||||
this.Controls.Add(this.progressStatus);
|
this.Controls.Add(this.progressStatus);
|
||||||
this.Controls.Add(this.progressBar);
|
this.Controls.Add(this.progressBar);
|
||||||
|
@ -270,6 +282,7 @@
|
||||||
this.groupBox1.ResumeLayout(false);
|
this.groupBox1.ResumeLayout(false);
|
||||||
this.groupBox1.PerformLayout();
|
this.groupBox1.PerformLayout();
|
||||||
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit();
|
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit();
|
||||||
|
((System.ComponentModel.ISupportInitialize)(this.dexToggle)).EndInit();
|
||||||
this.ResumeLayout(false);
|
this.ResumeLayout(false);
|
||||||
this.PerformLayout();
|
this.PerformLayout();
|
||||||
|
|
||||||
|
@ -289,6 +302,7 @@
|
||||||
private System.Windows.Forms.ProgressBar progressBar;
|
private System.Windows.Forms.ProgressBar progressBar;
|
||||||
private System.Windows.Forms.Label progressStatus;
|
private System.Windows.Forms.Label progressStatus;
|
||||||
private System.Windows.Forms.PictureBox pictureBox1;
|
private System.Windows.Forms.PictureBox pictureBox1;
|
||||||
|
private System.Windows.Forms.PictureBox dexToggle;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -8,6 +8,7 @@ using System.Text;
|
||||||
using KeyDerivation;
|
using KeyDerivation;
|
||||||
using PSVIMGTOOLS;
|
using PSVIMGTOOLS;
|
||||||
using System.Drawing;
|
using System.Drawing;
|
||||||
|
using System.Threading;
|
||||||
|
|
||||||
namespace CHOVY_TRANSFER
|
namespace CHOVY_TRANSFER
|
||||||
{
|
{
|
||||||
|
@ -16,6 +17,18 @@ namespace CHOVY_TRANSFER
|
||||||
[DllImport("CHOVY.dll", CallingConvention = CallingConvention.Cdecl)]
|
[DllImport("CHOVY.dll", CallingConvention = CallingConvention.Cdecl)]
|
||||||
private static extern int chovy_gen(string ebootpbp, UInt64 AID, string outscefile);
|
private static extern int chovy_gen(string ebootpbp, UInt64 AID, string outscefile);
|
||||||
|
|
||||||
|
public bool IsDexAidSet()
|
||||||
|
{
|
||||||
|
string isDex = ReadSetting("dexAid");
|
||||||
|
if (isDex == "false" || isDex == "")
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
public string GetCmaDir()
|
public string GetCmaDir()
|
||||||
{
|
{
|
||||||
string Dir = "";
|
string Dir = "";
|
||||||
|
@ -227,7 +240,8 @@ namespace CHOVY_TRANSFER
|
||||||
byte[] Header = new byte[0x8];
|
byte[] Header = new byte[0x8];
|
||||||
pbps.Read(Header, 0x00, 0x8);
|
pbps.Read(Header, 0x00, 0x8);
|
||||||
pbps.Close();
|
pbps.Close();
|
||||||
if(Encoding.UTF8.GetString(Header) == "PSISOIMG")
|
string header = Encoding.UTF8.GetString(Header);
|
||||||
|
if (header == "PSISOIMG" /*Single Disc PSX*/ || header == "PSTITLEI" /*Multi Disc PSX*/)
|
||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -375,7 +389,17 @@ namespace CHOVY_TRANSFER
|
||||||
File.Delete(sigFile);
|
File.Delete(sigFile);
|
||||||
}
|
}
|
||||||
|
|
||||||
int ChovyGenRes = chovy_gen(ebootFile, uAid, sigFile);
|
int ChovyGenRes = 100;
|
||||||
|
Thread ChovyGen = new Thread(() =>
|
||||||
|
{
|
||||||
|
ChovyGenRes = chovy_gen(ebootFile, uAid, sigFile);
|
||||||
|
});
|
||||||
|
|
||||||
|
ChovyGen.Start();
|
||||||
|
while (ChovyGen.IsAlive)
|
||||||
|
{
|
||||||
|
Application.DoEvents();
|
||||||
|
}
|
||||||
|
|
||||||
if (!File.Exists(sigFile) || ChovyGenRes != 0)
|
if (!File.Exists(sigFile) || ChovyGenRes != 0)
|
||||||
{
|
{
|
||||||
|
@ -395,7 +419,16 @@ namespace CHOVY_TRANSFER
|
||||||
|
|
||||||
// Pacakge GAME
|
// Pacakge GAME
|
||||||
|
|
||||||
byte[] CmaKey = CmaKeys.GenerateKey(bAid);
|
byte[] CmaKey;
|
||||||
|
if(!IsDexAidSet())
|
||||||
|
{
|
||||||
|
CmaKey = CmaKeys.GenerateKey(bAid);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
CmaKey = CmaKeys.GenerateKey(new byte[0x8] { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00});
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
string[] entrys = Directory.GetFileSystemEntries(gameFolder, "*", SearchOption.AllDirectories);
|
string[] entrys = Directory.GetFileSystemEntries(gameFolder, "*", SearchOption.AllDirectories);
|
||||||
long noEntrys = entrys.LongLength;
|
long noEntrys = entrys.LongLength;
|
||||||
|
@ -412,17 +445,37 @@ namespace CHOVY_TRANSFER
|
||||||
string pgameFolderl;
|
string pgameFolderl;
|
||||||
string scesys;
|
string scesys;
|
||||||
if (!isPs1)
|
if (!isPs1)
|
||||||
|
{
|
||||||
|
if(!IsDexAidSet())
|
||||||
{
|
{
|
||||||
pgameFolder = Path.Combine(backupDir, "PGAME", sAid, titleId, "game");
|
pgameFolder = Path.Combine(backupDir, "PGAME", sAid, titleId, "game");
|
||||||
pgameFolderl = Path.Combine(backupDir, "PGAME", sAid, titleId, "license");
|
pgameFolderl = Path.Combine(backupDir, "PGAME", sAid, titleId, "license");
|
||||||
scesys = Path.Combine(backupDir, "PGAME", sAid, titleId, "sce_sys");
|
scesys = Path.Combine(backupDir, "PGAME", sAid, titleId, "sce_sys");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
|
pgameFolder = Path.Combine(backupDir, "PGAME", "0000000000000000", titleId, "game");
|
||||||
|
pgameFolderl = Path.Combine(backupDir, "PGAME", "0000000000000000", titleId, "license");
|
||||||
|
scesys = Path.Combine(backupDir, "PSGAME", "0000000000000000", titleId, "sce_sys");
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if(!IsDexAidSet())
|
||||||
{
|
{
|
||||||
pgameFolder = Path.Combine(backupDir, "PSGAME", sAid, titleId, "game");
|
pgameFolder = Path.Combine(backupDir, "PSGAME", sAid, titleId, "game");
|
||||||
pgameFolderl = Path.Combine(backupDir, "PSGAME", sAid, titleId, "license");
|
pgameFolderl = Path.Combine(backupDir, "PSGAME", sAid, titleId, "license");
|
||||||
scesys = Path.Combine(backupDir, "PSGAME", sAid, titleId, "sce_sys");
|
scesys = Path.Combine(backupDir, "PSGAME", sAid, titleId, "sce_sys");
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
pgameFolder = Path.Combine(backupDir, "PSGAME", "0000000000000000", titleId, "game");
|
||||||
|
pgameFolderl = Path.Combine(backupDir, "PSGAME", "0000000000000000", titleId, "license");
|
||||||
|
scesys = Path.Combine(backupDir, "PSGAME", "0000000000000000", titleId, "sce_sys");
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
Directory.CreateDirectory(pgameFolder);
|
Directory.CreateDirectory(pgameFolder);
|
||||||
Directory.CreateDirectory(pgameFolderl);
|
Directory.CreateDirectory(pgameFolderl);
|
||||||
|
@ -515,5 +568,18 @@ namespace CHOVY_TRANSFER
|
||||||
pspGames.Enabled = true;
|
pspGames.Enabled = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void dexToggle_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
if(IsDexAidSet())
|
||||||
|
{
|
||||||
|
WriteSetting("dexAid", "false");
|
||||||
|
MessageBox.Show("Cex AID Will be used for CMA.", "CexAid", MessageBoxButtons.OK, MessageBoxIcon.Information);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
WriteSetting("dexAid", "true");
|
||||||
|
MessageBox.Show("Dex AID (0000000000000000) Will be used for CMA.","DexAid",MessageBoxButtons.OK,MessageBoxIcon.Information);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user