From f30bc33838bd3c151bd7627c67179c8cb4ca1c51 Mon Sep 17 00:00:00 2001 From: phacoxcll <36426650+phacoxcll@users.noreply.github.com> Date: Thu, 19 Dec 2019 03:03:51 -0600 Subject: [PATCH] Minor bug fixes --- PhacoxsInjector/GBAInjector.cs | 18 ++++++++++++------ PhacoxsInjector/HelpString.Designer.cs | 4 ++-- PhacoxsInjector/HelpString.es.resx | 4 ++-- PhacoxsInjector/HelpString.resx | 4 ++-- PhacoxsInjector/N64Injector.cs | 18 ++++++++++++------ PhacoxsInjector/NDSInjector.cs | 18 ++++++++++++------ PhacoxsInjector/NESInjector.cs | 14 ++++++++++---- PhacoxsInjector/Properties/AssemblyInfo.cs | 4 ++-- PhacoxsInjector/SNESInjector.cs | 14 ++++++++++---- PhacoxsInjector/VCGBA.cs | 2 +- PhacoxsInjector/VCN64.cs | 2 +- PhacoxsInjector/VCNDS.cs | 2 +- PhacoxsInjector/VCNES.cs | 2 +- PhacoxsInjector/VCSNES.cs | 2 +- 14 files changed, 69 insertions(+), 39 deletions(-) diff --git a/PhacoxsInjector/GBAInjector.cs b/PhacoxsInjector/GBAInjector.cs index 4185331..1cf1f7e 100644 --- a/PhacoxsInjector/GBAInjector.cs +++ b/PhacoxsInjector/GBAInjector.cs @@ -91,12 +91,18 @@ protected override void InjectRom() protected override WiiUVC GetLoadedBase() { - ValidateBase(BasePath); - - FileStream fs = File.Open(BasePath + "\\code\\m2engage.rpx", FileMode.Open); - uint hash = Cll.Security.ComputeCRC32(fs); - fs.Close(); - return VCGBA.GetVC(hash); + try + { + ValidateBase(BasePath); + FileStream fs = File.Open(BasePath + "\\code\\m2engage.rpx", FileMode.Open); + uint hash = Cll.Security.ComputeCRC32(fs); + fs.Close(); + return VCGBA.GetVC(hash); + } + catch + { + return null; + } } protected override void ValidateBase(string path) diff --git a/PhacoxsInjector/HelpString.Designer.cs b/PhacoxsInjector/HelpString.Designer.cs index 22e58f7..22c69ef 100644 --- a/PhacoxsInjector/HelpString.Designer.cs +++ b/PhacoxsInjector/HelpString.Designer.cs @@ -133,7 +133,7 @@ internal static string BaseInvalid { } /// - /// Busca una cadena traducida similar a Warning! "resources\cdecrypt\CDecrypt.exe" not found! CDecrypt allows you to unpack (decrypt) Wii U VC games to use as base.. + /// Busca una cadena traducida similar a Warning! "resources\unpack\CDecrypt.exe" not found! CDecrypt allows you to unpack (decrypt) Wii U VC games to use as base.. /// internal static string CDecryptWarning { get { @@ -682,7 +682,7 @@ internal static string NotPackDescription { } /// - /// Busca una cadena traducida similar a Warning! "resources\nuspacker\NUSPacker.jar" not found! NUSPacker allows you to pack the result for WUP Installer.. + /// Busca una cadena traducida similar a Warning! "resources\pack\NUSPacker.jar" not found! NUSPacker allows you to pack the result for WUP Installer.. /// internal static string NUSPackerWarning { get { diff --git a/PhacoxsInjector/HelpString.es.resx b/PhacoxsInjector/HelpString.es.resx index d98c869..d4ea7e4 100644 --- a/PhacoxsInjector/HelpString.es.resx +++ b/PhacoxsInjector/HelpString.es.resx @@ -142,7 +142,7 @@ La base no es válida. - ¡Advertencia! "resources\cdecrypt\CDecrypt.exe" no encontrado! CDecrypt te permite desempacar (descifrar) los juegos la consola virtual de Wii U para usarlos como base. + ¡Advertencia! "resources\unpack\CDecrypt.exe" no encontrado! CDecrypt te permite desempacar (descifrar) los juegos la consola virtual de Wii U para usarlos como base. Elegir archivo de configuración @@ -325,7 +325,7 @@ Realiza la inyección y copia el resultado en la ruta que selecciones. Para Loadiine. - ¡Advertencia! "resources\nuspacker\NUSPacker.jar" no encontrado! NUSPacker te permite empacar el resultado para WUP Installer. + ¡Advertencia! "resources\pack\NUSPacker.jar" no encontrado! NUSPacker te permite empacar el resultado para WUP Installer. Empacar diff --git a/PhacoxsInjector/HelpString.resx b/PhacoxsInjector/HelpString.resx index 05efab2..7f99aa3 100644 --- a/PhacoxsInjector/HelpString.resx +++ b/PhacoxsInjector/HelpString.resx @@ -224,7 +224,7 @@ @MutedRule(PunctuationLead) - Warning! "resources\cdecrypt\CDecrypt.exe" not found! CDecrypt allows you to unpack (decrypt) Wii U VC games to use as base. + Warning! "resources\unpack\CDecrypt.exe" not found! CDecrypt allows you to unpack (decrypt) Wii U VC games to use as base. @MutedRule(PunctuationLead) @@ -262,7 +262,7 @@ Perform the injection and copy the result in the path you select. For loadiine. - Warning! "resources\nuspacker\NUSPacker.jar" not found! NUSPacker allows you to pack the result for WUP Installer. + Warning! "resources\pack\NUSPacker.jar" not found! NUSPacker allows you to pack the result for WUP Installer. @MutedRule(PunctuationLead) diff --git a/PhacoxsInjector/N64Injector.cs b/PhacoxsInjector/N64Injector.cs index 99ccb8c..23707c5 100644 --- a/PhacoxsInjector/N64Injector.cs +++ b/PhacoxsInjector/N64Injector.cs @@ -257,12 +257,18 @@ protected override void InjectRom() protected override WiiUVC GetLoadedBase() { - ValidateBase(BasePath); - - FileStream fs = File.Open(BasePath + "\\code\\VESSEL.rpx", FileMode.Open); - uint hash = Cll.Security.ComputeCRC32(fs); - fs.Close(); - return VCN64.GetVC(hash); + try + { + ValidateBase(BasePath); + FileStream fs = File.Open(BasePath + "\\code\\VESSEL.rpx", FileMode.Open); + uint hash = Cll.Security.ComputeCRC32(fs); + fs.Close(); + return VCN64.GetVC(hash); + } + catch + { + return null; + } } protected override void ValidateBase(string path) diff --git a/PhacoxsInjector/NDSInjector.cs b/PhacoxsInjector/NDSInjector.cs index 7a9c088..e6b091a 100644 --- a/PhacoxsInjector/NDSInjector.cs +++ b/PhacoxsInjector/NDSInjector.cs @@ -87,12 +87,18 @@ protected override void InjectRom() protected override WiiUVC GetLoadedBase() { - ValidateBase(BasePath); - - FileStream fs = File.Open(BasePath + "\\code\\hachihachi_ntr.rpx", FileMode.Open); - uint hash = Cll.Security.ComputeCRC32(fs); - fs.Close(); - return VCNDS.GetVC(hash); + try + { + ValidateBase(BasePath); + FileStream fs = File.Open(BasePath + "\\code\\hachihachi_ntr.rpx", FileMode.Open); + uint hash = Cll.Security.ComputeCRC32(fs); + fs.Close(); + return VCNDS.GetVC(hash); + } + catch + { + return null; + } } protected override void ValidateBase(string path) diff --git a/PhacoxsInjector/NESInjector.cs b/PhacoxsInjector/NESInjector.cs index 40a0642..68abbe5 100644 --- a/PhacoxsInjector/NESInjector.cs +++ b/PhacoxsInjector/NESInjector.cs @@ -102,10 +102,16 @@ protected override void InjectRom() protected override WiiUVC GetLoadedBase() { - ValidateBase(BasePath, false); - RPXNES vc = ValidateRPX(BasePath); - - return VCNES.GetVC(vc.CRCsSum); + try + { + ValidateBase(BasePath, false); + RPXNES vc = ValidateRPX(BasePath); + return VCNES.GetVC(vc.CRCsSum); + } + catch + { + return null; + } } private RPXNES ValidateRPX(string path) diff --git a/PhacoxsInjector/Properties/AssemblyInfo.cs b/PhacoxsInjector/Properties/AssemblyInfo.cs index f748447..1502691 100644 --- a/PhacoxsInjector/Properties/AssemblyInfo.cs +++ b/PhacoxsInjector/Properties/AssemblyInfo.cs @@ -32,5 +32,5 @@ // Puede especificar todos los valores o usar los valores predeterminados de número de compilación y de revisión // utilizando el carácter "*", como se muestra a continuación: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.0.12.0")] -[assembly: AssemblyFileVersion("1.0.12.0")] +[assembly: AssemblyVersion("1.0.18.0")] +[assembly: AssemblyFileVersion("1.0.18.0")] diff --git a/PhacoxsInjector/SNESInjector.cs b/PhacoxsInjector/SNESInjector.cs index ab78cd9..3009e2f 100644 --- a/PhacoxsInjector/SNESInjector.cs +++ b/PhacoxsInjector/SNESInjector.cs @@ -98,10 +98,16 @@ protected override void InjectRom() protected override WiiUVC GetLoadedBase() { - ValidateBase(BasePath, false); - RPXSNES vc = ValidateRPX(BasePath); - - return VCSNES.GetVC(vc.CRCsSum); + try + { + ValidateBase(BasePath, false); + RPXSNES vc = ValidateRPX(BasePath); + return VCSNES.GetVC(vc.CRCsSum); + } + catch + { + return null; + } } private RPXSNES ValidateRPX(string path) diff --git a/PhacoxsInjector/VCGBA.cs b/PhacoxsInjector/VCGBA.cs index a5c3517..023e9a1 100644 --- a/PhacoxsInjector/VCGBA.cs +++ b/PhacoxsInjector/VCGBA.cs @@ -16,7 +16,7 @@ public VCGBA(uint hash) public override string ToString() { - return "Hash: " + Hash.ToString("X8") + ", Release date: " + Release.ToString("yyyy/MM/dd") + " \nTitle: " + Title; + return "Hash: " + Hash.ToString("X8") + ", Release date: " + Release.ToString("yyyy/MM/dd") + "\r\nTitle: " + Title; } public static VCGBA GetVC(uint hash) diff --git a/PhacoxsInjector/VCN64.cs b/PhacoxsInjector/VCN64.cs index 04506bd..6a82bce 100644 --- a/PhacoxsInjector/VCN64.cs +++ b/PhacoxsInjector/VCN64.cs @@ -20,7 +20,7 @@ public VCN64(uint hash) public override string ToString() { - return "Hash: " + Hash.ToString("X8") + ", SVN: " + SVN.ToString() + " TIME: " + Release.ToString("yyyy/MM/dd hh:mm:ss") + " \nTitle: " + Title; + return "Hash: " + Hash.ToString("X8") + ", SVN: " + SVN.ToString() + " TIME: " + Release.ToString("yyyy/MM/dd hh:mm:ss") + "\r\nTitle: " + Title; } public static VCN64 GetVC(uint hash) diff --git a/PhacoxsInjector/VCNDS.cs b/PhacoxsInjector/VCNDS.cs index d5a8cfa..3381567 100644 --- a/PhacoxsInjector/VCNDS.cs +++ b/PhacoxsInjector/VCNDS.cs @@ -16,7 +16,7 @@ public VCNDS(uint hash) public override string ToString() { - return "Hash: " + Hash.ToString("X8") + ", Release date: " + Release.ToString("yyyy/MM/dd") + " \nTitle: " + Title; + return "Hash: " + Hash.ToString("X8") + ", Release date: " + Release.ToString("yyyy/MM/dd") + "\r\nTitle: " + Title; } public static VCNDS GetVC(uint hash) diff --git a/PhacoxsInjector/VCNES.cs b/PhacoxsInjector/VCNES.cs index b3080b1..5c71652 100644 --- a/PhacoxsInjector/VCNES.cs +++ b/PhacoxsInjector/VCNES.cs @@ -35,7 +35,7 @@ public override string ToString() { return "Hash: " + Hash.ToString("X8") + ", Release date: " + Release.ToString("yyyy/MM/dd") + ", Type: " + Type.ToString() + ", ROM size: " + Useful.ToFileSize(ROMSize) + ", FDS ROM: " + FDSROM.ToString() + - " \nTitle: " + Title; + "\r\nTitle: " + Title; } public static VCNES GetVC(uint hash) diff --git a/PhacoxsInjector/VCSNES.cs b/PhacoxsInjector/VCSNES.cs index acd2f48..82a2728 100644 --- a/PhacoxsInjector/VCSNES.cs +++ b/PhacoxsInjector/VCSNES.cs @@ -40,7 +40,7 @@ public override string ToString() { return "Hash: " + Hash.ToString("X8") + ", Release date: " + Release.ToString("yyyy/MM/dd") + ", Type: " + Type.ToString() + ", ROM size: " + Useful.ToFileSize(ROMSize) + ", Extended footer: " + ExtendedFooter.ToString() + ", PCM data: " + PCMData.ToString() + - " \nTitle: " + Title; + "\r\nTitle: " + Title; } public static VCSNES GetVC(uint hash)