diff --git a/.github/workflows/commit.yml b/.github/workflows/commit.yml index aebefe5a..35b049ee 100644 --- a/.github/workflows/commit.yml +++ b/.github/workflows/commit.yml @@ -24,7 +24,6 @@ jobs: sudo apt-get install libncurses-dev sudo apt-get install srecord make dist - make clean rm -rf .git* - name: List Output @@ -64,7 +63,6 @@ jobs: export TZ='America/Los_Angeles' brew install srecord make dist - make clean rm -rf .git* - name: List Output diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 4a814905..6a1b82ba 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -27,7 +27,6 @@ jobs: run: | sudo apt-get install libncurses-dev make dist - make clean rm -rf .git* - name: Upload Artifact diff --git a/Binary/Apps/Makefile b/Binary/Apps/Makefile index 0b913750..940d9ae2 100644 --- a/Binary/Apps/Makefile +++ b/Binary/Apps/Makefile @@ -7,5 +7,5 @@ include $(TOOLS)/Makefile.inc all:: mkdir -p Tunes -clobber:: +clean:: @rm -f *.bin *.com *.img *.rom *.pdf *.log *.eeprom *.ovr *.hlp *.doc *.COM *.BIN Tunes/*.mym Tunes/*.pt? Tunes/*.vgm diff --git a/Binary/Apps/Test/Makefile b/Binary/Apps/Test/Makefile index db06d177..8fc553ae 100644 --- a/Binary/Apps/Test/Makefile +++ b/Binary/Apps/Test/Makefile @@ -3,5 +3,5 @@ MOREDIFF := $(shell $(TOOLS)/unix/casefn.sh *.com) include $(TOOLS)/Makefile.inc -clobber:: +clean:: @rm -f *.com diff --git a/Binary/CPM3/Makefile b/Binary/CPM3/Makefile index 2105f8de..bf98e7ac 100644 --- a/Binary/CPM3/Makefile +++ b/Binary/CPM3/Makefile @@ -3,5 +3,5 @@ MOREDIFF := $(shell $(TOOLS)/unix/casefn.sh *.spr) include $(TOOLS)/Makefile.inc -clobber:: - @rm -f *.spr +clean:: + @rm -f *.spr *.com *.sys *.dat cpm3fix.pat readme.1st diff --git a/Binary/Makefile b/Binary/Makefile index ea7a0d79..f4d4bec4 100644 --- a/Binary/Makefile +++ b/Binary/Makefile @@ -4,5 +4,5 @@ SUBDIRS = Apps CPM3 ZPM3 include $(TOOLS)/Makefile.inc -clobber:: - @rm -f *.bin *.com *.img *.rom *.upd *.hex *.pdf *.log *.eeprom *.dat \ No newline at end of file +clean:: + @rm -f *.bin *.com *.img *.rom *.upd *.hex *.pdf *.log *.eeprom *.dat diff --git a/Binary/ZPM3/Makefile b/Binary/ZPM3/Makefile index 2105f8de..95e533a1 100644 --- a/Binary/ZPM3/Makefile +++ b/Binary/ZPM3/Makefile @@ -3,5 +3,5 @@ MOREDIFF := $(shell $(TOOLS)/unix/casefn.sh *.spr) include $(TOOLS)/Makefile.inc -clobber:: - @rm -f *.spr +clean:: + @rm -f *.spr *.com *.sys *.dat *.zpm diff --git a/Build.cmd b/Build.cmd index 2b4a31d1..99a09b02 100644 --- a/Build.cmd +++ b/Build.cmd @@ -3,4 +3,4 @@ setlocal pushd Source && call Build %* || exit /b & popd -pause +if "%*" == "" pause diff --git a/Doc/ROM Applications.pdf b/Doc/ROM Applications.pdf index cabcf55c..ae9322a8 100644 Binary files a/Doc/ROM Applications.pdf and b/Doc/ROM Applications.pdf differ diff --git a/Doc/RomWBW Applications.pdf b/Doc/RomWBW Applications.pdf index 2f03b23c..ab526139 100644 Binary files a/Doc/RomWBW Applications.pdf and b/Doc/RomWBW Applications.pdf differ diff --git a/Doc/RomWBW Architecture.pdf b/Doc/RomWBW Architecture.pdf index 56c5def4..e76c2b98 100644 Binary files a/Doc/RomWBW Architecture.pdf and b/Doc/RomWBW Architecture.pdf differ diff --git a/Doc/RomWBW Disk Catalog.pdf b/Doc/RomWBW Disk Catalog.pdf index 16622fc9..e56a31b0 100644 Binary files a/Doc/RomWBW Disk Catalog.pdf and b/Doc/RomWBW Disk Catalog.pdf differ diff --git a/Doc/RomWBW Getting Started.pdf b/Doc/RomWBW Getting Started.pdf index 56aff8a3..37b22f80 100644 Binary files a/Doc/RomWBW Getting Started.pdf and b/Doc/RomWBW Getting Started.pdf differ diff --git a/Makefile b/Makefile index a9c1abae..487cb9a7 100644 --- a/Makefile +++ b/Makefile @@ -1,20 +1,18 @@ all: - $(MAKE) --directory Tools/unix + $(MAKE) --directory Tools $(MAKE) --directory Source clean: - $(MAKE) --directory Tools/unix clean + $(MAKE) --directory Tools clean $(MAKE) --directory Source clean $(MAKE) --directory Binary clean -clobber: - $(MAKE) --directory Tools/unix clobber - $(MAKE) --directory Source clobber - $(MAKE) --directory Binary clobber - rm -f typescript +clobber: clean diff: $(MAKE) --directory Source diff dist: $(MAKE) ROM_PLATFORM=dist + $(MAKE) --directory Source clean + $(MAKE) --directory Tools clean diff --git a/ReadMe.md b/ReadMe.md index 8f8bbc8e..35f45d48 100644 --- a/ReadMe.md +++ b/ReadMe.md @@ -3,7 +3,7 @@ ## Z80/Z180 System Software Version 3.1 Pre-release -21 Mar 2022 +09 Jul 2022 Wayne Warthen @@ -418,7 +418,7 @@ therefore, globally available. Some custom applications do not fit on the ROM disk. They are found on the disk image files or the individual files can be found in the -Binary\\Apps directory of the distribution. +Binary\Apps directory of the distribution. | Application | Description | |-------------|-------------------------------------------------------------| @@ -924,7 +924,7 @@ documents. Note that the build scripts for RomWBW create the default disk images supplied with RomWBW. It is relatively easy to customize the contents of the disk images that are part of RomWBW. This is described in more -detail in the Source\\Images directory of the distribution. +detail in the Source\Images directory of the distribution. ## FAT Filesystem Transfers @@ -945,7 +945,7 @@ however. Longer filenames will show up as a truncated version. The `FAT` application is not on your ROM disk because it is too large to fit. You will find it on all of the pre-built disk images as well as in -the Binary\\Apps directory of the distribution. +the Binary\Apps directory of the distribution. For advanced users, it is possible to create a hybrid disk that contains CP/M slices at the beginning and a FAT filesystem after. Such a hybrid @@ -953,7 +953,7 @@ disk can be used to boot an operating system and still have access to FAT files on the FAT portion of the disk. David Reese has prepared a document describing how to do this. It is called “SC126_How-To_No_2\_Preparing_an_SD_Card_for_Use_with_SC126_Rev_1-5.pdf” -and can be found in the Doc\\Contrib directory of the distribution. +and can be found in the Doc\Contrib directory of the distribution. # Startup Command Processing @@ -1164,7 +1164,7 @@ system on your disk. CP/M 3 uses a multi-step boot process involving multiple files. The CP/M 3 boot files are not included on the ROM disk due to space constraints. You will need to transfer the files to your system from - the RomWBW distribution directory Binary\\CPM3. + the RomWBW distribution directory Binary\CPM3. After this is done, you will need to use `SYSCOPY` to place the CP/M 3 loader image on the boot tracks of all CP/M 3 boot disks/slices. @@ -1182,7 +1182,7 @@ system on your disk. ZPM3 uses a multi-step boot process involving multiple files. The ZPM3 boot files are not included on the ROM disk due to space constraints. You will need to transfer the files to your system from - the RomWBW distribution directory Binary\\ZPM3. + the RomWBW distribution directory Binary\ZPM3. After this is done, you will need to use `SYSCOPY` to place the ZPM3 loader image on the boot tracks of all ZPM3 boot disks/slices. The @@ -1225,8 +1225,7 @@ For example: `B>COPY ASSIGN.COM C:` Some RomWBW custom applications are too large to fit on the ROM disk. If you are using any of these you will need to transfer them to your system and then update all copies. These applications are found in the -Binary\\Apps directory of the distribution and in all of the disk -images. +Binary\Apps directory of the distribution and in all of the disk images. - FAT.COM - TUNE.COM diff --git a/ReadMe.txt b/ReadMe.txt index 70410157..c05e9214 100644 --- a/ReadMe.txt +++ b/ReadMe.txt @@ -1,6 +1,6 @@ RomWBW Getting Started Wayne Warthen (mailto:wwarthen@gmail.com) -21 Mar 2022 +09 Jul 2022 @@ -17,7 +17,7 @@ RomWBW Z80/Z180 System Software Version 3.1 Pre-release -21 Mar 2022 +09 Jul 2022 Wayne Warthen wwarthen@gmail.com @@ -213,15 +213,23 @@ disk devices. The following ROM applications are available at the boot loader prompt: - Application - -------------- -------------------------------------------------------- - Monitor Z80 system debug monitor w/ Intel Hex loader - Forth Brad Rodriguez’s ANSI compatible Forth language - Basic Nascom 8K BASIC language - Tasty BASIC Dimitri Theuling’s Tiny BASIC implementation - Play A simple video game (requires ANSI terminal emulation) - Network Boot Boot through Wiznet MT011 device - Flash Update Upload and flash a new ROMWBW image using xmodem + -------------------------------------------------------------------------- + Application + ------------- ------------------------------------------------------------ + Monitor Z80 system debug monitor w/ Intel Hex loader + + Forth Brad Rodriguez’s ANSI compatible Forth language + + Basic Nascom 8K BASIC language + + Tasty BASIC Dimitri Theuling’s Tiny BASIC implementation + + Play A simple video game (requires ANSI terminal emulation) + + Network Boot Boot through Wiznet MT011 device + + Flash Update Upload and flash a new ROMWBW image using xmodem + -------------------------------------------------------------------------- In general, the command to exit these applications and restart the system is BYE. The exceptions are the Monitor which uses B and Play @@ -467,11 +475,15 @@ Some custom applications do not fit on the ROM disk. They are found on the disk image files or the individual files can be found in the Binary\Apps directory of the distribution. + -------------------------------------------------------------------------- Application Description - ------------- ------------------------------------------------------------- + ------------- ------------------------------------------------------------ TUNE Play .PT2, .PT3, .MYM audio files. + FAT Access MS-DOS FAT filesystems from RomWBW (based on FatFs). + INTTEST Test interrupt vector hooking. + -------------------------------------------------------------------------- Additional documentation on all of these applications can be found in “RomWBW Applications.pdf” in the Doc directory of the distribution. @@ -667,14 +679,21 @@ The following table shows the disk image files available. Note that the images in the “Hard” column are fine for use on CF Cards, SD Cards, as well as real spinning hard disks. - Floppy Hard Description - -------------- -------------- ------------------------------ - fd_cpm22.img hd_cpm22.img DRI CP/M 2.2 boot disk - fd_zsdos.img hd_zsdos.img ZSDOS 1.1 boot disk - fd_nzcom.img hd_nzcom.img NZCOM boot disk - fd_cpm3.img hd_cpm3.img DRI CP/M 3 boot disk - fd_zpm3.img hd_zpm3.img ZPM3 boot disk - fd_ws4.img hd_ws4.img WordStar v4 application disk + ----------------------------------------------------------------------- + Floppy Hard Description + --------------- --------------- --------------------------------------- + fd_cpm22.img hd_cpm22.img DRI CP/M 2.2 boot disk + + fd_zsdos.img hd_zsdos.img ZSDOS 1.1 boot disk + + fd_nzcom.img hd_nzcom.img NZCOM boot disk + + fd_cpm3.img hd_cpm3.img DRI CP/M 3 boot disk + + fd_zpm3.img hd_zpm3.img ZPM3 boot disk + + fd_ws4.img hd_ws4.img WordStar v4 application disk + ----------------------------------------------------------------------- In addition to the disk images above, there is also a special hard disk image called hd_combo.img. This image contains all of the images above, @@ -685,14 +704,21 @@ system options. This is the layout of the hd_combo disk image: - Slice Description - --------- ------------------------------ - Slice 0 DRI CP/M 2.2 boot disk - Slice 1 ZSDOS 1.1 boot disk - Slice 2 NZCOM boot disk - Slice 3 DRI CP/M 3 boot disk - Slice 4 ZPM3 boot disk - Slice 5 WordStar v4 application disk + ------------------------------------------------------------------------ + Slice Description + ------- ---------------------------------------------------------------- + Slice 0 DRI CP/M 2.2 boot disk + + Slice 1 ZSDOS 1.1 boot disk + + Slice 2 NZCOM boot disk + + Slice 3 DRI CP/M 3 boot disk + + Slice 4 ZPM3 boot disk + + Slice 5 WordStar v4 application disk + ------------------------------------------------------------------------ Note that unlike the ROM firmware, you do not need to choose a disk image specific to your hardware. Because the RomWBW firmware provides a diff --git a/Readme.unix b/Readme.unix index 8814e28c..8115beb5 100644 --- a/Readme.unix +++ b/Readme.unix @@ -34,22 +34,19 @@ By default, this will generate all of the standard configurations of RomWBW for all platforms. If you just want to build the ROM for a specific platform and configuration you can use - make ROM_PLATFORM= ROM_CONFIG= [ROMSIZE=] + make ROM_PLATFORM= ROM_CONFIG= where is one of the supported platforms such as SBC, RCZ80, -etc. and is a configuration of that platform. A ROM size may -optionally be specified and must be one of 128, 256, 512, or 1024. It -defaults to 512. For example, to build the "126" configuration of -the "SCZ180" platform: +etc. and is a configuration of that platform. For example, +to build the "126" configuration of the "SCZ180" platform: make ROM_PLATFORM=SCZ180 ROM_CONFIG=126 Please be aware that the make-based build does have a few deficiencies. First and most important, the Makefiles do not handle reruns very well. -To ensure a full buld, use "make clobber" from the top level directory -before running the actual build. For those used to using "make clean", -you can do that but it is not as thorough as "make clobber". +To ensure a full buld, use "make clean" from the top level directory +before running the actual build. Second, there are some build failures that will not stop the make process. Most of this is because real CP/M 2.2 tools are used in @@ -57,7 +54,7 @@ places and CP/M 2.2 does not allow programs to return a result code. Third, not all dependencies are properly handled. So, changes to some files will not cause things to rebuild as appropriate. In general, I -recommend doing a "make clobber" before running "make" to ensure that +recommend doing a "make clean" before running "make" to ensure that everything is fully rebuilt. For macOS users, you may encounter a failure reading or writing files. @@ -78,7 +75,7 @@ running. To disable this feature: DISCLAIMER: You do this at your own risk. I highly recommend that you return the settings back to normal immediately after doing a build. -Heavy use is made of make's include facility and pattern rules. the +Heavy use is made of make's include facility and pattern rules. The master rule set is in Tools/Makefile.inc. Changes here will affect almost every Makefile, and where exceptions are needed, the overrides are applied in the lower Makefiles. @@ -102,10 +99,10 @@ Credit: hacked to do case-insensitivity. These are not marked, and are not extensive. - zx is from the distributed version, and also has local hacks + zxcc is from the distributed version, and also has local hacks for case insensitivity. - Both zx and cpmtools ship with an overly complicated makefile + Both zxcc and cpmtools ship with an overly complicated makefile generation system and this is ignored. This whole Linux build framework is the work of Curt Mayer, diff --git a/Source/BPBIOS/Makefile b/Source/BPBIOS/Makefile index 05c064ed..852cb5c7 100644 --- a/Source/BPBIOS/Makefile +++ b/Source/BPBIOS/Makefile @@ -30,7 +30,7 @@ zcpr33n.rel zcpr33t.rel: all:: $(HD0IMG) -clobber:: +clean:: @rm -f $(HD0IMG) %.img: zcpr33n.rel zcpr33t.rel diff --git a/Source/CPM22/License.pdf b/Source/CPM22/License.pdf new file mode 100644 index 00000000..94912501 Binary files /dev/null and b/Source/CPM22/License.pdf differ diff --git a/Source/CPM3/License.pdf b/Source/CPM3/License.pdf new file mode 100644 index 00000000..94912501 Binary files /dev/null and b/Source/CPM3/License.pdf differ diff --git a/Source/CPM3/Makefile b/Source/CPM3/Makefile index f0c54f75..684aac83 100644 --- a/Source/CPM3/Makefile +++ b/Source/CPM3/Makefile @@ -13,6 +13,7 @@ OTHERS = cpmldr.rel biosldr.rel cpm3res.sys cpm3bnk.sys loader.bin cpmldr.bin OTHERS += biosldrc.rel biosldrd.rel NODELETE = ccp.com gencpm.com genres.dat genbnk.dat bdos3.spr bnkbdos3.spr resbdos3.spr NODELETE += readme.1st cpm3fix.pat +NODIFF = zpmbios3 DEST = ../../Binary/CPM3 TOOLS = ../../Tools diff --git a/Source/HBIOS/Build.cmd b/Source/HBIOS/Build.cmd index 4dc90995..a821b47f 100644 --- a/Source/HBIOS/Build.cmd +++ b/Source/HBIOS/Build.cmd @@ -4,7 +4,7 @@ setlocal if "%1" == "dist" goto :dist :: -:: Build [ [ [ []]]] +:: Build [ [ []]] :: set TOOLS=../../Tools @@ -28,11 +28,21 @@ PowerShell -ExecutionPolicy Unrestricted .\Build.ps1 %* || exit /b :: :: Below, we process the command file created by the PowerShell script. :: This sets the environment variables: Platform, Config, ROMName, -:: ROMSize, & CPUType. +:: & CPUType. :: call build_env.cmd +:: +:: Create a small app that is used to export key build variables of the build. +:: Then run the app to output a file with the variables. Finally, read the +:: variables into variables usable in this batch file. +:: + +tasm -t80 -g3 -dCMD hbios_env.asm hbios_env.com hbios_env.lst || exit /b +zxcc hbios_env >hbios_env.cmd +call hbios_env.cmd + :: :: Start of the actual build process for a given ROM. :: @@ -183,34 +193,34 @@ goto :eof :dist -call Build SBC std 512 || exit /b -call Build SBC simh 512 || exit /b -call Build MBC std 512 || exit /b -call Build ZETA std 512 || exit /b -call Build ZETA2 std 512 || exit /b -call Build N8 std 512 || exit /b -call Build MK4 std 512 || exit /b -call Build RCZ80 std 512 || exit /b -call Build RCZ80 skz 512 || exit /b -call Build RCZ80 kio 512 || exit /b -call Build RCZ80 mt 512 || exit /b -call Build RCZ80 duart 512 || exit /b -call Build RCZ80 zrc 512 || exit /b -call Build RCZ80 zrc_ram 0 || exit /b -call Build RCZ180 ext 512 || exit /b -call Build RCZ180 nat 512 || exit /b -call Build RCZ280 ext 512 || exit /b -call Build RCZ280 nat 512 || exit /b -call Build RCZ280 nat_zz 512 || exit /b -call Build RCZ280 nat_zzr 256 || exit /b -call Build SCZ180 126 512 || exit /b -call Build SCZ180 130 512 || exit /b -call Build SCZ180 131 512 || exit /b -call Build SCZ180 140 512 || exit /b -call Build EZZ80 std 512 || exit /b -call Build EZZ80 tz80 512 || exit /b -call Build DYNO std 512 || exit /b -call Build UNA std 512 || exit /b -call Build RPH std 512 || exit /b +call Build SBC std || exit /b +call Build SBC simh || exit /b +call Build MBC std || exit /b +call Build ZETA std || exit /b +call Build ZETA2 std || exit /b +call Build N8 std || exit /b +call Build MK4 std || exit /b +call Build RCZ80 std || exit /b +call Build RCZ80 skz || exit /b +call Build RCZ80 kio || exit /b +call Build RCZ80 mt || exit /b +call Build RCZ80 duart || exit /b +call Build RCZ80 zrc || exit /b +call Build RCZ80 zrc_ram || exit /b +call Build RCZ180 ext || exit /b +call Build RCZ180 nat || exit /b +call Build RCZ280 ext || exit /b +call Build RCZ280 nat || exit /b +call Build RCZ280 nat_zz || exit /b +call Build RCZ280 nat_zzr || exit /b +call Build SCZ180 126 || exit /b +call Build SCZ180 130 || exit /b +call Build SCZ180 131 || exit /b +call Build SCZ180 140 || exit /b +call Build EZZ80 std || exit /b +call Build EZZ80 tz80 || exit /b +call Build DYNO std || exit /b +call Build UNA std || exit /b +call Build RPH std || exit /b goto :eof diff --git a/Source/HBIOS/Build.ps1 b/Source/HBIOS/Build.ps1 index 21689463..0ff96229 100644 --- a/Source/HBIOS/Build.ps1 +++ b/Source/HBIOS/Build.ps1 @@ -1,4 +1,4 @@ -param([string]$Platform = "", [string]$Config = "", [int]$RomSize = 512, [string]$ROMName = "") +param([string]$Platform = "", [string]$Config = "", [string]$ROMName = "") # If a PowerShell exception occurs, just stop the script immediately. $ErrorAction = 'Stop' @@ -67,19 +67,6 @@ while ($true) $Config = (Read-Host -prompt "Configuration").Trim() } -# -# Establish the ROM size (in KB). It may have been passed in on the command line. Validate -# $RomSize and loop requesting a new value as long as it is not valid. The valid ROM sizes -# are just hard-coded for now. The ROM size does nothing more than determine the size of the -# ROM disk portion of the ROM image. -# - -while ($true) -{ - if (($RomSize -eq 0) -or ($RomSize -eq 128) -or ($RomSize -eq 256) -or ($RomSize -eq 512) -or ($RomSize -eq 1024)) {break} - $RomSize = (Read-Host -prompt "ROM Size [0|128|256|512|1024]").Trim() -} - # # TASM should be invoked with the proper CPU type. Below, the CPU type is inferred # from the platform. @@ -117,8 +104,6 @@ $TimeStamp = '"' + (Get-Date -Format 'yyyy-MM-dd') + '"' ; #DEFINE TIMESTAMP ${TimeStamp} ; -ROMSIZE .EQU ${ROMSize} -; #INCLUDE "${ConfigFile}" ; "@ | Out-File "build.inc" -Encoding ASCII @@ -134,6 +119,5 @@ ROMSIZE .EQU ${ROMSize} set Platform=${Platform} set Config=${Config} set ROMName=${ROMName} -set ROMSize=${ROMSize} set CPUType=${CPUType} "@ | Out-File "build_env.cmd" -Encoding ASCII diff --git a/Source/HBIOS/Build.sh b/Source/HBIOS/Build.sh index 202fbae2..37c54583 100755 --- a/Source/HBIOS/Build.sh +++ b/Source/HBIOS/Build.sh @@ -9,48 +9,38 @@ export ROMSIZE if [ "${ROM_PLATFORM}" == "dist" ] ; then echo "!!!DISTRIBUTION BUILD!!!" - ROM_PLATFORM="DYNO"; ROM_CONFIG="std"; ROMSIZE="512"; bash Build.sh - ROM_PLATFORM="EZZ80"; ROM_CONFIG="std"; ROMSIZE="512"; bash Build.sh - ROM_PLATFORM="EZZ80"; ROM_CONFIG="tz80"; ROMSIZE="512"; bash Build.sh - ROM_PLATFORM="MK4"; ROM_CONFIG="std"; ROMSIZE="512"; bash Build.sh - ROM_PLATFORM="N8"; ROM_CONFIG="std"; ROMSIZE="512"; bash Build.sh - ROM_PLATFORM="RCZ180"; ROM_CONFIG="ext"; ROMSIZE="512"; bash Build.sh - ROM_PLATFORM="RCZ180"; ROM_CONFIG="nat"; ROMSIZE="512"; bash Build.sh - ROM_PLATFORM="RCZ280"; ROM_CONFIG="ext"; ROMSIZE="512"; bash Build.sh - ROM_PLATFORM="RCZ280"; ROM_CONFIG="nat"; ROMSIZE="512"; bash Build.sh - ROM_PLATFORM="RCZ280"; ROM_CONFIG="nat_zz"; ROMSIZE="512"; bash Build.sh - ROM_PLATFORM="RCZ280"; ROM_CONFIG="nat_zzr"; ROMSIZE="256"; bash Build.sh - ROM_PLATFORM="RCZ80"; ROM_CONFIG="kio"; ROMSIZE="512"; bash Build.sh - ROM_PLATFORM="RCZ80"; ROM_CONFIG="mt"; ROMSIZE="512"; bash Build.sh - ROM_PLATFORM="RCZ80"; ROM_CONFIG="duart"; ROMSIZE="512"; bash Build.sh - ROM_PLATFORM="RCZ80"; ROM_CONFIG="std"; ROMSIZE="512"; bash Build.sh - ROM_PLATFORM="RCZ80"; ROM_CONFIG="skz"; ROMSIZE="512"; bash Build.sh - ROM_PLATFORM="RCZ80"; ROM_CONFIG="zrc"; ROMSIZE="512"; bash Build.sh - ROM_PLATFORM="RCZ80"; ROM_CONFIG="zrc_ram"; ROMSIZE="0"; bash Build.sh - ROM_PLATFORM="RPH"; ROM_CONFIG="std"; ROMSIZE="512"; bash Build.sh - ROM_PLATFORM="SBC"; ROM_CONFIG="std"; ROMSIZE="512"; bash Build.sh - ROM_PLATFORM="SBC"; ROM_CONFIG="simh"; ROMSIZE="512"; bash Build.sh - ROM_PLATFORM="MBC"; ROM_CONFIG="std"; ROMSIZE="512"; bash Build.sh - ROM_PLATFORM="SCZ180"; ROM_CONFIG="126"; ROMSIZE="512"; bash Build.sh - ROM_PLATFORM="SCZ180"; ROM_CONFIG="130"; ROMSIZE="512"; bash Build.sh - ROM_PLATFORM="SCZ180"; ROM_CONFIG="131"; ROMSIZE="512"; bash Build.sh - ROM_PLATFORM="SCZ180"; ROM_CONFIG="140"; ROMSIZE="512"; bash Build.sh - ROM_PLATFORM="UNA"; ROM_CONFIG="std"; ROMSIZE="512"; bash Build.sh - ROM_PLATFORM="ZETA"; ROM_CONFIG="std"; ROMSIZE="512"; bash Build.sh - ROM_PLATFORM="ZETA2"; ROM_CONFIG="std"; ROMSIZE="512"; bash Build.sh + ROM_PLATFORM="DYNO"; ROM_CONFIG="std"; bash Build.sh + ROM_PLATFORM="EZZ80"; ROM_CONFIG="std"; bash Build.sh + ROM_PLATFORM="EZZ80"; ROM_CONFIG="tz80"; bash Build.sh + ROM_PLATFORM="MK4"; ROM_CONFIG="std"; bash Build.sh + ROM_PLATFORM="N8"; ROM_CONFIG="std"; bash Build.sh + ROM_PLATFORM="RCZ180"; ROM_CONFIG="ext"; bash Build.sh + ROM_PLATFORM="RCZ180"; ROM_CONFIG="nat"; bash Build.sh + ROM_PLATFORM="RCZ280"; ROM_CONFIG="ext"; bash Build.sh + ROM_PLATFORM="RCZ280"; ROM_CONFIG="nat"; bash Build.sh + ROM_PLATFORM="RCZ280"; ROM_CONFIG="nat_zz"; bash Build.sh + ROM_PLATFORM="RCZ280"; ROM_CONFIG="nat_zzr"; bash Build.sh + ROM_PLATFORM="RCZ80"; ROM_CONFIG="kio"; bash Build.sh + ROM_PLATFORM="RCZ80"; ROM_CONFIG="mt"; bash Build.sh + ROM_PLATFORM="RCZ80"; ROM_CONFIG="duart"; bash Build.sh + ROM_PLATFORM="RCZ80"; ROM_CONFIG="std"; bash Build.sh + ROM_PLATFORM="RCZ80"; ROM_CONFIG="skz"; bash Build.sh + ROM_PLATFORM="RCZ80"; ROM_CONFIG="zrc"; bash Build.sh + ROM_PLATFORM="RCZ80"; ROM_CONFIG="zrc_ram"; bash Build.sh + ROM_PLATFORM="RPH"; ROM_CONFIG="std"; bash Build.sh + ROM_PLATFORM="SBC"; ROM_CONFIG="std"; bash Build.sh + ROM_PLATFORM="SBC"; ROM_CONFIG="simh"; bash Build.sh + ROM_PLATFORM="MBC"; ROM_CONFIG="std"; bash Build.sh + ROM_PLATFORM="SCZ180"; ROM_CONFIG="126"; bash Build.sh + ROM_PLATFORM="SCZ180"; ROM_CONFIG="130"; bash Build.sh + ROM_PLATFORM="SCZ180"; ROM_CONFIG="131"; bash Build.sh + ROM_PLATFORM="SCZ180"; ROM_CONFIG="140"; bash Build.sh + ROM_PLATFORM="UNA"; ROM_CONFIG="std"; bash Build.sh + ROM_PLATFORM="ZETA"; ROM_CONFIG="std"; bash Build.sh + ROM_PLATFORM="ZETA2"; ROM_CONFIG="std"; bash Build.sh exit fi -###if [ $1 == '-d' ] ; then -### shift -### diffdir=$1 -### shift -### if [ -f $diffdir/build.inc ] ; then -### timestamp=$(grep TIMESTAMP $diffdir/build.inc | awk '{print $3}' | tr -d '\015"') -### echo diff build using $timestamp -### fi -###fi - # prompt if no match platforms=($(find Config -name \*.asm -print | \ sed -e 's,Config/,,' -e 's/_.*$//' | sort -u)) @@ -69,21 +59,22 @@ done CONFIGFILE=Config/${ROM_PLATFORM}_${ROM_CONFIG}.asm -if [ -z "${ROMSIZE}" ] ; then - ROMSIZE="512" -fi - -while [ ! '(' "${ROMSIZE}" = 1024 -o "${ROMSIZE}" = 512 -o "${ROMSIZE}" = 256 -o "${ROMSIZE}" = 128 -o "${ROMSIZE}" = 0 ')' ] ; do - echo -n "Romsize :" - read ROMSIZE -done - if [ -z "${ROMNAME}" ] ; then ROMNAME=${ROM_PLATFORM}_${ROM_CONFIG} fi TIMESTAMP=$(date +%Y-%m-%d) +if [ "$1" = "-d" ] ; then + shift + diffdir=$1 + shift + if [ -f $diffdir/build.inc ] ; then + timestamp=$(grep TIMESTAMP $diffdir/build.inc | awk '{print $3}' | tr -d '\015"') + echo diff build using $timestamp + fi +fi + CONFIGFILE=Config/${ROM_PLATFORM}_${ROM_CONFIG}.asm echo Building $ROMNAME for $ROM_PLATFORM $ROM_CONFIG $ROMSIZE @@ -93,12 +84,15 @@ cat <<- EOF > build.inc ; #DEFINE TIMESTAMP "${TIMESTAMP}" ; -ROMSIZE .EQU ${ROMSIZE} -; #INCLUDE "${CONFIGFILE}" ; EOF +make hbios_env.sh +source hbios_env.sh + +cat hbios_env.sh + export OBJECTS OBJECTS="${ROMNAME}.rom" if [ "${ROM_PLATFORM}" != "UNA" ] ; then diff --git a/Source/HBIOS/Clean.cmd b/Source/HBIOS/Clean.cmd index d35f7fcb..432d4166 100644 --- a/Source/HBIOS/Clean.cmd +++ b/Source/HBIOS/Clean.cmd @@ -14,3 +14,4 @@ if exist *.sys del *.sys if exist build.inc del build.inc if exist font*.asm del font*.asm if exist build_env.cmd del build_env.cmd +if exist hbios_env.cmd del hbios_env.cmd diff --git a/Source/HBIOS/Config/RCZ280_nat_zzr.asm b/Source/HBIOS/Config/RCZ280_nat_zzr.asm index 4439f45d..4832805b 100644 --- a/Source/HBIOS/Config/RCZ280_nat_zzr.asm +++ b/Source/HBIOS/Config/RCZ280_nat_zzr.asm @@ -31,6 +31,7 @@ CPUOSC .SET 14745600 ; CPU OSC FREQ IN MHZ ; RAMSIZE .SET 256 ; SIZE OF RAM IN KB (MUST MATCH YOUR HARDWARE!!!) +ROMSIZE .SET 256 ; SIZE OF ROM IN KB (MUST MATCH YOUR HARDWARE!!!) ROMSIZE_CHK .SET 256 ; ROMSIZE VALUE VEREIFICATION (0=DISABLED) ; RAMLOC .SET 18 ; START OF RAM AS POWER OF 2 (2^N) IN PHYSICAL ADDRESS SPACE diff --git a/Source/HBIOS/Config/RCZ80_zrc_ram.asm b/Source/HBIOS/Config/RCZ80_zrc_ram.asm index cd68248d..99fea429 100644 --- a/Source/HBIOS/Config/RCZ80_zrc_ram.asm +++ b/Source/HBIOS/Config/RCZ80_zrc_ram.asm @@ -31,6 +31,7 @@ CRTACT .SET FALSE ; ACTIVATE CRT (VDU,CVDU,PROPIO,ETC) AT STARTUP CPUOSC .SET 7372800 ; CPU OSC FREQ IN MHZ ; RAMSIZE .SET 2048 ; SIZE OF RAM IN KB (MUST MATCH YOUR HARDWARE!!!) +ROMSIZE .SET 0 ; SIZE OF ROM IN KB (MUST MATCH YOUR HARDWARE!!!) MEMMGR .SET MM_ZRC ; MEMORY MANAGER: MM_[SBC|Z2|N8|Z180] ; MDROM .SET FALSE ; MD: ENABLE ROM DISK diff --git a/Source/HBIOS/Makefile b/Source/HBIOS/Makefile index 2fff3b8f..abf6854c 100644 --- a/Source/HBIOS/Makefile +++ b/Source/HBIOS/Makefile @@ -1,13 +1,12 @@ -MOREDIFF = camel80.bin game.bin hbios_rom.bin nascom.bin prefix.bin usrrom.bin \ +MOREDIFF = game.bin hbios_rom.bin nascom.bin usrrom.bin \ dbgmon.bin hbios_app.bin imgpad2.bin osimg1.bin osimg2.bin romldr.bin \ - eastaegg.bin hbios_img.bin osimg.bin tastybasic.bin \ - game.bin updater.bin usrrom.bin + eastaegg.bin hbios_img.bin osimg.bin game.bin updater.bin usrrom.bin SUBDIRS = DEST = ../../Binary TOOLS =../../Tools -OTHERS = *.img *.rom *.com *.upd *.bin *.z80 cpm.sys zsys.sys Build.inc font*.asm *.dat +OTHERS = *.img *.rom *.com *.upd *.bin *.z80 cpm.sys zsys.sys Build.inc font*.asm *.dat hbios_env.sh include $(TOOLS)/Makefile.inc FONTS := font8x11c.asm font8x11u.asm font8x16c.asm font8x16u.asm font8x8c.asm font8x8u.asm fontcgac.asm fontcgau.asm @@ -20,11 +19,13 @@ ifneq ($(findstring $(ROM_PLATFORM), RCZ280),) TASM=$(BINDIR)/uz80as -t z280 endif +# DIFFMAKE = 1 + ifeq ($(DIFFMAKE),1) DIFFBUILD := -d $(DIFFTO)/Source/HBIOS endif -DIFFPATH = $(DIFFTO)/Binary +# DIFFPATH = $(DIFFTO)/Binary DEPS=prereq dbgmon.bin romldr.bin nascom.bin tastybasic.bin game.bin eastaegg.bin updater.bin usrrom.bin imgpad2.bin @@ -38,19 +39,19 @@ endif ROMNAME=${ROM_PLATFORM}_${ROM_CONFIG} -#$(info DEPS=$(DEPS)) -#$(info ROM_PLATFORM=$(ROM_PLATFORM)) -#$(info ROM_CONFIG=$(ROM_CONFIG)) -#$(info ROMSIZE=$(ROMSIZE)) -#$(info ROMNAME=$(ROMNAME)) +$(info DEPS=$(DEPS)) +$(info ROM_PLATFORM=$(ROM_PLATFORM)) +$(info ROM_CONFIG=$(ROM_CONFIG)) +$(info ROMSIZE=$(ROMSIZE)) +$(info ROMNAME=$(ROMNAME)) all:: if [ -z "$(OBJECTS)" ] ; then \ chmod +x Build.sh ; \ - bash Build.sh ; \ + bash Build.sh $(DIFFBUILD) ; \ fi -$(ROMNAME).rom $(ROMNAME).com $(ROMNAME).img &: $(ROMDEPS) +$(ROMNAME).rom $(ROMNAME).com $(ROMNAME).img : $(ROMDEPS) cat romldr.bin dbgmon.bin ../ZSDOS/zsys_$(BIOS).bin ../CPM22/cpm_$(BIOS).bin >osimg.bin cat romldr.bin dbgmon.bin ../ZSDOS/zsys_$(BIOS).bin >osimg_small.bin if [ $(ROM_PLATFORM) != UNA ] ; then \ @@ -98,6 +99,12 @@ hbios_app.bin: hbios.asm build.inc $(DEPS) hbios_img.bin: hbios.asm build.inc $(DEPS) $(TASM) -dIMGBOOT hbios.asm hbios_img.bin hbios_img.lst +hbios_env.com: hbios_env.asm build.inc + $(TASM) -dBASH hbios_env.asm hbios_env.com hbios_env.lst + +hbios_env.sh: hbios_env.com + $(ZXCC) hbios_env.com >hbios_env.sh + romldr.bin: build.inc dbgmon.bin: build.inc nascom.bin: build.inc diff --git a/Source/HBIOS/cfg_dyno.asm b/Source/HBIOS/cfg_dyno.asm index a5400782..50785e2e 100644 --- a/Source/HBIOS/cfg_dyno.asm +++ b/Source/HBIOS/cfg_dyno.asm @@ -33,6 +33,7 @@ INTMODE .EQU 2 ; INTERRUPTS: 0=NONE, 1=MODE 1, 2=MODE 2, 3=MODE 3 (Z280) DEFSERCFG .EQU SER_38400_8N1 ; DEFAULT SERIAL LINE CONFIG (SEE STD.ASM) ; RAMSIZE .EQU 512 ; SIZE OF RAM IN KB (MUST MATCH YOUR HARDWARE!!!) +ROMSIZE .EQU 512 ; SIZE OF ROM IN KB (MUST MATCH YOUR HARDWARE!!!) ROMSIZE_CHK .EQU 0 ; ROMSIZE VALUE VEREIFICATION (0=DISABLED) MEMMGR .EQU MM_Z180 ; MEMORY MANAGER: MM_[SBC|Z2|N8|Z180|Z280|MBC|RPH] RAMLOC .EQU 19 ; START OF RAM AS POWER OF 2 (2^N) IN PHYSICAL ADDRESS SPACE diff --git a/Source/HBIOS/cfg_ezz80.asm b/Source/HBIOS/cfg_ezz80.asm index ebc35644..ffdb7586 100644 --- a/Source/HBIOS/cfg_ezz80.asm +++ b/Source/HBIOS/cfg_ezz80.asm @@ -33,6 +33,7 @@ INTMODE .EQU 2 ; INTERRUPTS: 0=NONE, 1=MODE 1, 2=MODE 2, 3=MODE 3 (Z280) DEFSERCFG .EQU SER_115200_8N1 ; DEFAULT SERIAL LINE CONFIG (SEE STD.ASM) ; RAMSIZE .EQU 512 ; SIZE OF RAM IN KB (MUST MATCH YOUR HARDWARE!!!) +ROMSIZE .EQU 512 ; SIZE OF ROM IN KB (MUST MATCH YOUR HARDWARE!!!) ROMSIZE_CHK .EQU 0 ; ROMSIZE VALUE VEREIFICATION (0=DISABLED) MEMMGR .EQU MM_Z2 ; MEMORY MANAGER: MM_[SBC|Z2|N8|Z180|Z280|MBC|RPH] MPGSEL_0 .EQU $78 ; Z2 MEM MGR BANK 0 PAGE SELECT REG (WRITE ONLY) diff --git a/Source/HBIOS/cfg_master.asm b/Source/HBIOS/cfg_master.asm index fb57e607..526d829e 100644 --- a/Source/HBIOS/cfg_master.asm +++ b/Source/HBIOS/cfg_master.asm @@ -30,6 +30,7 @@ INTMODE .EQU 0 ; INTERRUPTS: 0=NONE, 1=MODE 1, 2=MODE 2, 3=MODE 3 (Z280) DEFSERCFG .EQU SER_38400_8N1 ; DEFAULT SERIAL LINE CONFIG (SEE STD.ASM) ; RAMSIZE .EQU 512 ; SIZE OF RAM IN KB (MUST MATCH YOUR HARDWARE!!!) +ROMSIZE .EQU 512 ; SIZE OF ROM IN KB (MUST MATCH YOUR HARDWARE!!!) ROMSIZE_CHK .EQU 0 ; ROMSIZE VALUE VEREIFICATION (0=DISABLED) MEMMGR .EQU MM_NONE ; MEMORY MANAGER: MM_[SBC|Z2|N8|Z180|Z280|MBC|RPH] RAMLOC .EQU 19 ; START OF RAM AS POWER OF 2 (2^N) IN PHYSICAL ADDRESS SPACE @@ -269,7 +270,7 @@ PPIDE0B8BIT .EQU FALSE ; PPIDE 0B (SLAVE): 8 BIT XFER PPIDE1BASE .EQU $20 ; PPIDE 1: PPI REGISTERS BASE ADR PPIDE1A8BIT .EQU FALSE ; PPIDE 1A (MASTER): 8 BIT XFER PPIDE1B8BIT .EQU FALSE ; PPIDE 0B (SLAVE): 8 BIT XFER -PPIDE2BASE .EQU $44 ; PPIDE 2: PPI REGISTERS BASE ADR +PPIDE2BASE .EQU $14 ; PPIDE 2: PPI REGISTERS BASE ADR PPIDE2A8BIT .EQU FALSE ; PPIDE 2A (MASTER): 8 BIT XFER PPIDE2B8BIT .EQU FALSE ; PPIDE 0B (SLAVE): 8 BIT XFER ; diff --git a/Source/HBIOS/cfg_mbc.asm b/Source/HBIOS/cfg_mbc.asm index 8f0669d7..5cfbcb4c 100644 --- a/Source/HBIOS/cfg_mbc.asm +++ b/Source/HBIOS/cfg_mbc.asm @@ -33,6 +33,7 @@ INTMODE .EQU 0 ; INTERRUPTS: 0=NONE, 1=MODE 1, 2=MODE 2, 3=MODE 3 (Z280) DEFSERCFG .EQU SER_38400_8N1 ; DEFAULT SERIAL LINE CONFIG (SEE STD.ASM) ; RAMSIZE .EQU 512 ; SIZE OF RAM IN KB (MUST MATCH YOUR HARDWARE!!!) +ROMSIZE .EQU 512 ; SIZE OF ROM IN KB (MUST MATCH YOUR HARDWARE!!!) ROMSIZE_CHK .EQU 0 ; ROMSIZE VALUE VEREIFICATION (0=DISABLED) MEMMGR .EQU MM_MBC ; MEMORY MANAGER: MM_[SBC|Z2|N8|Z180|Z280|MBC|RPH] MPCL_RAM .EQU $78 ; SBC MEM MGR RAM PAGE SELECT REG (WRITE ONLY) @@ -198,7 +199,7 @@ PPIDE0B8BIT .EQU FALSE ; PPIDE 0B (SLAVE): 8 BIT XFER PPIDE1BASE .EQU $20 ; PPIDE 1: PPI REGISTERS BASE ADR PPIDE1A8BIT .EQU FALSE ; PPIDE 1A (MASTER): 8 BIT XFER PPIDE1B8BIT .EQU FALSE ; PPIDE 0B (SLAVE): 8 BIT XFER -PPIDE2BASE .EQU $44 ; PPIDE 2: PPI REGISTERS BASE ADR +PPIDE2BASE .EQU $14 ; PPIDE 2: PPI REGISTERS BASE ADR PPIDE2A8BIT .EQU FALSE ; PPIDE 2A (MASTER): 8 BIT XFER PPIDE2B8BIT .EQU FALSE ; PPIDE 0B (SLAVE): 8 BIT XFER ; diff --git a/Source/HBIOS/cfg_mk4.asm b/Source/HBIOS/cfg_mk4.asm index e642ce5c..c5108411 100644 --- a/Source/HBIOS/cfg_mk4.asm +++ b/Source/HBIOS/cfg_mk4.asm @@ -33,6 +33,7 @@ INTMODE .EQU 2 ; INTERRUPTS: 0=NONE, 1=MODE 1, 2=MODE 2, 3=MODE 3 (Z280) DEFSERCFG .EQU SER_38400_8N1 ; DEFAULT SERIAL LINE CONFIG (SEE STD.ASM) ; RAMSIZE .EQU 512 ; SIZE OF RAM IN KB (MUST MATCH YOUR HARDWARE!!!) +ROMSIZE .EQU 512 ; SIZE OF ROM IN KB (MUST MATCH YOUR HARDWARE!!!) ROMSIZE_CHK .EQU 0 ; ROMSIZE VALUE VEREIFICATION (0=DISABLED) MEMMGR .EQU MM_Z180 ; MEMORY MANAGER: MM_[SBC|Z2|N8|Z180|Z280|MBC|RPH] RAMLOC .EQU 19 ; START OF RAM AS POWER OF 2 (2^N) IN PHYSICAL ADDRESS SPACE @@ -191,7 +192,7 @@ IDE2B8BIT .EQU FALSE ; IDE 2B (MASTER): 8 BIT XFER PPIDEENABLE .EQU FALSE ; PPIDE: ENABLE PARALLEL PORT IDE DISK DRIVER (PPIDE.ASM) PPIDETRACE .EQU 1 ; PPIDE: TRACE LEVEL (0=NO,1=ERRORS,2=ALL) PPIDECNT .EQU 2 ; PPIDE: NUMBER OF PPI CHIPS TO DETECT (1-3), 2 DRIVES PER CHIP -PPIDE0BASE .EQU $44 ; PPIDE 0: PPI REGISTERS BASE ADR +PPIDE0BASE .EQU $14 ; PPIDE 0: PPI REGISTERS BASE ADR PPIDE0A8BIT .EQU FALSE ; PPIDE 0A (MASTER): 8 BIT XFER PPIDE0B8BIT .EQU FALSE ; PPIDE 0B (SLAVE): 8 BIT XFER PPIDE1BASE .EQU $20 ; PPIDE 1: PPI REGISTERS BASE ADR diff --git a/Source/HBIOS/cfg_n8.asm b/Source/HBIOS/cfg_n8.asm index f303b55f..c5d8ba50 100644 --- a/Source/HBIOS/cfg_n8.asm +++ b/Source/HBIOS/cfg_n8.asm @@ -33,6 +33,7 @@ INTMODE .EQU 2 ; INTERRUPTS: 0=NONE, 1=MODE 1, 2=MODE 2, 3=MODE 3 (Z280) DEFSERCFG .EQU SER_38400_8N1 ; DEFAULT SERIAL LINE CONFIG (SEE STD.ASM) ; RAMSIZE .EQU 512 ; SIZE OF RAM IN KB (MUST MATCH YOUR HARDWARE!!!) +ROMSIZE .EQU 512 ; SIZE OF ROM IN KB (MUST MATCH YOUR HARDWARE!!!) ROMSIZE_CHK .EQU 0 ; ROMSIZE VALUE VEREIFICATION (0=DISABLED) MEMMGR .EQU MM_N8 ; MEMORY MANAGER: MM_[SBC|Z2|N8|Z180|Z280|MBC|RPH] RAMBIAS .EQU 0 ; OFFSET OF START OF RAM IN PHYSICAL ADDRESS SPACE diff --git a/Source/HBIOS/cfg_rcz180.asm b/Source/HBIOS/cfg_rcz180.asm index 66536de4..373f23ec 100644 --- a/Source/HBIOS/cfg_rcz180.asm +++ b/Source/HBIOS/cfg_rcz180.asm @@ -33,6 +33,7 @@ INTMODE .EQU 2 ; INTERRUPTS: 0=NONE, 1=MODE 1, 2=MODE 2, 3=MODE 3 (Z280) DEFSERCFG .EQU SER_115200_8N1 ; DEFAULT SERIAL LINE CONFIG (SEE STD.ASM) ; RAMSIZE .EQU 512 ; SIZE OF RAM IN KB (MUST MATCH YOUR HARDWARE!!!) +ROMSIZE .EQU 512 ; SIZE OF ROM IN KB (MUST MATCH YOUR HARDWARE!!!) ROMSIZE_CHK .EQU 0 ; ROMSIZE VALUE VEREIFICATION (0=DISABLED) MEMMGR .EQU MM_Z180 ; MEMORY MANAGER: MM_[SBC|Z2|N8|Z180|Z280|MBC|RPH] RAMLOC .EQU 19 ; START OF RAM AS POWER OF 2 (2^N) IN PHYSICAL ADDRESS SPACE diff --git a/Source/HBIOS/cfg_rcz280.asm b/Source/HBIOS/cfg_rcz280.asm index 58fe389d..95d86e91 100644 --- a/Source/HBIOS/cfg_rcz280.asm +++ b/Source/HBIOS/cfg_rcz280.asm @@ -33,6 +33,7 @@ INTMODE .EQU 0 ; INTERRUPTS: 0=NONE, 1=MODE 1, 2=MODE 2, 3=MODE 3 (Z280) DEFSERCFG .EQU SER_115200_8N1 ; DEFAULT SERIAL LINE CONFIG (SEE STD.ASM) ; RAMSIZE .EQU 512 ; SIZE OF RAM IN KB (MUST MATCH YOUR HARDWARE!!!) +ROMSIZE .EQU 512 ; SIZE OF ROM IN KB (MUST MATCH YOUR HARDWARE!!!) ROMSIZE_CHK .EQU 0 ; ROMSIZE VALUE VEREIFICATION (0=DISABLED) MEMMGR .EQU MM_Z2 ; MEMORY MANAGER: MM_[SBC|Z2|N8|Z180|Z280|MBC|RPH] RAMLOC .EQU 19 ; START OF RAM AS POWER OF 2 (2^N) IN PHYSICAL ADDRESS SPACE diff --git a/Source/HBIOS/cfg_rcz80.asm b/Source/HBIOS/cfg_rcz80.asm index ee0cf84a..805cecff 100644 --- a/Source/HBIOS/cfg_rcz80.asm +++ b/Source/HBIOS/cfg_rcz80.asm @@ -33,6 +33,7 @@ INTMODE .EQU 1 ; INTERRUPTS: 0=NONE, 1=MODE 1, 2=MODE 2, 3=MODE 3 (Z280) DEFSERCFG .EQU SER_115200_8N1 ; DEFAULT SERIAL LINE CONFIG (SEE STD.ASM) ; RAMSIZE .EQU 512 ; SIZE OF RAM IN KB (MUST MATCH YOUR HARDWARE!!!) +ROMSIZE .EQU 512 ; SIZE OF ROM IN KB (MUST MATCH YOUR HARDWARE!!!) ROMSIZE_CHK .EQU 0 ; ROMSIZE VALUE VEREIFICATION (0=DISABLED) MEMMGR .EQU MM_Z2 ; MEMORY MANAGER: MM_[SBC|Z2|N8|Z180|Z280|MBC|RPH] MPGSEL_0 .EQU $78 ; Z2 MEM MGR BANK 0 PAGE SELECT REG (WRITE ONLY) diff --git a/Source/HBIOS/cfg_rph.asm b/Source/HBIOS/cfg_rph.asm index ebba0a25..a17fbf99 100644 --- a/Source/HBIOS/cfg_rph.asm +++ b/Source/HBIOS/cfg_rph.asm @@ -33,6 +33,7 @@ INTMODE .EQU 2 ; INTERRUPTS: 0=NONE, 1=MODE 1, 2=MODE 2, 3=MODE 3 (Z280) DEFSERCFG .EQU SER_38400_8N1 ; DEFAULT SERIAL LINE CONFIG (SEE STD.ASM) ; RAMSIZE .EQU 512 ; SIZE OF RAM IN KB (MUST MATCH YOUR HARDWARE!!!) +ROMSIZE .EQU 512 ; SIZE OF ROM IN KB (MUST MATCH YOUR HARDWARE!!!) ROMSIZE_CHK .EQU 0 ; ROMSIZE VALUE VEREIFICATION (0=DISABLED) MEMMGR .EQU MM_RPH ; MEMORY MANAGER: MM_[SBC|Z2|N8|Z180|Z280|MBC|RPH] RAMBIAS .EQU 0 ; OFFSET OF START OF RAM IN PHYSICAL ADDRESS SPACE diff --git a/Source/HBIOS/cfg_sbc.asm b/Source/HBIOS/cfg_sbc.asm index f44de4cb..26c945c0 100644 --- a/Source/HBIOS/cfg_sbc.asm +++ b/Source/HBIOS/cfg_sbc.asm @@ -33,6 +33,7 @@ INTMODE .EQU 0 ; INTERRUPTS: 0=NONE, 1=MODE 1, 2=MODE 2, 3=MODE 3 (Z280) DEFSERCFG .EQU SER_38400_8N1 ; DEFAULT SERIAL LINE CONFIG (SEE STD.ASM) ; RAMSIZE .EQU 512 ; SIZE OF RAM IN KB (MUST MATCH YOUR HARDWARE!!!) +ROMSIZE .EQU 512 ; SIZE OF ROM IN KB (MUST MATCH YOUR HARDWARE!!!) ROMSIZE_CHK .EQU 0 ; ROMSIZE VALUE VEREIFICATION (0=DISABLED) MEMMGR .EQU MM_SBC ; MEMORY MANAGER: MM_[SBC|Z2|N8|Z180|Z280|MBC|RPH] MPCL_RAM .EQU $78 ; SBC MEM MGR RAM PAGE SELECT REG (WRITE ONLY) @@ -198,7 +199,7 @@ PPIDE0B8BIT .EQU FALSE ; PPIDE 0B (SLAVE): 8 BIT XFER PPIDE1BASE .EQU $20 ; PPIDE 1: PPI REGISTERS BASE ADR PPIDE1A8BIT .EQU FALSE ; PPIDE 1A (MASTER): 8 BIT XFER PPIDE1B8BIT .EQU FALSE ; PPIDE 0B (SLAVE): 8 BIT XFER -PPIDE2BASE .EQU $44 ; PPIDE 2: PPI REGISTERS BASE ADR +PPIDE2BASE .EQU $14 ; PPIDE 2: PPI REGISTERS BASE ADR PPIDE2A8BIT .EQU FALSE ; PPIDE 2A (MASTER): 8 BIT XFER PPIDE2B8BIT .EQU FALSE ; PPIDE 0B (SLAVE): 8 BIT XFER ; diff --git a/Source/HBIOS/cfg_scz180.asm b/Source/HBIOS/cfg_scz180.asm index a8947263..978ecc86 100644 --- a/Source/HBIOS/cfg_scz180.asm +++ b/Source/HBIOS/cfg_scz180.asm @@ -33,6 +33,7 @@ INTMODE .EQU 2 ; INTERRUPTS: 0=NONE, 1=MODE 1, 2=MODE 2, 3=MODE 3 (Z280) DEFSERCFG .EQU SER_115200_8N1 ; DEFAULT SERIAL LINE CONFIG (SEE STD.ASM) ; RAMSIZE .EQU 512 ; SIZE OF RAM IN KB (MUST MATCH YOUR HARDWARE!!!) +ROMSIZE .EQU 512 ; SIZE OF ROM IN KB (MUST MATCH YOUR HARDWARE!!!) ROMSIZE_CHK .EQU 0 ; ROMSIZE VALUE VEREIFICATION (0=DISABLED) MEMMGR .EQU MM_Z180 ; MEMORY MANAGER: MM_[SBC|Z2|N8|Z180|Z280|MBC|RPH] RAMLOC .EQU 19 ; START OF RAM AS POWER OF 2 (2^N) IN PHYSICAL ADDRESS SPACE diff --git a/Source/HBIOS/cfg_una.asm b/Source/HBIOS/cfg_una.asm index eae041fb..469e0f65 100644 --- a/Source/HBIOS/cfg_una.asm +++ b/Source/HBIOS/cfg_una.asm @@ -26,6 +26,7 @@ CPUOSC .EQU 18432000 ; CPU OSC FREQ IN MHZ INTMODE .EQU 0 ; INTERRUPTS: 0=NONE, 1=MODE 1, 2=MODE 2, 3=MODE 3 (Z280) ; RAMSIZE .EQU 512 ; SIZE OF RAM IN KB (MUST MATCH YOUR HARDWARE!!!) +ROMSIZE .EQU 512 ; SIZE OF ROM IN KB (MUST MATCH YOUR HARDWARE!!!) ; RTCIO .EQU $70 ; RTC LATCH REGISTER ADR ; diff --git a/Source/HBIOS/cfg_zeta.asm b/Source/HBIOS/cfg_zeta.asm index 3ac56328..8f080708 100644 --- a/Source/HBIOS/cfg_zeta.asm +++ b/Source/HBIOS/cfg_zeta.asm @@ -33,6 +33,7 @@ INTMODE .EQU 0 ; INTERRUPTS: 0=NONE, 1=MODE 1, 2=MODE 2, 3=MODE 3 (Z280) DEFSERCFG .EQU SER_38400_8N1 ; DEFAULT SERIAL LINE CONFIG (SEE STD.ASM) ; RAMSIZE .EQU 512 ; SIZE OF RAM IN KB (MUST MATCH YOUR HARDWARE!!!) +ROMSIZE .EQU 512 ; SIZE OF ROM IN KB (MUST MATCH YOUR HARDWARE!!!) ROMSIZE_CHK .EQU 0 ; ROMSIZE VALUE VEREIFICATION (0=DISABLED) MEMMGR .EQU MM_SBC ; MEMORY MANAGER: MM_[SBC|Z2|N8|Z180|Z280|MBC|RPH] MPCL_RAM .EQU $78 ; SBC MEM MGR RAM PAGE SELECT REG (WRITE ONLY) diff --git a/Source/HBIOS/cfg_zeta2.asm b/Source/HBIOS/cfg_zeta2.asm index 8c40e759..ec794f13 100644 --- a/Source/HBIOS/cfg_zeta2.asm +++ b/Source/HBIOS/cfg_zeta2.asm @@ -33,6 +33,7 @@ INTMODE .EQU 2 ; INTERRUPTS: 0=NONE, 1=MODE 1, 2=MODE 2, 3=MODE 3 (Z280) DEFSERCFG .EQU SER_38400_8N1 ; DEFAULT SERIAL LINE CONFIG (SEE STD.ASM) ; RAMSIZE .EQU 512 ; SIZE OF RAM IN KB (MUST MATCH YOUR HARDWARE!!!) +ROMSIZE .EQU 512 ; SIZE OF ROM IN KB (MUST MATCH YOUR HARDWARE!!!) ROMSIZE_CHK .EQU 0 ; ROMSIZE VALUE VEREIFICATION (0=DISABLED) MEMMGR .EQU MM_Z2 ; MEMORY MANAGER: MM_[SBC|Z2|N8|Z180|Z280|MBC|RPH] MPGSEL_0 .EQU $78 ; Z2 MEM MGR BANK 0 PAGE SELECT REG (WRITE ONLY) diff --git a/Source/HBIOS/dsrtc.asm b/Source/HBIOS/dsrtc.asm index 9b8c630d..c4e8608b 100644 --- a/Source/HBIOS/dsrtc.asm +++ b/Source/HBIOS/dsrtc.asm @@ -118,7 +118,7 @@ DS2d8k .EQU %10101011 ; 2 DIODES 8K RESISTOR ; #IF (DSRTCMODE == DSRTCMODE_MFPIC) ; -DSRTC_IO .EQU $43 ; RTC PORT ON MF/PIC +DSRTC_IO .EQU $13 ; RTC PORT ON MF/PIC ; DSRTC_DATA .EQU %00000001 ; BIT 0 IS RTC DATA OUT DSRTC_CLK .EQU %00000100 ; BIT 2 IS RTC CLOCK (CLK) diff --git a/Source/HBIOS/hbios.asm b/Source/HBIOS/hbios.asm index e729f5c2..cfb04eec 100644 --- a/Source/HBIOS/hbios.asm +++ b/Source/HBIOS/hbios.asm @@ -219,6 +219,7 @@ RTCDEF .SET RTCDEF | %00001000 ; INITIAL SPEED LOW ; .FILL (000H - $),0FFH ; RST 0 JP HB_START + .DB 0 ; SIG PTR STARTS AT $0004 .DW ROM_SIG .FILL (008H - $),0FFH ; RST 8 JP HB_INVOKE ; INVOKE HBIOS FUNCTION diff --git a/Source/HBIOS/hbios_env.asm b/Source/HBIOS/hbios_env.asm new file mode 100644 index 00000000..16356176 --- /dev/null +++ b/Source/HBIOS/hbios_env.asm @@ -0,0 +1,61 @@ +; +;================================================================================================== +; HBIOS ENVIRONMENT EXPORT +;================================================================================================== +; +; Do we need a private stack??? +; Use a macro do dump each variable? +; +#include "std.asm" +; + .org $100 ; Normal CP/M start address +; + ; Dump ROMSIZE + call PRTSTRD +#ifdef CMD + .text "set ROMSize=$" +#endif +#ifdef BASH + .text "ROMSIZE=$" +#endif + ld hl,ROMSIZE + call PRTDEC + call EOL +; + ret ; Return +; +; Output end-of-line. Handles differences between +; Windows CMD file and Bash. +; +EOL: +#ifdef CMD + ld a,13 + call COUT +#endif + ld a,10 + call COUT + ret + +; +; Print a single character from register A. +; This routine is required by the utility routines included below. +; +COUT: + push af + push bc + push de + push hl + ld e,a + ld c,2 + call $0005 + pop hl + pop de + pop bc + pop af + ret +; +; Include the utility routines +; +#include "util.asm" +; + .end \ No newline at end of file diff --git a/Source/HBIOS/uart.asm b/Source/HBIOS/uart.asm index 4045a6e9..c8e0b9b2 100644 --- a/Source/HBIOS/uart.asm +++ b/Source/HBIOS/uart.asm @@ -55,7 +55,7 @@ UART_AFCACT .EQU 5 ; AUTO FLOW CONTROL ACTIVE BIT ; UARTSBASE .EQU $68 UARTCBASE .EQU $80 -UARTMBASE .EQU $48 +UARTMBASE .EQU $18 UART4BASE .EQU $C0 UARTRBASE .EQU $A0 UARTDBASE .EQU $80 diff --git a/Source/ReadMe.txt b/Source/ReadMe.txt index 701a3da2..a187e8c1 100644 --- a/Source/ReadMe.txt +++ b/Source/ReadMe.txt @@ -296,13 +296,10 @@ For example: In this case, you will not be prompted. This is useful if you wish to automate your build process. -There is a third parameter that you can specify to the BuildROM -command via a command line. If you want to build a 1024K (1MB) ROM, -you can add "1024" to the end of the line, like this: - - C:\RomWBW\Source> BuildROM MK4 cust 1024 - -You must ensure that your system actually supports a 1024K ROM. +In the past, the size of the ROM could be specified as the third +parameter of the command. This parameter is now deprecated and +the size of the ROM is specified in your configuration file +using the ROMSIZE variable. Special Build Commands ---------------------- diff --git a/Source/TastyBasic/src/Build.cmd b/Source/TastyBasic/src/Build.cmd index 11a556be..3045a99a 100644 --- a/Source/TastyBasic/src/Build.cmd +++ b/Source/TastyBasic/src/Build.cmd @@ -13,4 +13,5 @@ set VER=v0.3.0 tasm -80 -g3 -fFF -dROMWBW -d"VERSION \"%VER%\"" tastybasic.asm tastybasic.bin tastybasic.bin.lst tasm -80 -g3 -fFF -dCPM -d"VERSION \"%VER%\"" tastybasic.asm tastybasic.com tastybasic.com.lst -copy /b /v tastybasic.com ..\..\..\Binary\Apps\tbasic.com +copy /b /v tastybasic.com tbasic.com +copy /b /v tbasic.com ..\..\..\Binary\Apps\tbasic.com diff --git a/Source/ver.inc b/Source/ver.inc index 90b2cbf3..5dfe1610 100644 --- a/Source/ver.inc +++ b/Source/ver.inc @@ -2,4 +2,4 @@ #DEFINE RMN 1 #DEFINE RUP 1 #DEFINE RTP 0 -#DEFINE BIOSVER "3.1.1-pre.178" +#DEFINE BIOSVER "3.1.1-pre.180" diff --git a/Source/ver.lib b/Source/ver.lib index 0814c961..78f63bde 100644 --- a/Source/ver.lib +++ b/Source/ver.lib @@ -3,5 +3,5 @@ rmn equ 1 rup equ 1 rtp equ 0 biosver macro - db "3.1.1-pre.178" + db "3.1.1-pre.180" endm diff --git a/Tools/Makefile b/Tools/Makefile new file mode 100644 index 00000000..b6093e4c --- /dev/null +++ b/Tools/Makefile @@ -0,0 +1,11 @@ +# +# build the tools for linux and Darwin +# +UNAME := $(shell uname) + +all: + $(MAKE) --directory unix + +clean: + $(MAKE) --directory unix clean + @rm -rf $(UNAME) diff --git a/Tools/Makefile.inc b/Tools/Makefile.inc index 1a579e50..c6813efa 100644 --- a/Tools/Makefile.inc +++ b/Tools/Makefile.inc @@ -156,13 +156,7 @@ clean:: done clobber:: clean - @if [ "$(DEST)" ] ; then for file in $(OBJECTS) ; do \ - rm -f $$($(CASEFN) $(DEST)/$$file) ; \ - done ; fi - @-rm -f $$($(CASEFN) $(filter-out $(NODELETE),$(OBJECTS))) - @for dir in $(SUBDIRS) ; do \ - $(MAKE) --directory $$dir clobber ; \ - done + # # this is used to verify that the unix and windows tool chains are generating # the same objects @@ -172,7 +166,7 @@ ifneq ($(DIFFTO),) @for dir in $(SUBDIRS) ; do \ ( echo "diff in $(HERE)/$$dir" ; cd "$$dir" ; make diff ) ; \ done - @for i in $(OBJECTS) $(MOREDIFF) ; do \ + @for i in $(filter-out $(NODIFF),$(OBJECTS) $(MOREDIFF)) ; do \ sf=$$($(CASEFN) $$i) ; \ df=$$($(CASEFN) $(DIFFPATH)/$$i) ; \ if [ -f "$$df" -a -f "$$sf" ] ; then \ @@ -193,5 +187,6 @@ ifneq ($(DIFFTO),) done endif + vdiff: make VERBOSEDIFF=2 diff diff --git a/Tools/unix/Makefile b/Tools/unix/Makefile index 571e876d..bdd56c36 100644 --- a/Tools/unix/Makefile +++ b/Tools/unix/Makefile @@ -15,9 +15,5 @@ all: @chmod +x casefn.sh @$(foreach subdir,$(SUBDIRS),$(MAKE) --directory $(subdir) all;) -clobber: - @$(foreach subdir,$(SUBDIRS),$(MAKE) --directory $(subdir) clobber;) - @rm -rf ../$(UNAME) - clean: @$(foreach subdir,$(SUBDIRS),$(MAKE) --directory $(subdir) clean;) \ No newline at end of file diff --git a/Tools/unix/bin2asm/Makefile b/Tools/unix/bin2asm/Makefile index 1ffdbd79..85c956d0 100644 --- a/Tools/unix/bin2asm/Makefile +++ b/Tools/unix/bin2asm/Makefile @@ -18,9 +18,6 @@ $(DEST): clean: rm -f $(OBJ_FILES) $(BINARY) -clobber: clean - rm -f $(DEST)/$(BINARY) $(BINARY) - $(BINARY): $(OBJ_FILES) $(CC) -o $@ $^ $(LIBS) diff --git a/Tools/unix/bst/Makefile b/Tools/unix/bst/Makefile index 2e6c8227..f051f892 100644 --- a/Tools/unix/bst/Makefile +++ b/Tools/unix/bst/Makefile @@ -20,9 +20,4 @@ all: $(DEST) $(DEST): mkdir $(DEST) -clobber: clean - -for i in *.$(SUFFIX) ; do \ - rm $(DEST)/$$(basename $$i .$(SUFFIX)) ; \ - done - clean: diff --git a/Tools/unix/cpmtools/Makefile b/Tools/unix/cpmtools/Makefile index 9c850895..7cc055f8 100644 --- a/Tools/unix/cpmtools/Makefile +++ b/Tools/unix/cpmtools/Makefile @@ -54,8 +54,3 @@ $(DEST): clean: -rm -f *.o $(OBJECTS) - -clobber: clean - -for i in $(OBJECTS) ; do \ - rm -f $(DEST)/$$i ; \ - done diff --git a/Tools/unix/lzsa/Makefile b/Tools/unix/lzsa/Makefile index 9f9cd895..80884198 100644 --- a/Tools/unix/lzsa/Makefile +++ b/Tools/unix/lzsa/Makefile @@ -41,6 +41,3 @@ $(APP): $(OBJS) clean: @rm -rf $(APP) $(OBJDIR) - -clobber: clean - rm -f ../../$(UNAME)/$(APP) diff --git a/Tools/unix/uz80as/Makefile b/Tools/unix/uz80as/Makefile index 164ca7e8..2f5b0ec6 100644 --- a/Tools/unix/uz80as/Makefile +++ b/Tools/unix/uz80as/Makefile @@ -49,9 +49,6 @@ all: uz80as $(DEST) $(DEST): mkdir -p $(DEST) -clobber: clean - -rm -f uz80as $(DEST)/uz80as - clean: -rm -f $(OBJECTS) uz80as diff --git a/Tools/unix/zxcc/Makefile b/Tools/unix/zxcc/Makefile index 70420378..3a5ad1e8 100644 --- a/Tools/unix/zxcc/Makefile +++ b/Tools/unix/zxcc/Makefile @@ -25,9 +25,6 @@ $(DEST): clean: -rm -f $(OBJECTS) config.h zxcc bios.bin -clobber: clean - -rm -f $(DEST)/zxcc $(DEST)/bios.bin zxcc - $(OBJECTS): config.h bios.bin zxcc: $(OBJECTS)