home *** CD-ROM | disk | FTP | other *** search
/ CP/M / CPM_CDROM.iso / cpm / utils / sysutl / sgen2.lbr / SGEN2.DZC / SGEN2.DOC
Text File  |  1987-08-29  |  5KB  |  94 lines

  1.     MORE THAN TWO SYSTEM TRACKS FOR CP/M 2.2 - A PRACTICAL SOLUTION
  2.  
  3.                           By Donald E. Killen
  4.  
  5.  
  6. For those of you out there in CP/M-land who want three (or more) system
  7. tracks but are tired of asking "HOW", here is one way.  It works in
  8. conjunction with the program "SGEN.COM" which I have provided the Group
  9. with.
  10.  
  11. For openers, when I found myself running out of BIOS space (CP/M 2.2 is
  12. two sectors WORSE than good ol' 1.4 on this count), I asked myself,
  13. "Self, how are you going to GET all the nice stuff you write in
  14. assembler code ON a floppy, using Digital Research's SYSGEN (or a
  15. "GETSYS/ PUTSYS" combination of some sort)?" And I answered - "with
  16. difficulty".
  17.  
  18. Next, I found myself musing about compatibility with the "two-tracked"
  19. world once I did manage to build 3 or more system tracks and use the
  20. thing successfully.  So again I said, "Self, how are you going to get
  21. out of THAT one?" And I answered "With difficulty".
  22.  
  23. Just to show you how unreliable first impressions can be, I looked
  24. closer at the documentation on CP/M 2.2 (As an avid non-reader of most
  25. documentation, I did what I usually did, search for the pictures, found
  26. none of those, and started from the back, reading towards the front.)
  27.  
  28. About three one morning I said "AHA" - I know what I'll do - I'll fool
  29. the system by defining (in 2.2) TWO sets of logical disk drives, and
  30. "fold" one set over the other such that there is one set of physical
  31. drives, each drive of which has two logical definitions, either of which
  32. can be specified at run time.
  33.  
  34. I defined eight physical drives, 0 through 7.  Drives 0, 1, 2, and 3 are
  35. defined just like the others except that three (3) tracks are "reserved"
  36. - i.e. used for the "system", which includes my gigantic BIOS.  Drives
  37. 4, 5, 6, and 7 use two (2) system tracks.  Selecting drive "A" in my
  38. system gets a 3-track drive, selecting "E" gets you the SAME physical
  39. drive, only it is known (to CP/M) to have only two system tracks.  Thus
  40. I can be compatible with certain 2-tracked worlds with only one drive,
  41. if I must.  Or I can use up to four drives and mix them any way I want.
  42. One EASY way to tell if you've forgotten and selected a two-track drive
  43. which has a 3-track floppy in it is that DIR gets you a lot of nulls or
  44. "NO FILE", depending upon whims, etc.This works the other way around
  45. also.
  46.  
  47.         Physical Drive  0       1       2       3
  48.         ----------------------------------------------
  49.         3-track drive:  A       B       C       D
  50.         2-track drive:  E       F       G       H
  51.         ----------------------------------------------
  52.  
  53. The chart above is a handy reference and serves to illustrate the
  54. functionality of this scheme.  However, one further point has to be
  55. mentioned.  Your average (e.g. Tarbell) Floppy Disk Interface can
  56. select one of a maximum of FOUR drives.  Therefore, I had to perform
  57. minor surgery on the SELDSK routine in BIOS.  Just at the point that
  58. SELDSK is about to ship off two bits specifying which of four drives you
  59. want, the third (hi-order, or bit 2) bit gets discarded.  Up to that
  60. point, and for that matter, in RAM until changed, are three bits
  61. defining the LOGICAL drive requested.  That accesses the tables (in CP/M
  62. 2.2) which define the disk parameters.  Then, for the purposes of
  63. limited controllers (like the Tarbell Single Density controller), only
  64. the least significant two bits are used - hence a 4 looks like a 0, a 5
  65. like a 1, and so-forth.
  66.  
  67. If anyone is really interested in the gory details, Charlie Foster has a
  68. disk with a copy of my BIOS (KBIOS.MAC/PRN) - which might convey the
  69. details in more depth.
  70.  
  71. Once CP/M has this capability, I next needed to refine the program I
  72. call SGEN.  SGEN.COM will do anything Digital Research's SYSGEN will do,
  73. plus it is an "n-track" system in that it asks you up front how many
  74. tracks (system tracks) you want to copy.  It works with 1-9 tracks
  75. (NOTE: If anyone comes up with a one-track system, let me know, o.k.).
  76. It makes you say "y" (or "Y") to make doubly sure, then copies from
  77. memory or disk to memory or disk - just like SYSGEN.  You'll also need
  78. the upgraded versions of MACRO.LIB, which, after converting nearly
  79. everything to Zilog notation, is called MACROZ.MAC, and I believe
  80. CLIB.MAC is also used.  The latter is a clutter of miscellany which I've
  81. put together for assembly development work.
  82.  
  83. I have no idea what one would do with regard to defining drives "sort
  84. of" like the above only for CP/M 1.4 - but I'd like to hear any comments
  85. anyone has.
  86.  
  87. EDITOR'S NOTE: Don Killen is willing to discuss this (or any other
  88.     items of interest) with anyone but prefers a note in the mail
  89.     however he doesn't really mind the phone at all.  So----
  90.  
  91. Donald Killen
  92. 2101 Hickory Drive  Home: (214) 242-4968
  93. Carrollton, Tx 75006
  94.