home *** CD-ROM | disk | FTP | other *** search
/ ftp.barnyard.co.uk / 2015.02.ftp.barnyard.co.uk.tar / ftp.barnyard.co.uk / cpm / walnut-creek-CDROM / ENTERPRS / CPM / UTILS / F / FORMAT81.LZH / FORMAT81.DOC < prev    next >
Text File  |  1991-01-16  |  8KB  |  160 lines

  1.  
  2.                  USING THE 1581 DRIVE WITH CP/M
  3.  
  4.                           Gene Pizzetta
  5.                        September 13, 1987
  6.  
  7.  
  8. I've been waiting almost two months for the new CP/M BIOS to arrive from West 
  9. Chester, while my 1581 drive gathered dust on the shelf.  I'm sure the new 
  10. system will be great when it finally gets here, but in the meantime I decided 
  11. to do something to get the new drive working on my machine. 
  12.  
  13. Using the format program included in this library you can get your 1581 in 
  14. service under CP/M in about three minutes.  With about another half-hour of 
  15. work you can get a full 800K on your 3-1/2 inch disks. 
  16.  
  17. It should be emphasized that the format program creates a disk that you 
  18. computer will think is an Epson QX-10 double-sided 5-1/4 inch floppy.  This 
  19. disk format is not likely to be compatible with the revised BIOS you will 
  20. eventually get from Commodore, so you'll probably have to move everything to 
  21. disks with the new format later.  In addition, you will not be able to boot 
  22. CP/M from the 1581, so it should not be drive A.  In the meantime, though, 
  23. you'll have a fast, high-capacity drive that will hold all of WordStar Release 
  24. 4 with plenty of space to spare. 
  25.  
  26.  
  27.                             FORMAT81
  28.                            Version 1.1
  29.  
  30.  
  31. This is an interim program to format a disk in the Commodore 1581 disk drive 
  32. for use under CP/M 3.0 on the C-128.  Disks formatted with this program are 
  33. NOT likely to be compatible with the official BIOS upgrade, when it is finally 
  34. delivered by Commodore Business Machines. 
  35.  
  36. USAGE:
  37.  
  38.     FORMAT81 {d:}
  39.  
  40. This command will format the disk in the given drive.  If a drive 
  41. specification is not supplied in the command tail, then the currently logged 
  42. disk is assumed.  Only drives A, B, C, and D will be accepted; all others 
  43. result in an 'invalid drive' message.  Permissible drives may be further 
  44. restricted in the drive list. 
  45.  
  46. When you first put a disk into the 1581, you will be unable to make that drive 
  47. the default (current) drive.  If you try it, CP/M will make several attempts 
  48. to log it in and then report a disk error.  Returning you to where you were.  
  49. Because of that you will have to use the command line drive designator to 
  50. format your first disk (for example, "FORMAT81 B:".  After the disk is 
  51. formatted, you can log in the drive and check your disk space with SHOW.COM, 
  52. NEW-D.COM, XDIR, or some other favorite utility. 
  53.  
  54. This format program will no doubt cause problems if you try to run it on a 
  55. disk in a 1571 drive.  Frankly, I haven't tried it (I haven't had the guts!), 
  56. so I won't make any predictions.  I think it would be best if you avoided the 
  57. possibility by making a small change in the source code at the label DrvLst.  
  58. The comments explain the procedure. 
  59.  
  60. If you don't want to bother with reassembly, you can make the patch directly 
  61. to the .COM file using EDFILE or SID.  The drive list can be found at 103h-
  62. 106h.  These four bytes are flags for drives A through D, respectively.  If 
  63. the byte for a drive is non-zero then FORMAT81 will abort with an "invalid 
  64. drive" message if by chance it is the drive you inadvertantly selected.  As 
  65. distributed, the program will format a disk in any drive, but you should patch 
  66. FFh (or any non-zero byte) into the flag bytes that do not correspond to a 
  67. 1581 drive. 
  68.  
  69. For example, if your 1581 is drive C, then patch FFh, FFh, 00h, FFh into the 
  70. drive list.  The 00h at byte 105 corresponds to drive C.  After you've made 
  71. the patch, FORMAT81 won't let you format a disk in any drive but C. 
  72.  
  73. This program was developed with SLRMAC, a truly fantastic 8080 assembler that 
  74. has extended Intel Z80 mnemonics built-in (and it's only $49.95).  You can 
  75. reassemble FORMAT81.MAC with MAC and HEXCOM, but first you will have to change 
  76. the name to FORMAT81.ASM and then make sure Z80.LIB is on your default disk. 
  77.  
  78. Version 1.0 (9/10/87) -- successfully formatted disks in 1581     drive under CP/M 
  79. using Epson QX-10 format options. 
  80.  
  81. Version 1.1 (9/12/87) -- added command line drive selection,  drive list, error 
  82. checking, and drive reset. 
  83.  
  84.  
  85.                        MODIFYING THE BIOS
  86.  
  87.  
  88. After you have formatted a disk with FORMAT81, you will notice that you have 
  89. only around 390K of disk space.  That's because Epson QX-10 disks had only 40 
  90. tracks and your 1581 has 80.  You can't read and write to the full 800K of 
  91. your 1581 unless you modify your BIOS.  But that's easy to do.  Here's how: 
  92.  
  93. Making this patch will eliminate the possibility of reading and writing QX-10 
  94. double-sided disks (single-sided disks are unaffected), but I doubt many 
  95. people do that with any regularity. Anyway, you will still have your original 
  96. BIOS if you need it in a pinch. 
  97.  
  98. (At this point everybody seems to feel obliged to issue a warning about not 
  99. using your original disks.  I won't insult you. Anybody that needs such a 
  100. warning wouldn't be making patches, they'd be playing Face Maker on the 64 
  101. side.) 
  102.  
  103. To make this patch you need the source code for your BIOS. Commodore sends it 
  104. out to those who return the card in the "System Guide".  If you're using a 
  105. December 6 system that you got from another source, then the source code is 
  106. available from Quantum-Link, most FOG boards (you may have to request it from 
  107. the Sysop), and it may even be on CompuServe someplace. 
  108.  
  109. Find the file CXDISK.ASM and call up your favorite editor (like VDE) to make 
  110. two tiny changes.  Near the end of this rather long source file you will find 
  111. the source for the disk parameter blocks.  The one you need is the SECOND one 
  112. marked 'Epson QX10'. The first QX-10 block is for single-sided disks.  The 
  113. source block will look like this: 
  114.  
  115.  db 80h+S512*2+(10*2-8)+1 ; 256 byte sect, 16 sec/trk
  116. ; db S256*2   ; track 0 is 256 bytes/sector
  117.  db MFM+S512+Type0+C0+S1 ; DSDD
  118.  dw 0   ; start on track 2 sect 1 (2 alc)
  119.  dpb 512,20,40,2048,128,2 ; sect# 1 to 10
  120.  db 10   ; (top and bottom numbered the same)
  121.  db 'Epson QX10'  ; 2
  122.  
  123. You only need to make two changes, both of them in the 5th line, that begins 
  124. "dpb".  Change the "40" to "80".  Change the "2" to "0".  That tells CP/M that 
  125. the disk has 80 tracks and it should start at track 0 (the Epson had two 
  126. reserved tracks for booting the system, so it started on track 2).  You might 
  127. also want to change the ASCII string in the last line to '   1581   ', so that 
  128. there are exactly 10 letters and spaces between the single quotes.  The 
  129. modified block should look like this: 
  130.  
  131.  db 80h+S512*2+(10*2-8)+1 ; 256 byte sect, 16 sec/trk
  132. ; db S256*2   ; track 0 is 256 bytes/sector
  133.  db MFM+S512+Type0+C0+S1 ; DSDD
  134.  dw 0   ; start on track 2 sect 1 (2 alc)
  135.  dpb 512,20,80,2048,128,0 ; sect# 1 to 10
  136.  db 10   ; (top and bottom numbered the same)
  137.  db '   1581   '  ; 2
  138.  
  139. Using the small doc file that comes with the source code as your guide, you 
  140. will have to regenerate the CPM+.SYS file using the modified CXDISK.ASM file 
  141. in place of the original.  Once you get the regeneration process going, go out 
  142. to dinner.  It takes quite a while to do its work. 
  143.  
  144. When you come back, reboot the system with your new CPM+.SYS file in drive A 
  145. (along with a copy of CCP.COM, of course).  Then run SHOW.COM on your 1581. 
  146.  "RW, Space     796k"
  147. That's 800K, minus 4K for the disk directory.  Enjoy!
  148.  
  149. Let me know if you experience any problems, find any bugs, or have any 
  150. suggestions. 
  151.  
  152.      Gene Pizzetta
  153.      481 Revere Street
  154.      Revere, MA  02151
  155.  
  156.      Voice (617) 284-0891
  157.      CompuServe 72060,505
  158.      Quantum-Link GeneP
  159. 
  160.