home *** CD-ROM | disk | FTP | other *** search
/ CP/M / CPM_CDROM.iso / simtel / sigm / vols000 / vol025 / sgen.doc < prev    next >
Text File  |  1985-02-09  |  5KB  |  101 lines

  1.  
  2.        -----------------------------------------------
  3.  
  4.    MORE THAN TWO SYSTEM TRACKS FOR CP/M 2.2 - A PRACTICAL SOLUTION
  5.  
  6.                 By Donald E. Killen
  7.  
  8.  
  9. For those of you out there in CP/M-land who want three (or more) system
  10. tracks but are tired of asking "HOW", here is one way.  It works in
  11. conjunction with the program "SGEN.COM" which I have provided the Group
  12. with.  
  13.  
  14. For openers, when I found myself running out of BIOS space (CP/M 2.2 is
  15. two sectors WORSE than good ol' 1.4 on this count), I asked myself,
  16. "Self, how are you going to GET all the nice stuff you write in assembler
  17. code ON a floppy, using Digital Research's SYSGEN (or a "GETSYS/
  18. PUTSYS" combination of some sort)?"  And I answered - "with difficulty".
  19.  
  20. Next, I found myself musing about compatibility with the "two-tracked"
  21. world once I did manage to build 3 or more system tracks and use the
  22. thing successfully.  So again I said, "Self, how are you going to get
  23. out of THAT one?"  And I answered "With difficulty".
  24.  
  25. Just to show you how unreliable first impressions can be, I looked
  26. closer at the documentation on CP/M 2.2 (As an avid non-reader of
  27. most documentation, I did what I usually did, search for the
  28. pictures, found none of those,and started from the back, reading
  29. towards the front.)
  30.  
  31. About three one morning I said "AHA" - I know what I'll do - I'll fool
  32. the system by defining (in 2.2) TWO sets of logical disk drives, and
  33. "fold" one set over the other such that there is one set of physical
  34. drives, each drive of which has two logical definitions, either
  35. of which can be specified at run time.
  36.  
  37. I defined eight physical drives, 0 through 7.  Drives 0,1,2, & 3
  38. are defined just like the others execpt that three (3) tracks are
  39. "reserved" - i.e. used for the "system", which includes my gigantic
  40. BIOS.  Drives 4,5,6, & 7 use two (2) system tracks.
  41. Selecting drive 'A' in my system gets a 3-track drive, selecting 'E'
  42. gets you the SAME physical drive, only it is known (to CP/M) to
  43. have only two system tracks.  Thus I can be compatible with certain
  44. 2-tracked worlds with only one drive, if I must.  Or I can use up to
  45. four drives and mix them any way I want.  One EASY way to tell if you've
  46. forgotten and selected a two-track drive which has a 3-track floppy
  47. in it is that DIR gets you a lot of nulls or "NO FILE", depending
  48. upon whims, etc.This works the other way around also.  
  49.  
  50.     Physical Drive    0    1    2    3
  51.     ----------------------------------------------
  52.     3-track drive:    A    B    C    D
  53.     2-track drive:    E    F    G    H
  54.     ----------------------------------------------
  55. èThe chart above is a handy reference and serves to illustrate the
  56. functionality of this scheme.  However, one further point has to be
  57. mentioned.  Your average (e.g. Tarbell) Floppy Disk Interface can
  58. select one of a maximum of FOUR drives.  Therefore, I had to perform
  59. minor surgery on the SELDSK routine in BIOS.  Just at the point that
  60. SELDSK is about to ship off two bits specifying which of four
  61. drives you want, the third (hi-order, or bit 2) bit gets discarded.
  62. Up to that point, and for that matter, in RAM until changed, are three
  63. bits defining the LOGICAL drive requested.  That accesses the tables
  64. (in CP/M 2.2) which define the disk parameters.  Then, for the purposes
  65. of limited controllers (like the Tarbell Single Density controller), only
  66. the least significant two bits are used - hence a 4 looks like a 0,
  67. a 5 like a 1, and so-forth.
  68.  
  69. If anyone is really interested in the gory details, Charlie Foster has
  70. a disk with a copy of my BIOS (KBIOS.MAC/PRN) - which might convey
  71. the details in more depth.  
  72.  
  73. Oncσá CP/═á ha≤á thi≤ capability¼á ╔ nex⌠ needeΣá t∩á refinσá thσ prograφá
  74. ╔á cal∞á SGE╬á «á  SGEN.CO═á wil∞á d∩á anythinτá Digita∞ Research'≤ SYSGE╬ 
  75. wil∞ do¼ plu≤ i⌠ i≤ aε "n-trackó systeφ iε tha⌠ i⌠á ask≤ yo⌡ u≡ fron⌠ ho≈ 
  76. man∙ track≤ (systeφ tracks⌐ yo⌡ wan⌠ t∩ copy«á  I⌠ work≤ witΦ 1-╣ track≤ 
  77. (NOTE║á  Iµ anyonσ come≤ u≡ witΦ  ß one-tracδ system¼ le⌠ mσ know¼ o.k.)« 
  78. I⌠ make≤ yo⌡ sa∙ "yó (o≥ "Y"⌐á t∩á makσ doubl∙ sure¼á theε copie≤ froφ 
  79. memor∙ o≥á disδá t∩ memor∙ o≥ disk - just like SYSGEN. You'll also need 
  80. the upgraded versions of MACRO.LIB, which, after converting nearly 
  81. everything to Zilog notation, is called MACROZ.MAC, and I beleive CLIB.MAC 
  82. is also used.  The latter is a clutter of miscellany which I've put together 
  83. for assembly development work.
  84.  
  85. I have no idea what one would do with regard to defining drives "sort of"
  86. like the above only for CP/M 1.4 - but I'd like to hear any
  87. comments anyone has.
  88.  
  89.       ------------------------------------------------
  90. EDITOR'╙á NOTE║á  Doε Killeε i≤ willinτ t∩ discus≤ thi≤á (o≥á an∙ ì
  91.                   othe≥áá item≤á oµá interest⌐á witΦá anyonσá bu⌠ ì
  92.                   prefer≤á  ßá notσá iε thσá mai∞á howeve≥áhe   ì
  93.                   doesn't really  mind the phone at all. So----
  94. Donald Killen
  95. 2101 Hickory Drive            home: (214) 242-4968
  96. Carrollton, Tx                
  97. 75006
  98.  
  99.  
  100.  
  101.