Browse Source

Build script improvements

- Allow building a 128KB ROM with 0KB ROM disk
- Move Z280 UART driver to top of device list to make it the highest priority driver for Z280 platforms
pull/199/head
Wayne Warthen 5 years ago
parent
commit
db659da876
  1. 49
      Source/HBIOS/Build.ps1
  2. 64
      Source/HBIOS/Build.sh
  3. 12
      Source/HBIOS/hbios.asm
  4. 2
      Source/ver.inc
  5. 2
      Source/ver.lib

49
Source/HBIOS/Build.ps1

@ -1,4 +1,4 @@
param([string]$Platform = "", [string]$Config = "", [string]$RomSize = "512", [string]$RomName = "")
param([string]$Platform = "", [string]$Config = "", [int]$RomSize = 512, [string]$RomName = "")
#
# This PowerShell script performs the heavy lifting in the build of RomWBW. It handles the assembly
@ -65,8 +65,8 @@ while ($true)
#
while ($true)
{
if (($RomSize -eq "256") -or ($RomSize -eq "512") -or ($RomSize -eq "1024")) {break}
$RomSize = (Read-Host -prompt "ROM Size [256|512|1024]").Trim()
if (($RomSize -eq 128) -or ($RomSize -eq 256) -or ($RomSize -eq 512) -or ($RomSize -eq 1024)) {break}
$RomSize = (Read-Host -prompt "ROM Size [128|256|512|1024]").Trim()
}
#
@ -114,7 +114,11 @@ $UpdFile = "${OutDir}/${RomName}.upd" # Final name of System ROM image
if ($Platform -eq "UNA") {$Bios = 'una'} else {$Bios = 'wbw'}
# List of RomWBW proprietary apps to imbed in ROM disk.
$RomApps = "assign","fdu","format","mode","rtc","survey","syscopy","sysgen","talk","timer","xm","inttest"
$RomApps = "assign","mode","rtc","syscopy","xm"
if ($RomSize -gt "256")
{
$RomApps += "fdu","format","survey","sysgen","talk","timer","inttest"
}
""
"Building ${RomName} ${ROMSize}KB ROM configuration ${Config} for Z${CPUType}..."
@ -211,31 +215,30 @@ if ($Platform -ne "UNA")
# Create a blank ROM disk image to create a working ROM disk image
Set-Content -Value ([byte[]](0xE5) * (([int]${RomSize} * 1KB) - 128KB)) -Encoding byte -Path $RomDiskFile
# Copy all files from the appropriate directory to the working ROM disk image
cpmcp -f $RomFmt $RomDiskFile ../RomDsk/ROM_${RomSize}KB/*.* 0:
# Add any platform specific files to the working ROM disk image
if (Test-Path "../RomDsk/${Platform}/*.*")
if ($RomSize -gt 128)
{
cpmcp -f $RomFmt $RomDiskFile ../RomDsk/${Platform}/*.* 0:
}
# Copy all files from the appropriate directory to the working ROM disk image
cpmcp -f $RomFmt $RomDiskFile ../RomDsk/ROM_${RomSize}KB/*.* 0:
# Add the proprietary RomWBW applications to the working ROM disk image
foreach ($App in $RomApps)
{
cpmcp -f $RomFmt $RomDiskFile ../../Binary/Apps/$App.com 0:
}
# Add any platform specific files to the working ROM disk image
if (Test-Path "../RomDsk/${Platform}/*.*")
{
cpmcp -f $RomFmt $RomDiskFile ../RomDsk/${Platform}/*.* 0:
}
# Add the proprietary RomWBW applications to the working ROM disk image
foreach ($App in $RomApps)
{
cpmcp -f $RomFmt $RomDiskFile ../../Binary/Apps/$App.com 0:
}
# Add the CP/M and ZSystem system images to the ROM disk (used by SYSCOPY)
if ($RomSize -ne "256")
{
# Add the CP/M and ZSystem system images to the ROM disk (used by SYSCOPY)
cpmcp -f $RomFmt $RomDiskFile ..\cpm22\cpm_${Bios}.sys 0:cpm.sys
cpmcp -f $RomFmt $RomDiskFile ..\zsdos\zsys_${Bios}.sys 0:zsys.sys
}
# Set all the files in the ROM disk image to read only for extra protection under flash file system.
cpmchattr -f $RomFmt $RomDiskFile r 0:*.*
# Set all the files in the ROM disk image to read only for extra protection under flash file system.
cpmchattr -f $RomFmt $RomDiskFile r 0:*.*
}
#
# Finally, the individual binary components are concatenated together to produce

64
Source/HBIOS/Build.sh

@ -42,7 +42,7 @@ while ! echo ${configs[@]} | grep -s -w -q "$config" ; do
done
configfile=Config/${platform}_${config}.asm
while [ ! '(' "$romsize" = 1024 -o "$romsize" = 512 -o "$romsize" = 256 ')' ] ; do
while [ ! '(' "$romsize" = 1024 -o "$romsize" = 512 -o "$romsize" = 256 -o "$romsize" = 128 ')' ] ; do
echo -n "Romsize :"
read romsize
done
@ -58,7 +58,10 @@ else
BIOS=wbw
fi
Apps=(assign fdu format mode rtc survey syscopy sysgen talk timer xm inttest)
Apps=(assign mode rtc syscopy xm)
if [ $romsize -gt 256 ] ; then
Apps+=(fdu format survey sysgen talk timer inttest)
fi
blankfile=Blank${romsize}KB.dat
romdiskfile=RomDisk.tmp
@ -113,43 +116,44 @@ fi
echo "Building ${romsize}KB $romname ROM disk data file..."
cp $blankfile $romdiskfile
if [ $romsize -gt 128 ] ; then
echo placing files into $romdiskfile
for file in $(ls -1 ../RomDsk/ROM_${romsize}KB/* | sort -V) ; do
echo " " $file
$CPMCP -f $romfmt $romdiskfile $file 0:
done
if [ -d ../RomDsk/$platform ] ; then
for file in ../RomDsk/$platform/* ; do
echo placing files into $romdiskfile
for file in $(ls -1 ../RomDsk/ROM_${romsize}KB/* | sort -V) ; do
echo " " $file
$CPMCP -f $romfmt $romdiskfile $file 0:
done
fi
echo "adding apps to $romdiskfile"
for i in ${Apps[@]} ; do
set +e
f=$(../../Tools/unix/casefn.sh ../../Binary/Apps/$i.com)
set -e
if [ -z "$f" ] ; then
echo " " $i "not found"
else
echo " " $f
$CPMCP -f $romfmt $romdiskfile $f 0:
if [ -d ../RomDsk/$platform ] ; then
for file in ../RomDsk/$platform/* ; do
echo " " $file
$CPMCP -f $romfmt $romdiskfile $file 0:
done
fi
done
echo "copying systems to $romdiskfile"
if [ $romsize != 256 ] ; then
echo "adding apps to $romdiskfile"
for i in ${Apps[@]} ; do
set +e
f=$(../../Tools/unix/casefn.sh ../../Binary/Apps/$i.com)
set -e
if [ -z "$f" ] ; then
echo " " $i "not found"
else
echo " " $f
$CPMCP -f $romfmt $romdiskfile $f 0:
fi
done
echo "copying systems to $romdiskfile"
$CPMCP -f $romfmt $romdiskfile ../CPM22/cpm_$BIOS.sys 0:cpm.sys
$CPMCP -f $romfmt $romdiskfile ../ZSDOS/zsys_$BIOS.sys 0:zsys.sys
echo "setting files in the ROM disk image to read only"
$CPMCH -f $romfmt $romdiskfile r 0:*.*
fi
echo "setting files in the ROM disk image to read only"
$CPMCH -f $romfmt $romdiskfile r 0:*.*
if [ $platform = UNA ] ; then
cp osimg.bin $outdir/UNA_WBW_SYS.bin
cp $romdiskfile $outdir/UNA_WBW_ROM$romsize.bin

12
Source/HBIOS/hbios.asm

@ -2202,6 +2202,9 @@ HB_PCINITTBL:
#IF (ASCIENABLE)
.DW ASCI_PREINIT
#ENDIF
#IF (Z2UENABLE)
.DW Z2U_PREINIT
#ENDIF
#IF (UARTENABLE)
.DW UART_PREINIT
#ENDIF
@ -2214,9 +2217,6 @@ HB_PCINITTBL:
#IF (ACIAENABLE)
.DW ACIA_PREINIT
#ENDIF
#IF (Z2UENABLE)
.DW Z2U_PREINIT
#ENDIF
#IF (PIO_4P | PIO_ZP)
.DW PIO_PREINIT
#ENDIF
@ -2248,6 +2248,9 @@ HB_INITTBL:
#IF (ASCIENABLE)
.DW ASCI_INIT
#ENDIF
#IF (Z2UENABLE)
.DW Z2U_INIT
#ENDIF
#IF (UARTENABLE)
.DW UART_INIT
#ENDIF
@ -2260,9 +2263,6 @@ HB_INITTBL:
#IF (ACIAENABLE)
.DW ACIA_INIT
#ENDIF
#IF (Z2UENABLE)
.DW Z2U_INIT
#ENDIF
#IF (DSRTCENABLE)
.DW DSRTC_INIT
#ENDIF

2
Source/ver.inc

@ -2,4 +2,4 @@
#DEFINE RMN 1
#DEFINE RUP 1
#DEFINE RTP 0
#DEFINE BIOSVER "3.1.1-pre.57"
#DEFINE BIOSVER "3.1.1-pre.58"

2
Source/ver.lib

@ -3,5 +3,5 @@ rmn equ 1
rup equ 1
rtp equ 0
biosver macro
db "3.1.1-pre.57"
db "3.1.1-pre.58"
endm

Loading…
Cancel
Save