mirror of https://github.com/wwarthen/RomWBW.git
Browse Source
- Determine slice images to create dynamically based on the hd_xxx.txt and fd_xxx.txt files. - Add a volume label directive to the hd_xxx.txt and fd_xxx.txt files. - Add a system image directive to the hd_xxx.txt and fd_xxx.txt files.pull/596/head
61 changed files with 1197 additions and 1262 deletions
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -1,4 +0,0 @@ |
|||
@echo off |
|||
setlocal |
|||
|
|||
pushd BPBIOS && call Build || exit /b & popd |
|||
@ -1,92 +1,22 @@ |
|||
@echo off |
|||
setlocal |
|||
|
|||
:: call BuildDisk.cmd bp hd wbw_hd1k ..\zsdos\zsys_wbw.sys |
|||
:: copy /b hd1k_prefix.dat + ..\..\Binary\hd1k_bp.img + ..\..\Binary\hd1k_cpm22.img + ..\..\Binary\hd1k_zsdos.img + ..\..\Binary\hd1k_nzcom.img + ..\..\Binary\hd1k_cpm3.img + ..\..\Binary\hd1k_zpm3.img + ..\..\Binary\hd1k_ws4.img ..\..\Binary\hd1k_combo_bp.img || exit /b |
|||
:: goto :eof |
|||
|
|||
echo. |
|||
echo Building Floppy Disk Images... |
|||
echo. |
|||
call BuildDisk.cmd cpm22 fd wbw_fd144 ..\cpm22\cpm_wbw.sys || exit /b |
|||
call BuildDisk.cmd zsdos fd wbw_fd144 ..\zsdos\zsys_wbw.sys || exit /b |
|||
call BuildDisk.cmd nzcom fd wbw_fd144 ..\zsdos\zsys_wbw.sys || exit /b |
|||
call BuildDisk.cmd cpm3 fd wbw_fd144 ..\cpm3\cpmldr.sys || exit /b |
|||
call BuildDisk.cmd zpm3 fd wbw_fd144 ..\zpm3\zpmldr.sys || exit /b |
|||
call BuildDisk.cmd z3plus fd wbw_fd144 ..\cpm3\cpmldr.sys || exit /b |
|||
call BuildDisk.cmd ws4 fd wbw_fd144 || exit /b |
|||
call BuildDisk.cmd qpm fd wbw_fd144 ..\qpm\qpm_wbw.sys || exit /b |
|||
call BuildDisk.cmd z80asm fd wbw_fd144 || exit /b |
|||
call BuildDisk.cmd aztecc fd wbw_fd144 || exit /b |
|||
call BuildDisk.cmd hitechc fd wbw_fd144 || exit /b |
|||
call BuildDisk.cmd tpascal fd wbw_fd144 || exit /b |
|||
call BuildDisk.cmd bascomp fd wbw_fd144 || exit /b |
|||
call BuildDisk.cmd cobol fd wbw_fd144 || exit /b |
|||
call BuildDisk.cmd fortran fd wbw_fd144 || exit /b |
|||
call BuildDisk.cmd games fd wbw_fd144 || exit /b |
|||
call BuildDisk.cmd cowgol fd wbw_fd144 || exit /b |
|||
|
|||
echo. |
|||
echo Building Hard Disk Images (512 directory entry format)... |
|||
echo. |
|||
call BuildDisk.cmd blank hd wbw_hd512 || exit /b |
|||
call BuildDisk.cmd cpm22 hd wbw_hd512 ..\cpm22\cpm_wbw.sys || exit /b |
|||
call BuildDisk.cmd zsdos hd wbw_hd512 ..\zsdos\zsys_wbw.sys || exit /b |
|||
call BuildDisk.cmd nzcom hd wbw_hd512 ..\zsdos\zsys_wbw.sys || exit /b |
|||
call BuildDisk.cmd cpm3 hd wbw_hd512 ..\cpm3\cpmldr.sys || exit /b |
|||
call BuildDisk.cmd zpm3 hd wbw_hd512 ..\zpm3\zpmldr.sys || exit /b |
|||
call BuildDisk.cmd z3plus hd wbw_hd512 ..\cpm3\cpmldr.sys || exit /b |
|||
call BuildDisk.cmd ws4 hd wbw_hd512 || exit /b |
|||
call BuildDisk.cmd dos65 hd wbw_hd512 ..\zsdos\zsys_wbw.sys || exit /b |
|||
call BuildDisk.cmd qpm hd wbw_hd512 ..\qpm\qpm_wbw.sys || exit /b |
|||
call BuildDisk.cmd z80asm hd wbw_hd512 || exit /b |
|||
call BuildDisk.cmd aztecc hd wbw_hd512 || exit /b |
|||
call BuildDisk.cmd hitechc hd wbw_hd512 || exit /b |
|||
call BuildDisk.cmd tpascal hd wbw_hd512 || exit /b |
|||
call BuildDisk.cmd bascomp hd wbw_hd512 || exit /b |
|||
call BuildDisk.cmd cobol hd wbw_hd512 || exit /b |
|||
call BuildDisk.cmd fortran hd wbw_hd512 || exit /b |
|||
call BuildDisk.cmd games hd wbw_hd512 || exit /b |
|||
call BuildDisk.cmd cowgol hd wbw_hd512 || exit /b |
|||
call BuildDisk.cmd msxroms1 hd wbw_hd512 || exit /b |
|||
call BuildDisk.cmd msxroms2 hd wbw_hd512 || exit /b |
|||
call BuildDisk.cmd infocom hd wbw_hd512 || exit /b |
|||
|
|||
:: echo. |
|||
:: echo Building Combo Disk (512 directory entry format) Image... |
|||
:: copy /b ..\..\Binary\hd512_cpm22.img + ..\..\Binary\hd512_zsdos.img + ..\..\Binary\hd512_nzcom.img + ..\..\Binary\hd512_cpm3.img + ..\..\Binary\hd512_zpm3.img + ..\..\Binary\hd512_ws4.img ..\..\Binary\hd512_combo.img || exit /b |
|||
|
|||
echo. |
|||
echo Building Hard Disk Images (1024 directory entry format)... |
|||
echo. |
|||
call BuildDisk.cmd blank hd wbw_hd1k || exit /b |
|||
call BuildDisk.cmd cpm22 hd wbw_hd1k ..\cpm22\cpm_wbw.sys || exit /b |
|||
call BuildDisk.cmd zsdos hd wbw_hd1k ..\zsdos\zsys_wbw.sys || exit /b |
|||
call BuildDisk.cmd nzcom hd wbw_hd1k ..\zsdos\zsys_wbw.sys || exit /b |
|||
call BuildDisk.cmd cpm3 hd wbw_hd1k ..\cpm3\cpmldr.sys || exit /b |
|||
call BuildDisk.cmd zpm3 hd wbw_hd1k ..\zpm3\zpmldr.sys || exit /b |
|||
call BuildDisk.cmd z3plus hd wbw_hd1k ..\cpm3\cpmldr.sys || exit /b |
|||
call BuildDisk.cmd ws4 hd wbw_hd1k || exit /b |
|||
call BuildDisk.cmd qpm hd wbw_hd1k ..\qpm\qpm_wbw.sys || exit /b |
|||
call BuildDisk.cmd z80asm hd wbw_hd1k || exit /b |
|||
call BuildDisk.cmd aztecc hd wbw_hd1k || exit /b |
|||
call BuildDisk.cmd hitechc hd wbw_hd1k || exit /b |
|||
call BuildDisk.cmd tpascal hd wbw_hd1k || exit /b |
|||
call BuildDisk.cmd bascomp hd wbw_hd1k || exit /b |
|||
call BuildDisk.cmd cobol hd wbw_hd1k || exit /b |
|||
call BuildDisk.cmd fortran hd wbw_hd1k || exit /b |
|||
call BuildDisk.cmd games hd wbw_hd1k || exit /b |
|||
call BuildDisk.cmd cowgol hd wbw_hd1k || exit /b |
|||
call BuildDisk.cmd msxroms1 hd wbw_hd1k || exit /b |
|||
call BuildDisk.cmd msxroms2 hd wbw_hd1k || exit /b |
|||
call BuildDisk.cmd infocom hd wbw_hd1k || exit /b |
|||
|
|||
if exist ..\BPBIOS\bp*.rel call BuildDisk.cmd bp hd wbw_hd1k ..\zsdos\zsys_wbw.sys || exit /b |
|||
SETLOCAL EnableDelayedExpansion |
|||
|
|||
copy hd1k_prefix.dat ..\..\Binary\ || exit /b |
|||
|
|||
:: echo. |
|||
:: echo Building Combo Disk (1024 directory entry format) Image... |
|||
:: copy /b hd1k_prefix.dat + ..\..\Binary\hd1k_cpm22.img + ..\..\Binary\hd1k_zsdos.img + ..\..\Binary\hd1k_nzcom.img + ..\..\Binary\hd1k_cpm3.img + ..\..\Binary\hd1k_zpm3.img + ..\..\Binary\hd1k_ws4.img ..\..\Binary\hd1k_combo.img || exit /b |
|||
|
|||
call BuildImg.cmd || exit /b |
|||
for %%f in (fd_*.txt) do ( |
|||
set Image=%%~nf |
|||
PowerShell -ExecutionPolicy Unrestricted .\BuildImg.ps1 fd144_!Image:fd_=! || exit /b |
|||
) |
|||
|
|||
for %%f in (hd_*.txt) do ( |
|||
set Image=%%~nf |
|||
PowerShell -ExecutionPolicy Unrestricted .\BuildImg.ps1 hd512_!Image:hd_=! || exit /b |
|||
PowerShell -ExecutionPolicy Unrestricted .\BuildImg.ps1 hd1k_!Image:hd_=! || exit /b |
|||
) |
|||
|
|||
for %%f in (*.def) do ( |
|||
PowerShell -ExecutionPolicy Unrestricted .\BuildDsk.ps1 hd512_%%~nf || exit /b |
|||
PowerShell -ExecutionPolicy Unrestricted .\BuildDsk.ps1 hd1k_%%~nf || exit /b |
|||
) |
|||
|
|||
@ -1,4 +0,0 @@ |
|||
@echo off |
|||
setlocal |
|||
|
|||
PowerShell -ExecutionPolicy Unrestricted .\BuildDisk.ps1 %* || exit /b |
|||
@ -1,110 +0,0 @@ |
|||
Param($Disk, $Type="", $Format="", $SysFile="") |
|||
|
|||
$ErrorAction = 'Stop' |
|||
|
|||
$CpmToolsPath = '../../Tools/cpmtools' |
|||
|
|||
$env:PATH = $CpmToolsPath + ';' + $env:PATH |
|||
|
|||
if ($Type.Length -eq 0) |
|||
{ |
|||
Write-Error "No disk type specified!" -ErrorAction Stop |
|||
return |
|||
} |
|||
|
|||
if ($Format.Length -eq 0) |
|||
{ |
|||
Write-Error "No disk format specified!" -ErrorAction Stop |
|||
return |
|||
} |
|||
|
|||
switch ($Format) |
|||
{ |
|||
"wbw_fd144" |
|||
{ |
|||
# 1.44MB Floppy Disk |
|||
$Desc = "1.44MB Floppy Disk" |
|||
$ImgFile = "fd144_${Disk}.img" |
|||
$CatFile = "fd144_${Disk}.cat" |
|||
$MediaID = 6 |
|||
$Size = 1440KB |
|||
} |
|||
|
|||
"wbw_hd512" |
|||
{ |
|||
# 512 Directory Entry Hard Disk Format |
|||
$Desc = "Hard Disk (512 directory entry format)" |
|||
$ImgFile = "hd512_${Disk}.img" |
|||
$CatFile = "hd512_${Disk}.cat" |
|||
$MediaID = 4 |
|||
$Size = 8MB + 128KB |
|||
} |
|||
|
|||
"wbw_hd1k" |
|||
{ |
|||
# 1024 Directory Entry Hard Disk Format |
|||
$Desc = "Hard Disk (1024 directory entry format)" |
|||
$ImgFile = "hd1k_${Disk}.img" |
|||
$CatFile = "hd1k_${Disk}.cat" |
|||
$MediaID = 10 |
|||
$Size = 8MB |
|||
} |
|||
} |
|||
|
|||
if (-not (Test-Path("d_${Disk}/"))) |
|||
{ |
|||
Write-Error "Source directory d_${Disk} for disk ${Disk} not found!" -ErrorAction Stop |
|||
return |
|||
} |
|||
|
|||
"Generating $Disk $Desc..." |
|||
|
|||
if ($SysFile.Length -gt 0) |
|||
{ [byte[]]$SysImg = [System.IO.File]::ReadAllBytes($SysFile) } |
|||
else |
|||
{ [byte[]]$SysImg = @() } |
|||
|
|||
$Image = ($SysImg + ([byte[]](0xE5) * ($Size - $SysImg.length))) |
|||
|
|||
# $Image[1410] = 0x4D |
|||
# $Image[1411] = 0x49 |
|||
# $Image[1412] = 0x44 |
|||
# $Image[1413] = $MediaID |
|||
|
|||
[System.IO.File]::WriteAllBytes($ImgFile, $Image) |
|||
|
|||
for ($Usr=0; $Usr -lt 16; $Usr++) |
|||
{ |
|||
if (Test-Path ("d_${Disk}/u${Usr}/*")) |
|||
{ |
|||
$Cmd = "cpmcp -f $Format $ImgFile d_${Disk}/u${Usr}/*.* ${Usr}:" |
|||
$Cmd |
|||
Invoke-Expression $Cmd |
|||
if ($LASTEXITCODE -gt 0) {throw "Command returned exit code $LASTEXITCODE"} |
|||
} |
|||
} |
|||
|
|||
if (Test-Path("${Type}_${Disk}.txt")) |
|||
{ |
|||
foreach($Line in Get-Content "${Type}_${Disk}.txt") |
|||
{ |
|||
$Spec = $Line.Trim() |
|||
if (($Spec.Length -gt 0) -and ($Spec.Substring(0,1) -ne "#")) |
|||
{ |
|||
$Cmd = "cpmcp -f $Format $ImgFile ${Spec}" |
|||
$Cmd |
|||
Invoke-Expression $Cmd |
|||
if ($LASTEXITCODE -gt 0) {throw "Command returned exit code $LASTEXITCODE"} |
|||
} |
|||
} |
|||
} |
|||
|
|||
$Cmd = "cpmls -f $Format -D $ImgFile" |
|||
$Cmd |
|||
Invoke-Expression $Cmd > $CatFile |
|||
|
|||
"Moving image $ImgFile into output directory..." |
|||
|
|||
Move-Item $ImgFile -Destination "..\..\Binary\" -Force |
|||
|
|||
return |
|||
@ -0,0 +1,59 @@ |
|||
param([string]$Disk) |
|||
|
|||
# If a PowerShell exception occurs, just stop the script immediately. |
|||
$ErrorAction = 'Stop' |
|||
|
|||
# $ImgFile = "..\..\Binary\hd1k_" + $Image + ".img" |
|||
|
|||
$Format, $Def = $Disk.Split("_") |
|||
|
|||
$DefFile = $Def + ".def" |
|||
|
|||
$SliceList = @() |
|||
|
|||
ForEach ($Line in Get-Content $DefFile) |
|||
{ |
|||
$Line = $Line.Trim() |
|||
|
|||
if (($Line.Length -eq 0) -or ($Line[0] -eq "#")) |
|||
{ |
|||
continue |
|||
} |
|||
|
|||
$SliceList += $Line |
|||
} |
|||
|
|||
$ImgFile = "..\..\Binary\" + $Disk + ".img" |
|||
|
|||
$FileList = "" |
|||
|
|||
"Generating $ImgFile using $DefFile..." |
|||
|
|||
ForEach ($Slice in $SliceList) |
|||
{ |
|||
$File = "..\..\Binary\" + $Format + "_" + $Slice + ".img" |
|||
|
|||
if (!(Test-Path $File)) |
|||
{ |
|||
"Slice input file """ + $File + """ not found!!!" |
|||
exit 1 |
|||
} |
|||
|
|||
if ($FileList.Length -gt 0) |
|||
{ |
|||
$FileList += "+" |
|||
} |
|||
|
|||
$FileList += $File |
|||
} |
|||
|
|||
if ($Format -eq "hd1k") |
|||
{ |
|||
$FileList = "hd1k_prefix.dat+" + $FileList |
|||
} |
|||
|
|||
$Cmd = "$env:ComSpec /c copy /b $FileList $ImgFile" |
|||
$Cmd |
|||
Invoke-Expression $Cmd |
|||
|
|||
exit 0 |
|||
@ -1,6 +0,0 @@ |
|||
@echo off |
|||
setlocal |
|||
|
|||
for %%f in (*.def) do ( |
|||
PowerShell -ExecutionPolicy Unrestricted .\BuildImg.ps1 %%~nf || exit /b |
|||
) |
|||
@ -1,55 +0,0 @@ |
|||
# |
|||
# Add ZSystem images |
|||
# |
|||
../BPBIOS/*.img 0: |
|||
../BPBIOS/*.rel 0: |
|||
../BPBIOS/*.zrl 0: |
|||
../BPBIOS/*.zex 0: |
|||
../BPBIOS/bpbuild.com 0: |
|||
# |
|||
# Add RomWBW utilities |
|||
# |
|||
#../../Binary/Apps/*.com 15: |
|||
../../Binary/Apps/assign.com 15: |
|||
#../../Binary/Apps/bbcbasic.com 15: |
|||
#../../Binary/Apps/bbcbasic.txt 15: |
|||
../../Binary/Apps/cpuspd.com 15: |
|||
../../Binary/Apps/reboot.com 15: |
|||
../../Binary/Apps/fat.com 15: |
|||
../../Binary/Apps/fdu.com 15: |
|||
../../Binary/Apps/fdu.doc 15: |
|||
../../Binary/Apps/format.com 15: |
|||
../../Binary/Apps/mode.com 15: |
|||
../../Binary/Apps/rtc.com 15: |
|||
../../Binary/Apps/survey.com 15: |
|||
../../Binary/Apps/syscopy.com 15: |
|||
../../Binary/Apps/sysgen.com 15: |
|||
../../Binary/Apps/talk.com 15: |
|||
../../Binary/Apps/htalk.com 15: |
|||
../../Binary/Apps/tbasic.com 15: |
|||
../../Binary/Apps/timer.com 15: |
|||
../../Binary/Apps/tune.com 15: |
|||
../../Binary/Apps/xm.com 15: |
|||
../../Binary/Apps/zmp.com 15: |
|||
../../Binary/Apps/zmp.hlp 15: |
|||
../../Binary/Apps/zmp.doc 10: |
|||
../../Binary/Apps/zmp.cfg 15: |
|||
../../Binary/Apps/zmp.fon 15: |
|||
../../Binary/Apps/zmxfer.ovr 15: |
|||
../../Binary/Apps/zmterm.ovr 15: |
|||
../../Binary/Apps/zminit.ovr 15: |
|||
../../Binary/Apps/zmconfig.ovr 15: |
|||
../../Binary/Apps/zmd.com 15: |
|||
../../Binary/Apps/vgmplay.com 15: |
|||
# |
|||
# Add Common Applications |
|||
# |
|||
Common/All/u10/*.* 10: |
|||
Common/All/u14/*.* 14: |
|||
Common/All/u15/*.* 15: |
|||
Common/CPM22/*.* 15: |
|||
Common/Z/u14/*.* 14: |
|||
Common/Z/u15/*.* 15: |
|||
Common/Z3/u10/*.* 10: |
|||
Common/Z3/u14/*.* 14: |
|||
Common/Z3/u15/*.* 15: |
|||
@ -1,3 +1,4 @@ |
|||
@Label="Blank" |
|||
# |
|||
# Blank disk template |
|||
# |
|||
|
|||
Loading…
Reference in new issue