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

github.com/ClusterM/coolgirl-multirom-builder.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexey 'Cluster' Avdyukhin <clusterrr@clusterrr.com>2022-12-07 22:28:26 +0300
committerAlexey 'Cluster' Avdyukhin <clusterrr@clusterrr.com>2022-12-07 22:28:26 +0300
commit49c6dc82b95ec44b6af4d59f2df5c92414c7782d (patch)
treec61ce4928d0be95a190064476a829d9a1c7a45c2
parent503a877cd7f19b89259ca02dc2dd901bdf7b35c8 (diff)
ROM file size fix
-rw-r--r--.github/workflows/build.yaml20
-rw-r--r--tools_sources/CoolgirlCombiner/CoolgirlCombiner.csproj6
-rw-r--r--tools_sources/CoolgirlCombiner/Program.cs7
3 files changed, 16 insertions, 17 deletions
diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml
index bc57c39..700eebc 100644
--- a/.github/workflows/build.yaml
+++ b/.github/workflows/build.yaml
@@ -36,11 +36,11 @@ jobs:
- name: Build CoolgirlCombiner for Linux-x64
env:
SC_OPS: ${{ matrix.sc == 'self-contained' && '--self-contained true' || '--no-self-contained' }}
- run: dotnet publish tools_sources/CoolgirlCombiner -c Release -r linux-x64 -o ${{ env.TOOLS_DIR }} ${{ env.SC_OPS }}
+ run: dotnet publish tools_sources/CoolgirlCombiner -c Debug -r linux-x64 -o ${{ env.TOOLS_DIR }} ${{ env.SC_OPS }}
- name: Build NesTiler for Linux-x64
env:
SC_OPS: ${{ matrix.sc == 'self-contained' && '--self-contained true' || '--no-self-contained' }}
- run: dotnet publish tools_sources/NesTiler/NesTiler -c Release -r linux-x64 -o ${{ env.TOOLS_DIR }} ${{ env.SC_OPS }}
+ run: dotnet publish tools_sources/NesTiler/NesTiler -c Debug -r linux-x64 -o ${{ env.TOOLS_DIR }} ${{ env.SC_OPS }}
- name: Build nesasm for Linux-x64
run: make -C tools_sources/nesasm/source EXEDIR=../../../${{ env.TOOLS_DIR }}
- name: Remove unnecessary files
@@ -61,11 +61,11 @@ jobs:
- name: Build CoolgirlCombiner for Linux-ARM32
env:
SC_OPS: ${{ matrix.sc == 'self-contained' && '--self-contained true' || '--no-self-contained' }}
- run: dotnet publish tools_sources/CoolgirlCombiner -c Release -r linux-arm -o ${{ env.TOOLS_DIR }} ${{ env.SC_OPS }}
+ run: dotnet publish tools_sources/CoolgirlCombiner -c Debug -r linux-arm -o ${{ env.TOOLS_DIR }} ${{ env.SC_OPS }}
- name: Build NesTiler for Linux-ARM32
env:
SC_OPS: ${{ matrix.sc == 'self-contained' && '--self-contained true' || '--no-self-contained' }}
- run: dotnet publish tools_sources/NesTiler/NesTiler -c Release -r linux-arm -o ${{ env.TOOLS_DIR }} ${{ env.SC_OPS }}
+ run: dotnet publish tools_sources/NesTiler/NesTiler -c Debug -r linux-arm -o ${{ env.TOOLS_DIR }} ${{ env.SC_OPS }}
- name: Build nesasm for Linux-ARM32
run: make -C tools_sources/nesasm/source EXEDIR=../../../${{ env.TOOLS_DIR }} CC=arm-linux-gnueabihf-gcc
- name: Remove unnecessary files
@@ -82,11 +82,11 @@ jobs:
- name: Build CoolgirlCombiner for Linux-ARM64
env:
SC_OPS: ${{ matrix.sc == 'self-contained' && '--self-contained true' || '--no-self-contained' }}
- run: dotnet publish tools_sources/CoolgirlCombiner -c Release -r linux-arm64 -o ${{ env.TOOLS_DIR }} ${{ env.SC_OPS }}
+ run: dotnet publish tools_sources/CoolgirlCombiner -c Debug -r linux-arm64 -o ${{ env.TOOLS_DIR }} ${{ env.SC_OPS }}
- name: Build NesTiler for Linux-ARM64
env:
SC_OPS: ${{ matrix.sc == 'self-contained' && '--self-contained true' || '--no-self-contained' }}
- run: dotnet publish tools_sources/NesTiler/NesTiler -c Release -r linux-arm64 -o ${{ env.TOOLS_DIR }} ${{ env.SC_OPS }}
+ run: dotnet publish tools_sources/NesTiler/NesTiler -c Debug -r linux-arm64 -o ${{ env.TOOLS_DIR }} ${{ env.SC_OPS }}
- name: Build nesasm for Linux-ARM64
run: make -C tools_sources/nesasm/source EXEDIR=../../../${{ env.TOOLS_DIR }} CC=aarch64-linux-gnu-gcc
- name: Remove unnecessary files
@@ -124,11 +124,11 @@ jobs:
- name: Build CoolgirlCombiner for MacOS-x64
env:
SC_OPS: ${{ matrix.sc == 'self-contained' && '--self-contained true' || '--no-self-contained' }}
- run: dotnet publish tools_sources/CoolgirlCombiner -c Release -r osx-x64 -o ${{ env.TOOLS_DIR }} ${{ env.SC_OPS }}
+ run: dotnet publish tools_sources/CoolgirlCombiner -c Debug -r osx-x64 -o ${{ env.TOOLS_DIR }} ${{ env.SC_OPS }}
- name: Build NesTiler for MacOS-x64
env:
SC_OPS: ${{ matrix.sc == 'self-contained' && '--self-contained true' || '--no-self-contained' }}
- run: dotnet publish tools_sources/NesTiler/NesTiler -c Release -r osx-x64 -o ${{ env.TOOLS_DIR }} ${{ env.SC_OPS }}
+ run: dotnet publish tools_sources/NesTiler/NesTiler -c Debug -r osx-x64 -o ${{ env.TOOLS_DIR }} ${{ env.SC_OPS }}
- name: Build nesasm for MacOS-x64
run: make -C tools_sources/nesasm/source EXEDIR=../../../${{ env.TOOLS_DIR }}
- name: Remove unnecessary files
@@ -178,11 +178,11 @@ jobs:
- name: Build CoolgirlCombiner for Win-x64
env:
SC_OPS: ${{ matrix.sc == 'self-contained' && '--self-contained true' || '--no-self-contained' }}
- run: dotnet publish tools_sources/CoolgirlCombiner -c Release -r win-x64 -o ${{ env.TOOLS_DIR }} ${{ env.SC_OPS }}
+ run: dotnet publish tools_sources/CoolgirlCombiner -c Debug -r win-x64 -o ${{ env.TOOLS_DIR }} ${{ env.SC_OPS }}
- name: Build NesTiler for Win-x64
env:
SC_OPS: ${{ matrix.sc == 'self-contained' && '--self-contained true' || '--no-self-contained' }}
- run: dotnet publish tools_sources/NesTiler/NesTiler -c Release -r win-x64 -o ${{ env.TOOLS_DIR }} ${{ env.SC_OPS }}
+ run: dotnet publish tools_sources/NesTiler/NesTiler -c Debug -r win-x64 -o ${{ env.TOOLS_DIR }} ${{ env.SC_OPS }}
- name: Remove unnecessary files
shell: msys2 {0}
run: rm -f ${{ env.TOOLS_DIR }}/*.md
diff --git a/tools_sources/CoolgirlCombiner/CoolgirlCombiner.csproj b/tools_sources/CoolgirlCombiner/CoolgirlCombiner.csproj
index 80185a4..c2bd258 100644
--- a/tools_sources/CoolgirlCombiner/CoolgirlCombiner.csproj
+++ b/tools_sources/CoolgirlCombiner/CoolgirlCombiner.csproj
@@ -10,9 +10,9 @@
<Nullable>enable</Nullable>
<RepositoryUrl>https://github.com/ClusterM/coolgirl-multirom-builder</RepositoryUrl>
<RepositoryType>git</RepositoryType>
- <AssemblyVersion>2.0.1</AssemblyVersion>
- <FileVersion>2.0.1</FileVersion>
- <Version>2.0.1</Version>
+ <AssemblyVersion>2.1.0</AssemblyVersion>
+ <FileVersion>2.1.0</FileVersion>
+ <Version>2.1.0</Version>
<NeutralLanguage>en</NeutralLanguage>
<Authors>Alexey 'Cluster' Avdyukhin</Authors>
</PropertyGroup>
diff --git a/tools_sources/CoolgirlCombiner/Program.cs b/tools_sources/CoolgirlCombiner/Program.cs
index 7bb7614..47c35f2 100644
--- a/tools_sources/CoolgirlCombiner/Program.cs
+++ b/tools_sources/CoolgirlCombiner/Program.cs
@@ -28,7 +28,7 @@ namespace com.clusterrr.Famicom.CoolGirl
{
try
{
- var version = Assembly.GetExecutingAssembly()?.GetName()?.Version;
+ var version = Assembly.GetExecutingAssembly()?.GetName()?.Version;
Console.WriteLine($"COOLGIRL Combiner v{version?.Major}.{version?.Minor}{((version?.Build ?? 0) > 0 ? $"{(char)((byte)'a' + version!.Build)}" : "")}");
Console.WriteLine($" Commit {Properties.Resources.gitCommit} @ {REPO_PATH}");
#if DEBUG
@@ -238,7 +238,6 @@ namespace com.clusterrr.Famicom.CoolGirl
usedSpace += notFittedSize;
// Round up to minimum PRG bank size
usedSpace = 0x4000 * (int)Math.Ceiling((float)usedSpace / (float)0x4000);
- int romSize = usedSpace;
// Round up to sector size
usedSpace = FLASH_SECTOR_SIZE * (int)Math.Ceiling((float)usedSpace / (float)FLASH_SECTOR_SIZE);
// Space for saves
@@ -604,7 +603,7 @@ namespace com.clusterrr.Famicom.CoolGirl
if (config.Command == Config.CombinerCommand.Prepare)
{
var offsets = new Offsets();
- offsets.Size = romSize;
+ offsets.Size = usedSpace;
offsets.RomCount = gameCount;
offsets.GamesFile = Path.GetFileName(config.GamesFile);
offsets.Games = sortedGames.Where(g => !g.IsSeparator).ToArray();
@@ -614,7 +613,7 @@ namespace com.clusterrr.Famicom.CoolGirl
if (config.Command == Config.CombinerCommand.Build)
{
Console.Write("Compiling using nesasm... ");
- if (romSize < result.Length) Array.Resize(ref result, romSize);
+ if (usedSpace < result.Length) Array.Resize(ref result, usedSpace);
var process = new Process();
var cp866 = CodePagesEncodingProvider.Instance.GetEncoding(866) ?? Encoding.ASCII;
process.StartInfo.FileName = config.NesAsm;