home *** CD-ROM | disk | FTP | other *** search
/ 8bitfiles.net/archives / archives.tar / archives / genie-commodore-file-library / Information / DIR-EXTEND-INFO < prev    next >
Encoding:
Text File  |  2019-04-13  |  5.9 KB  |  126 lines

  1. To   : All 1571 owners
  2. From : Ed Parry, Sepulveda, CA
  3. Subj : Extending 1571 DIR entry capacity
  4. Date : 23 April 1987
  5.  
  6. 1) 1st the explanation: I bought C POWER 128 in September of 1986. I
  7. noticed that the disk was actually a FLIPPY. Two single formatted sides
  8. on one disk. The back side contains all the LIBRARY's, the front
  9. contains other C programs and files. I thought it would be nice to fit
  10. these ALL on ONE 1571 formatted disk so I wouldn't have to flip the
  11. disk while linking my LIBRARY's.
  12.  
  13. 2) To the rescue: While on Chris (ARC) Smeets BBS a few days ago I
  14. posted that I was looking for ideas or solutions to this "extended DIR"
  15. prob. I had tried unsuccessfully several weeks before and gave up in
  16. frustration. (8 hours with nothing to show get's depressing!) Chris
  17. himself posted a reply that ended up being the solution to my problems.
  18. Following is the technique I used to make my C POWER 128 disk hold 173
  19. directory entrys. The main idea/technique is HIS idea, I just fine
  20. tuned a bit here and there for the 1571.
  21.  
  22. 3) Limitations : 1st, we both learned that your CANNOT write to an
  23. "extended dir" once you alter the disk to obtain the extended dir. To
  24. get the files on there in the 1st place requires some work. U CAN ADD
  25. further files in this manner but CANNOT add files without playing with
  26. the disk a bit.
  27.  
  28. 4) Here's how to do it:
  29.  
  30. a) Format a disk in 128/1571 mode. (Gives a disk of 1300+ blocks)
  31. b) copy all the SIDE TWO files to your destination disk.
  32. c) Enter and run this little program:
  33.  
  34. 10 open8,8,8,"$0:*":rem read dir as a SEQ file.
  35. 20 open9,8,9,"old dir,s,w":rem open SEQ file to host our "old dir"
  36. 30 fori=1to254:get#8,a$:next:rem skip BAM (18/0)
  37. 40 get#8,a$:s=st:rem start grabbing DIR bytes/save i/o status
  38. 50 print#9,chr$(asc(a$));:rem output byte to OUR "old dir" file.
  39. 60 ifs=0 then 40:rem loop until we hit EOF.
  40. 70 close8:close9
  41.  
  42. For 1541's in C64 mode you have to add in a line:
  43.  
  44. 45 ifa$=""thena$=chr$(0):rem haven't tried it yet but oughta work!
  45.  
  46. What this little program does is READ your current directory as a SEQ
  47. file and then re-writes it into another SEQ file. If you check your DIR
  48. after you run this program you'll see the file "old dir" in there.
  49. It'll be as many blocks long as your DIR is currently using.
  50.  
  51. 5) Now use a good sector editor (I suggest DISKNOSER 128 v2.0!) and go
  52. back thru track 18, starting at sector 1 and change all the "filetype"
  53. bytes to $00's. You'll note these easily because they are the bytes 3
  54. to the left of the 1st letter of the filenames. Generally these are
  55. (REV)a's and (REV)b's. There are 8 entrie's in a DIR sector if the
  56. sector is full. The LAST DIR sector will have a LINK of 000/255. (Or
  57. 000/000 if your using NOSER.) Simply link thru the DIR sectors
  58. nullifying all the active filetypes insuring to (re)write the sector
  59. after you've made your alterations.
  60.  
  61. 6) When you get to the "old dir" file entry you should write down the
  62. TRACK/SECTOR link for the start of that file. It is VERY important
  63. since we will eventually LINK our TRACK 18 dir to that TRACK/SECTOR. To
  64. find out the track/sector link for the file put the cursor on the 1st
  65. character of the filename ("o") and cursor LEFT twice. Check your JUMP
  66. link indicator and jot down the track and sector. This will be your
  67. extended DIR!
  68.  
  69. 7) Now we're ready to copy further. Your DIR should now appear empty
  70. yet the BAM will reflect all the blocks used so nothing will get
  71. overwritten. File copy the remainder of your files over to the disk
  72. now. (I used UNICOPY+/128 that has been modified so 1571 side two slow
  73. downs don't occur! (Thanx JG!))
  74.  
  75. 8) When done, reboot your sector editor. Trace thru the NEW DIR files
  76. that will start at 18/1 until you reach the 000/255 (block without a
  77. valid JUMP link). On the 1st TWO bytes of that block, edit the 1st byte
  78. to contain the value of your "old dir" TRACK and the second byte of
  79. that block to the value of your "old dir" SECTOR. (Noser users note
  80. that all EDIT values MUST be 3 digits. IE:3 would be "003". 15 would be
  81. "015" etc. Both DIR are now linked!
  82.  
  83. 9) I ran into a snag. It seems when a 1571 hits ANY sector that is
  84. numbered ZERO ("0") that it think's it has hit the end of your dir.
  85. After I figured this out (took an hour of figuring!) I decided to
  86. simply COPY the TRACK/0 sector to another NON 0 sector. In MY case 24/0
  87. was copied to 24/3. If you have a sector 0 in your "old dir" file
  88. simply find an empty sector near or in the same current track (altho
  89. not essential) and copy the sector 0 block to your NEW block. Then EDIT
  90. the links (1st two bytes of EVERY sector = TRACK/SECTOR link) that
  91. pointed to your sector 0 to point to your NEW track/sector: IE: (In MY
  92. case)
  93.  
  94. 24/14 - pointed to 24/00
  95. 24/00 - pooped out my extended DIR when it got here!
  96. 24/06 - 24/00 pointed here.
  97.  
  98. I copied 24/0 to 24/3.
  99. I EDITed the 1st two bytes on 24/14 to point to 24/3.
  100. I was done and it works!
  101.  
  102. 10) Conclusion: As a READ only disk I am quite satisfied. You can add
  103. MORE files long as you disconnect the "old dir" every time you save to
  104. the disk. I also have not attempted to validate for fear that it would
  105. mangle the disk in some way. The only wasted block I am aware of is the
  106. SECTOR 0 block (24/00) that I copied to another sector.
  107.  
  108. I hope this proves informative and interesting. Much thanx to Chris
  109. Smeets for his ingenious idea.
  110.  
  111. *QUICK DISKNOSER/128 v2.0 NOTE* - When it became obvious I had to copy
  112. the sector I decided to update/modify DISKNOSER 128 a bit. I added in
  113. COLOR (lost a little screen print speed but it's WELL worth it!), added
  114. in a COPY sector option (Just READ a sector then hit C and enter your
  115. target TRACK and SECTOR!) and modified the DOS wedge and DIR wedge a
  116. bit. For a QUICK dir hit a "$". For patterned DIR's just enter the
  117. pattern at the Disk Command (wedge) prompt. (IE:$*=p for all program
  118. files...) Lemme know whatcha think of DISKNOSER v2.0 and how your DIR
  119. EXTENDING adventures goes!
  120.  
  121.  
  122. thanx, Ep
  123.  
  124. GEnie Mailbox : EBBS
  125. COREWARS EBBS : 818-846-8083 (#2)
  126.