From 1c10f734bd0a71c8bdc1644c3b0135bf5a3cb45d Mon Sep 17 00:00:00 2001 From: Wayne Warthen Date: Tue, 21 Nov 2023 14:36:56 -0800 Subject: [PATCH] Create AddRom.cmd Experimental command line script (Windows only) to add a ROM image to user area 0 of hd1k_combo.img. Intended to make it easier to get a ROM image to a system for subsequent FLASHing. --- Source/Images/AddRom.cmd | 45 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 Source/Images/AddRom.cmd diff --git a/Source/Images/AddRom.cmd b/Source/Images/AddRom.cmd new file mode 100644 index 00000000..b193ec53 --- /dev/null +++ b/Source/Images/AddRom.cmd @@ -0,0 +1,45 @@ +@echo off +setlocal + +set PATH=..\..\Tools\cpmtools;%PATH% +set ROMLOC=..\..\Binary + +if "%1"=="" goto :usage + +if not exist %ROMLOC%\%1.rom goto :nofile + +echo. + +cpmrm.exe -f wbw_hd1k_0 %ROMLOC%/hd1k_combo.img 0:rom.img +cpmcp.exe -f wbw_hd1k_0 %ROMLOC%/hd1k_combo.img %ROMLOC%/%1.rom 0:rom.img + +if errorlevel 1 goto :err + +::cpmls.exe -f wbw_hd1k_0 %ROMLOC%/hd1k_combo.img 0:rom.img + +echo %1.rom has been added to hd1k_combo.img in user area 0 +echo. +goto :eof + +:nofile +echo. +echo %ROMLOC%\%1.rom file not found!!! +echo. +goto :eof + +:usage +echo. +echo Usage: +echo AddRom romname +echo. +echo romname is the root filename of an existing ROM image in the %ROMLOC% directory +echo. +echo Example: +echo AddRom RCZ80_std +echo. +goto :eof + +:err +echo. +echo An error occurred copying %1.rom into hd1k_combo.img! +echo. \ No newline at end of file