Acorn CP/M Hard Drive BIOS v1.24 ================================ J.G.Harston, 70 Camm Street, Walkley, Sheffield S6 3TR http://mdfs.net/CPM/Acorn/HardDrive Date: 12-Sep-2010 HDBIOS.SYS is a replacement BIOS for the Acorn Z80 CoProcessor or emulator to provide access to a hard drive accessed as drive C: from CP/M. This hard drive is stored in a MyZ80-format disk image stored on any media. By default the file "$.CPMDISK" on the current ADFS disk is looked for. HDBIOS also fixes problems accessing floppy disks when DFS is not selected. Installation ============ The Acorn Z80 CoProcessor always attempts to boot CP/M from a single density disk in drive 0. Consequently, to access a hard drive CP/M must be booted from a system floppy with the Hard Drive BIOS on it, or the HDBIOS stored in a suitable sideways ROM storage system. Copy the file "CPMDISK" to the root directory of ADFS drive 0. The disk image file can be put on a different drive or filing system by changing the HDBIOS settings with the MOUNT command, by default it is adfs:$.CPMDISK. Copy the following files to an Acorn CP/M system disk: HDBIOS.SYS PUTBIOS.COM SJCCP.SYS PUTCCP.COM SETPATH.COM MOUNT.COM FREE.COM DIRX.COM To install HDBIOS.SYS on a system floppy, use the following command: PUTBIOS HDBIOS.SYS You will also find it useful to use the SJCCP instead of the standard Digital Research CCP, so install it with the following command: PUTCCP SJCCP.SYS Reboot the system completely by pressing Ctrl-D-Break. You should get the following startup message: Acorn CP/M 2.2 - HDBIOS 1.24 SJCCP version 1.40 C0> You can now access the hard drive image on the ADFS drive as CP/M drive C:. Try DIR C: or DIRX C: to examine the files on drive C:. Note that as with large CP/M drives it takes a couple of seconds to first access the drive as the large catalogue is scanned. Drive C: can store up to 1024 directory entries and 8M of data instead of the 256 directory entries and 400K of data on an AcornCPM floppy. The supplied SJCCP has the default search path set to drive C: user area 15, so you can copy often-used tools into C15: and use it as a library area. This can be changed with the SETPATH command. If the hard drive image file is found when the BIOS is cold or warm started the BIOS defaults to drive C:, otherwise drive A: is selected. Changing image file =================== By default HDBIOS.SYS uses a disk image called adfs:$.CPMDISK. This can be changed with the MOUNT command: MOUNT (CPM drive) (BBC filing system:)(BBC image file) For instance, the following command: MOUNT A: adfs::0.CPM.DRIVE_C mounts the ADFS file ':0.CPM.DRIVE_C' as the CPM drive C:, and stores the setting in the BIOS on the system tracks of drive A: MOUNT "" disables any access to drive C: entirely. The CP/M drive can be omitted, which stores the image path in the BIOS on the current CP/M disk. The BBC filing system can be omitted, which then specifies that the current filing system selected when the image file is accessed will be used. The image file can be on any filing system and any filename, but must be read/write accessible. The filename must be no more than 16 characters long. Disk errors are not trapped and will result in a return to the CCP prompt. The disk image used is the 'MyZ80' image format. This has a 256-byte header, followed by zero system tracks, followed by the disk data itself. If filetyped to "MyZ80" (&19B) images can be accessed with CPMFS (see mdfs.net/Apps/Filing). As a consequence of the drive image having no system tracks, and with the Acorn Z80 client ROM always booting from drive 0, you cannot boot from the hard drive image, you must boot from a system floppy. Extras ====== The file CPMDISK is supplied with some useful utilities in user area 15: FREE.COM - Display disk free space in a similar manner to *FREE. DIRX.COM - Extended DIR command. SETPATH.COM - Set default search path for SJCCP. CLS.COM - Clear screen MODE.COM - Select screen mode COLOUR.COM - Set text colour Creating a blank hard drive image ================================= To create a blank hard drive image file use the following code, changing the filename if needed. This code snippet is deliberately not supplied as a stand-alone file to prevent accidental running. out%=OPENOUT("$.CPMDISK") FOR A%=1 TO &8100:BPUT#out%,&E5:NEXT A% PTR#out%=&800000 CLOSE#out% Technical notes =============== The HDBIOS has been tested on Z80Tube running on an A5000 and the ARM CoPro, and with a hardware Z80 CoProcessor. The disk image filename is stored at the start of the BIOS and can be changed by patching the HDBIOS.SYS file, which can then be installed with PUTBIOS. start+&33 : Filing system number (eg 8 for ADFS) start+&34 : -terminated file name, maximum 16 characters plus . If the image file is absent, then the BIOS DSKREAD amd DSKWRITE calls will return &01 (Sector not found). The OSWORD &7F call to read/write floppy disks in the DFS on the BBC Master has problems if DFS is not the selected filing system. For example, if you try to boot into CP/M when ADFS or NET is the selected filing system then the Z80 CoPro MOS fails to read the disk to read the CP/M system tracks. Consequently, to successfully use CP/M on a BBC Master you need to configure the Master to start in DFS, or press Ctrl-D-Break to boot. With the standard floppy-only BIOS this also means that you cannot access floppies from CP/M unless DFS is selected. The HDBIOS ensures that DFS is selected whenever a CP/M floppy access is made.