forked from MirrorRepos/RomWBW
8 changed files with 200 additions and 172 deletions
@ -1,6 +1,4 @@ |
|||||
@echo off |
@echo off |
||||
setlocal |
setlocal |
||||
|
|
||||
rem pushd HBIOS && Powershell -ExecutionPolicy Unrestricted .\Build.ps1 %* || exit /b & popd |
|
||||
|
|
||||
pushd HBIOS && call Build %* || exit /b & popd |
pushd HBIOS && call Build %* || exit /b & popd |
||||
|
|||||
@ -1,6 +1,103 @@ |
|||||
@echo off |
@echo off |
||||
setlocal |
setlocal |
||||
|
|
||||
|
:: |
||||
|
:: Build [<platform> [<config> [<romsize> [<romname>]]]] |
||||
|
:: |
||||
|
|
||||
set TOOLS=../../Tools |
set TOOLS=../../Tools |
||||
|
|
||||
|
set PATH=%TOOLS%\tasm32;%TOOLS%\zx;%PATH% |
||||
|
|
||||
|
set TASMTABS=%TOOLS%\tasm32 |
||||
|
|
||||
|
set ZXBINDIR=%TOOLS%/cpm/bin/ |
||||
|
set ZXLIBDIR=%TOOLS%/cpm/lib/ |
||||
|
set ZXINCDIR=%TOOLS%/cpm/include/ |
||||
|
|
||||
PowerShell -ExecutionPolicy Unrestricted .\Build.ps1 %* || exit /b |
PowerShell -ExecutionPolicy Unrestricted .\Build.ps1 %* || exit /b |
||||
|
|
||||
|
call build_env.cmd |
||||
|
|
||||
|
echo Building %ROMSize%K ROM %ROMName% for Z%CPUType% CPU... |
||||
|
|
||||
|
if %Platform%==UNA goto :UNA |
||||
|
|
||||
|
copy ..\Fonts\font*.asm . || exit /b |
||||
|
|
||||
|
:: |
||||
|
:: Build HBIOS Core (all variants) |
||||
|
:: |
||||
|
tasm -t%CPUType% -g3 -dROMBOOT hbios.asm hbios_rom.bin hbios_rom.lst || exit /b |
||||
|
tasm -t%CPUType% -g3 -dAPPBOOT hbios.asm hbios_app.bin hbios_app.lst || exit /b |
||||
|
tasm -t%CPUType% -g3 -dIMGBOOT hbios.asm hbios_img.bin hbios_img.lst || exit /b |
||||
|
|
||||
|
:: |
||||
|
:: Build ROM Components |
||||
|
:: |
||||
|
call :asm dbgmon |
||||
|
call :asm romldr |
||||
|
call :asm eastaegg |
||||
|
call :asm nascom |
||||
|
call :asm tastybasic |
||||
|
call :asm game |
||||
|
call :asm usrrom |
||||
|
call :asm updater |
||||
|
call :asm imgpad2 |
||||
|
|
||||
|
:: |
||||
|
:: Create ROM bank images by assembling components |
||||
|
:: |
||||
|
|
||||
|
copy /b romldr.bin + dbgmon.bin + ..\zsdos\zsys_wbw.bin + ..\cpm22\cpm_wbw.bin osimg.bin || exit /b |
||||
|
copy /b romldr.bin + dbgmon.bin + ..\zsdos\zsys_wbw.bin osimg_small.bin || exit /b |
||||
|
copy /b ..\Forth\camel80.bin + nascom.bin + tastybasic.bin + game.bin + eastaegg.bin + netboot.mod + updater.bin + usrrom.bin osimg1.bin || exit /b |
||||
|
copy /b imgpad2.bin osimg2.bin || exit /b |
||||
|
|
||||
|
:: |
||||
|
:: Create final ROM images |
||||
|
:: |
||||
|
|
||||
|
set RomDiskDat= |
||||
|
if %ROMSize% GTR 128 set RomDiskDat=..\RomDsk\rom%ROMSize%_wbw.dat |
||||
|
|
||||
|
copy /b hbios_rom.bin + osimg.bin + osimg1.bin + osimg2.bin + ..\RomDsk\rom%ROMSize%_wbw.dat %ROMName%.rom || exit /b |
||||
|
copy /b hbios_rom.bin + osimg.bin + osimg1.bin + osimg2.bin %ROMName%.upd || exit /b |
||||
|
copy /b hbios_app.bin + osimg_small.bin %ROMName%.com || exit /b |
||||
|
|
||||
|
:: |
||||
|
:: Copy to output directory |
||||
|
:: |
||||
|
|
||||
|
copy %ROMName%.rom ..\..\Binary || exit /b |
||||
|
copy %ROMName%.upd ..\..\Binary || exit /b |
||||
|
copy %ROMName%.com ..\..\Binary || exit /b |
||||
|
|
||||
|
goto :eof |
||||
|
|
||||
|
:: |
||||
|
:: UNA specific ROM creation |
||||
|
:: |
||||
|
|
||||
|
:UNA |
||||
|
|
||||
|
call :asm dbgmon |
||||
|
call :asm romldr |
||||
|
|
||||
|
copy /b romldr.bin + dbgmon.bin + ..\zsdos\zsys_una.bin + ..\cpm22\cpm_una.bin osimg.bin || exit /b |
||||
|
|
||||
|
copy /b osimg.bin ..\..\Binary\UNA_WBW_SYS.bin || exit /b |
||||
|
copy /b ..\RomDsk\rom%ROMSize%_una.dat ..\..\Binary\UNA_WBW_ROM%ROMSize%.bin || exit /b |
||||
|
|
||||
|
copy /b ..\UBIOS\UNA-BIOS.BIN + osimg.bin + ..\UBIOS\FSFAT.BIN + ..\RomDsk\rom%ROMSize%_una.dat %ROMName%.rom || exit /b |
||||
|
|
||||
|
copy %ROMName%.rom ..\..\Binary || exit /b |
||||
|
|
||||
|
goto :eof |
||||
|
|
||||
|
:asm |
||||
|
echo. |
||||
|
echo Building %1... |
||||
|
tasm -t80 -g3 -fFF %1.asm %1.bin %1.lst || exit /b |
||||
|
goto :eof |
||||
|
|
||||
|
|||||
@ -0,0 +1,59 @@ |
|||||
|
@echo off |
||||
|
setlocal |
||||
|
|
||||
|
set TOOLS=../../Tools |
||||
|
|
||||
|
set PATH=%TOOLS%\tasm32;%TOOLS%\zx;%TOOLS%\srecord;%TOOLS%\cpmtools;%PATH% |
||||
|
|
||||
|
set TASMTABS=%TOOLS%\tasm32 |
||||
|
|
||||
|
set ZXBINDIR=%TOOLS%/cpm/bin/ |
||||
|
set ZXLIBDIR=%TOOLS%/cpm/lib/ |
||||
|
set ZXINCDIR=%TOOLS%/cpm/include/ |
||||
|
|
||||
|
:: |
||||
|
:: Make all variants of the ROM Disk contents image. Three sizes are |
||||
|
:: created for each of the different ROM sizes possible (256K, 512K, 1024K). |
||||
|
:: Also, the UNA ROM Disks contain different versions of the OS files. |
||||
|
:: |
||||
|
:: Note that the sizes specified below are not the size of the final |
||||
|
:: ROM. The ROM reserves 128K for code space. So, the size created is |
||||
|
:: the final ROM size less 128K. |
||||
|
:: |
||||
|
|
||||
|
:: MakeDisk <OutputFile> <ImageSize> <Format> <Directory> <Bios> |
||||
|
|
||||
|
set RomApps=assign mode rtc syscopy xm |
||||
|
|
||||
|
call :MakeDisk rom256_wbw 0x20000 wbw_rom256 ROM_256KB wbw |
||||
|
call :MakeDisk rom256_una 0x20000 wbw_rom256 ROM_256KB una |
||||
|
|
||||
|
set RomApps=%RomApps% fdu format survey sysgen talk timer inttest |
||||
|
|
||||
|
call :MakeDisk rom512_wbw 0x60000 wbw_rom512 ROM_512KB wbw |
||||
|
call :MakeDisk rom512_una 0x60000 wbw_rom512 ROM_512KB una |
||||
|
|
||||
|
call :MakeDisk rom1024_wbw 0xE0000 wbw_rom1024 ROM_1024KB wbw |
||||
|
call :MakeDisk rom1024_una 0xE0000 wbw_rom1024 ROM_1024KB una |
||||
|
|
||||
|
goto :eof |
||||
|
|
||||
|
:MakeDisk |
||||
|
set Output=%1 |
||||
|
set Size=%2 |
||||
|
set Format=%3 |
||||
|
set Content=%4 |
||||
|
set Bios=%5 |
||||
|
|
||||
|
echo Making ROM Disk %Output% |
||||
|
|
||||
|
srec_cat -Generate 0 %Size% --Constant 0xE5 -Output %Output%.dat -Binary || exit /b |
||||
|
|
||||
|
cpmcp -f %Format% %Output%.dat %Content%/*.* 0: || exit /b |
||||
|
for %%f in (%RomApps%) do cpmcp -f %Format% %Output%.dat ../../Binary/Apps/%%f.com 0: || exit /b |
||||
|
cpmcp -f %Format% %Output%.dat ..\cpm22\cpm_%Bios%.sys 0:cpm.sys || exit /b |
||||
|
cpmcp -f %Format% %Output%.dat ..\zsdos\zsys_%Bios%.sys 0:zsys.sys || exit /b |
||||
|
|
||||
|
cpmchattr -f %Format% %Output%.dat r 0:*.* || exit /b |
||||
|
|
||||
|
goto :eof |
||||
@ -0,0 +1,4 @@ |
|||||
|
@echo off |
||||
|
setlocal |
||||
|
|
||||
|
if exist *.dat del *.dat |
||||
Loading…
Reference in new issue