Date : Mon, 13 Jan 1986 03:40:08 GMT
From : "Phil Dimond, ms:SNA/CSS Engineering,Sydney,Aust." <dimond%aussie.dec@BRL.ARPA>
Subject: 40 track drives on Apple CP/M
Hi:
From the responses I have gratefully received from the net, I have
the essential data for modifying Apple CP/M to drive 40 tracks on Apple
drives. I will summarise here. If anyone desires further information, please
do not hesitate to contact me by mail.
Firstly, it is very important to use late model drives. Apple has
advised me that any drives sold since the IIe was released should be capable
of 40 track operation. Any Far-East Apple compatible drives should also
be fine. The problem with old drives is that they cannot step to 40 tracks.
Now, the only modification that is required is to alter the drive
characteristics contained in the BDOS. These characteristics are held in
the Disk Parameter Block, whose initial address can be found by BDOS function
31. To find this address, enter DDT, and run the following program:
0100 MVI C,1F ;Load C for function 31.
0102 CALL 5 ;Execute the function.
0105 RES 7 ;On completion, re-enter DDT.
Now, if the CPU registers are examined, the data in the HL register
should contain the address of the first block of the DPB for the current
default drive. In my 60K Softcard II CP/M the address is FA73 hex for drive
A: .
Offset five bytes from this are two bytes called the DSM parameter.
These bytes, stored with the low order byte first, give the block number
of the highest block on the disk. In the case of Apple CP/M, there are four
blocks per track, thus for a 35 track drive the highest block number will
be 139 (as the blocks are numbered from zero). We actually have 40 tracks,
so we wish to store 9F hex in this parameter.
The easy way to do this is to execute the following program. It
will find the DPB for the current default drive, and automatically alter
it's value. The easy way to ensure the disk change is to autorun this
program on disk boot.
;Modify the DPB to set the current default drive to 40 tracks.
;Written in 8080 assembler for the DR assm assembler.
;
ORG 0100H ;Start of Transient Program Area.
;
START: MVI C,01FH ;Prepare to call BDOS function 31.
CALL 5 ;Execute the function.
LXI D,05H ;Load the parameter offset.
DAD D ;Add the offset to the DPB address.
MVI B,09FH ;Load the new parameter value.
MOV M,B ;Update the DPB.
RET ;Return to CP/M.
;
A better way is to use one of the multitude of disk editing utilities
that are available in the public domain for CP/M. Edit the system tracks
until you find a copy of the DPB that you see in memory, modify it accordingly,
and you have altered it for good.
It is at this point that a problem crops up - there is no easily
accessible formatting program available for the Apple CP/M environment that
will format the 40 tracks, at least that I know of.
Does anyone have one, or even the source to one of uSoft's formatting
programs, or even an idea of how to modify them? It could not be that hard.
This information was compiled with the help of some reference texts
and several net persons (they know who they are - let me thank them ). A
good reference text is:
"Mastering CP/M", by Alan R Miller, pub: SYBEX Inc, 1983
" All opinions expressed herein are those of myself only, and not
necessarily those of any other persons, or of any organisation, or of the
cat which lives in our flats."
Phil Dimond,
...decvax!decwrl!dec-rhea!dec-aussie!dimond
"When all else fails take the engineering approach: Hit it with a hammer."