diff options
author | Alexey 'Cluster' Avdyukhin <clusterrr@clusterrr.com> | 2021-09-25 13:03:46 +0300 |
---|---|---|
committer | Alexey 'Cluster' Avdyukhin <clusterrr@clusterrr.com> | 2021-09-25 13:03:46 +0300 |
commit | 7a60fca641797fa2b6312a42865b0c361625601b (patch) | |
tree | 1cafdc3a570747e5d91956a108cdc0c35ce3495f /tools_sources | |
parent | 7e8f5a22d4b925fc2dcaa0350740c639791c176f (diff) |
Limits fixes
Diffstat (limited to 'tools_sources')
-rw-r--r-- | tools_sources/CoolgirlCombiner/CoolgirlCombiner.csproj | 6 | ||||
-rw-r--r-- | tools_sources/CoolgirlCombiner/Program.cs | 16 | ||||
m--------- | tools_sources/NesContainers | 0 |
3 files changed, 11 insertions, 11 deletions
diff --git a/tools_sources/CoolgirlCombiner/CoolgirlCombiner.csproj b/tools_sources/CoolgirlCombiner/CoolgirlCombiner.csproj index 7ab26a8..1e57b29 100644 --- a/tools_sources/CoolgirlCombiner/CoolgirlCombiner.csproj +++ b/tools_sources/CoolgirlCombiner/CoolgirlCombiner.csproj @@ -23,15 +23,15 @@ <ItemGroup>
<None Update="coolgirl-fixes.json">
- <CopyToOutputDirectory>Always</CopyToOutputDirectory>
+ <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<ExcludeFromSingleFile>true</ExcludeFromSingleFile>
</None>
<None Update="coolgirl-mappers.json">
- <CopyToOutputDirectory>Always</CopyToOutputDirectory>
+ <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<ExcludeFromSingleFile>true</ExcludeFromSingleFile>
</None>
<None Update="coolgirl-symbols.json">
- <CopyToOutputDirectory>Always</CopyToOutputDirectory>
+ <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<ExcludeFromSingleFile>true</ExcludeFromSingleFile>
</None>
</ItemGroup>
diff --git a/tools_sources/CoolgirlCombiner/Program.cs b/tools_sources/CoolgirlCombiner/Program.cs index b2c13f5..ca70e21 100644 --- a/tools_sources/CoolgirlCombiner/Program.cs +++ b/tools_sources/CoolgirlCombiner/Program.cs @@ -49,8 +49,8 @@ namespace com.clusterrr.Famicom.CoolGirl string optionLanguage = "eng";
var badSectors = new List<int>();
bool optionNoSort = false;
- int optionMaxRomSize = 256;
- int optionMaxChrRamSize = 256;
+ uint optionMaxRomSize = 256;
+ uint optionMaxChrRamSize = 256;
bool optionCalculateMd5 = false;
var jsonOptions = new JsonSerializerOptions()
{
@@ -121,11 +121,11 @@ namespace com.clusterrr.Famicom.CoolGirl optionNoSort = true;
break;
case "maxromsize":
- optionMaxRomSize = int.Parse(value);
+ optionMaxRomSize = uint.Parse(value);
i++;
break;
case "maxchrsize":
- optionMaxChrRamSize = int.Parse(value);
+ optionMaxChrRamSize = uint.Parse(value);
i++;
break;
case "language":
@@ -470,11 +470,11 @@ namespace com.clusterrr.Famicom.CoolGirl if (games.Count - hiddenCount == 0)
throw new InvalidOperationException("Games list is empty");
- if (usedSpace > optionMaxRomSize * 1024 * 1024) // This should not happen
+ if (usedSpace > optionMaxRomSize * 1024 * 1024)
throw new OutOfMemoryException($"ROM is too big: {Math.Round(usedSpace / 1024.0 / 1024.0, 3)}MB");
- if (games.Count > 768)
+ if (games.Count > 1536)
throw new ArgumentOutOfRangeException("games", $"Too many ROMs: {games.Count}");
- if (saveId > 128)
+ if (saveId > 255)
throw new ArgumentOutOfRangeException("saves", $"Too many battery backed games: {saveId}");
regs["reg_0"] = new List<string>();
@@ -900,7 +900,7 @@ namespace com.clusterrr.Famicom.CoolGirl nes.CHR = null;
nes.Mapper = 342;
nes.PrgNvRamSize = 32 * 1024;
- nes.ChrRamSize = 512 * 1024;
+ nes.ChrRamSize = optionMaxChrRamSize * 1024;
nes.Battery = true;
nes.Save(optionNes20File);
Console.WriteLine("OK");
diff --git a/tools_sources/NesContainers b/tools_sources/NesContainers -Subproject 1916c77c9b79c20225f997abc195640c11d8e09 +Subproject 7d014bbb8f8a09891999d1be90b73db618d5dd3 |