Skip to content

Commit

Permalink
Minor bug fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
phacoxcll authored Dec 19, 2019
1 parent 3c2f34f commit f30bc33
Show file tree
Hide file tree
Showing 14 changed files with 69 additions and 39 deletions.
18 changes: 12 additions & 6 deletions PhacoxsInjector/GBAInjector.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
4 changes: 2 additions & 2 deletions PhacoxsInjector/HelpString.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions PhacoxsInjector/HelpString.es.resx
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@
<value>La base no es válida.</value>
</data>
<data name="CDecryptWarning" xml:space="preserve">
<value>¡Advertencia! "resources\cdecrypt\CDecrypt.exe" no encontrado! CDecrypt te permite desempacar (descifrar) los juegos la consola virtual de Wii U para usarlos como base.</value>
<value>¡Advertencia! "resources\unpack\CDecrypt.exe" no encontrado! CDecrypt te permite desempacar (descifrar) los juegos la consola virtual de Wii U para usarlos como base.</value>
</data>
<data name="ChooseN64ConfigFile" xml:space="preserve">
<value>Elegir archivo de configuración</value>
Expand Down Expand Up @@ -325,7 +325,7 @@
<value>Realiza la inyección y copia el resultado en la ruta que selecciones. Para Loadiine.</value>
</data>
<data name="NUSPackerWarning" xml:space="preserve">
<value>¡Advertencia! "resources\nuspacker\NUSPacker.jar" no encontrado! NUSPacker te permite empacar el resultado para WUP Installer.</value>
<value>¡Advertencia! "resources\pack\NUSPacker.jar" no encontrado! NUSPacker te permite empacar el resultado para WUP Installer.</value>
</data>
<data name="Pack" xml:space="preserve">
<value>Empacar</value>
Expand Down
4 changes: 2 additions & 2 deletions PhacoxsInjector/HelpString.resx
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@
<comment>@MutedRule(PunctuationLead)</comment>
</data>
<data name="CDecryptWarning" xml:space="preserve">
<value>Warning! "resources\cdecrypt\CDecrypt.exe" not found! CDecrypt allows you to unpack (decrypt) Wii U VC games to use as base.</value>
<value>Warning! "resources\unpack\CDecrypt.exe" not found! CDecrypt allows you to unpack (decrypt) Wii U VC games to use as base.</value>
<comment>@MutedRule(PunctuationLead)</comment>
</data>
<data name="LoadBase" xml:space="preserve">
Expand Down Expand Up @@ -262,7 +262,7 @@
<value>Perform the injection and copy the result in the path you select. For loadiine.</value>
</data>
<data name="NUSPackerWarning" xml:space="preserve">
<value>Warning! "resources\nuspacker\NUSPacker.jar" not found! NUSPacker allows you to pack the result for WUP Installer.</value>
<value>Warning! "resources\pack\NUSPacker.jar" not found! NUSPacker allows you to pack the result for WUP Installer.</value>


<comment>@MutedRule(PunctuationLead)</comment>
Expand Down
18 changes: 12 additions & 6 deletions PhacoxsInjector/N64Injector.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
18 changes: 12 additions & 6 deletions PhacoxsInjector/NDSInjector.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
14 changes: 10 additions & 4 deletions PhacoxsInjector/NESInjector.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
4 changes: 2 additions & 2 deletions PhacoxsInjector/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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")]
14 changes: 10 additions & 4 deletions PhacoxsInjector/SNESInjector.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion PhacoxsInjector/VCGBA.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion PhacoxsInjector/VCN64.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion PhacoxsInjector/VCNDS.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion PhacoxsInjector/VCNES.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion PhacoxsInjector/VCSNES.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit f30bc33

Please sign in to comment.