Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/ClusterM/hakchi2.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'Apps/NesGame.cs')
-rw-r--r--Apps/NesGame.cs20
1 files changed, 16 insertions, 4 deletions
diff --git a/Apps/NesGame.cs b/Apps/NesGame.cs
index 6fedd280..f075e038 100644
--- a/Apps/NesGame.cs
+++ b/Apps/NesGame.cs
@@ -51,7 +51,7 @@ namespace com.clusterrr.hakchi_gui
gameGenie = File.ReadAllText(GameGeniePath);
}
- public static bool Patch(string inputFileName, ref byte[] rawRomData, ref char prefix, ref string application, ref string outputFileName, ref string args, ref Image cover, ref uint crc32)
+ public static bool Patch(string inputFileName, ref byte[] rawRomData, ref char prefix, ref string application, ref string outputFileName, ref string args, ref Image cover, ref byte saveCount, ref uint crc32)
{
// Try to patch before mapper check, maybe it will patch mapper
FindPatch(ref rawRomData, inputFileName, crc32);
@@ -69,15 +69,22 @@ namespace com.clusterrr.hakchi_gui
nesFile.CorrectRom();
crc32 = nesFile.CRC32;
if (ConfigIni.ConsoleType == MainForm.ConsoleType.NES || ConfigIni.ConsoleType == MainForm.ConsoleType.Famicom)
+ {
application = "/bin/clover-kachikachi-wr";
+ args = DefaultArgs;
+ }
else
+ {
application = "/bin/nes";
+ }
//if (nesFile.Mapper == 71) nesFile.Mapper = 2; // games by Codemasters/Camerica - this is UNROM clone. One exception - Fire Hawk
//if (nesFile.Mapper == 88) nesFile.Mapper = 4; // Compatible with MMC3... sometimes
//if (nesFile.Mapper == 95) nesFile.Mapper = 4; // Compatible with MMC3
//if (nesFile.Mapper == 206) nesFile.Mapper = 4; // Compatible with MMC3
- if (!supportedMappers.Contains(nesFile.Mapper) && (IgnoreMapper != true))
+ if (!supportedMappers.Contains(nesFile.Mapper) &&
+ (ConfigIni.ConsoleType == MainForm.ConsoleType.NES || ConfigIni.ConsoleType == MainForm.ConsoleType.Famicom)
+ && (IgnoreMapper != true))
{
if (IgnoreMapper != false)
{
@@ -93,7 +100,9 @@ namespace com.clusterrr.hakchi_gui
}
else return false;
}
- if ((nesFile.Mirroring == NesFile.MirroringType.FourScreenVram) && (IgnoreMapper != true))
+ if ((nesFile.Mirroring == NesFile.MirroringType.FourScreenVram) &&
+ (ConfigIni.ConsoleType == MainForm.ConsoleType.NES || ConfigIni.ConsoleType == MainForm.ConsoleType.Famicom) &&
+ (IgnoreMapper != true))
{
var r = WorkerForm.MessageBoxFromThread(ParentForm,
string.Format(Resources.FourScreenNotSupported, System.IO.Path.GetFileName(inputFileName)),
@@ -109,7 +118,10 @@ namespace com.clusterrr.hakchi_gui
// TODO: Make trainer check. I think that the NES Mini doesn't support it.
rawRomData = nesFile.GetRaw();
if (inputFileName.Contains("(J)")) cover = Resources.blank_jp;
- args = DefaultArgs;
+
+ if (nesFile.Battery)
+ saveCount = 3;
+
return true;
}