diff --git a/.github/workflows/commit.yml b/.github/workflows/commit.yml index 39efadf0..e2e2af8a 100644 --- a/.github/workflows/commit.yml +++ b/.github/workflows/commit.yml @@ -23,7 +23,7 @@ jobs: export TZ='America/Los_Angeles' sudo apt-get install libncurses-dev sudo apt-get install srecord - make + make dist make clean rm -rf .git* @@ -49,7 +49,7 @@ jobs: run: | export TZ='America/Los_Angeles' brew install srecord - make + make dist make clean rm -rf .git* diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 5e5fbaaf..4a814905 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -26,7 +26,7 @@ jobs: - name: Build run: | sudo apt-get install libncurses-dev - make + make dist make clean rm -rf .git* diff --git a/.gitignore b/.gitignore index ebd567a5..f17a0be4 100644 --- a/.gitignore +++ b/.gitignore @@ -93,9 +93,9 @@ Tools/unix/zx/zx !Source/ZRC/*.bin !Source/ZZR/*.bin !Source/ZZR/*.hex -!Tools/cpm/bin -!Tools/unix/zx -!Tools/zx +!Tools/cpm/bin/* +!Tools/unix/zx/* +!Tools/zx/* Source/ZPM3/gencpm.com Source/ZPM3/startzpm.com diff --git a/Binary/Makefile b/Binary/Makefile index c5a288e1..cdca45ae 100644 --- a/Binary/Makefile +++ b/Binary/Makefile @@ -5,4 +5,4 @@ SUBDIRS = Apps CPM3 ZPM3 include $(TOOLS)/Makefile.inc clobber:: - @rm -f *.bin *.com *.img *.rom *.hex *.pdf *.log *.eeprom *.dat + @rm -f *.bin *.com *.img *.rom *.upd *.hex *.pdf *.log *.eeprom *.dat diff --git a/Build.cmd b/Build.cmd new file mode 100644 index 00000000..2b4a31d1 --- /dev/null +++ b/Build.cmd @@ -0,0 +1,6 @@ +@echo off +setlocal + +pushd Source && call Build %* || exit /b & popd + +pause diff --git a/Clean.cmd b/Clean.cmd new file mode 100644 index 00000000..3c7b25e2 --- /dev/null +++ b/Clean.cmd @@ -0,0 +1,5 @@ +@echo off +setlocal + +pushd Binary && call Clean || exit /b 1 & popd +pushd Source && call Clean || exit /b 1 & popd diff --git a/Doc/ChangeLog.txt b/Doc/ChangeLog.txt index 14adad1e..c45b61e2 100644 --- a/Doc/ChangeLog.txt +++ b/Doc/ChangeLog.txt @@ -45,6 +45,10 @@ Version 3.1.1 - WBW: Added Phil Summers' ROM Updater into ROM Loader - AJL: Added ramtest app (requires SBC and MBC for now) - L?N: Provided SCOPY, XSUB01, and EX applications +- WBW: Added support for MBC FDC to FDU application +- WBW: Added support for MBC FDC to HBIOS +- WBW: Refactored make process +- WBW: Added ROM verification to boot process Version 3.1 ----------- diff --git a/Doc/FDU.txt b/Doc/FDU.txt index 88fd88a3..38adda12 100644 --- a/Doc/FDU.txt +++ b/Doc/FDU.txt @@ -74,10 +74,10 @@ supported: - Zeta 2 - N8 - Mark IV - - RC2014 w/ SMC - - RC2014 w/ WDC + - RC2014 - SmallZ80 - Dyno + - MBC You must be using either a RomWBW or UBA based OS version. @@ -91,6 +91,9 @@ You must have one of the following floppy disk controllers: - N8 SBC onboard FDC - RC2014 Scott Baker SMC-based Floppy Module - RC2014 Scott Baker WDC-based Floppy Module + - SmallZ80 FDC + - Dyno FDC + - MBC FDC Finally, you will need a floppy drive connected via an appropriate cable: @@ -152,12 +155,18 @@ The RC2014 Scott Baker WDC-based floppy module should be jumpered for I/O base address 0x50 (SV1: 11-12), JP1 (/DACK): 1-2, JP2 (TC): 2-3. +The RC2014 FDC by Alan Cox (Etched Pixels) needs to be strapped +for base I/O address 0x48. + SmallZ80 does not have any relevant jumper settings. The hardwired I/O ranges are assumed in the code. Dyno does not have any relevant jumper settings. The hardwired I/O ranges are assumed in the code. +The MBC FDC is expected to be strapped to use neither INT nor NMI. It +is also not expected to use DMA. + Modes of Operation ------------------ @@ -520,4 +529,7 @@ WW 12/12/2020: v5.6 - Updated SmallZ80 support for new I/O map WW 3/24/2021: v5.7 - - Added support for a few single-sided formats \ No newline at end of file + - Added support for a few single-sided formats + +WW 7/26/2021: v5.8 + - Added support for MBC FDC diff --git a/Doc/RomWBW Applications.pdf b/Doc/RomWBW Applications.pdf index 78024561..a576103b 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 32fd994e..567ec86e 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 56db6345..1066b565 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 4c1b6f4a..e78e795b 100644 Binary files a/Doc/RomWBW Getting Started.pdf and b/Doc/RomWBW Getting Started.pdf differ diff --git a/Makefile b/Makefile index 741e5ef7..a9c1abae 100644 --- a/Makefile +++ b/Makefile @@ -16,3 +16,5 @@ clobber: diff: $(MAKE) --directory Source diff +dist: + $(MAKE) ROM_PLATFORM=dist diff --git a/ReadMe.md b/ReadMe.md index 87c3b432..13a209d8 100644 --- a/ReadMe.md +++ b/ReadMe.md @@ -3,7 +3,7 @@ ## Z80/Z180 System Software Version 3.1 Pre-release -Saturday 13 March 2021 +Thursday 22 July 2021 Wayne Warthen @@ -126,6 +126,7 @@ the appropriate ROM image for your hardware. | SC130 | SCZ180\_130.rom | 115200 | Stephen Cousin’s SC130 Z180 | | SC131 | SCZ180\_131.rom | 115200 | Stephen Cousin’s SC131 Z180 | | Dyno | DYNO\_std.rom | 38400 | Steve Garcia’s Z180 Dyno Computer | +| MBC | MBC\_std.rom | 38400 | Andrew Lynch’s Multi Board Computer | \*The RC2014 Z180 requires a separate RAM/ROM memory module. There are two types of these modules and you must pick the ROM for your type of @@ -183,13 +184,15 @@ 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) | +| 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 diff --git a/ReadMe.txt b/ReadMe.txt index 76559f40..48a802d5 100644 --- a/ReadMe.txt +++ b/ReadMe.txt @@ -3,7 +3,7 @@ RomWBW Z80/Z180 System Software Version 3.1 Pre-release -Saturday 13 March 2021 +Thursday 22 July 2021 Wayne Warthen wwarthen@gmail.com @@ -139,6 +139,8 @@ appropriate ROM image for your hardware. SC131 SCZ180_131.rom 115200 Stephen Cousin’s SC131 Z180 Dyno DYNO_std.rom 38400 Steve Garcia’s Z180 Dyno Computer + + MBC MBC_std.rom 38400 Andrew Lynch’s Multi Board Computer ------------------------------------------------------------------------- *The RC2014 Z180 requires a separate RAM/ROM memory module. There are @@ -197,13 +199,15 @@ 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) + 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 diff --git a/Source/Apps/FDU/fdu.asm b/Source/Apps/FDU/fdu.asm index 6941c682..c8c7fc3f 100644 --- a/Source/Apps/FDU/fdu.asm +++ b/Source/Apps/FDU/fdu.asm @@ -48,6 +48,7 @@ ; 2020-04-29: v5.5 ADDED SUPPORT FOR ETCHED PIXELS FDC ; 2020-12-12: v5.6 UPDATED SMALLZ80 TO NEW I/O ADDRESSES ; 2021-03-24: v5.7 ADDED SOME SINGLE-SIDED FORMATS +; 2021-07-26: v5.8 ADDED SUPPORT MBC FDC ; ;_______________________________________________________________________________ ; @@ -83,6 +84,7 @@ FDC_RCWDC .EQU 7 FDC_SMZ80 .EQU 8 FDC_DYNO .EQU 9 FDC_EPFDC .EQU 10 +FDC_MBC .EQU 11 ; ; FDC MODE ; @@ -217,7 +219,7 @@ INIT5: XOR A RET -STR_BANNER .DB "Floppy Disk Utility (FDU) v5.7, 24-Mar-2021$" +STR_BANNER .DB "Floppy Disk Utility (FDU) v5.8, 26-Jul-2021$" STR_BANNER2 .DB "Copyright (C) 2021, Wayne Warthen, GNU GPL v3","$" STR_HBIOS .DB " [HBIOS]$" STR_UBIOS .DB " [UBIOS]$" @@ -289,6 +291,7 @@ FDCTBL: ; LABEL CONFIG DATA .DW STR_SMZ80, CFG_SMZ80 .DW STR_DYNO, CFG_DYNO .DW STR_EPFDC, CFG_EPFDC + .DW STR_MBC, CFG_MBC FDCCNT .EQU ($-FDCTBL)/4 ; FD CONTROLLER COUNT ; ; FDC LABEL STRINGS @@ -304,6 +307,7 @@ STR_RCWDC .TEXT "RC-WDC$" STR_SMZ80 .TEXT "SMZ80$" STR_DYNO .TEXT "DYNO$" STR_EPFDC .TEXT "EPFDC$" +STR_MBC .TEXT "MBC$" ; ; FDC CONFIGURATION BLOCKS ; @@ -436,6 +440,17 @@ CFG_EPFDC: .DB 0FFH ; PSEUDO DMA DATA PORT .DB _PCAT ; MODE= ; +CFG_MBC: + .DB 030H ; FDC MAIN STATUS REGISTER + .DB 031H ; FDC DATA PORT + .DB 0FFH ; DATA INPUT REGISTER + .DB 036H ; DIGITAL OUTPUT REGISTER (WHEN WRITTEN) + .DB 035H ; CONFIGURATION CONTROL REGISTER + .DB 036H ; DACK (WHEN READ) + .DB 037H ; TERMINAL COUNT (W/ DACK) + .DB 0FFH ; NOT USED BY ZETA SBC V2 + .DB _PCAT ; MODE= +; FDCID .DB 0 ; FDC IDENTIFIER (0 INDEXED) FDCBM .DB 0 ; FDC ID BITMAP FDCLBL .DW 0 ; POINTER TO ACTIVE FDC LABEL STRING @@ -455,6 +470,7 @@ FSS_MENU: .TEXT " (I) SmallZ80 Expansion\r\n" .TEXT " (J) Dyno-Card FDC, D1030\r\n" .TEXT " (K) RC2014 EPFDC\r\n" + .TEXT " (L) Multi-Board Computer FDC\r\n" .TEXT " (X) Exit\r\n" .TEXT "=== OPTION ===> $\r\n" ; @@ -1544,6 +1560,7 @@ MD_MAP: .DB %00000001 ; SMZ80 POLL .DB %00000001 ; DYNO POLL .DB %00000001 ; EPFDC POLL + .DB %00000001 ; MBC POLL ; ; MEDIA DESCRIPTION BLOCK ; @@ -2004,7 +2021,7 @@ FM_DRAW0B: ; ZETA, DIO3 LD A,(FST_DOR) AND 00000010B JR FM_DRAW1 -FM_DRAW0C: ; DIDE, N8, ZETA2, RCWDC, SMZ80, DYNO, EPFDC +FM_DRAW0C: ; DIDE, N8, ZETA2, RCWDC, SMZ80, DYNO, EPFDC, MBC LD A,(FST_DOR) AND 11110000B JR FM_DRAW1 @@ -2157,7 +2174,7 @@ FM_MOTOR0B: ; ZETA, DIO3 LD A,(FST_DOR) AND 00000010B JR FM_MOTOR1 -FM_MOTOR0C: ; DIDE, N8, ZETA2, RCWDC, SMZ80, DYNO, EPFDC +FM_MOTOR0C: ; DIDE, N8, ZETA2, RCWDC, SMZ80, DYNO, EPFDC, MBC LD A,(FST_DOR) AND 11110000B JR FM_MOTOR1 @@ -2896,7 +2913,7 @@ FC_INIT1: ; DIO FC_INIT2: ; ZETA, DIO3 LD A,(FCD_DORB) JR FC_INIT5 -FC_INIT3: ; DIDE, N8, ZETA2, RCWDC, SMZ80, DYNO, EPFDC +FC_INIT3: ; DIDE, N8, ZETA2, RCWDC, SMZ80, DYNO, EPFDC, MBC LD A,(FCD_DORC) JR FC_INIT5 FC_INIT4: ; WDSMC @@ -2940,7 +2957,7 @@ FC_RESETFDC1: ; ZETA, DIO3, RCSMC POP AF OUT (C),A JR FC_RESETFDC3 -FC_RESETFDC2: ; DIDE, N8, ZETA2, RCWDC, SMZ80, DYNO, EPFDC +FC_RESETFDC2: ; DIDE, N8, ZETA2, RCWDC, SMZ80, DYNO, EPFDC, MBC LD A,0 OUT (C),A LD A,(FST_DOR) @@ -2967,7 +2984,7 @@ FC_PULSETC: ;RES 0,A ;OUT (C),A ;JR FC_PULSETC2 -;FC_PULSETC1: ; DIDE, N8, ZETA2, RCWDC, SMZ80, DYNO, EPFDC +;FC_PULSETC1: ; DIDE, N8, ZETA2, RCWDC, SMZ80, DYNO, EPFDC, MBC ;LD C,(IY+CFG_TC) ;IN A,(C) ;JR FC_PULSETC2 @@ -2999,7 +3016,7 @@ FC_MOTORON2: ; ZETA, DIO3 LD HL,FST_DOR ; POINT TO FDC_DOR SET 1,(HL) JR FC_MOTORON5 -FC_MOTORON3: ; DIDE, N8, ZETA2, RCWDC, SMZ80, DYNO, EPFDC +FC_MOTORON3: ; DIDE, N8, ZETA2, RCWDC, SMZ80, DYNO, EPFDC, MBC LD HL,FST_DOR ; POINT TO FDC_DOR LD A,(HL) ; START WITH CURRENT DOR AND 11111100B ; GET RID OF ANY ACTIVE DS BITS @@ -3063,7 +3080,7 @@ FC_MOTOROFF2: ; ZETA, DIO3 LD HL,FST_DOR ; POINT TO FDC_DOR RES 1,(HL) JR FC_MOTOROFF5 -FC_MOTOROFF3: ; DIDE, N8, ZETA2, RCWDC, SMZ80, DYNO, EPFDC +FC_MOTOROFF3: ; DIDE, N8, ZETA2, RCWDC, SMZ80, DYNO, EPFDC, MBC LD HL,FST_DOR ; POINT TO FDC_DOR LD A,DORC_INIT LD (HL),A @@ -3933,7 +3950,7 @@ DORB_BR500 .EQU 10100000B ; 500KBPS ; DORB_INIT .EQU DORB_BR250 ; -; *** DIDE/N8/ZETA2/RCWDC/SMZ80/DYNO/EPFDC *** +; *** DIDE/N8/ZETA2/RCWDC/SMZ80/DYNO/EPFDC/MBC *** ; DORC_INIT .EQU 00001100B ; SOFT RESET INACTIVE, DMA ENABLED ; diff --git a/Source/Apps/FDU/fdu.txt b/Source/Apps/FDU/fdu.txt index 88fd88a3..38adda12 100644 --- a/Source/Apps/FDU/fdu.txt +++ b/Source/Apps/FDU/fdu.txt @@ -74,10 +74,10 @@ supported: - Zeta 2 - N8 - Mark IV - - RC2014 w/ SMC - - RC2014 w/ WDC + - RC2014 - SmallZ80 - Dyno + - MBC You must be using either a RomWBW or UBA based OS version. @@ -91,6 +91,9 @@ You must have one of the following floppy disk controllers: - N8 SBC onboard FDC - RC2014 Scott Baker SMC-based Floppy Module - RC2014 Scott Baker WDC-based Floppy Module + - SmallZ80 FDC + - Dyno FDC + - MBC FDC Finally, you will need a floppy drive connected via an appropriate cable: @@ -152,12 +155,18 @@ The RC2014 Scott Baker WDC-based floppy module should be jumpered for I/O base address 0x50 (SV1: 11-12), JP1 (/DACK): 1-2, JP2 (TC): 2-3. +The RC2014 FDC by Alan Cox (Etched Pixels) needs to be strapped +for base I/O address 0x48. + SmallZ80 does not have any relevant jumper settings. The hardwired I/O ranges are assumed in the code. Dyno does not have any relevant jumper settings. The hardwired I/O ranges are assumed in the code. +The MBC FDC is expected to be strapped to use neither INT nor NMI. It +is also not expected to use DMA. + Modes of Operation ------------------ @@ -520,4 +529,7 @@ WW 12/12/2020: v5.6 - Updated SmallZ80 support for new I/O map WW 3/24/2021: v5.7 - - Added support for a few single-sided formats \ No newline at end of file + - Added support for a few single-sided formats + +WW 7/26/2021: v5.8 + - Added support for MBC FDC diff --git a/Source/Apps/I2C/Makefile b/Source/Apps/I2C/Makefile index e205dc82..a6715214 100644 --- a/Source/Apps/I2C/Makefile +++ b/Source/Apps/I2C/Makefile @@ -2,20 +2,7 @@ OBJECTS = i2cscan.com rtcds7.com i2clcd.com DEST = ../../../Binary/Apps TOOLS = ../../../Tools -include $(TOOLS)/Makefile.inc - -DEPS1 := i2cscan.asm $(shell find . -name '*.inc') -DEPS2 := rtcds7.asm $(shell find . -name '*.inc') -DEPS3 := i2clcd.asm $(shell find . -name '*.inc') - - -i2cscan.com: $(DEPS1) - $(TASM) -dWBW i2cscan.asm i2cscan.com i2cscan.lst - -rtcds7.com: $(DEPS2) - $(TASM) -dWBW rtcds7.asm rtcds7.com rtcds7.lst - -i2clcd.com: $(DEPS3) - $(TASM) -dWBW i2clcd.asm i2clcd.com i2clcd.lst - +USETASM=1 +TASMFLAGS=-dWBW +include $(TOOLS)/Makefile.inc diff --git a/Source/Apps/Makefile b/Source/Apps/Makefile index cbcd6675..7f87a2d0 100644 --- a/Source/Apps/Makefile +++ b/Source/Apps/Makefile @@ -10,5 +10,5 @@ include $(TOOLS)/Makefile.inc USETASM = 1 -survey.com: USETASM=0 +survey.com: USETASM = 0 diff --git a/Source/Apps/ramtest/Makefile b/Source/Apps/ramtest/Makefile index f99ee0bc..7e910bca 100644 --- a/Source/Apps/ramtest/Makefile +++ b/Source/Apps/ramtest/Makefile @@ -6,5 +6,5 @@ OTHERS = loader.bin dbgmon.bin include $(TOOLS)/Makefile.inc ramtest.com: loader.bin dbgmon.bin - cat loader.bin dbgmon.bin >ramtest.com + cat $^ >$@ diff --git a/Source/BPBIOS/@WBW Issues.txt b/Source/BPBIOS/@WBW Issues.txt index f7d12f4c..98021418 100644 --- a/Source/BPBIOS/@WBW Issues.txt +++ b/Source/BPBIOS/@WBW Issues.txt @@ -1,8 +1,33 @@ -Loader uses CBIOS Disk I/O prior to CBOOT/WBOOT being run. As a -result, DIOBUF is not properly initialized. At present, it is -initialized to $7C00 which will work unless the location of the -physical disk buffer in HBIOS ever changes! - +In general, the BPBIOS for RomWBW is incomplete. This is +mostly just a proof of concept that it can work. As such, +it is not built or included in the default builds of +RomWBW. You *must* review and adjust the file romwbw.lib +before building BPBIOS. To include BPBIOS in the build +process, you need to uncomment the corresponding line +in the Build.cmd file in the Source directory. + +For now, BPBIOS does not understand the dynamic disk assignment +mechanism of RomWBW. This means that you need to explicitly +tell BPBIOS the console unit number and the disk unit number of +the first hard disk device. Floppy drives are basically not +supported. You should review and adjust the romwbw.lib file +as needed. The RomWBW ASSIGN command is not supported. BPBIOS +will boot from the first hard disk unit number you assign and +always from the first slice. + +As documented in "@WBW Z3ENV.txt", there are two general +configurations of BPBIOS for RomWBW. I strongly recomment +using the T configurations (external HBIOS proxy). This is +the long term direction for BPBIOS on RomWBW. The N +configurations (internal HBIOS proxy) will not work with +interrrupts of any kind. This means that to use the N +configurations, you *must* use a RomWBW ROM built with +interrupts disabled or chaos will ensue. + +BPBIOS does not yet understand the 1024 directory entry +hard disk format. You must use the 512 directory entry +format images. + The clock drivers supplied with BPBIOS (LDDS, LDP2D, and LDNZT) load into ZSYS user memory. If the user segment is not at the same location as the original BPBIOS ($E900), then the clock @@ -11,5 +36,3 @@ is OK because it does not relocate the user segment, but the T config fails because it uses a user segment at $E700. Note that this does not affect ZSDOS2 variants because they do not require a loadable clock driver. - -BPBIOS needs to assign disk units dynamically via discovery of disk type diff --git a/Source/BPBIOS/romwbw-mk4.lib b/Source/BPBIOS/romwbw-mk4.lib index e4dcf70f..bf3ba2b3 100644 --- a/Source/BPBIOS/romwbw-mk4.lib +++ b/Source/BPBIOS/romwbw-mk4.lib @@ -28,7 +28,7 @@ HBCLK EQU YES ; HBIOS clock driver ; HB_IODEV EQU 0 ; Assume we want to use first HBIOS serial device ; -; Set HB_HDDEV to appropriate hard disk driver +; Set HB_HDDEV to the first (boot) hard disk device unit number ; HB_HDDEV EQU 2 ; Assumes disk device #2 is first hard disk device ; diff --git a/Source/BPBIOS/romwbw-sim.lib b/Source/BPBIOS/romwbw-sim.lib index d666295f..4ac87cd5 100644 --- a/Source/BPBIOS/romwbw-sim.lib +++ b/Source/BPBIOS/romwbw-sim.lib @@ -28,7 +28,7 @@ HBCLK EQU YES ; HBIOS clock driver ; HB_IODEV EQU 0 ; Assume we want to use first HBIOS serial device ; -; Set HB_HDDEV to appropriate hard disk driver +; Set HB_HDDEV to the first (boot) hard disk device unit number ; HB_HDDEV EQU 2 ; Assumes disk device #2 is first hard disk device ; diff --git a/Source/BPBIOS/romwbw.lib b/Source/BPBIOS/romwbw.lib index d666295f..4ac87cd5 100644 --- a/Source/BPBIOS/romwbw.lib +++ b/Source/BPBIOS/romwbw.lib @@ -28,7 +28,7 @@ HBCLK EQU YES ; HBIOS clock driver ; HB_IODEV EQU 0 ; Assume we want to use first HBIOS serial device ; -; Set HB_HDDEV to appropriate hard disk driver +; Set HB_HDDEV to the first (boot) hard disk device unit number ; HB_HDDEV EQU 2 ; Assumes disk device #2 is first hard disk device ; diff --git a/Source/Build.cmd b/Source/Build.cmd index e5ab6856..82506681 100644 --- a/Source/Build.cmd +++ b/Source/Build.cmd @@ -1,11 +1,15 @@ @echo off setlocal -REM call BuildDoc || exit /b +:: call BuildDoc || exit /b call BuildProp || exit /b call BuildShared || exit /b -REM call BuildBP || exit /b +:: call BuildBP || exit /b call BuildImages || exit /b call BuildROM %* || exit /b call BuildZRC || exit /b -call BuildZZR || exit /b \ No newline at end of file +call BuildZZR || exit /b + +if "%1" == "dist" ( + call Clean || exit /b +) \ No newline at end of file diff --git a/Source/Fonts/Makefile b/Source/Fonts/Makefile index c9a06b35..0a3ddf78 100644 --- a/Source/Fonts/Makefile +++ b/Source/Fonts/Makefile @@ -4,7 +4,6 @@ OBJECTS = \ OTHERS = font8x8c.bin font8x11c.bin font8x16c.bin -DEST = ../HBIOS TOOLS = ../../Tools include $(TOOLS)/Makefile.inc diff --git a/Source/Forth/Makefile b/Source/Forth/Makefile index 51fbdee2..be6e1607 100644 --- a/Source/Forth/Makefile +++ b/Source/Forth/Makefile @@ -1,6 +1,5 @@ OBJECTS = camel80.bin TOOLS = ../../Tools OTHERS = *.rel -DEST = ../HBIOS include $(TOOLS)/Makefile.inc diff --git a/Source/HBIOS/Build.cmd b/Source/HBIOS/Build.cmd index f6639106..e0c3985e 100644 --- a/Source/HBIOS/Build.cmd +++ b/Source/HBIOS/Build.cmd @@ -1,6 +1,8 @@ @echo off setlocal +if "%1" == "dist" goto :dist + :: :: Build [ [ [ []]]] :: @@ -15,19 +17,46 @@ set ZXBINDIR=%TOOLS%/cpm/bin/ set ZXLIBDIR=%TOOLS%/cpm/lib/ set ZXINCDIR=%TOOLS%/cpm/include/ +:: +:: This PowerShell script validates the build variables passed in. If +:: necessary, the user is prmopted to pick the variables. It then creates +:: an include file that is imbedded in the HBIOS assembly (build.inc). +:: It also creates a batch command file that sets environment variables +:: for use by the remainder of this batch file (build_env.cmd). +:: + 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. +:: + call build_env.cmd +:: +:: Start of the actual build process for a given ROM. +:: + echo Building %ROMSize%K ROM %ROMName% for Z%CPUType% CPU... +:: +:: UNA is a special case, check for it and jump if needed. +:: + if %Platform%==UNA goto :UNA +:: +:: Bring the previously build font files into this directory +:: + 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 @@ -35,6 +64,7 @@ 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 @@ -46,27 +76,50 @@ call :asm updater call :asm imgpad2 :: -:: Create ROM bank images by assembling components +:: Create additional ROM bank images by assembling components into +:: 32K chunks which can be concatenated later. Note that +:: osimg_small is a special case because it is 20K in size. This +:: image is subsequently used to generate the .com loadable file. :: 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 +copy /b romldr.bin + dbgmon.bin + ..\zsdos\zsys_wbw.bin osimg_small.bin || exit /b + :: -:: Create final ROM images +:: Inject one byte checksum at the last byte of all 4 ROM bank image files. +:: This means that computing a checksum over any of the 32K osimg banks +:: should yield a result of zero. :: -set RomDiskDat= -if %ROMSize% GTR 128 set RomDiskDat=..\RomDsk\rom%ROMSize%_wbw.dat +for %%f in (hbios_rom.bin osimg.bin osimg1.bin osimg2.bin) do ( + "%TOOLS%\srecord\srec_cat.exe" %%f -Binary -Crop 0 0x7FFF -checksum-neg-b-e 0x7FFF 1 1 -o %%f -Binary +) + +:: +:: Create final images (.rom, .upd, & .com) +:: The previously created bank images are concatenated as needed. +:: +:: The .rom image is made up of 4 banks followed by the ROM Disk. This +:: is for programming onto a ROM. +:: +:: The .upd image is the same as above, but without the the ROM Disk. +:: This is so you can update just the code portion of your ROM without +:: updating the ROM Disk contents. +:: +:: The .com image is a scaled down version of the ROM that you can run +:: as a standard application under an OS and it will replace your +:: HBIOS on the fly for testing purposes. +:: 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 results to output directory :: copy %ROMName%.rom ..\..\Binary || exit /b @@ -81,23 +134,74 @@ goto :eof :UNA +:: +:: This process is basically equivalent to the one above, but tailored +:: for the UNA BIOS. +:: + +:: Build ROM components required by UNA call :asm dbgmon call :asm romldr +:: Create the OS bank copy /b romldr.bin + dbgmon.bin + ..\zsdos\zsys_una.bin + ..\cpm22\cpm_una.bin osimg.bin || exit /b +:: Copy OS Bank and ROM Disk image files to output 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 +:: Create the final ROM image copy /b ..\UBIOS\UNA-BIOS.BIN + osimg.bin + ..\UBIOS\FSFAT.BIN + ..\RomDsk\rom%ROMSize%_una.dat %ROMName%.rom || exit /b +:: Copy to output copy %ROMName%.rom ..\..\Binary || exit /b goto :eof +:: +:: Simple procedure to assemble a specified component via TASM. +:: + :asm + echo. echo Building %1... tasm -t80 -g3 -fFF %1.asm %1.bin %1.lst || exit /b + goto :eof +:: +:: Build all of the official distribution ROMs +:: + +: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 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 + +goto :eof diff --git a/Source/HBIOS/Build.sh b/Source/HBIOS/Build.sh index 65f6b205..3ced548c 100755 --- a/Source/HBIOS/Build.sh +++ b/Source/HBIOS/Build.sh @@ -3,166 +3,102 @@ # fail on any error set -e -CPMCP=../../Tools/`uname`/cpmcp -CPMCH=../../Tools/`uname`/cpmchattr - -timestamp=$(date +%Y-%m-%d) -#timestamp="2020-02-24" - -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 +export ROM_PLATFORM +export ROM_CONFIG +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="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 + exit fi -# positional arguments -platform=$1 -config=$2 -romsize=$3 -romname=$4 - -export platform +###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)) -while ! echo ${platforms[@]} | grep -q -w -s "$platform" ; do +while ! echo ${platforms[@]} | grep -q -w -s "${ROM_PLATFORM}" ; do echo -n "Enter platform [" ${platforms[@]} "] :" - read platform + read ROM_PLATFORM done -configs=$(find Config -name ${platform}_\* -print | \ - sed -e 's,Config/,,' -e "s/${platform}_//" -e "s/.asm//") -while ! echo ${configs[@]} | grep -s -w -q "$config" ; do +configs=$(find Config -name ${ROM_PLATFORM}_\* -print | \ + sed -e 's,Config/,,' -e "s/${ROM_PLATFORM}_//" -e "s/.asm//") +while ! echo ${configs[@]} | grep -s -w -q "${ROM_CONFIG}" ; do echo -n "Enter config for $platform [" ${configs[@]} "] :" - read config + read ROM_CONFIG done -configfile=Config/${platform}_${config}.asm -while [ ! '(' "$romsize" = 1024 -o "$romsize" = 512 -o "$romsize" = 256 -o "$romsize" = 128 ')' ] ; do +CONFIGFILE=Config/${ROM_PLATFORM}_${ROM_CONFIG}.asm + +while [ ! '(' "${ROMSIZE}" = 1024 -o "${ROMSIZE}" = 512 -o "${ROMSIZE}" = 256 -o "${ROMSIZE}" = 128 ')' ] ; do echo -n "Romsize :" - read romsize + read ROMSIZE done -if [ -z "$romname" ] ; then - romname=${platform}_${config} -fi -echo Building for $romname for $platform $config $romsize - -if [ $platform == UNA ] ; then - BIOS=una -else - BIOS=wbw +if [ -z "${ROMNAME}" ] ; then + ROMNAME=${ROM_PLATFORM}_${ROM_CONFIG} fi -Apps=(assign mode rtc syscopy xm) -if [ $romsize -gt 256 ] ; then - Apps+=(fdu format survey sysgen talk timer inttest) -fi +TIMESTAMP=$(date +%Y-%m-%d) -blankfile=Blank${romsize}KB.dat -romdiskfile=RomDisk.tmp -romfmt=wbw_rom${romsize} -outdir=../../Binary +CONFIGFILE=Config/${ROM_PLATFORM}_${ROM_CONFIG}.asm -echo "creating empty rom disk of size $romsize in $blankfile" -#LANG=en_US.US-ASCII tr '\000' '\345' /dev/null -#LC_CTYPE=en_US.US-ASCII tr '\000' '\345' /dev/null -LC_ALL=en_US.US-ASCII tr '\000' '\345' build.inc -; RomWBW Configured for $platform $config $timestamp +; RomWBW Configured for ${ROM_PLATFORM} ${ROM_CONFIG} ${TIMESTAMP} ; -#DEFINE TIMESTAMP "$timestamp" +#DEFINE TIMESTAMP "${TIMESTAMP}" ; -ROMSIZE .EQU $romsize +ROMSIZE .EQU ${ROMSIZE} ; -#INCLUDE "$configfile" +#INCLUDE "${CONFIGFILE}" ; EOF -echo "checking prerequisites" -for need in ../CPM22/cpm_$BIOS.bin ../ZSDOS/zsys_$BIOS.bin \ - ../Forth/camel80.bin font8x11c.asm font8x11u.asm font8x16c.asm \ - font8x16u.asm font8x8c.asm font8x8u.asm ; do - if [ ! -f $need ] ; then - echo $need missing - exit 2 - fi -done - -cp ../Forth/camel80.bin . - -make dbgmon.bin romldr.bin imgpad2.bin - -if [ $platform != UNA ] ; then - make nascom.bin tastybasic.bin game.bin eastaegg.bin updater.bin usrrom.bin imgpad2.bin - make hbios_rom.bin hbios_app.bin hbios_img.bin +export OBJECTS +OBJECTS="${ROMNAME}.rom" +if [ "${ROM_PLATFORM}" != "UNA" ] ; then + OBJECTS+=" ${ROMNAME}.com ${ROMNAME}.upd" fi -echo "Building $romname output files..." - -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 [ $platform != UNA ] ; then - cat camel80.bin nascom.bin tastybasic.bin game.bin eastaegg.bin netboot.mod updater.bin usrrom.bin >osimg1.bin - cat imgpad2.bin >osimg2.bin -fi +#echo OBJECTS=${OBJECTS} -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 " " $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: - 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 - -if [ $platform = UNA ] ; then - cp osimg.bin $outdir/UNA_WBW_SYS.bin - cp $romdiskfile $outdir/UNA_WBW_ROM$romsize.bin - cat ../UBIOS/UNA-BIOS.BIN osimg.bin ../UBIOS/FSFAT.BIN $romdiskfile >$romname.rom -else - cat hbios_rom.bin osimg.bin osimg1.bin osimg2.bin $romdiskfile >$romname.rom - cat hbios_rom.bin osimg.bin osimg1.bin osimg2.bin >$romname.upd - cat hbios_app.bin osimg_small.bin > $romname.com -fi +make ROM_PLATFORM=${ROM_PLATFORM} ROM_CONFIG=${ROM_CONFIG} ROMSIZE=${ROMSIZE} diff --git a/Source/HBIOS/Config/MBC_std.asm b/Source/HBIOS/Config/MBC_std.asm index a8c21dcd..ef9ca19a 100644 --- a/Source/HBIOS/Config/MBC_std.asm +++ b/Source/HBIOS/Config/MBC_std.asm @@ -29,6 +29,8 @@ ; BATCOND .SET FALSE ; +FDENABLE .SET TRUE ; FD: ENABLE FLOPPY DISK DRIVER (FD.ASM) +; PPIDEENABLE .SET TRUE ; PPIDE: ENABLE PARALLEL PORT IDE DISK DRIVER (PPIDE.ASM) ; DSKYENABLE .SET FALSE ; ENABLES DSKY diff --git a/Source/HBIOS/Makefile b/Source/HBIOS/Makefile index a6edb1b0..11edb245 100644 --- a/Source/HBIOS/Makefile +++ b/Source/HBIOS/Makefile @@ -1,38 +1,3 @@ -ifndef ROM_CONFIG - ROM_CONFIG=std -endif - -ifdef ROM_PLATFORM - OBJECTS = ${ROM_PLATFORM}_${ROM_CONFIG}.rom ${ROM_PLATFORM}_${ROM_CONFIG}.com ${ROM_PLATFORM}_${ROM_CONFIG}.upd -else - OBJECTS += DYNO_std.rom DYNO_std.com DYNO_std.upd - OBJECTS += EZZ80_std.rom EZZ80_std.com EZZ80_std.upd - OBJECTS += EZZ80_tz80.rom EZZ80_tz80.com EZZ80_tz80.upd - OBJECTS += MK4_std.rom MK4_std.com MK4_std.upd - OBJECTS += N8_std.rom N8_std.com N8_std.upd - OBJECTS += RCZ180_ext.rom RCZ180_ext.com RCZ180_ext.upd - OBJECTS += RCZ180_nat.rom RCZ180_nat.com RCZ180_nat.upd - OBJECTS += RCZ280_ext.rom RCZ280_ext.com RCZ280_ext.upd - OBJECTS += RCZ280_nat.rom RCZ280_nat.com RCZ280_nat.upd - OBJECTS += RCZ280_nat_zz.rom RCZ280_nat_zz.com RCZ280_nat_zz.upd - OBJECTS += RCZ280_nat_zzr.rom RCZ280_nat_zzr.com RCZ280_nat_zzr.upd - OBJECTS += RCZ80_kio.rom RCZ80_kio.com RCZ80_kio.upd - OBJECTS += RCZ80_mt.rom RCZ80_mt.com RCZ80_mt.upd - OBJECTS += RCZ80_duart.rom RCZ80_duart.com RCZ80_duart.upd - OBJECTS += RCZ80_std.rom RCZ80_std.com RCZ80_std.upd - OBJECTS += RCZ80_skz.rom RCZ80_skz.com RCZ80_skz.upd - OBJECTS += RCZ80_zrc.rom RCZ80_zrc.com RCZ80_zrc.upd - OBJECTS += SBC_std.rom SBC_std.com SBC_std.upd - OBJECTS += SBC_simh.rom SBC_simh.com SBC_simh.upd - OBJECTS += MBC_std.rom MBC_std.com MBC_std.upd - OBJECTS += SCZ180_126.rom SCZ180_126.com SCZ180_126.upd - OBJECTS += SCZ180_130.rom SCZ180_130.com SCZ180_130.upd - OBJECTS += SCZ180_131.rom SCZ180_131.com SCZ180_131.upd - OBJECTS += SCZ180_140.rom SCZ180_140.com SCZ180_140.upd - OBJECTS += UNA_std.rom - OBJECTS += ZETA_std.rom ZETA_std.com ZETA_std.upd - OBJECTS += ZETA2_std.rom ZETA2_std.com ZETA2_std.upd -endif MOREDIFF = camel80.bin game.bin hbios_rom.bin nascom.bin prefix.bin usrrom.bin \ dbgmon.bin hbios_app.bin imgpad2.bin osimg1.bin osimg2.bin romldr.bin \ @@ -42,14 +7,16 @@ MOREDIFF = camel80.bin game.bin hbios_rom.bin nascom.bin prefix.bin usrrom.bin \ SUBDIRS = DEST = ../../Binary TOOLS =../../Tools -OTHERS = *.img *.rom *.com *.bin *.z80 cpm.sys zsys.sys Build.inc RomDisk.tmp font*.asm *.dat +OTHERS = *.img *.rom *.com *.upd *.bin *.z80 cpm.sys zsys.sys Build.inc font*.asm *.dat include $(TOOLS)/Makefile.inc -ifneq ($(findstring $(platform), N8 MK4 RCZ180 SCZ180 DYNO),) +FONTS := font8x11c.asm font8x11u.asm font8x16c.asm font8x16u.asm font8x8c.asm font8x8u.asm + +ifneq ($(findstring $(ROM_PLATFORM), N8 MK4 RCZ180 SCZ180 DYNO),) TASM=$(BINDIR)/uz80as -t hd64180 endif -ifneq ($(findstring $(platform), RCZ280),) +ifneq ($(findstring $(ROM_PLATFORM), RCZ280),) TASM=$(BINDIR)/uz80as -t z280 endif @@ -59,22 +26,65 @@ endif DIFFPATH = $(DIFFTO)/Binary -ROMSIZE=512 +DEPS=prereq dbgmon.bin romldr.bin nascom.bin tastybasic.bin game.bin eastaegg.bin updater.bin usrrom.bin imgpad2.bin + +ifeq ($(ROM_PLATFORM),UNA) + ROMDEPS=romldr.bin dbgmon.bin + BIOS=una +else + ROMDEPS=hbios_rom.bin hbios_app.bin hbios_img.bin + BIOS=wbw +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)) + +all:: + if [ -z "$(OBJECTS)" ] ; then \ + chmod +x Build.sh ; \ + bash Build.sh ; \ + fi + +$(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 \ + cat camel80.bin nascom.bin tastybasic.bin game.bin eastaegg.bin netboot.mod updater.bin usrrom.bin >osimg1.bin ; \ + cat imgpad2.bin >osimg2.bin ; \ + for f in hbios_rom.bin osimg.bin osimg1.bin osimg2.bin ; do \ + srec_cat $$f -Binary -Crop 0 0x7FFF -checksum-neg-b-e 0x7FFF 1 1 -o $$f -Binary ; \ + done \ + fi + if [ $(ROM_PLATFORM) = UNA ] ; then \ + cp osimg.bin $(DEST)/UNA_WBW_SYS.bin ; \ + cp ../RomDsk/rom$(ROMSIZE)_una.dat $(DEST)/UNA_WBW_ROM$(ROMSIZE).bin ; \ + cat ../UBIOS/UNA-BIOS.BIN osimg.bin ../UBIOS/FSFAT.BIN ../RomDsk/rom$(ROMSIZE)_una.dat >$(ROMNAME).rom ; \ + else \ + cat hbios_rom.bin osimg.bin osimg1.bin osimg2.bin ../RomDsk/rom$(ROMSIZE)_wbw.dat >$(ROMNAME).rom ; \ + cat hbios_rom.bin osimg.bin osimg1.bin osimg2.bin >$(ROMNAME).upd ; \ + cat hbios_app.bin osimg_small.bin > $(ROMNAME).com ; \ + fi -N8_std.rom: ROMSIZE=512 -RCZ280_nat_zzr.rom: ROMSIZE=256 +prereq: $(FONTS) camel80.bin -%.rom: - chmod +x Build.sh - bash Build.sh $(DIFFBUILD) $(shell echo $* | sed 's/_/ /') $(ROMSIZE) +font%.asm: + cp ../Fonts/$@ . -hbios_rom.bin: hbios.asm build.inc +camel80.bin: + cp ../Forth/$@ . + +hbios_rom.bin: hbios.asm build.inc $(DEPS) $(TASM) -dROMBOOT hbios.asm hbios_rom.bin hbios_rom.lst -hbios_app.bin: hbios.asm build.inc +hbios_app.bin: hbios.asm build.inc $(DEPS) $(TASM) -dAPPBOOT hbios.asm hbios_app.bin hbios_app.lst -hbios_img.bin: hbios.asm build.inc +hbios_img.bin: hbios.asm build.inc $(DEPS) $(TASM) -dIMGBOOT hbios.asm hbios_img.bin hbios_img.lst romldr.bin: build.inc diff --git a/Source/HBIOS/cfg_dyno.asm b/Source/HBIOS/cfg_dyno.asm index c83fa6a7..d848cf7b 100644 --- a/Source/HBIOS/cfg_dyno.asm +++ b/Source/HBIOS/cfg_dyno.asm @@ -124,7 +124,7 @@ MDTRACE .EQU 1 ; MD: TRACE LEVEL (0=NO,1=ERRORS,2=ALL) MDFFENABLE .EQU FALSE ; MD: ENABLE FLASH FILE SYSTEM ; FDENABLE .EQU FALSE ; FD: ENABLE FLOPPY DISK DRIVER (FD.ASM) -FDMODE .EQU FDMODE_DYNO ; FD: DRIVER MODE: FDMODE_[DIO|ZETA|ZETA2|DIDE|N8|DIO3|RCSMC|RCWDC|DYNO|EPWDC] +FDMODE .EQU FDMODE_DYNO ; FD: DRIVER MODE: FDMODE_[DIO|ZETA|ZETA2|DIDE|N8|DIO3|RCSMC|RCWDC|DYNO|EPFDC|MBC] FDCNT .EQU 2 ; FD: NUMBER OF FLOPPY DRIVES ON THE INTERFACE (1-2) FDTRACE .EQU 1 ; FD: TRACE LEVEL (0=NO,1=FATAL,2=ERRORS,3=ALL) FDMEDIA .EQU FDM144 ; FD: DEFAULT MEDIA FORMAT FDM[720|144|360|120|111] diff --git a/Source/HBIOS/cfg_ezz80.asm b/Source/HBIOS/cfg_ezz80.asm index c858c2c7..96d55c21 100644 --- a/Source/HBIOS/cfg_ezz80.asm +++ b/Source/HBIOS/cfg_ezz80.asm @@ -155,7 +155,7 @@ MDTRACE .EQU 1 ; MD: TRACE LEVEL (0=NO,1=ERRORS,2=ALL) MDFFENABLE .EQU FALSE ; MD: ENABLE FLASH FILE SYSTEM ; FDENABLE .EQU FALSE ; FD: ENABLE FLOPPY DISK DRIVER (FD.ASM) -FDMODE .EQU FDMODE_RCWDC ; FD: DRIVER MODE: FDMODE_[DIO|ZETA|ZETA2|DIDE|N8|DIO3|RCSMC|RCWDC|DYNO|EPWDC] +FDMODE .EQU FDMODE_RCWDC ; FD: DRIVER MODE: FDMODE_[DIO|ZETA|ZETA2|DIDE|N8|DIO3|RCSMC|RCWDC|DYNO|EPFDC|MBC] FDCNT .EQU 2 ; FD: NUMBER OF FLOPPY DRIVES ON THE INTERFACE (1-2) FDTRACE .EQU 1 ; FD: TRACE LEVEL (0=NO,1=FATAL,2=ERRORS,3=ALL) FDMEDIA .EQU FDM144 ; FD: DEFAULT MEDIA FORMAT FDM[720|144|360|120|111] diff --git a/Source/HBIOS/cfg_master.asm b/Source/HBIOS/cfg_master.asm index 4a198c10..18497330 100644 --- a/Source/HBIOS/cfg_master.asm +++ b/Source/HBIOS/cfg_master.asm @@ -211,7 +211,7 @@ MDTRACE .EQU 1 ; MD: TRACE LEVEL (0=NO,1=ERRORS,2=ALL) MDFFENABLE .EQU FALSE ; MD: ENABLE FLASH FILE SYSTEM ; FDENABLE .EQU FALSE ; FD: ENABLE FLOPPY DISK DRIVER (FD.ASM) -FDMODE .EQU FDMODE_NONE ; FD: DRIVER MODE: FDMODE_[DIO|ZETA|ZETA2|DIDE|N8|DIO3|RCSMC|RCWDC|DYNO|EPWDC] +FDMODE .EQU FDMODE_NONE ; FD: DRIVER MODE: FDMODE_[DIO|ZETA|ZETA2|DIDE|N8|DIO3|RCSMC|RCWDC|DYNO|EPFDC|MBC] FDCNT .EQU 2 ; FD: NUMBER OF FLOPPY DRIVES ON THE INTERFACE (1-2) FDTRACE .EQU 1 ; FD: TRACE LEVEL (0=NO,1=FATAL,2=ERRORS,3=ALL) FDMEDIA .EQU FDM144 ; FD: DEFAULT MEDIA FORMAT FDM[720|144|360|120|111] diff --git a/Source/HBIOS/cfg_mbc.asm b/Source/HBIOS/cfg_mbc.asm index ac0c488c..d74e37d7 100644 --- a/Source/HBIOS/cfg_mbc.asm +++ b/Source/HBIOS/cfg_mbc.asm @@ -148,7 +148,7 @@ MDFFENABLE .EQU FALSE ; MD: ENABLE FLASH FILE SYSTEM ; ; FDENABLE .EQU FALSE ; FD: ENABLE FLOPPY DISK DRIVER (FD.ASM) -FDMODE .EQU FDMODE_DIO3 ; FD: DRIVER MODE: FDMODE_[DIO|ZETA|ZETA2|DIDE|N8|DIO3|RCSMC|RCWDC|DYNO|EPWDC] +FDMODE .EQU FDMODE_MBC ; FD: DRIVER MODE: FDMODE_[DIO|ZETA|ZETA2|DIDE|N8|DIO3|RCSMC|RCWDC|DYNO|EPFDC|MBC] FDCNT .EQU 2 ; FD: NUMBER OF FLOPPY DRIVES ON THE INTERFACE (1-2) FDTRACE .EQU 1 ; FD: TRACE LEVEL (0=NO,1=FATAL,2=ERRORS,3=ALL) FDMEDIA .EQU FDM144 ; FD: DEFAULT MEDIA FORMAT FDM[720|144|360|120|111] diff --git a/Source/HBIOS/cfg_mk4.asm b/Source/HBIOS/cfg_mk4.asm index 726c33b9..c36bfd21 100644 --- a/Source/HBIOS/cfg_mk4.asm +++ b/Source/HBIOS/cfg_mk4.asm @@ -146,7 +146,7 @@ MDTRACE .EQU 1 ; MD: TRACE LEVEL (0=NO,1=ERRORS,2=ALL) MDFFENABLE .EQU FALSE ; MD: ENABLE FLASH FILE SYSTEM ; FDENABLE .EQU FALSE ; FD: ENABLE FLOPPY DISK DRIVER (FD.ASM) -FDMODE .EQU FDMODE_DIDE ; FD: DRIVER MODE: FDMODE_[DIO|ZETA|ZETA2|DIDE|N8|DIO3|RCSMC|RCWDC|DYNO|EPWDC] +FDMODE .EQU FDMODE_DIDE ; FD: DRIVER MODE: FDMODE_[DIO|ZETA|ZETA2|DIDE|N8|DIO3|RCSMC|RCWDC|DYNO|EPFDC|MBC] FDCNT .EQU 2 ; FD: NUMBER OF FLOPPY DRIVES ON THE INTERFACE (1-2) FDTRACE .EQU 1 ; FD: TRACE LEVEL (0=NO,1=FATAL,2=ERRORS,3=ALL) FDMEDIA .EQU FDM144 ; FD: DEFAULT MEDIA FORMAT FDM[720|144|360|120|111] @@ -227,7 +227,7 @@ SN7CLK .EQU CPUOSC / 4 ; DEFAULT TO CPUOSC / 4 ; AY38910ENABLE .EQU FALSE ; AY: AY-3-8910 / YM2149 SOUND DRIVER AY_CLK .EQU CPUOSC / 4 ; DEFAULT TO CPUOSC / 4 -AYMODE .EQU AYMODE_NONE ; AY: DRIVER MODE: AYMODE_[SCG/N8/RCZ80/RCZ180] +AYMODE .EQU AYMODE_SCG ; AY: DRIVER MODE: AYMODE_[SCG/N8/RCZ80/RCZ180] ; SPKENABLE .EQU FALSE ; SPK: ENABLE RTC LATCH IOBIT SOUND DRIVER (SPK.ASM) ; diff --git a/Source/HBIOS/cfg_n8.asm b/Source/HBIOS/cfg_n8.asm index 8a597d4f..032f7ccc 100644 --- a/Source/HBIOS/cfg_n8.asm +++ b/Source/HBIOS/cfg_n8.asm @@ -148,7 +148,7 @@ MDTRACE .EQU 1 ; MD: TRACE LEVEL (0=NO,1=ERRORS,2=ALL) MDFFENABLE .EQU FALSE ; MD: ENABLE FLASH FILE SYSTEM ; FDENABLE .EQU TRUE ; FD: ENABLE FLOPPY DISK DRIVER (FD.ASM) -FDMODE .EQU FDMODE_N8 ; FD: DRIVER MODE: FDMODE_[DIO|ZETA|ZETA2|DIDE|N8|DIO3|RCSMC|RCWDC|DYNO|EPWDC] +FDMODE .EQU FDMODE_N8 ; FD: DRIVER MODE: FDMODE_[DIO|ZETA|ZETA2|DIDE|N8|DIO3|RCSMC|RCWDC|DYNO|EPFDC|MBC] FDCNT .EQU 2 ; FD: NUMBER OF FLOPPY DRIVES ON THE INTERFACE (1-2) FDTRACE .EQU 1 ; FD: TRACE LEVEL (0=NO,1=FATAL,2=ERRORS,3=ALL) FDMEDIA .EQU FDM144 ; FD: DEFAULT MEDIA FORMAT FDM[720|144|360|120|111] diff --git a/Source/HBIOS/cfg_rcz180.asm b/Source/HBIOS/cfg_rcz180.asm index a98fa0b8..5c2ce5b3 100644 --- a/Source/HBIOS/cfg_rcz180.asm +++ b/Source/HBIOS/cfg_rcz180.asm @@ -162,7 +162,7 @@ MDTRACE .EQU 1 ; MD: TRACE LEVEL (0=NO,1=ERRORS,2=ALL) MDFFENABLE .EQU FALSE ; MD: ENABLE FLASH FILE SYSTEM ; FDENABLE .EQU FALSE ; FD: ENABLE FLOPPY DISK DRIVER (FD.ASM) -FDMODE .EQU FDMODE_RCWDC ; FD: DRIVER MODE: FDMODE_[DIO|ZETA|ZETA2|DIDE|N8|DIO3|RCSMC|RCWDC|DYNO|EPWDC] +FDMODE .EQU FDMODE_RCWDC ; FD: DRIVER MODE: FDMODE_[DIO|ZETA|ZETA2|DIDE|N8|DIO3|RCSMC|RCWDC|DYNO|EPFDC|MBC] FDCNT .EQU 2 ; FD: NUMBER OF FLOPPY DRIVES ON THE INTERFACE (1-2) FDTRACE .EQU 1 ; FD: TRACE LEVEL (0=NO,1=FATAL,2=ERRORS,3=ALL) FDMEDIA .EQU FDM144 ; FD: DEFAULT MEDIA FORMAT FDM[720|144|360|120|111] diff --git a/Source/HBIOS/cfg_rcz280.asm b/Source/HBIOS/cfg_rcz280.asm index d807eb5a..77d054fb 100644 --- a/Source/HBIOS/cfg_rcz280.asm +++ b/Source/HBIOS/cfg_rcz280.asm @@ -178,7 +178,7 @@ MDTRACE .EQU 1 ; MD: TRACE LEVEL (0=NO,1=ERRORS,2=ALL) MDFFENABLE .EQU FALSE ; MD: ENABLE FLASH FILE SYSTEM ; FDENABLE .EQU FALSE ; FD: ENABLE FLOPPY DISK DRIVER (FD.ASM) -FDMODE .EQU FDMODE_RCWDC ; FD: DRIVER MODE: FDMODE_[DIO|ZETA|ZETA2|DIDE|N8|DIO3|RCSMC|RCWDC|DYNO|EPWDC] +FDMODE .EQU FDMODE_RCWDC ; FD: DRIVER MODE: FDMODE_[DIO|ZETA|ZETA2|DIDE|N8|DIO3|RCSMC|RCWDC|DYNO|EPFDC|MBC] FDCNT .EQU 2 ; FD: NUMBER OF FLOPPY DRIVES ON THE INTERFACE (1-2) FDTRACE .EQU 1 ; FD: TRACE LEVEL (0=NO,1=FATAL,2=ERRORS,3=ALL) FDMEDIA .EQU FDM144 ; FD: DEFAULT MEDIA FORMAT FDM[720|144|360|120|111] diff --git a/Source/HBIOS/cfg_rcz80.asm b/Source/HBIOS/cfg_rcz80.asm index c0b45afa..7374f0c8 100644 --- a/Source/HBIOS/cfg_rcz80.asm +++ b/Source/HBIOS/cfg_rcz80.asm @@ -167,7 +167,7 @@ MDTRACE .EQU 1 ; MD: TRACE LEVEL (0=NO,1=ERRORS,2=ALL) MDFFENABLE .EQU FALSE ; MD: ENABLE FLASH FILE SYSTEM ; FDENABLE .EQU FALSE ; FD: ENABLE FLOPPY DISK DRIVER (FD.ASM) -FDMODE .EQU FDMODE_RCWDC ; FD: DRIVER MODE: FDMODE_[DIO|ZETA|ZETA2|DIDE|N8|DIO3|RCSMC|RCWDC|DYNO|EPWDC] +FDMODE .EQU FDMODE_RCWDC ; FD: DRIVER MODE: FDMODE_[DIO|ZETA|ZETA2|DIDE|N8|DIO3|RCSMC|RCWDC|DYNO|EPFDC|MBC] FDCNT .EQU 2 ; FD: NUMBER OF FLOPPY DRIVES ON THE INTERFACE (1-2) FDTRACE .EQU 1 ; FD: TRACE LEVEL (0=NO,1=FATAL,2=ERRORS,3=ALL) FDMEDIA .EQU FDM144 ; FD: DEFAULT MEDIA FORMAT FDM[720|144|360|120|111] diff --git a/Source/HBIOS/cfg_sbc.asm b/Source/HBIOS/cfg_sbc.asm index 1ad20a3e..3f0ab5c0 100644 --- a/Source/HBIOS/cfg_sbc.asm +++ b/Source/HBIOS/cfg_sbc.asm @@ -148,7 +148,7 @@ MDFFENABLE .EQU FALSE ; MD: ENABLE FLASH FILE SYSTEM ; ; FDENABLE .EQU FALSE ; FD: ENABLE FLOPPY DISK DRIVER (FD.ASM) -FDMODE .EQU FDMODE_DIO3 ; FD: DRIVER MODE: FDMODE_[DIO|ZETA|ZETA2|DIDE|N8|DIO3|RCSMC|RCWDC|DYNO|EPWDC] +FDMODE .EQU FDMODE_DIO3 ; FD: DRIVER MODE: FDMODE_[DIO|ZETA|ZETA2|DIDE|N8|DIO3|RCSMC|RCWDC|DYNO|EPFDC|MBC] FDCNT .EQU 2 ; FD: NUMBER OF FLOPPY DRIVES ON THE INTERFACE (1-2) FDTRACE .EQU 1 ; FD: TRACE LEVEL (0=NO,1=FATAL,2=ERRORS,3=ALL) FDMEDIA .EQU FDM144 ; FD: DEFAULT MEDIA FORMAT FDM[720|144|360|120|111] diff --git a/Source/HBIOS/cfg_scz180.asm b/Source/HBIOS/cfg_scz180.asm index 939f8f88..50ce8893 100644 --- a/Source/HBIOS/cfg_scz180.asm +++ b/Source/HBIOS/cfg_scz180.asm @@ -157,7 +157,7 @@ MDTRACE .EQU 1 ; MD: TRACE LEVEL (0=NO,1=ERRORS,2=ALL) MDFFENABLE .EQU FALSE ; MD: ENABLE FLASH FILE SYSTEM ; FDENABLE .EQU FALSE ; FD: ENABLE FLOPPY DISK DRIVER (FD.ASM) -FDMODE .EQU FDMODE_RCWDC ; FD: DRIVER MODE: FDMODE_[DIO|ZETA|ZETA2|DIDE|N8|DIO3|RCSMC|RCWDC|DYNO|EPWDC] +FDMODE .EQU FDMODE_RCWDC ; FD: DRIVER MODE: FDMODE_[DIO|ZETA|ZETA2|DIDE|N8|DIO3|RCSMC|RCWDC|DYNO|EPFDC|MBC] FDCNT .EQU 2 ; FD: NUMBER OF FLOPPY DRIVES ON THE INTERFACE (1-2) FDTRACE .EQU 1 ; FD: TRACE LEVEL (0=NO,1=FATAL,2=ERRORS,3=ALL) FDMEDIA .EQU FDM144 ; FD: DEFAULT MEDIA FORMAT FDM[720|144|360|120|111] diff --git a/Source/HBIOS/cfg_zeta.asm b/Source/HBIOS/cfg_zeta.asm index 79740aa2..8b1aa2af 100644 --- a/Source/HBIOS/cfg_zeta.asm +++ b/Source/HBIOS/cfg_zeta.asm @@ -120,7 +120,7 @@ MDTRACE .EQU 1 ; MD: TRACE LEVEL (0=NO,1=ERRORS,2=ALL) MDFFENABLE .EQU FALSE ; MD: ENABLE FLASH FILE SYSTEM ; FDENABLE .EQU TRUE ; FD: ENABLE FLOPPY DISK DRIVER (FD.ASM) -FDMODE .EQU FDMODE_ZETA ; FD: DRIVER MODE: FDMODE_[DIO|ZETA|ZETA2|DIDE|N8|DIO3|RCSMC|RCWDC|DYNO|EPWDC] +FDMODE .EQU FDMODE_ZETA ; FD: DRIVER MODE: FDMODE_[DIO|ZETA|ZETA2|DIDE|N8|DIO3|RCSMC|RCWDC|DYNO|EPFDC|MBC] FDCNT .EQU 1 ; FD: NUMBER OF FLOPPY DRIVES ON THE INTERFACE (1-2) FDTRACE .EQU 1 ; FD: TRACE LEVEL (0=NO,1=FATAL,2=ERRORS,3=ALL) FDMEDIA .EQU FDM144 ; FD: DEFAULT MEDIA FORMAT FDM[720|144|360|120|111] diff --git a/Source/HBIOS/cfg_zeta2.asm b/Source/HBIOS/cfg_zeta2.asm index 5cbdb2eb..7f71ec8a 100644 --- a/Source/HBIOS/cfg_zeta2.asm +++ b/Source/HBIOS/cfg_zeta2.asm @@ -131,7 +131,7 @@ MDTRACE .EQU 1 ; MD: TRACE LEVEL (0=NO,1=ERRORS,2=ALL) MDFFENABLE .EQU FALSE ; MD: ENABLE FLASH FILE SYSTEM ; FDENABLE .EQU TRUE ; FD: ENABLE FLOPPY DISK DRIVER (FD.ASM) -FDMODE .EQU FDMODE_ZETA2 ; FD: DRIVER MODE: FDMODE_[DIO|ZETA|ZETA2|DIDE|N8|DIO3|RCSMC|RCWDC|DYNO|EPWDC] +FDMODE .EQU FDMODE_ZETA2 ; FD: DRIVER MODE: FDMODE_[DIO|ZETA|ZETA2|DIDE|N8|DIO3|RCSMC|RCWDC|DYNO|EPFDC|MBC] FDCNT .EQU 1 ; FD: NUMBER OF FLOPPY DRIVES ON THE INTERFACE (1-2) FDTRACE .EQU 1 ; FD: TRACE LEVEL (0=NO,1=FATAL,2=ERRORS,3=ALL) FDMEDIA .EQU FDM144 ; FD: DEFAULT MEDIA FORMAT FDM[720|144|360|120|111] diff --git a/Source/HBIOS/fd.asm b/Source/HBIOS/fd.asm index eb26ac96..3e7bd1c0 100644 --- a/Source/HBIOS/fd.asm +++ b/Source/HBIOS/fd.asm @@ -68,6 +68,13 @@ FDC_DOR .EQU $4A ; DIGITAL OUTPUT REGISTER FDC_DCR .EQU $4B ; CONFIGURATION CONTROL REGISTER FDC_TC .EQU $4C ; TERMINAL COUNT (W/ DACK) #ENDIF +#IF (FDMODE == FDMODE_MBC) +FDC_MSR .EQU $30 ; 8272 MAIN STATUS REGISTER +FDC_DATA .EQU $31 ; 8272 DATA PORT +FDC_DOR .EQU $36 ; DIGITAL OUTPUT REGISTER +FDC_DCR .EQU $35 ; CONFIGURATION CONTROL REGISTER +FDC_TC .EQU $37 ; TERMINAL COUNT (W/ DACK) +#ENDIF ; ; DISK OPERATIONS ; @@ -406,7 +413,7 @@ DOR_INIT .EQU 11100000B ; INITIAL DEFAULT LATCH VALUE ; ; *** DIDE/N8/ZETA V2 *** ; -#IF ((FDMODE == FDMODE_DIDE) | (FDMODE == FDMODE_N8) | (FDMODE == FDMODE_ZETA2) | (FDMODE == FDMODE_RCWDC) | (FDMODE == FDMODE_DYNO) | (FDMODE == FDMODE_EPFDC)) +#IF ((FDMODE == FDMODE_DIDE) | (FDMODE == FDMODE_N8) | (FDMODE == FDMODE_ZETA2) | (FDMODE == FDMODE_RCWDC) | (FDMODE == FDMODE_DYNO) | (FDMODE == FDMODE_EPFDC) | (FDMODE == FDMODE_MBC)) DOR_INIT .EQU 00001100B ; SOFT RESET INACTIVE, DMA ENABLED DOR_BR250 .EQU DOR_INIT DOR_BR500 .EQU DOR_INIT @@ -689,6 +696,10 @@ FD_INIT: #IF (FDMODE == FDMODE_EPFDC) PRTS("EPFDC$") #ENDIF +; +#IF (FDMODE == FDMODE_MBC) + PRTS("MBC$") +#ENDIF ; PRTS(" IO=0x$") LD A,FDC_MSR @@ -1343,7 +1354,7 @@ FC_SETDOR: ; ; SET FST_DCR ; -#IF ((FDMODE == FDMODE_DIDE) | (FDMODE == FDMODE_N8) | (FDMODE == FDMODE_ZETA2) | (FDMODE == FDMODE_RCWDC) | (FDMODE == FDMODE_DYNO) | (FDMODE == FDMODE_EPFDC)) +#IF ((FDMODE == FDMODE_DIDE) | (FDMODE == FDMODE_N8) | (FDMODE == FDMODE_ZETA2) | (FDMODE == FDMODE_RCWDC) | (FDMODE == FDMODE_DYNO) | (FDMODE == FDMODE_EPFDC) | (FDMODE == FDMODE_MBC)) ; FC_SETDCR LD (FST_DCR),A @@ -1375,7 +1386,7 @@ FC_RESETFDC: #IF ((FDMODE == FDMODE_ZETA) | (FDMODE == FDMODE_DIO3) | (FDMODE == FDMODE_RCSMC)) RES 7,A #ENDIF -#IF ((FDMODE == FDMODE_DIDE) | (FDMODE == FDMODE_N8) | (FDMODE == FDMODE_ZETA2) | (FDMODE == FDMODE_RCWDC) | (FDMODE == FDMODE_DYNO) | (FDMODE == FDMODE_EPFDC)) +#IF ((FDMODE == FDMODE_DIDE) | (FDMODE == FDMODE_N8) | (FDMODE == FDMODE_ZETA2) | (FDMODE == FDMODE_RCWDC) | (FDMODE == FDMODE_DYNO) | (FDMODE == FDMODE_EPFDC) | (FDMODE == FDMODE_MBC)) LD A,0 #ENDIF CALL FC_SETDOR @@ -1390,7 +1401,7 @@ FC_RESETFDC: ; PULSE TERMCT TO TERMINATE ANY ACTIVE EXECUTION PHASE ; FC_PULSETC: -#IF ((FDMODE == FDMODE_DIDE) | (FDMODE == FDMODE_N8) | (FDMODE == FDMODE_ZETA2) | (FDMODE == FDMODE_RCWDC) | (FDMODE == FDMODE_DYNO) | (FDMODE == FDMODE_EPFDC)) +#IF ((FDMODE == FDMODE_DIDE) | (FDMODE == FDMODE_N8) | (FDMODE == FDMODE_ZETA2) | (FDMODE == FDMODE_RCWDC) | (FDMODE == FDMODE_DYNO) | (FDMODE == FDMODE_EPFDC) | (FDMODE == FDMODE_MBC)) IN A,(FDC_TC) #ELSE LD A,(FST_DOR) @@ -1447,7 +1458,7 @@ FC_MOTORON1: CP C ; COMPARE TO NEW MOTOR BITS RET Z ; SKIP DELAY, MOTOR WAS ALREADY ON #ENDIF -#IF ((FDMODE == FDMODE_DIDE) | (FDMODE == FDMODE_N8) | (FDMODE == FDMODE_ZETA2) | (FDMODE == FDMODE_RCWDC) | (FDMODE == FDMODE_DYNO) | (FDMODE == FDMODE_EPFDC)) +#IF ((FDMODE == FDMODE_DIDE) | (FDMODE == FDMODE_N8) | (FDMODE == FDMODE_ZETA2) | (FDMODE == FDMODE_RCWDC) | (FDMODE == FDMODE_DYNO) | (FDMODE == FDMODE_EPFDC) | (FDMODE == FDMODE_MBC)) ; SETUP DCR FOR DIDE HARDWARE LD A,(FCD_DCR) ; GET NEW DCR VALUE CALL FC_SETDCR ; AND IMPLEMENT IT diff --git a/Source/HBIOS/hbios.asm b/Source/HBIOS/hbios.asm index d7990f4a..6ed7af9a 100644 --- a/Source/HBIOS/hbios.asm +++ b/Source/HBIOS/hbios.asm @@ -2066,6 +2066,65 @@ HB_Z280BUS1: CALL PRTHEXWORDHL #ENDIF ; +; ROM CHECKSUM VERIFICATION +; EACH OF THE FIRST 4 ROM BANKS HAS A CHECKSUM INJECTED SUCH THAT +; A COMPUTED CHECKSUM ACROSS THE ENTIRE BANK SHOLD ALWAYS BE ZERO +; +HB_ROMCK: + CALL NEWLINE + PRTS("ROM VERIFY:$") +; + ; COPY CHECKSUM ROUTINE TO UPPER RAM + LD HL,HB_CKBNK + LD DE,$8000 + LD BC,HB_CKBNKSIZ + LDIR +; + ; TEST FIRST 4 BANKS OF ROM + LD B,4 ; 4 BANKS + LD C,0 ; STARTING AT BANK 0 +HB_ROMCK1: + PUSH BC ; SAVE LOOP CONTROL + CALL $8000 ; TEST THE BANK + CALL PC_SPACE ; FORMATTING + CALL PRTHEXBYTE ; PRINT RESULT + POP BC ; RESTORE LOOP CONTROL + OR A ; SET FLAGS + JR NZ,HB_ROMCK2 ; HANDLE FAILURE + INC C ; NEXT BANK + DJNZ HB_ROMCK1 ; LOOP FOR BANKS + PRTS(" PASS$") ; DISPLAY SUCCESS + JR HB_ROMCKZ ; CONTINUE BOOT +HB_ROMCK2: + PRTS(" FAIL$") ; DISPLAY ERROR + JR HB_ROMCKZ ; CONTINUE BOOT +; +; VERIFY ROM CHECKSUM BANK SPECIFIED IN REG C +; THIS MUST BE COPIED TO UPPER RAM TO RUN +; +HB_CKBNK: + LD A,(HB_CURBNK) ; GET CURRENT BANK + LD E,A ; SAVE IN E + LD A,C ; BANK TO TEST + CALL HBX_BNKSEL ; SELECT BANK IT + LD HL,$7FFF ; START AT BANK END + LD BC,1 ; DECREMENT VALUE + XOR A ; ZERO ACCUM +HB_CKBNK1: + ADD A,(HL) ; ADD NEXT BYTE + OR A ; CLEAR CARRY + SBC HL,BC ; DECREMENT + JR NC,HB_CKBNK1 ; LOOP TILL DONE + PUSH AF ; SAVE RESULT + LD A,E ; BANK TO RESTORE + CALL HBX_BNKSEL ; RESTORE ORIG BANK + POP AF ; RECOVER RESULT + RET ; AND DONE +; +HB_CKBNKSIZ .EQU $-HB_CKBNK ; SIZE OF ROUTINE +; +HB_ROMCKZ: +; ; LOW BATTERY DIAGNOSTIC MESSAGE ; #IF (BATCOND) diff --git a/Source/HBIOS/std.asm b/Source/HBIOS/std.asm index 83050926..21f66057 100644 --- a/Source/HBIOS/std.asm +++ b/Source/HBIOS/std.asm @@ -167,6 +167,7 @@ FDMODE_RCSMC .EQU 7 ; RC2014 SMC 9266 @ $40 (SCOTT BAKER) FDMODE_RCWDC .EQU 8 ; RC2014 WDC 37C65 @ $40 (SCOTT BAKER) FDMODE_DYNO .EQU 9 ; DYNO WDC 37C65 @ $84 FDMODE_EPFDC .EQU 10 ; RC2014 ETCHED PIXELS FDC +FDMODE_MBC .EQU 11 ; MULTI-BOARD COMPUTER FDC ; ; IDE MODE SELECTIONS ; diff --git a/Source/Images/Makefile b/Source/Images/Makefile index 7df9706f..1540ddce 100644 --- a/Source/Images/Makefile +++ b/Source/Images/Makefile @@ -28,6 +28,8 @@ DEST=../../Binary TOOLS = ../../Tools include $(TOOLS)/Makefile.inc +.SHELLFLAGS = -ce + DIFFPATH = $(DIFFTO)/Binary hd512_combo.img: $(HD512PREFIX) $(HD512IMGS) diff --git a/Source/Images/d_zpm3/u10/SCOPY.HLP b/Source/Images/d_zpm3/u10/SCOPY.HLP index 7f4b3511..2d430bbd 100644 --- a/Source/Images/d_zpm3/u10/SCOPY.HLP +++ b/Source/Images/d_zpm3/u10/SCOPY.HLP @@ -2,7 +2,7 @@  SCOPY.COM  Size (recs) CRC Version Author/Latest Issue Disk - 17k (140) 62B8 1.0e Lars Nelson 2/13 + 18k (141) 62B8 1.0f Lars Nelson 7/21 15k (120) D6DB 0.8 Rob Friefeld 10/91 Z3COM19  1- Syntax 2- SCOPY Commands 3- Notes  @@ -38,7 +38,7 @@ master and which is the target directory. When re-logging from within SCOPY, the syntax has the same meaning, but remember that you will not necessarily be currently logged into the same directory as at startup. -:2 :SCOPY10e +:2 :SCOPY10F :3  SCOPY Notes  diff --git a/Source/Images/d_zpm3/u10/SCOPY10F.HLP b/Source/Images/d_zpm3/u10/SCOPY10F.HLP new file mode 100644 index 00000000..49d09ca6 --- /dev/null +++ b/Source/Images/d_zpm3/u10/SCOPY10F.HLP @@ -0,0 +1,369 @@ +; +======= S C O P Y H E L P ======= + + 1 Copy Move Delete Rename Kompare Quick Set + + 2 Jump ReJump Jump Tag Jump Untag Jump One Jump Two + + 3 Tag Untag Retag Wild Tag + + 4 View + + 5 GROUP Arc Copy Del Move View Kompare Quick Set + + 6 GROUP Equate New + + 7 Cursor + + 8 Options + + 9 Miscellaneous Log Relog New Switch Execute Command +:1 + +C Copy - Send file at pointer to other directory. An arrow at + the top of the screen shows the copy direction. Copying is + controlled by verification flags described below. If there is + inadequate space on the destination disk, the copy is not + attempted, and (for Group operations) the file remains tagged. + +D Delete - Delete file at pointer. + +M Move - Copy, then delete source file. + +R Rename + Rename does not integrate too well with SCOPY's method of file + display. In fact, the display may become useless. Therefore + SCOPY requires a Relog before any copy operations are allowed + following a Rename. + + If an Archived file is renamed, the archive attribute is reset. + (Ditto the Public attribute.) + + ...more + + +Q Quick Copy - Copy current file to alternate directory. Saves + you the trouble of logging in the alternate directory. Quick + Copy bypasses any checks against the destination date stamp + or disk capacity. It is fast, but you don't get the full + benefit of Login. + + +K Kompare - Do a byte for byte comparison of source and + destination files, report the result on the screen divider as + "=" or "~". For Group Kompare, you may then retag files which + tested either equal or unequal. + + +S Set Attributes - Set or clear F1, F3, F4, W/P, R/O, SYS, and + ARC attributes in any combination: + Set: 1,3,4,W,R,S,A Clear: -1,-3,-4,-W,-R,-S,-A +:2 + +JUMP COMMANDS: + +J Jump - Find the next match to the mask entered. The mask is + automatically wildcarded. + +^J, H ReJump - Use the same mask. (^J will not work if your TCAP + defines it as an arrow key. Use H (Hop) instead.) + +1 Jump One - Go to next file which exists only in current + directory. + +2 Jump Two - Go to next file which exists in both directories. + +` Jump Tagged - Go to next tagged file. + +~ Jump Untagged - Go to next untagged file. +:3 + +T Tag - Mark a file for a Group operation. Group Tag tags all files + from the pointer to the end of the list. + +U Untag - Cancels a tag. Group Untag untags all files from the + pointer to the end of the list. + +Y Retag - When a Group operation runs through the tagged file + list, the files are "soft" tagged. This command retags them. + +GR Group Reverse - Reverses the tags on all files. + + + ...more + +WILD COMMAND + + (W)ild Tag/ Untag/ New/ 1/ 2 MASK DATESPEC + + Select a fileset for a Group operation by comparing the + directory to a Mask and/or Datespec, and: + + 1. (T)ag all matches + 2. (U)ntag all matches + 3. (N)ew - Tag match only if the source version is Newer. + 4. (1) -Tag match if it exists in 1 directory only. + 5. (2) -Tag match if it exists in 2 directories. + + "Newness" is determined by comparing the two + Modify dates if possible. If there is no Modify + date for one of the files, its Create date is + used. If neither is valid, the file is not + tagged. The command has no effect on unstamped + disks or systems. Note that one file's Modify + date could be compared to the other file's Create + date (if it has no Modify date.) + + + Wild commands ask for an optional Mask (automatically + wildcarded) and an optional Datespec. The datespec is + compared to the Modify date or, if there is none, to the + Create date. Access date is not used. + + The datespec format is: + + [/C]<, >, or =date[ time] + + Where: + /C Forces comparison to Create date ONLY + < > = Mandatory date signifier (how to use date) + date dd.mm.yy (any part omitted = the current date) + date mm/dd/yy (alternate format) + time hh:mm (any part omitted is ignored) + + Wildcard characters "?" or "*" are allowed in date, time. + + Examples: + <1.9 Selects all modified before 1 Sept this year + = All modified today + >.. 13:00 All modified after 1pm today + /c=* All created any day this month + + European style date format is the default if the date parser + is unable to determine which one you are using. "xx" will be + taken to mean "dd". "xx/" means "mm". + + Some mask and/or date spec must be given, or the Wild command + cancels. You can use a single "." or "*" to test everything. + + WILD Examples: + + WN. + Tag everything in the source dir newer than an existing + file in the destination. + + W2= + Tag all files modified today in the source directory which + also exist in the destination directory. + + WTs /c>.. 10 + Tag all S*.* created after 10AM today. +:4 +V - View + + The main viewer commands are shown highlighted on the bottom + screen line. All viewer functions are controlled with the + left hand. These are: + + F - Next screen + A - Previous screen + T - Top screen + B - Bottom screen + R - Read more file if too big for available buffer + G - GoTo string up to 20 characters. "?" is wild char. + H - Repeat GoTo on same string. Same as G + X - Done with this file. Group View goes on to next file. + S - Scroll continuously forward until a keypress + D - Reverse scroll. + + ...more + + +V - View + + Commands NOT shown while viewing are: + + Next line + - Previous line + Next screen (synonym for Forward) + Hop forward 10 lines + ^C Abort loop (Group View) +:5 +GROUP COMMANDS: + +Group commands operate on tagged files, proceeding from file to +file. To cancel a group operation, press ^C. + + +GA Archive - Copy only tagged files which do NOT have the archive + attribute set, then set the source archive attribute. + +GC Copy Automates single file command. +GD Delete +GM Move +GV View +GK Kompare May retag all equal or unequal files after comparison. +GQ Quick +GS Set Attributes +:6 + +GE - Group Equate + +Copy all tagged files which do not exist in the destination +directory, OR whose datestamp (including the time) is different +from the target file datestamp. Group Equate is equivalent to +copying every tagged file from the source to the destination, but +it does not waste time copying files which are presumably the +same. (The files may not actually BE the same in the case of a +copy error, bad disk sector, faulty clock, etc. If you +suspect you can't trust the datestamps, use GC - Group Copy.) + +Group Equate insists that both Create and Modify fields of the +datestamp be identical. The dates are not checked for validity, +however. (A file does not _have_ to have a valid Modify date.) +If both files have null datestamps, GE will untag. + + ...more + + +GN - Group New + +Copy all tagged files which do not exist in the destination, OR +whose datestamp is newer than the target file datestamp. This +command UPDATES the destination. + +If any dates aren't valid, then a file flunks this test and is +untagged. + + Summary: + + GROUP EQUATE is intended for restoring a directory from + older backup files. GROUP NEW is for updating a directory + with newer files. WILD selects a file set by name and + date criteria for the Group commands to act on. +:7 +FILE POINTER MOVEMENTS: + + + SCREEN Arrow Keys and WS Diamond + ^R - Top Line Up ^E, Up + ^C - Bottom ^ + +,^F - Next ^S Prev File < + > Next File ^D + -,^A - Prev v + FILE Line Down ^X + ^T - Top + ^B - Bottom + CR,SP - Next + BS - Prev + +Note that cursor commands are available to jump to the next FILE +in the current window () or to the next LINE of the display +(^X). The directory displays are interleaved, so there could be +many blank lines in one directory between files entries. + +See also Jump commands. +:8 +O - Options Menu + +Datestamp Oriented Options: + + A. replace by date If Yes, D-F are ignored, else B-C ignored + B. older replace query + C. newer/equal replace query If No query, copy is NOT made. + + Use these options if A. is NO, or the file datestamp is invalid. + D. single replace query + E. group replace query + F. archive replace query + +A. Replace by Date - If Yes, the next two options are operative. + If No, they are ignored. Quick Copy ignores Replace by Date. + +B. Older Replace - Ask before replacing an older file. + +C. Newer/ Equal Replace - Ask before replacing a newer file. You + usually won't want to. Therefore, if this option is set to + NO, the copy does NOT occur. + + + + +If the dates compared aren't valid, then date replace queries +are skipped and fall back on options D-F. SCOPY would then +work like ZFILER for systems/disks without datestamps. + +******** + HINT: Set up SCOPY's query options to allow you to safely + play with the new date selection methods. You will be able to + see on screen what SCOPY intends to do, but can bail out at + the prompt before anything happens. The easiest way to do + this is to Ask For Verification. A ^C at the Y/N prompt will + cancel the command. Files will remain tagged. +******** + + ...more + +G. Verify Query - Ask whether or not to do CRC verification. + +H. Verify Default - If not queried, do CRC verification? + +I. Supress SYS Files - Only takes effect when logging in. + +J. Set Copied File Attributes - Destination file attributes are + cleared unless this option is Yes. + +K. Use Destination Attributes - IF previous option is Yes, use + existing destination attributes on copy, else use source. + +L. Archive Destination - Used when copying files to a work area, + such as a RAM disk. The Group Archive command can then + conveniently move any files you altered back to permanent + storage when you are done. + +M. Show File Attributes - SCOPY uses the extended TCAP SETATR + function to underline filename characters to represent a file + attribute set. This is unobtrusive, but doesn't give good + results on all terminals. SCOPY can be configured to show set + attributes in upper case, or you can just turn the display off. +:9 +L Login - Relog SCOPY with new command line, using the same + syntax as on initial callup. As a convenience, the ":" is + optional following a DIR reference. Note that if you name + only one directory, the current directory is assumed to be + the source, and it is the other directory which changes. + Login does not preserve the old file mask. + +N New DIR - Change the current directory only, same mask. + + Relog - Logs the same directories with the same file mask + You may want to Relog after renaming files, after file + deletions have left big holes in the file list, or when + changing floppy disks during a backup operation. + +TAB - Switch copy direction. + +Z - Command line. Run a Z-System command, and reinvoke SCOPY when + done. The command is run from the original DU: in which SCOPY + was invoked. (This function requires an XFCB and User Reg 21.) + + +IMPORTANT NOTE: SCOPY requires an extended TCAP 4D which includes + Insert/Delete line, and Clear to End of Screen. If available, + it uses cursor on/off, line graphics, and character attributes. + + + + + SCOPY, Version 1.0F + + Copyright 1992 by Rob Friefeld. All rights reserved. + +May not be sold, either alone or as part of a commercial product, +without the prior written consent of the author. May be +distributed among users at nominal cost of media. + +Rob Friefeld +4607 Colorado Street +Long Beach, CA 90814 +(310) 434-7338 voice + \ No newline at end of file diff --git a/Source/Makefile b/Source/Makefile index 189430e2..cb096c4a 100644 --- a/Source/Makefile +++ b/Source/Makefile @@ -6,10 +6,10 @@ SUBDIRS += Apps SUBDIRS += CBIOS SUBDIRS += Forth SUBDIRS += Fonts -SUBDIRS += CPM22 ZCPR ZCPR-DJ ZSDOS -SUBDIRS += HBIOS CPM3 -SUBDIRS += ZPM3 +SUBDIRS += CPM22 ZCPR ZCPR-DJ ZSDOS CPM3 ZPM3 #SUBDIRS += BPBIOS +SUBDIRS += RomDsk +SUBDIRS += HBIOS SUBDIRS += Images SUBDIRS += ZRC SUBDIRS += ZZR diff --git a/Source/RomDsk/Build.cmd b/Source/RomDsk/Build.cmd index 965a2dd0..5e784779 100644 --- a/Source/RomDsk/Build.cmd +++ b/Source/RomDsk/Build.cmd @@ -11,6 +11,9 @@ set ZXBINDIR=%TOOLS%/cpm/bin/ set ZXLIBDIR=%TOOLS%/cpm/lib/ set ZXINCDIR=%TOOLS%/cpm/include/ +set RomApps1=assign mode rtc syscopy xm +set RomApps2=fdu format survey sysgen talk timer inttest + :: :: Make all variants of the ROM Disk contents image. Three sizes are :: created for each of the different ROM sizes possible (256K, 512K, 1024K). @@ -21,39 +24,46 @@ set ZXINCDIR=%TOOLS%/cpm/include/ :: the final ROM size less 128K. :: +set RomApps= + +copy NUL rom128_wbw.dat +copy NUL rom128_una.dat + :: MakeDisk -set RomApps=assign mode rtc syscopy xm +set RomApps=%RomApps1% -call :MakeDisk rom256_wbw 0x20000 wbw_rom256 ROM_256KB wbw -call :MakeDisk rom256_una 0x20000 wbw_rom256 ROM_256KB una +call :MakeDisk rom256_wbw 256 0x20000 wbw +call :MakeDisk rom256_una 256 0x20000 una -set RomApps=%RomApps% fdu format survey sysgen talk timer inttest +set RomApps=%RomApps1% %RomApps2% -call :MakeDisk rom512_wbw 0x60000 wbw_rom512 ROM_512KB wbw -call :MakeDisk rom512_una 0x60000 wbw_rom512 ROM_512KB una +call :MakeDisk rom512_wbw 512 0x60000 wbw +call :MakeDisk rom512_una 512 0x60000 una -call :MakeDisk rom1024_wbw 0xE0000 wbw_rom1024 ROM_1024KB wbw -call :MakeDisk rom1024_una 0xE0000 wbw_rom1024 ROM_1024KB una +call :MakeDisk rom1024_wbw 1024 0xE0000 wbw +call :MakeDisk rom1024_una 1024 0xE0000 una goto :eof :MakeDisk set Output=%1 -set Size=%2 -set Format=%3 -set Content=%4 -set Bios=%5 +set RomSize=%2 +set ImgSize=%3 +set Bios=%4 echo Making ROM Disk %Output% -srec_cat -Generate 0 %Size% --Constant 0xE5 -Output %Output%.dat -Binary || exit /b +:: Create the empty disk image file +srec_cat -Generate 0 %ImgSize% --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 +:: Populate the disk image via cpmtools +cpmcp -f wbw_rom%RomSize% %Output%.dat ROM_%RomSize%KB/*.* 0: || exit /b +for %%f in (%RomApps%) do cpmcp -f wbw_rom%RomSize% %Output%.dat ../../Binary/Apps/%%f.com 0: || exit /b +cpmcp -f wbw_rom%RomSize% %Output%.dat ..\cpm22\cpm_%Bios%.sys 0:cpm.sys || exit /b +cpmcp -f wbw_rom%RomSize% %Output%.dat ..\zsdos\zsys_%Bios%.sys 0:zsys.sys || exit /b -cpmchattr -f %Format% %Output%.dat r 0:*.* || exit /b +:: Mark all disk files R/O for safety +cpmchattr -f wbw_rom%RomSize% %Output%.dat r 0:*.* || exit /b goto :eof diff --git a/Source/RomDsk/Makefile b/Source/RomDsk/Makefile new file mode 100644 index 00000000..7f4837ac --- /dev/null +++ b/Source/RomDsk/Makefile @@ -0,0 +1,36 @@ +OBJECTS = rom128_wbw.dat rom128_una.dat rom256_wbw.dat rom256_una.dat rom512_wbw.dat rom512_una.dat rom1024_wbw.dat rom1024_una.dat +OTHERS=*.dat + +TOOLS = ../../Tools +include $(TOOLS)/Makefile.inc + +.SHELLFLAGS = -ce + +ROMAPPS1 := assign mode rtc syscopy xm +ROMAPPS2 := fdu format survey sysgen talk timer inttest + +rom256_%.dat: ROMSIZ=256 +rom512_%.dat: ROMSIZ=512 +rom1024_%.dat: ROMSIZ=1024 + +rom256_%.dat: IMGSIZ=0x20000 +rom512_%.dat: IMGSIZ=0x60000 +rom1024_%.dat: IMGSIZ=0xE0000 + +rom256_%.dat: ROMAPPS=$(ROMAPPS1) +rom512_%.dat rom1024_%.dat: ROMAPPS=$(ROMAPPS1) $(ROMAPPS2) + +rom%_wbw.dat: BIOS=wbw +rom%_una.dat: BIOS=una + +rom128%.dat: + >$@ + +%.dat: + ### Making ROM Disk $@ + srec_cat -Generate 0 $(IMGSIZ) --Constant 0xE5 -Output $@ -Binary + $(CPMCP) -f wbw_rom$(ROMSIZ) $@ ROM_$(ROMSIZ)KB/*.* 0: + for i in $(ROMAPPS) ; do $(CPMCP) -f wbw_rom$(ROMSIZ) $@ ../../Binary/Apps/$$i.com 0: ; done + $(CPMCP) -f wbw_rom$(ROMSIZ) $@ ../CPM22/cpm_$(BIOS).sys 0:cpm.sys + $(CPMCP) -f wbw_rom$(ROMSIZ) $@ ../ZSDOS/zsys_$(BIOS).sys 0:zsys.sys + $(CPMCHATTR) -f wbw_rom$(ROMSIZ) $@ r 0:*.* diff --git a/Source/HBIOS/diskdefs b/Source/RomDsk/diskdefs similarity index 100% rename from Source/HBIOS/diskdefs rename to Source/RomDsk/diskdefs diff --git a/Source/ver.inc b/Source/ver.inc index ce9a1dbe..5ef69718 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.96" +#DEFINE BIOSVER "3.1.1-pre.101" diff --git a/Source/ver.lib b/Source/ver.lib index ff448aa9..34f75d1a 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.96" + db "3.1.1-pre.101" endm diff --git a/Tools/Makefile.inc b/Tools/Makefile.inc index 21ef90b8..48910ec8 100644 --- a/Tools/Makefile.inc +++ b/Tools/Makefile.inc @@ -34,43 +34,58 @@ DIFFPATH := $(DIFFTO)/$(RELPATH) # CASEFN = $(TOOLS)/unix/casefn.sh +# +# compiler/assembler locations and flags +# ZXCC=$(BINDIR)/zx TASM=$(BINDIR)/uz80as -t z80 +TASMFLAGS= OPENSPIN=$(BINDIR)/openspin BSTC=$(BINDIR)//bstc CPMCP=$(BINDIR)/cpmcp +CPMCHATTR=$(BINDIR)/cpmchattr # # directory containing cpm binaries # CPM=$(TOOLS)/cpm/bin +# +# .ONESHELL uses a single shell instance for all shell scripts. +# .SHELLFLAGS is used to cause all shell scripts to echo ("e") and to +# exit if any command returns a non-zero result ("x"). +# +.ONESHELL: +.SHELLFLAGS = -cex + %.com: %.asm - if [ "$(USETASM)" = 1 ] ; then \ - $(TASM) $< $@ ; \ + @if [ "$(USETASM)" = 1 ] ; then \ + $(TASM) $(TASMFLAGS) $< $@ $*.lst ; \ else \ $(ZXCC) $(CPM)/MAC -$< -$$PO ; \ $(ZXCC) $(CPM)/MLOAD25 -tmp.bin=$*.hex ; \ mv tmp.bin $@ ; \ + rm -f /tmp/casefn.cache ; \ rm -f $$($(CASEFN) $*.hex) ; \ fi %.hex: %.asm - $(ZXCC) $(CPM)/MAC -$< -$$PO ; \ + $(ZXCC) $(CPM)/MAC -$< -$$PO %.bin: %.ASM $(ZXCC) $(CPM)/MAC -$< -$$PO $(ZXCC) $(CPM)/MLOAD25 -tmp.bin=$*.hex mv tmp.bin $@ + rm -f /tmp/casefn.cache rm -f $$($(CASEFN) $*.hex) %.com: %.z80 - $(ZXCC) $(CPM)/Z80ASM -$(basename $<)/F ; \ - rm -f /tmp/casefn.cache ; \ + $(ZXCC) $(CPM)/Z80ASM -$(basename $<)/F + rm -f /tmp/casefn.cache mv $$($(CASEFN) $@) tmp.com ; mv tmp.com $@ %.bin: %.asm - $(TASM) $< $@ + $(TASM) $(TASMFLAGS) $< $@ $(basename $<).lst %.rel: %.asm $(ZXCC) $(CPM)/RMAC -$< @@ -95,8 +110,6 @@ ifeq ($(UNAME), Linux) $(BSTC) -e -l $< endif -.ONESHELL: - # # darwin bstc won't run, since mac os does not do 32 bit binaries any more # openspin ought to work @@ -110,29 +123,36 @@ endif # first target is default # all:: $(OBJECTS) - @$(foreach subdir,$(SUBDIRS),echo "*** Making directory $(subdir)"; $(MAKE) --directory $(subdir) all || exit 1;) - @if [ "$(DEST)" ] ; then for file in $(filter-out $(NOCOPY),$(OBJECTS)) ; do \ + @for dir in $(SUBDIRS) ; do \ + $(MAKE) --directory $$dir all ; \ + done + @if [ "$(DEST)" ] && [ "$(OBJECTS)" ] ; then for file in $(filter-out $(NOCOPY),$(OBJECTS)) ; do \ mkdir -p $(DEST) ; \ - echo copy $$file to $(DEST) ; \ + echo Copying $$file to $(DEST) ; \ rm -f /tmp/casefn.cache ; \ cp $$($(CASEFN) $$file) $(DEST) ; \ done ; fi - @if [ "$(DOCDEST)" ] ; then for file in $(DOCS) ; do \ + @if [ "$(DOCDEST)" ] && [ "$(DOCS)" ] ; then for file in $(DOCS) ; do \ mkdir -p $(DOCDEST) ; \ - echo copy $$file to $(DOCDEST) ; \ + echo Copying $$file to $(DOCDEST) ; \ + rm -f /tmp/casefn.cache ; \ cp $$($(CASEFN) $$file) $(DOCDEST) ; \ done ; fi clean:: @-rm -f $$($(CASEFN) make.out *.sym *.lst *.prn *.diff *.dump $(OTHERS) $(filter-out $(NODELETE),$(OBJECTS))) - @$(foreach subdir,$(SUBDIRS),echo "*** Cleaning directory $(subdir)"; $(MAKE) --directory $(subdir) clean || exit 1;) + @for dir in $(SUBDIRS) ; do \ + $(MAKE) --directory $$dir 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))) - @$(foreach subdir,$(SUBDIRS),echo "*** Clobbering directory $(subdir)"; $(MAKE) --directory $(subdir) clobber || exit 1;) + @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 @@ -165,4 +185,3 @@ endif vdiff: make VERBOSEDIFF=2 diff - diff --git a/Tools/cpm/bin/UNZIP154.COM b/Tools/cpm/bin/UNZIP154.COM new file mode 100644 index 00000000..f0572630 Binary files /dev/null and b/Tools/cpm/bin/UNZIP154.COM differ diff --git a/Tools/cpm/bin/UNZIP186.COM b/Tools/cpm/bin/UNZIP186.COM new file mode 100644 index 00000000..c750ff52 Binary files /dev/null and b/Tools/cpm/bin/UNZIP186.COM differ diff --git a/Tools/unix/Makefile b/Tools/unix/Makefile index caa6c4ff..cba1782e 100644 --- a/Tools/unix/Makefile +++ b/Tools/unix/Makefile @@ -13,10 +13,11 @@ SUBDIRS = bst uz80as zx cpmtools bin2asm lzsa all: @chmod +x casefn.sh - @$(foreach subdir,$(SUBDIRS),$(MAKE) --directory $(subdir) all || exit 1;) + @$(foreach subdir,$(SUBDIRS),$(MAKE) --directory $(subdir) all;) clobber: - @$(foreach subdir,$(SUBDIRS),$(MAKE) --directory $(subdir) clobber || exit 1;) + @$(foreach subdir,$(SUBDIRS),$(MAKE) --directory $(subdir) clobber;) + @rm -rf ../$(UNAME) clean: - @$(foreach subdir,$(SUBDIRS),$(MAKE) --directory $(subdir) clean || exit 1;) + @$(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 ec98153d..1ffdbd79 100644 --- a/Tools/unix/bin2asm/Makefile +++ b/Tools/unix/bin2asm/Makefile @@ -16,9 +16,9 @@ $(DEST): .PHONY: clean clean: - rm -f $(OBJ_FILES) + rm -f $(OBJ_FILES) $(BINARY) -clobber: +clobber: clean rm -f $(DEST)/$(BINARY) $(BINARY) $(BINARY): $(OBJ_FILES) diff --git a/Tools/unix/bst/Makefile b/Tools/unix/bst/Makefile index d3170586..2e6c8227 100644 --- a/Tools/unix/bst/Makefile +++ b/Tools/unix/bst/Makefile @@ -20,7 +20,7 @@ all: $(DEST) $(DEST): mkdir $(DEST) -clobber: +clobber: clean -for i in *.$(SUFFIX) ; do \ rm $(DEST)/$$(basename $$i .$(SUFFIX)) ; \ done diff --git a/Tools/unix/lzsa/Makefile b/Tools/unix/lzsa/Makefile index 84df4aab..9f9cd895 100644 --- a/Tools/unix/lzsa/Makefile +++ b/Tools/unix/lzsa/Makefile @@ -36,11 +36,11 @@ all: $(APP) cp -p $(APP) ../../$(UNAME) $(APP): $(OBJS) - @mkdir -p ../../bin/posix + #@mkdir -p ../../bin/posix $(CC) $^ $(LDFLAGS) -o $(APP) clean: @rm -rf $(APP) $(OBJDIR) -clobber: +clobber: clean rm -f ../../$(UNAME)/$(APP) diff --git a/Tools/unix/uz80as/Makefile b/Tools/unix/uz80as/Makefile index 1a22b386..164ca7e8 100644 --- a/Tools/unix/uz80as/Makefile +++ b/Tools/unix/uz80as/Makefile @@ -53,7 +53,7 @@ clobber: clean -rm -f uz80as $(DEST)/uz80as clean: - -rm -f $(OBJECTS) + -rm -f $(OBJECTS) uz80as uz80as: $(OBJECTS) $(CC) $(CFLAGS) -o uz80as $(OBJECTS) diff --git a/Tools/unix/zx/Makefile b/Tools/unix/zx/Makefile index 12adc60f..862ec7a3 100644 --- a/Tools/unix/zx/Makefile +++ b/Tools/unix/zx/Makefile @@ -23,7 +23,7 @@ $(DEST): mkdir -p $(DEST) clean: - -rm -f $(OBJECTS) config.h + -rm -f $(OBJECTS) config.h zx clobber: clean -rm -f $(DEST)/zx $(DEST)/bios.bin zx