diff --git a/Doc/RomWBW Applications.pdf b/Doc/RomWBW Applications.pdf index d10f8d34..ea50c203 100644 Binary files a/Doc/RomWBW Applications.pdf and b/Doc/RomWBW Applications.pdf differ diff --git a/Doc/RomWBW Disk Catalog.pdf b/Doc/RomWBW Disk Catalog.pdf index e2628916..99872a35 100644 Binary files a/Doc/RomWBW Disk Catalog.pdf and b/Doc/RomWBW Disk Catalog.pdf differ diff --git a/Doc/RomWBW Errata.pdf b/Doc/RomWBW Errata.pdf index 9e17f800..3ec0d57b 100644 Binary files a/Doc/RomWBW Errata.pdf and b/Doc/RomWBW Errata.pdf differ diff --git a/Doc/RomWBW ROM Applications.pdf b/Doc/RomWBW ROM Applications.pdf index ba860339..d04b6903 100644 Binary files a/Doc/RomWBW ROM Applications.pdf and b/Doc/RomWBW ROM Applications.pdf differ diff --git a/Doc/RomWBW System Guide.pdf b/Doc/RomWBW System Guide.pdf index 12cfa034..7ec5c43e 100644 Binary files a/Doc/RomWBW System Guide.pdf and b/Doc/RomWBW System Guide.pdf differ diff --git a/Doc/RomWBW User Guide.pdf b/Doc/RomWBW User Guide.pdf index 8a24c3b6..20925a21 100644 Binary files a/Doc/RomWBW User Guide.pdf and b/Doc/RomWBW User Guide.pdf differ diff --git a/ReadMe.md b/ReadMe.md index 41ab05e4..c91cec6d 100644 --- a/ReadMe.md +++ b/ReadMe.md @@ -3,7 +3,7 @@ **RomWBW ReadMe** \ Version 3.5 \ Wayne Warthen ([wwarthen@gmail.com](mailto:wwarthen@gmail.com)) \ -17 Apr 2024 +03 May 2024 # Overview diff --git a/ReadMe.txt b/ReadMe.txt index af0e23ec..bb14f64f 100644 --- a/ReadMe.txt +++ b/ReadMe.txt @@ -1,6 +1,6 @@ RomWBW ReadMe Wayne Warthen (wwarthen@gmail.com) -17 Apr 2024 +03 May 2024 diff --git a/Source/Doc/Applications.md b/Source/Doc/Applications.md index 5c0f03bb..a972b53e 100644 --- a/Source/Doc/Applications.md +++ b/Source/Doc/Applications.md @@ -48,8 +48,9 @@ found: | RTC | Yes | Yes | Yes | | TIMER | Yes | Yes | Yes | | CPUSPD | Yes | Yes | Yes | +| FAT | Yes | Yes | Yes | +| CLRDIR | Yes | Yes | Yes | | INTTEST | No | Yes | Yes | -| FAT | No | Yes | Yes | | TUNE | No | Yes | Yes | | WDATE | No | Yes | Yes | | HTALK | No | Yes | Yes | @@ -545,7 +546,7 @@ distribution in the Doc/Contrib directory. The application supports a significant number of EEPROM parts. It should automatically detect your part. If it does not recognize your chip, make sure that you do not have a write protect jumper set -- -this jumper can prevent the ROM chip from being recognized. +this jumper will prevent the ROM chip from being recognized. Reprogramming a ROM chip in-place is inherently dangerous. If anything goes wrong, you will be left with a non-functional system and no @@ -921,6 +922,15 @@ Files written are not verified. Wildcard matching in FAT filesystems is a bit unusual as implemented by FatFs. See FatFs documentation. +The `FAT FORMAT` command will not perform a physical format on floppy +disks. You must use FDU to do this prior to using `FAT FORMAT`. + +Formatting (`FAT FORMAT`) of floppies does not work well. The +underlying FatFs library uses some non-standard fields. The resulting +floppy may or may not be useable on other systems. It is best to format +a FAT floppy on a Windows or DOS system. You should have no problems +copying files to/from such a floppy using `FAT`. + ## Etymology The `FAT` application is an original RomWBW work, but utilizes the @@ -953,6 +963,60 @@ can corrupt a file if it occurs. Be careful to avoid this. `\clearpage`{=latex} +# CLRDIR + +`CLRDIR` is used to initialize a CP/M filesystem. This is frequently +used to prepare RomWBW disk slices for use. If there is any data +on the filesystem, it will be destroyed. `CLRDIR` works on CP/M +drive letters. To initialize a RomWBW slice, the slice must first be +assigned to a CP/M drive letter. + + +This application is provided by Max Scane. + +## Syntax + +| `CLRDIR `*``*` [options]` + +*``* is the CP/M drive letter to be cleared (e.g., "A:") + + +Options: + +| `-D`: Enable debug output +| `-Y`: Do not ask for confirmation + +## Usage + +This application has a command line interface only. Type an +appropriately formatted command at the command prompt at any of the +RomWBW CP/M operatings systems (CP/M 2.2, ZSDOS, CP/M 3, etc.). + +You will be prompted for confirmation to continue. You must type a +**capital** 'Y' to proceed. The application will confirm that the +drive has been cleared. + +If used under ZSDOS, you should issue a `RELOG` command after using +`CLRDIR` to ensure that CP/M relogs the cleared drive. + +## Notes + +This command is inherently dangerous. It will completely destroy the +directory area of the target drive. Be very careful to ensure you do +not target a drive that contains useful data. + +`CLRDIR` understands the directory formats of all of the RomWBW +CPM-like operating systems and devices including floppy disks, CF/SD +Cards, etc. + +## Etymology + +This application was written and provided by Max Scane. He +provides it in binary format and is included in the RomWBW +distribution as a binary file. + +`\clearpage`{=latex} + # TUNE If your RomWBW system has a sound card based on either an AY-3-8190 or diff --git a/Source/Doc/UserGuide.md b/Source/Doc/UserGuide.md index 624df28d..04ba281f 100644 --- a/Source/Doc/UserGuide.md +++ b/Source/Doc/UserGuide.md @@ -1118,11 +1118,11 @@ system. The drive letter assignments **do not** change during an OS session unless you use the `ASSIGN` command yourself to do it. Additionally, the - assignments at boot will stay the same on each boot as long as you do +assignments at boot will stay the same on each boot as long as you do not make changes to your hardware configuration. Note that the assignments **are** dependent on the media currently inserted in hard disk drives when the operating system is started. So, notice that if you - insert or remove an SD Card, CF Card or USB Drive, the drive +insert or remove an SD Card, CF Card or USB Drive, the drive assignments will change. Since drive letter assignments can change, you must be careful when doing destructive things like using `CLRDIR` to make sure the drive letter you use is referring to the desired media. @@ -1513,10 +1513,10 @@ B>assign H:=IDE0:3 B>clrdir G: -CLRDIR Version 1.2 April 2020 by Max Scane +CLRDIR Version 1.2B May 2024 by Max Scane Warning - this utility will overwrite the directory sectors of Drive: G -Type Y to proceed, any key other key to exit. Y +Type CAPITAL Y to proceed, any key other key to exit. Y Directory cleared. B> ``` @@ -1993,10 +1993,12 @@ custom hard disk image file, it will need to be written to the media using your modern computer. Note that you **do not** run `CLRDIR` or `SYSCOPY` on the slices that contain the data. When using this method, the disk will be partitioned and setup with 1 or more slices containing -ready-to-run bootable operating systems. +ready-to-run bootable operating systems. You **do** need to run +`CLRDIR` and optionally `SYSCOPY` on slices that are not part of the +image (slices beyond the ones included with the image). To write a hard disk image file onto your actual media (actual hard disk - or CF/SD/USB Media), you need to use an image writing utility on your +or CF/SD/USB Media), you need to use an image writing utility on your modern computer. Your modern computer will need to have an appropriate interface or slot that accepts the media. To actually copy the image, you can use the `dd` command on Linux or MacOS. On Windows, in the diff --git a/Source/HBIOS/hbios.asm b/Source/HBIOS/hbios.asm index e0f6fb41..05f5fde8 100644 --- a/Source/HBIOS/hbios.asm +++ b/Source/HBIOS/hbios.asm @@ -22,27 +22,25 @@ ; SYSTEM INITIALIZATION, THE IMAGE OF THE RUNNING ROM BANK IS COPIED TO A RAM BANK ; CREATING A SHADOW COPY IN RAM. EXECUTION IS THAN TRANSFERRED TO THE RAM SHADOW COPY. ; THIS IS ESSENTIAL BECAUSE THE HBIOS CODE DOES NOT SUPPORT RUNNING IN READ ONLY MEMORY -; (EXCEPT FOR THE INITIAL LAUNCHING CODE). IN THIS MODE, THE HBI OS INITIALIZATION WILL -; ALSO COPY THE OS IMAGES BANK IN ROM TO THE USER RAM BANK AND LAUNCH IT AFTER HBIOS -; IS INSTALLED. +; (EXCEPT FOR THE INITIAL LAUNCHING CODE). ; ; - APPBOOT: BOOT FROM A CP/M STYLE APPLICATION FILE ; ; WHEN APPBOOT IS DEFINED, THE FILE IS ASSEMBLED AS A CP/M APPLICATION ASSUMING ; THAT IT WILL BE LOADED AT 100H BY THE CP/M (OR COMPATIBLE) OS. NOTE THAT IN ; THIS CASE IT IS ASSUMED THAT AN OS IMAGES FILE IS APPENDED TO THE END OF THE -; HBIOS APPLICATION BINARY. THE APPENDED OS IMAGES ARE COPIED TO THE USER RAM +; HBIOS APPLICATION BINARY. THE APPENDED OS IMAGES ARE COPIED TO THE AUX RAM ; BANK AND LAUNCHED AFTER HBIOS HAS INSTALLED ITSELF. ; -; - IMGBOOT: BOOT FROM AN IMAGE FILE THAT HAS BEEN PLACED IN THE USER BANK -; -; WHEN IMGBOOT IS DEFINED, THE FILE IS ASSEMBLED SUCH THAT IT CAN BE PRELOADED -; INTO THE RAM USER BANK BY AN EXTERNAL PROCESS THAT SUBSEQUENTLY LAUNCHES -; THE CODE AT ADDRESS 0. THE MOST COMMON EXAMPLE OF THIS IS THE UNA FSFAT -; TOOL WHICH CAN LOAD AN IMAGE FROM A DOS FAT FILESYSTEM PROVIDING A SIMPLE -; WAY TO LOAD A TEST COPY OF HBIOS. AS IS THE CASE WITH APPBOOT, IT IS ASSUMED -; THAT AN OS IMAGES FILE IS APPENDED TO THE END OF THE IMAGE AND IS LAUNCHED -; AFTER HBIOS IS INSTALLED. +;;;; - IMGBOOT: BOOT FROM AN IMAGE FILE THAT HAS BEEN PLACED IN THE USER BANK +;;;; +;;;; WHEN IMGBOOT IS DEFINED, THE FILE IS ASSEMBLED SUCH THAT IT CAN BE PRELOADED +;;;; INTO THE RAM USER BANK BY AN EXTERNAL PROCESS THAT SUBSEQUENTLY LAUNCHES +;;;; THE CODE AT ADDRESS 0. THE MOST COMMON EXAMPLE OF THIS IS THE UNA FSFAT +;;;; TOOL WHICH CAN LOAD AN IMAGE FROM A DOS FAT FILESYSTEM PROVIDING A SIMPLE +;;;; WAY TO LOAD A TEST COPY OF HBIOS. AS IS THE CASE WITH APPBOOT, IT IS ASSUMED +;;;; THAT AN OS IMAGES FILE IS APPENDED TO THE END OF THE IMAGE AND IS LAUNCHED +;;;; AFTER HBIOS IS INSTALLED. ; ; INCLUDE FILE NESTING: ; @@ -1423,15 +1421,32 @@ BOOTWAIT: ; Z280 BARE METAL INIT ; #IF (CPUFAM == CPU_Z280) + ; CLEAR THE MASTER STATUS REGISTER + LD C,Z280_MSR ; MASTER STATUS REGISTER + LD HL,$0000 ; SYS MODE, NO INTERRUPTS + LDCTL (C),HL ; DO IT +; ; SET MAXIMUM I/O WAIT STATES FOR NOW LD C,Z280_BTCR ; BUS TIMING AND CONTROL REGISTER LD HL,$0033 ; 3 I/O WAIT STATES ADDED - LDCTL (C),HL + LDCTL (C),HL ; DO IT ; - ; START BY SELECTING I/O PAGE $FF + ; SELECT I/O PAGE $FF FOR INTERNAL SYSTEM REGISTER ACCESS LD L,$FF ; MMU AND DMA PAGE I/O REG IS $FF LD C,Z280_IOPR ; REG C POINTS TO I/O PAGE REGISTER - LDCTL (C),HL + LDCTL (C),HL ; DO IT +; + ; DISABLE MEMORY REFRESH CYCLES + LD A,$08 ; REFRESH DISABLED + OUT (Z280_RRR),A ; DO IT +; + ; INITIALIZE CACHE CONTROL REGISTER + LD A,$20 ; CACHE INSTRUCTIONS, NOT DATA + OUT (Z280_CCR),A ; DO IT +; + ; INITIALIZE TRAP CONTROL REGISTER + LD A,$00 ; ALLOW USER I/O, NO EPU, NO STK WARN + OUT (Z280_TCR),A ; DO IT ; #IF (MEMMGR == MM_Z280) ; @@ -1468,10 +1483,6 @@ BOOTWAIT: LD C,Z280_MMUMCR ; MMU MASTER CONTROL REGISTER LD HL,$BBFF ; ENABLE USER & SYSTEM TRANSLATE OUTW (C),HL -; - ; DISABLE MEMORY REFRESH CYCLES - LD A,$08 ; DISABLED - OUT (Z280_RRR),A ; SET REFRESH RATE REGISTER ; JR Z280_INITZ ; JUMP TO CODE CONTINUATION ; @@ -1505,7 +1516,7 @@ Z280_INITZ: ; #ENDIF ; - ; RESTORE I/O PAGE TO $00 + ; RESTORE I/O PAGE TO $00 FOR NORMAL USER I/O SPACE LD L,$00 ; NORMAL I/O REG IS $00 LD C,Z280_IOPR ; REG C POINTS TO I/O PAGE REGISTER LDCTL (C),HL @@ -2917,17 +2928,26 @@ HB_Z280BUS1: PRTS("BTCR=$") LD C,Z280_BTCR ; BUS TIMING AND CONTROL REGISTER LDCTL HL,(C) - CALL PRTHEXWORDHL + LD A,L + CALL PRTHEXBYTE CALL PC_SPACE PRTS("BTIR=$") LD C,Z280_BTIR ; BUS TIMING AND CONTROL REGISTER LDCTL HL,(C) - CALL PRTHEXWORDHL + LD A,L + CALL PRTHEXBYTE CALL PC_SPACE PRTS("CCR=$") LD C,Z280_CCR ; CACHE CONTROL REGISTER LDCTL HL,(C) - CALL PRTHEXWORDHL + LD A,L + CALL PRTHEXBYTE + CALL PC_SPACE + PRTS("TCR=$") + LD C,Z280_TCR ; CACHE CONTROL REGISTER + LDCTL HL,(C) + LD A,L + CALL PRTHEXBYTE #ENDIF ; #IFDEF ROMBOOT @@ -3326,32 +3346,28 @@ DBG_NOTE: ; #ENDIF ; +#IFDEF TESTING + CALL SND_BEEP +#ENDIF +; INITSYS4: ; #IF (MEMMGR == MM_Z280) - ; LEAVE SYSTEM MODE STACK POINTING TO AN OK PLACE - LD SP,HB_STACK ; NOW USE REAL SYSTEM STACK LOC -; - HB_DI ; NOT SURE THIS IS NEEDED + ; LEAVE SYSTEM MODE STACK POINTING TO THE RIGHT PLACE + LD SP,HB_STACK ; DEDICATED HBIOS STACK LOC ; ; ACTIVATE THE CORRECT USER MODE BANK LD A,(HB_CURBNK) ; GET CURRENT BANK - CALL HBX_BNKSEL + CALL HBX_BNKSEL ; DO IT ; ; PRESET THE USER MODE STACK - LD HL,HBX_LOC - LDCTL USP,HL -; - HB_EI ; NOT SURE THIS IS NEEDED + LD HL,HBX_LOC ; USER STACK JUST BELOW PROXY + LDCTL USP,HL ; DO IT ; ; SWITCH TO USER MODE NOW - LD C,Z280_MSR - LD HL,$407F - LDCTL (C),HL -#ENDIF -; -#IFDEF TESTING - CALL SND_BEEP + LD C,Z280_MSR ; MASTER STATUS REGISTER + LD HL,$4000 | $0B ; USER MODE W/ NORMAL INT MASK + LDCTL (C),HL ; DO IT #ENDIF ; DIAG(0) ; CLEAR BOOT DIAG LED(S) @@ -5911,23 +5927,31 @@ Z280_PRIVINST: EX (SP),HL ; GET ADR, SAVE HL ; PUSH AF - PUSH BC - PUSH DE + PUSH BC ; NEEDED? + PUSH DE ; NEEDED? ; LDUP A,(HL) ; BYTE FROM USER SPACE ; - ; HANDLE DI + ; HANDLE USER MODE Z80 DI CP $F3 ; DI? JR NZ,Z280_PRIVINST2 - HB_DI ; DO THE DI + + ;;;HB_DI ; DO THE DI + XOR A ; NO INTERRUPTS + LD (HB_MSRSAV),A ; UPDATE SAVED MSR LSB + INC HL ; BUMP PAST IT JR Z280_PRIVINSTX ; Z280_PRIVINST2: - ; HANDLE EI + ; HANDLE USER MODE Z80 EI CP $FB ; EI? JR NZ,Z280_PRIVINST3 - HB_EI ; DO THE EI + + ;;;HB_EI ; DO THE EI + LD A,$0B ; NORMAL INTERRUPTS + LD (HB_MSRSAV),A ; UPDATE SAVED MSR LSB + INC HL ; BUMP PAST IT JR Z280_PRIVINSTX ; @@ -5954,8 +5978,8 @@ Z280_PRIVINST4: ; Z280_PRIVINSTX: ; RESTORE REGISTERS - POP DE - POP BC + POP DE ; NEEDED? + POP BC ; NEEDED? POP AF ; ; RECOVER HL AND MSR, THEN RETURN VIA RETIL diff --git a/Source/Images/Common/All/CLRDIR.COM b/Source/Images/Common/All/CLRDIR.COM index 9c00904f..068bfb4c 100644 Binary files a/Source/Images/Common/All/CLRDIR.COM and b/Source/Images/Common/All/CLRDIR.COM differ diff --git a/Source/RomDsk/ROM_128KB/CLRDIR.COM b/Source/RomDsk/ROM_128KB/CLRDIR.COM index 9c00904f..068bfb4c 100644 Binary files a/Source/RomDsk/ROM_128KB/CLRDIR.COM and b/Source/RomDsk/ROM_128KB/CLRDIR.COM differ diff --git a/Source/RomDsk/ROM_256KB/CLRDIR.COM b/Source/RomDsk/ROM_256KB/CLRDIR.COM index 9c00904f..068bfb4c 100644 Binary files a/Source/RomDsk/ROM_256KB/CLRDIR.COM and b/Source/RomDsk/ROM_256KB/CLRDIR.COM differ diff --git a/Source/RomDsk/ROM_384KB/CLRDIR.COM b/Source/RomDsk/ROM_384KB/CLRDIR.COM index 9c00904f..068bfb4c 100644 Binary files a/Source/RomDsk/ROM_384KB/CLRDIR.COM and b/Source/RomDsk/ROM_384KB/CLRDIR.COM differ diff --git a/Source/RomDsk/ROM_896KB/CLRDIR.COM b/Source/RomDsk/ROM_896KB/CLRDIR.COM index 9c00904f..068bfb4c 100644 Binary files a/Source/RomDsk/ROM_896KB/CLRDIR.COM and b/Source/RomDsk/ROM_896KB/CLRDIR.COM differ diff --git a/Source/RomDsk/ReadMe.txt b/Source/RomDsk/ReadMe.txt index 5fe0d7ed..c5fdee56 100644 --- a/Source/RomDsk/ReadMe.txt +++ b/Source/RomDsk/ReadMe.txt @@ -9,10 +9,15 @@ This is the parent directory for all files to be included in the ROM Disk when a ROM is built. -When constructing the ROM disk as part of a build, the build process +When constructing the ROM Disk as part of a build, the build process first grabs all of the "standard" files for the size of ROM being -built. So, if you are building a normal 512KB ROM, all of the files -in ROM_512KB directory will be pulled in. +built. Note the table at the bottom of this file which indicates +the size of the ROM Disk that will be created depending on +the size of your ROM chip and the boot type of your system. The +size of your ROM Disk determines which sub-folder will be used to +pull in your files. For example, if you are using a typical 512KB +ROM chip and a normal ROM Boot process, you will have a 384KB ROM +Disk and the files will come from the ROM_384KB sub-folder. You may freely add/delete/update the files in these directories to change the contents of the ROM Disk of your ROM firmware. @@ -27,16 +32,22 @@ BuildROM script: The resulting ROM Disk is still OK to use, but will not contain the file(s) that did not fit. -RomWBW also supports the concept of a "ROMless" system in which an -external bootstrap pre-loads the RAM. The RAM_xxxKB directories -contain the files to be used for such systems. Note the size of the -RAM disk on a 512KB ROMless system is not the same as the RAM disk -on a normal system. This is due to different bank layout and overhead. - -System ROM Disk Image RAM Disk Image ------- -------------- -------------- -128KB n/a n/a -256KB 128KB ROM Disk n/a -512KB 384KB ROM Disk 256KB RAM Disk -1024KB 896KB ROM Disk 768KB RAM Disk ??? -2048KB n/a 1792KB RAM Disk ??? \ No newline at end of file +The table below indicates the size of the ROM Disk that you will +have based on your ROM chip size and boot type. The common boot +type is a ROM Boot where your system boots from code on the ROM. +Alternatively, some systems provide a ROMless boot where the +code is loaded from somewhere else (typically a disk or CF/SD Card). +In this case, you actually have no ROM disk, but instead you get +a pre-loaded RAM disk. + +A normal ROM Boot system will have a ROM Disk that is 128KB less +than the size of the ROM chip. A ROMless Boot system will have a +ROM Disk that is 256KB less than the size of the ROM chip. + +ROM Chip ROM Boot ROMless Boot +-------------- -------------- -------------- +128KB n/a n/a +256KB 128KB ROM Disk n/a +512KB 384KB ROM Disk 256KB RAM Disk +1024KB 896KB ROM Disk 768KB RAM Disk +2048KB n/a 1792KB RAM Disk \ No newline at end of file diff --git a/Source/ver.inc b/Source/ver.inc index d9157629..cd0508b2 100644 --- a/Source/ver.inc +++ b/Source/ver.inc @@ -2,7 +2,7 @@ #DEFINE RMN 5 #DEFINE RUP 0 #DEFINE RTP 0 -#DEFINE BIOSVER "3.5.0-dev.34" +#DEFINE BIOSVER "3.5.0-dev.35" #define rmj RMJ #define rmn RMN #define rup RUP diff --git a/Source/ver.lib b/Source/ver.lib index bd52da34..7958f07b 100644 --- a/Source/ver.lib +++ b/Source/ver.lib @@ -3,5 +3,5 @@ rmn equ 5 rup equ 0 rtp equ 0 biosver macro - db "3.5.0-dev.34" + db "3.5.0-dev.35" endm