From fb2e988bd465fc5509f6fc9703b693d7a21070c0 Mon Sep 17 00:00:00 2001 From: piratesephiroth Date: Mon, 19 Aug 2019 03:41:09 -0300 Subject: [PATCH 1/8] improved error logging a little --- 64Injector.cs | 68 +++++++++++++++++++++++++++++---------------------- 1 file changed, 39 insertions(+), 29 deletions(-) diff --git a/64Injector.cs b/64Injector.cs index 6a6d555..165cf07 100644 --- a/64Injector.cs +++ b/64Injector.cs @@ -507,6 +507,7 @@ public bool LoadBase(string path) Cll.Log.WriteLine("Previous base deleted."); } + Cll.Log.WriteLine("Validating input base..."); if (IsValidBase(path)) { Cll.Log.WriteLine("The \"" + path + "\" folder contains a valid base."); @@ -543,6 +544,7 @@ public bool LoadIni(string filename) private VCN64 GetLoadedBase() { + Cll.Log.WriteLine("Validating loaded base..."); if (IsValidBase("base")) { FileStream fs = File.Open("base\\code\\VESSEL.rpx", FileMode.Open); @@ -592,44 +594,52 @@ private VCN64 GetLoadedBase() else return null; } - + #endregion #region Validations private bool IsValidBase(string path) { - if (File.Exists(path + "\\code\\app.xml") && - File.Exists(path + "\\code\\cos.xml") && - File.Exists(path + "\\code\\VESSEL.rpx") && - Directory.Exists(path + "\\content\\config") && - Directory.Exists(path + "\\content\\rom") && - File.Exists(path + "\\content\\BuildInfo.txt") && - File.Exists(path + "\\content\\config.ini") && - File.Exists(path + "\\content\\FrameLayout.arc") && - File.Exists(path + "\\meta\\iconTex.tga") && - File.Exists(path + "\\meta\\bootTvTex.tga") && - File.Exists(path + "\\meta\\bootDrcTex.tga") && - File.Exists(path + "\\meta\\meta.xml")) - return true; - else + bool validBase = true; + string[] contentFolders = new string[] + { + "\\content\\config", + "\\content\\rom" + }; + string[] contentFiles = new string[] + { + "\\code\\cos.xml", + "\\code\\VESSEL.rpx", + "\\content\\BuildInfo.txt", + "\\content\\config.ini", + "\\content\\FrameLayout.arc", + "\\meta\\iconTex.tga", + "\\meta\\bootTvTex.tga", + "\\meta\\bootDrcTex.tga", + "\\meta\\meta.xml" + }; + for (int i = 0; i < contentFiles.Length; i++) + { + if (!File.Exists(path + contentFiles[i])) + { + Cll.Log.WriteLine(string.Format("This file is missing: {0}", path + contentFiles[i])); + validBase = false; + } + } + for (int j = 0; j < contentFolders.Length; j++) + { + if (!Directory.Exists(path + contentFolders[j])) + { + Cll.Log.WriteLine(string.Format("This folder is missing: {0}", path + contentFolders[j])); + validBase = false; + } + } + if (!validBase) { Cll.Log.WriteLine("The base is invalid."); - Cll.Log.WriteLine("Some of the following files or folders are missing:"); - Cll.Log.WriteLine(path + "\\code\\app.xml"); - Cll.Log.WriteLine(path + "\\code\\cos.xml"); - Cll.Log.WriteLine(path + "\\code\\VESSEL.rpx"); - Cll.Log.WriteLine(path + "\\content\\config"); - Cll.Log.WriteLine(path + "\\content\\rom"); - Cll.Log.WriteLine(path + "\\content\\BuildInfo.txt"); - Cll.Log.WriteLine(path + "\\content\\config.ini"); - Cll.Log.WriteLine(path + "\\content\\FrameLayout.arc"); - Cll.Log.WriteLine(path + "\\meta\\iconTex.tga"); - Cll.Log.WriteLine(path + "\\meta\\bootTvTex.tga"); - Cll.Log.WriteLine(path + "\\meta\\bootDrcTex.tga"); - Cll.Log.WriteLine(path + "\\meta\\meta.xml"); - return false; } + return validBase; } private bool IsValidEncryptedBase(string path) From 259694aa43f2d12f3d4b9b4e2139a967449ea9cd Mon Sep 17 00:00:00 2001 From: piratesephiroth Date: Mon, 19 Aug 2019 05:17:04 -0300 Subject: [PATCH 2/8] add custom robo v2 to the list of known builds --- VCN64.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/VCN64.cs b/VCN64.cs index 0184504..6a4fb4e 100644 --- a/VCN64.cs +++ b/VCN64.cs @@ -35,6 +35,7 @@ public override string ToString() public static readonly VCN64 MarioParty2 = new VCN64(0xBE3CEC5F, "SVN: 2234 TIME: 2016/02/02 10:56:10", "Mario Party 2 (NTSC-U)"); public static readonly VCN64 OgreBattle64 = new VCN64(0xFED1FB48, "SVN: 2395 TIME: 2016/08/30 13:57:02", "Ogre Battle 64: Person of Lordly Caliber (NTSC-U)"); public static readonly VCN64 Excitebike64 = new VCN64(0x724C4F5D, "SVN: 2404 TIME: 2016/09/14 13:42:00", "Excitebike 64 (NTSC-U)"); + public static readonly VCN64 CustomRoboV2 = new VCN64(0x89F2BC09, "SVN: 2244 TIME: 2016/02/26 09:03:55", "Custom Robo V2 (NTSC-J)"); public static readonly VCN64 FZeroX = new VCN64(0x2AF3C23B, "SVN: 2428 TIME: 2016/11/18 11:44:39", "F-Zero X (NTSC-U)"); } } From 64eec46e04cf14e2104ccc0cc71c0e94c9c2cec4 Mon Sep 17 00:00:00 2001 From: piratesephiroth Date: Mon, 19 Aug 2019 05:18:56 -0300 Subject: [PATCH 3/8] add custom robo v2 to the list of known builds --- 64Injector.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/64Injector.cs b/64Injector.cs index 165cf07..64c285f 100644 --- a/64Injector.cs +++ b/64Injector.cs @@ -583,6 +583,8 @@ private VCN64 GetLoadedBase() return VCN64.OgreBattle64; else if (hash == VCN64.Excitebike64.HashCRC32) return VCN64.Excitebike64; + else if (hash == VCN64.CustomRoboV2.HashCRC32) + return VCN64.CustomRoboV2; else if (hash == VCN64.FZeroX.HashCRC32) return VCN64.FZeroX; else From d96647c711251a2b5ff883677d2bc3b3e586428d Mon Sep 17 00:00:00 2001 From: piratesephiroth Date: Mon, 19 Aug 2019 06:30:36 -0300 Subject: [PATCH 4/8] added more known builds --- 64Injector.cs | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/64Injector.cs b/64Injector.cs index 64c285f..871a0cd 100644 --- a/64Injector.cs +++ b/64Injector.cs @@ -553,14 +553,22 @@ private VCN64 GetLoadedBase() if (hash == VCN64.DonkeyKong64.HashCRC32) return VCN64.DonkeyKong64; + else if (hash == VCN64.DonkeyKong64J.HashCRC32) + return VCN64.DonkeyKong64J; else if (hash == VCN64.Ocarina.HashCRC32) return VCN64.Ocarina; else if (hash == VCN64.PaperMario.HashCRC32) return VCN64.PaperMario; + else if (hash == VCN64.Kirby64J.HashCRC32) + return VCN64.Kirby64J; else if (hash == VCN64.Kirby64.HashCRC32) return VCN64.Kirby64; + else if (hash == VCN64.SnowJ.HashCRC32) + return VCN64.SnowJ; else if (hash == VCN64.MarioTennis.HashCRC32) return VCN64.MarioTennis; + else if (hash == VCN64.MarioGolfJ.HashCRC32) + return VCN64.MarioGolfJ; else if (hash == VCN64.MarioGolf.HashCRC32) return VCN64.MarioGolf; else if (hash == VCN64.StarFox64.HashCRC32) @@ -573,6 +581,8 @@ private VCN64 GetLoadedBase() return VCN64.YoshiStory; else if (hash == VCN64.WaveRace64.HashCRC32) return VCN64.WaveRace64; + else if (hash == VCN64.MajoraJ.HashCRC32) + return VCN64.MajoraJ; else if (hash == VCN64.Majora.HashCRC32) return VCN64.Majora; else if (hash == VCN64.PokemonSnap.HashCRC32) From 0090d1056a69ddb2dfc9491c62d5074cafde9ec6 Mon Sep 17 00:00:00 2001 From: piratesephiroth Date: Mon, 19 Aug 2019 06:30:39 -0300 Subject: [PATCH 5/8] added more known builds --- VCN64.cs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/VCN64.cs b/VCN64.cs index 6a4fb4e..ebcb705 100644 --- a/VCN64.cs +++ b/VCN64.cs @@ -18,18 +18,22 @@ public override string ToString() { return Title + "\nCRC32: " + HashCRC32.ToString("X8") + " " + Info; } - public static readonly VCN64 DonkeyKong64 = new VCN64(0xFB245F10, "SVN: 1680 TIME: 2015/01/20 14:12:06", "Donkey Kong 64 (NTSC-U)"); + public static readonly VCN64 DonkeyKong64J = new VCN64(0x8EF60284, "SVN: 1690 TIME: 2015/01/27 16:08:00", "Donkey Kong 64 (NTSC-J)"); public static readonly VCN64 Ocarina = new VCN64(0xF042E451, "SVN: 1696 TIME: 2015/01/30 10:49:22", "The Legend of Zelda: Ocarina of Time (NTSC-U)"); public static readonly VCN64 PaperMario = new VCN64(0xAE933905, "SVN: 1743 TIME: 2015/03/05 15:06:57", "Paper Mario (NTSC-U)"); + public static readonly VCN64 Kirby64J = new VCN64(0xCEB7A833, "SVN: 1778 TIME: 2015/03/19 16:15:32", "Hoshi no Kirby (NTSC-J)"); public static readonly VCN64 Kirby64 = new VCN64(0x7EB7B97D, "SVN: 1790 TIME: 2015/03/24 13:46:36", "Kirby 64: The Crystal Shards (NTSC-U)"); + public static readonly VCN64 SnowJ = new VCN64(0x17BCC968, "SVN: 1897 TIME: 2015/05/12 17:32:21", "1080° Snowboarding (NTSC-J)"); public static readonly VCN64 MarioTennis = new VCN64(0x05F20995, "SVN: 1918 TIME: 2015/05/20 14:34:00", "Mario Tennis (NTSC-U)"); + public static readonly VCN64 MarioGolfJ = new VCN64(0x8D3C196C, "SVN: 1946 TIME: 2015/06/09 11:00:28", "Mario Golf (NTSC-U)"); public static readonly VCN64 MarioGolf = new VCN64(0x307DCE21, "SVN: 1955 TIME: 2015/06/16 16:09:03", "Mario Golf (NTSC-U)"); public static readonly VCN64 StarFox64 = new VCN64(0xF41BC127, "SVN: 1970 TIME: 2015/06/30 14:07:35", "Star Fox 64 (NTSC-U)"); public static readonly VCN64 SinAndP = new VCN64(0x36C0456E, "SVN: 1991 TIME: 2015/07/16 09:20:39", "Sin and Punishment (NTSC-U)"); public static readonly VCN64 MarioKart64 = new VCN64(0x5559F831, "SVN: 2043 TIME: 2015/08/18 10:07:52", "Mario Kart 64 (NTSC-U)"); public static readonly VCN64 YoshiStory = new VCN64(0xD554D2E4, "SVN: 2079 TIME: 2015/09/15 16:19:11", "Yoshi's Story (NTSC-U)"); public static readonly VCN64 WaveRace64 = new VCN64(0xC376B949, "SVN: 2136 TIME: 2015/11/18 12:41:26", "Wave Race 64 (NTSC-U)"); + public static readonly VCN64 MajoraJ = new VCN64(0xEE8855FF, "SVN: 2170 TIME: 2015/12/16 16:01:23", "Zelda no Densetsu : Mujura no Kamen (NTSC-J)"); public static readonly VCN64 Majora = new VCN64(0x71FC1731, "SVN: 2190 TIME: 2016/01/05 16:50:14", "The Legend of Zelda: Majora's Mask (NTSC-U)"); public static readonly VCN64 PokemonSnap = new VCN64(0x967E7DF0, "SVN: 2195 TIME: 2016/01/08 09:42:51", "Pokémon Snap (NTSC-U)"); public static readonly VCN64 MarioParty2 = new VCN64(0xBE3CEC5F, "SVN: 2234 TIME: 2016/02/02 10:56:10", "Mario Party 2 (NTSC-U)"); From 7c63d1c2b878165e25e8a88fb235f01956a17ee6 Mon Sep 17 00:00:00 2001 From: piratesephiroth Date: Mon, 19 Aug 2019 06:34:18 -0300 Subject: [PATCH 6/8] fix typo --- VCN64.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/VCN64.cs b/VCN64.cs index ebcb705..5831d21 100644 --- a/VCN64.cs +++ b/VCN64.cs @@ -26,7 +26,7 @@ public override string ToString() public static readonly VCN64 Kirby64 = new VCN64(0x7EB7B97D, "SVN: 1790 TIME: 2015/03/24 13:46:36", "Kirby 64: The Crystal Shards (NTSC-U)"); public static readonly VCN64 SnowJ = new VCN64(0x17BCC968, "SVN: 1897 TIME: 2015/05/12 17:32:21", "1080° Snowboarding (NTSC-J)"); public static readonly VCN64 MarioTennis = new VCN64(0x05F20995, "SVN: 1918 TIME: 2015/05/20 14:34:00", "Mario Tennis (NTSC-U)"); - public static readonly VCN64 MarioGolfJ = new VCN64(0x8D3C196C, "SVN: 1946 TIME: 2015/06/09 11:00:28", "Mario Golf (NTSC-U)"); + public static readonly VCN64 MarioGolfJ = new VCN64(0x8D3C196C, "SVN: 1946 TIME: 2015/06/09 11:00:28", "Mario Golf (NTSC-J)"); public static readonly VCN64 MarioGolf = new VCN64(0x307DCE21, "SVN: 1955 TIME: 2015/06/16 16:09:03", "Mario Golf (NTSC-U)"); public static readonly VCN64 StarFox64 = new VCN64(0xF41BC127, "SVN: 1970 TIME: 2015/06/30 14:07:35", "Star Fox 64 (NTSC-U)"); public static readonly VCN64 SinAndP = new VCN64(0x36C0456E, "SVN: 1991 TIME: 2015/07/16 09:20:39", "Sin and Punishment (NTSC-U)"); From f56039bca2c81d250138e4bdcb76e8d4cc5e1523 Mon Sep 17 00:00:00 2001 From: piratesephiroth Date: Mon, 19 Aug 2019 06:39:21 -0300 Subject: [PATCH 7/8] fix order --- VCN64.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/VCN64.cs b/VCN64.cs index 5831d21..cff2a68 100644 --- a/VCN64.cs +++ b/VCN64.cs @@ -37,9 +37,9 @@ public override string ToString() public static readonly VCN64 Majora = new VCN64(0x71FC1731, "SVN: 2190 TIME: 2016/01/05 16:50:14", "The Legend of Zelda: Majora's Mask (NTSC-U)"); public static readonly VCN64 PokemonSnap = new VCN64(0x967E7DF0, "SVN: 2195 TIME: 2016/01/08 09:42:51", "Pokémon Snap (NTSC-U)"); public static readonly VCN64 MarioParty2 = new VCN64(0xBE3CEC5F, "SVN: 2234 TIME: 2016/02/02 10:56:10", "Mario Party 2 (NTSC-U)"); + public static readonly VCN64 CustomRoboV2 = new VCN64(0x89F2BC09, "SVN: 2244 TIME: 2016/02/26 09:03:55", "Custom Robo V2 (NTSC-J)"); public static readonly VCN64 OgreBattle64 = new VCN64(0xFED1FB48, "SVN: 2395 TIME: 2016/08/30 13:57:02", "Ogre Battle 64: Person of Lordly Caliber (NTSC-U)"); public static readonly VCN64 Excitebike64 = new VCN64(0x724C4F5D, "SVN: 2404 TIME: 2016/09/14 13:42:00", "Excitebike 64 (NTSC-U)"); - public static readonly VCN64 CustomRoboV2 = new VCN64(0x89F2BC09, "SVN: 2244 TIME: 2016/02/26 09:03:55", "Custom Robo V2 (NTSC-J)"); public static readonly VCN64 FZeroX = new VCN64(0x2AF3C23B, "SVN: 2428 TIME: 2016/11/18 11:44:39", "F-Zero X (NTSC-U)"); } } From a29a2b5ac71d09e19087dd39e2c8820985f20988 Mon Sep 17 00:00:00 2001 From: piratesephiroth Date: Mon, 19 Aug 2019 06:39:29 -0300 Subject: [PATCH 8/8] fix order --- 64Injector.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/64Injector.cs b/64Injector.cs index 871a0cd..26d863c 100644 --- a/64Injector.cs +++ b/64Injector.cs @@ -589,12 +589,12 @@ private VCN64 GetLoadedBase() return VCN64.PokemonSnap; else if (hash == VCN64.MarioParty2.HashCRC32) return VCN64.MarioParty2; + else if (hash == VCN64.CustomRoboV2.HashCRC32) + return VCN64.CustomRoboV2; else if (hash == VCN64.OgreBattle64.HashCRC32) return VCN64.OgreBattle64; else if (hash == VCN64.Excitebike64.HashCRC32) return VCN64.Excitebike64; - else if (hash == VCN64.CustomRoboV2.HashCRC32) - return VCN64.CustomRoboV2; else if (hash == VCN64.FZeroX.HashCRC32) return VCN64.FZeroX; else