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

github.com/coolgirl-multicart/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-11-08 23:56:41 +0300
committerAlexey 'Cluster' Avdyukhin <clusterrr@clusterrr.com>2022-11-08 23:56:41 +0300
commit74fe88b84621e6a2ace445f7ac7c8673305c12b4 (patch)
treee8008515cc16316d40d6cce672a8fd47b2281e9d
parent7c484b1c8824bdba4339dd35e8f422132277dd51 (diff)
Automatic GAMES_DB define, new parameter - --sources
-rw-r--r--Makefile3
-rw-r--r--tools_sources/CoolgirlCombiner/Program.cs12
2 files changed, 10 insertions, 5 deletions
diff --git a/Makefile b/Makefile
index b1492b2..0487c27 100644
--- a/Makefile
+++ b/Makefile
@@ -115,8 +115,7 @@ NESASM_OPTS += -C MENU_HEADER_PATTERN_TABLE_BIN=$(MENU_HEADER
-C MENU_HEADER_ATTRIBUTE_TABLE_BIN=$(MENU_HEADER_ATTRIBUTE_TABLE_BIN) \
-C MENU_HEADER_BG_PALETTE_0=$(MENU_HEADER_BG_PALETTE_0) \
-C MENU_HEADER_BG_PALETTE_1=$(MENU_HEADER_BG_PALETTE_1) \
- -C MENU_HEADER_BG_PALETTE_2=$(MENU_HEADER_BG_PALETTE_2) \
- -C GAMES_DB=$(GAMES_DB)
+ -C MENU_HEADER_BG_PALETTE_2=$(MENU_HEADER_BG_PALETTE_2)
all: $(UNIF) $(NES20) $(BIN)
build: $(UNIF)
diff --git a/tools_sources/CoolgirlCombiner/Program.cs b/tools_sources/CoolgirlCombiner/Program.cs
index 9ee245a..cfa2146 100644
--- a/tools_sources/CoolgirlCombiner/Program.cs
+++ b/tools_sources/CoolgirlCombiner/Program.cs
@@ -51,6 +51,7 @@ namespace com.clusterrr.Famicom.CoolGirl
optionSymbolsFile = Path.Combine("/etc", DEFAULT_SYMBOLS_FILE);
string optionNesAsm = "nesasm";
string optionNesAsmArgs = "";
+ string optionSourcesDir = ".";
string? optionGamesFile = null;
string optionAsmFile = "games.asm";
string optionOffsetsFile = "offsets.json";
@@ -166,6 +167,10 @@ namespace com.clusterrr.Famicom.CoolGirl
optionNesAsmArgs = value;
i++;
break;
+ case "sources":
+ optionSourcesDir = value;
+ i++;
+ break;
default:
Console.WriteLine("Unknown parameter: " + param);
needShowHelp = true;
@@ -217,11 +222,12 @@ namespace com.clusterrr.Famicom.CoolGirl
Console.WriteLine(" {0,-20}{1}", "--nes20", "- output NES 2.0 file");
Console.WriteLine(" {0,-20}{1}", "--bin", "- output raw binary file");
Console.WriteLine("All at once:");
- Console.WriteLine($" {exename} build --games <games.txt> --asm <games.asm> [--nesasm <nesasm>] [--nesasm-args <args>] [--report <report.txt>] [--nosort] [--maxromsize <size_mb>] [--maxchrsize <size_kb>] [--language <language>] [--badsectors <sectors>] [--unif <multirom.unf>] [--nes20 <multirom.nes>] [--bin <multirom.bin>]");
+ Console.WriteLine($" {exename} build --games <games.txt> --asm <games.asm> [--nesasm <nesasm>] [--nesasm-args <args>] [--sources <path>] [--report <report.txt>] [--nosort] [--maxromsize <size_mb>] [--maxchrsize <size_kb>] [--language <language>] [--badsectors <sectors>] [--unif <multirom.unf>] [--nes20 <multirom.nes>] [--bin <multirom.bin>]");
Console.WriteLine(" {0,-20}{1}", "--games", "- input plain text file with list of ROM files");
Console.WriteLine(" {0,-20}{1}", "--asm", "- output file for the loader");
Console.WriteLine(" {0,-20}{1}", "--nesasm", "- path to the nesasm compiler executable");
Console.WriteLine(" {0,-20}{1}", "--nesasm-args", "- additional command-line arguments for nesasm");
+ Console.WriteLine(" {0,-20}{1}", "--sources", "- directory with loader source files, default is current directory");
Console.WriteLine(" {0,-20}{1}", "--report", "- output report file (human readable)");
Console.WriteLine(" {0,-20}{1}", "--nosort", "- disable automatic sort by name");
Console.WriteLine(" {0,-20}{1}", "--maxromsize", "- maximum size for final file (in megabytes)");
@@ -790,8 +796,8 @@ namespace com.clusterrr.Famicom.CoolGirl
var process = new Process();
var cp866 = CodePagesEncodingProvider.Instance.GetEncoding(866) ?? Encoding.ASCII;
process.StartInfo.FileName = optionNesAsm;
- process.StartInfo.Arguments = $"\"menu.asm\" -r -o - " + optionNesAsmArgs;
- process.StartInfo.WorkingDirectory = Path.GetDirectoryName(optionAsmFile);
+ process.StartInfo.Arguments = $"\"menu.asm\" -r -o - -C \"GAMES_DB={optionAsmFile}\" " + optionNesAsmArgs;
+ process.StartInfo.WorkingDirectory = optionSourcesDir;
process.StartInfo.WindowStyle = ProcessWindowStyle.Hidden;
process.StartInfo.UseShellExecute = false;
process.StartInfo.CreateNoWindow = true;