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