View Single Post
Old 21st May 2019, 3:55 am   #70
JohnBHanson
Heptode
 
Join Date: Aug 2009
Location: Worthing, Sussex, UK.
Posts: 661
Default Re: Gemini 80-Bus System

Be careful when changing the DPB to include larger disks. The screen dumps of DISKDEF I gave earlier use the definition of even tracks being on side 0 and odd tracks being on side 1. (Scheme a)

The gemini bios uses the definition of tracks being cylinders eg each track starts on side 0 and continues on side 1. (Scheme b)

Both techniques are acceptable for CP/M and which is used depends on how the bios determines the side number.

The first definition - the bios divides the track number by two to give the cylinder number - the remainder being the side number

The second definition the sector number is compared to the number of sectors per track and this is used to determine the side number.

This means that there are a difference between some items within the Disk Parameter Block.

This affects the values of SPT and OFF defined in the Disk Parameter Block.

Scheme a
SPT: 40
OFF: 2

Scheme b
SPT:80
OFF:1

(NBSPT refer to 128 byte sectors which is what CP/M BDOS sees).

This is because scheme a tracks are actually tracks, whereas scheme b tracks are really cylinders - I hope that makes sense.

Some systems work one way and some another - CP/M does not directly have a concept of sides only tracks and sectors. So when double sided disks happened either the number of tracks or the number of sectors were doubled giving the two alternative layouts.

To change to 80 tracks you will need to change the DPB - the disk size is given by the DSM field. This is measured in blocks. If you keep the block size
the same then you will need to change the size of the allocation vector - this is one bit per block. If you don't have enough room in the bios for the larger allocation vector size you can change the block size. This will involve changing BSH/BLM/AL0/AL1. See the alteration guide for details, or look at the diskdef screen dumps earlier which have the values calculated. Note diskdef uses scheme a and not scheme b so you will have to double SPT and half the OFF values before using them in your bios.

Do make sure the memory allocted in the bios for he Check and allocation vectors are large enough.

Last edited by JohnBHanson; 21st May 2019 at 4:08 am. Reason: Correct for 128 byte sectors that CP/M sees.
JohnBHanson is offline