[comp.sys.apple] Usabale blocks on ProDOS data disk

bird@ihlpf.ATT.COM (Walters) (02/13/89)

When I updated my AppleWorks 2.0 to 2.1 I specified that I wanted the update
to be on a 3.5 disk. Unfortunately when it arrived I did not yet own such a
drive. I asked a friend to copy the files from the 3.5 to two sides of a
5.25 disk. By looking at my copy of version 2.0 I knew which  files were on
which side of the disk. Unfortunately, the three files that were supposed to
go onto side 2 would not fit. We had to put one of the three on side 1.
(SEG.PR was the "obvious" choice.)

Doing the above caused me to flip the disk two extra times when booting
(seems that SEG.PR is loaded second). In addition, getting any of the
Timeout series onto the disk was real fun.

I finally found someone that had updated and requested the 5.25 format.
Looking at that disk I saw that the files were the same size as he 3.5
format files and they were placed on the two sides exactly as they were for
version 2.0 i.e., the way I tried to get them and was unsuccessful.

Continuing, if you format a ProDOS disk and then CATALOG it you are told:

Blocks Total   Blocks Free   Blocks Used
     280           273           7

If you catalog the program disk for Appleworks version 2.1 you are told:

Blocks Total   Blocks Free   Blocks Used
    280            2            278

There are thee files on the disk and their size is:

SEG.MO  SEG.M1  SEG.PR
  46      219     9

As expected, the disk total is still 280, however, the three files total
274. Add blocks free to this you get 276. This leads to a number of
questions:

1. What happened to the missing 4 blocks (280-276)? Or 278-274 if you
look at blocks used and the total file sizes.

2. How did Apple get one extra block on the disk? (274 when formatting a
disk only leaves you with 273)

3. Are they somehow breaking their own rules on disk usage? If not, how
can I "break" the same rules and gain some additional storage on my
disks?

4. Do the answers to the above questions apply to 3.5 disks as well?


-- 
				Joe Walters att!ihlpf!bird   
				IHP 1F-240 (312) 416-5356

bfox%vision@HUB.UCSB.EDU (Brian Fox) (02/14/89)

   From: Walters <att!ihlpf!bird@ucbvax.berkeley.edu>

   Continuing, if you format a ProDOS disk and then CATALOG it you are told:

   Blocks Total   Blocks Free   Blocks Used
	280           273           7

   If you catalog the program disk for Appleworks version 2.1 you are told:

   Blocks Total   Blocks Free   Blocks Used
       280            2            278

   There are thee files on the disk and their size is:

   SEG.MO  SEG.M1  SEG.PR
     46      219     9

   As expected, the disk total is still 280, however, the three files total
   274. Add blocks free to this you get 276. This leads to a number of
   questions:

   1. What happened to the missing 4 blocks (280-276)? Or 278-274 if you
   look at blocks used and the total file sizes.

   2. How did Apple get one extra block on the disk? (274 when formatting a
   disk only leaves you with 273)

   3. Are they somehow breaking their own rules on disk usage? If not, how
   can I "break" the same rules and gain some additional storage on my
   disks?


On a "normally" formatted disk, (e.g. one formatted from FILER) blocks 0
through 7 are marked in use, where blocks 2 through 7 contain the volume
directory.   Without looking at the disk, I suspect that the people who made
Appleworks only used 1 directory block for directory information, since they
knew that there would only be three files on the disk, and that the directory
information for those three files could be kept in one block.  That would
allow them to free the 4 remaining blocks in the volume directory for the
storage of file data.

Using a program such as BLOCK.WARDEN from Glenn Bredon would allow you to do
the same thing.  But first, you should read _Beneath Apple ProDOS_, which can
be found at any reasonable store which sells Apple // hardware.

Brian Fox

demarco@cpsc.ucalgary.ca (Vince Demarco) (02/14/89)

To use those extra blocks on the disk download the program i uploaded to
comp.binaries.apple2.  It will format your disks for up to 20k more storage
that is assuming your drive head can read that far.


Vince

brisinda@cpsc.ucalgary.ca (Dale Brisinda) (02/14/89)

In article <703@cs-spool.calgary.UUCP>, demarco@cpsc.ucalgary.ca (Vince Demarco) writes:
> 
> To use those extra blocks on the disk download the program i uploaded to
> comp.binaries.apple2.  It will format your disks for up to 20k more storage
> that is assuming your drive head can read that far.
> 
> 
> Vince
> 

O.K. I downloaded that formater, and I ran it, and it seemed to be working
fine!! When I catalog, when I want to draw a bit sector map etc...
Now, the problem is, when I *ACTUALLY* want to format a disk, (and give the
disk *up* to 20 more K of disk strage capacity) I go through the procedure:

1) First I set the config. to format 27 tracks, instead of the normal 22.
2) Then I actually format the disk, and some buzzing goes on...fine O.K.
3) Now the weird part, when I do a bit sector map, (where + stands for used
   blocks, and - stands for empty blocks) there are +'s and -'s all over the
   place!!!
4) I then try to catalog the disk, and it gives me a nice user friendly
   message:

error

5) And when I even try to copy that Prodos v 1.7 (The one that enables
   the disk to *READ* those extra blocks), it gives me another user friendly
   message:

error

Can you make anything out of this? 

						...Dale

Jerry.Kindall@f10.n226.z1.FIDONET.ORG (Jerry Kindall) (02/14/89)

> How did Apple get all those files on side 2 of the AppleWorks disk?
 
Basically, what they did is made the directory shorter.  Normally there 
are 4 directory blocks, allowing for a total of 51 files (plus one 
directory header).  The AppleWorks disk has a directory only one block 
long, for a total of 12 files in the main directory (plus the header).
 
It's easy to make a 5.25 disk like that.  Just copy your AppleWorks 
disk onto another 5.25 disk and delete all the files.
 
As to whether it's kosher, I doubt it.  On the other hand, ProDOS' /RAM 
disk (the small one on 128K machines) also has a shortened directory.  
Notice that if you try to READ the directory of the RAM disk or the 
AppleWorks disk, you will get an END OF DATA message before the actual 
end of the directory.  You won't see the footer with block usage 
information when READing the directory from a BASIC program.  This is 
because the shortened directory confuses BASIC.SYSTEM.
 
If you can shorten the volume directory, can you lengthen it?  Sounds 
reasonable, but it might meet up with some problems.
 
/\
  \/  Jerry Kindall

--  
Jerry Kindall  via cmhGate - Net 226 fido<=>uucp gateway Col, OH
UUCP:  ...!osu-cis!n8emr!cmhgate!10!Jerry.Kindall

matthew@sunpix.UUCP ( Sun NCAA) (02/14/89)

In article <7682@ihlpf.ATT.COM>, bird@ihlpf.ATT.COM (Walters) writes:

	[comments about files on AppleWorks program disk]

> As expected, the disk total is still 280, however, the three files total
> 274. Add blocks free to this you get 276. This leads to a number of
> questions:
> 
> 1. What happened to the missing 4 blocks (280-276)? Or 278-274 if you
> look at blocks used and the total file sizes.

	program files: 274
	boot block   :   1
	root directory:  2
	volume bitmap:   1
	------------------
	used           278
	free             2
	------------------
	total          280

> 2. How did Apple get one extra block on the disk? (274 when formatting a
> disk only leaves you with 273)
  
	The standard root directory is 4 blocks long. The shortened it to
	make room for the files (they only need room for 3 files, not 51)

> 3. Are they somehow breaking their own rules on disk usage? If not, how
> can I "break" the same rules and gain some additional storage on my
> disks?

	No, the rules allow for changes like this. What was simply done, is 
	that the 'pointer to next directory block' in root directory block 2
	was zero'ed, and the bits for blocks 4 and 5 cleared in the volume 
	bitmap. 

	The most number of free blocks you can put on a 35 track - 5.25"
	floppy disk is 278. What you need to do is:

		1) Using your standard method, format a disk.
		2) Using a ProDOS block editor.
			A) Move block 6 to block 0.
			B) Edit block 0, byte 0 to $5f.
			C) Edit block 2, bytes 0 thru 3 are all zeros.
	
	Thats it, the only precautions is disk will crash your system if 
	booted (previously it only gave a warning). This disk only has 
	storage for 12 item in the root.
	
> 4. Do the answers to the above questions apply to 3.5 disks as well?

	Yes.


-- 
Matthew Lee Stier     (919) 469-8300|
Sun Microsystems ---  RTP, NC  27560|          "Wisconsin   Escapee"
uucp: {sun, rti}!sunpix!matthew     |

matthew@sunpix.UUCP ( Sun NCAA) (02/14/89)

In article <7682@ihlpf.ATT.COM>, bird@ihlpf.ATT.COM (Walters) writes:

        [comments about files on AppleWorks program disk]

> As expected, the disk total is still 280, however, the three files total
> 274. Add blocks free to this you get 276. This leads to a number of
> questions:
> 
> 1. What happened to the missing 4 blocks (280-276)? Or 278-274 if you
> look at blocks used and the total file sizes.

        program files: 274
        boot block   :   2
        root directory:  1
        volume bitmap:   1
        ------------------
        used           278
        free             2
        ------------------
        total          280

> 2. How did Apple get one extra block on the disk? (274 when formatting a
> disk only leaves you with 273)
  
        The standard root directory is 4 blocks long. The shortened it to
        make room for the files (they only need room for 3 files, not 51)

> 3. Are they somehow breaking their own rules on disk usage? If not, how
> can I "break" the same rules and gain some additional storage on my
>
        No, the rules allow for changes like this. What was simply done, is 
        that the 'pointer to next directory block' in root directory block 2
        was zero'ed, and the bits for blocks 3, 4 and 5 cleared in the volume 
        bitmap. 

        The most number of free blocks you can put on a 35 track - 5.25"
        floppy disk is 278. What you need to do is:

                1) Using your standard method, format a disk.
                2) Using a ProDOS block editor.
                        A) Move block 6 to block 0.
                        B) Edit block 0, byte 0 to $5f.
                        C) Edit block 2, bytes 0 thru 3 are all zeros.
         
        Thats it, the only precautions is disk will crash your system if 
        booted (previously it only gave a warning). This disk only has 
        storage for 12 item in the root.
         
> 4. Do the answers to the above questions apply to 3.5 disks as well?

        Yes.



-- 
Matthew Lee Stier     (919) 469-8300|
Sun Microsystems ---  RTP, NC  27560|          "Wisconsin   Escapee"
uucp: {sun, rti}!sunpix!matthew     |

jla@hogbbs.Fidonet.Org (Slartibartfast) (02/16/89)

-> To use those extra blocks on the disk download the program
-> i uploaded to
-> comp.binaries.apple2.  It will format your disks for up to
-> 20k more storage
-> that is assuming your drive head can read that far.
What what the filename of that program?

Thanks.
--- QuickBBS v2.03
 * Origin: The Heart of Gold - hogbbs.fidonet.org - (1:129/87)
--  
Fidonet : 1:263/42    Jim Anderson    |
UUCP    : ..psuvax1!psuhcx!hogbbs!jla |       This Space
Internet: jla@hogbbs.fidonet.org      |        For Rent
or jla%hogbbs.fidonet.org@hcx.psu.edu |

brianw@microsoft.UUCP (Brian Willoughby) (02/16/89)

In article <6631.23F858E1@cmhgate.FIDONET.ORG>, Jerry.Kindall@f10.n226.z1.FIDONET.ORG (Jerry Kindall) writes:
> If you can shorten the volume directory, can you lengthen it?  Sounds 
> reasonable, but it might meet up with some problems.
>  
By carefully reading _Beneath Apple DOS_ or _Beneath Apple ProDOS_ as
appropriate, you find that each directory can be extended or shortened by
sector-editing the pointers to "next sector/block" to point to whatever sector
or block you want. The only problems that I have had is that 3rd party disk
programs (like Copy II Plus) don't fully interpret what is written on the disk.
This causes certain files to be inaccessable, or the offending program refuses
to use the space you have freed for file storage. Where DOS correctly follows
the sector pointers, other software 'assumes' the catalog is in the standard
location and gets lost.

The problem with 3rd party software not performing to Apple scecifications is
also true of the 40-track extensions to either DOS that have been mentioned.
I use 40-track DOS and ProDOS disks regularly, because it's worth the added
space, to (%,, with the 3rd party disk junk..

BTW, I have only had problems with the extra 5 tracks of a 40-track disk
with one brand of disk. The DISK II formatting scheme utilizes a floppy
somewhere between single and double densitys (FM or MFM) by using the Woz
Group Encoding. Does anyone know if the data on tracks 35-39, because of the
smaller diameter of the disk, is actually written at a higher density than
some diskettes can handle? I always use Double-Density, and I would assume
that this density could handle the slightly higher data rate if and only if
the disks were *true* double density.

Brian Willoughby		microsoft!brianw

#include <std.disclaimer>

demarco@cpsc.ucalgary.ca (Vince Demarco) (02/21/89)

In article <262.23FA661D@hogbbs.Fidonet.Org>, jla@hogbbs.Fidonet.Org (Slartibartfast) writes:
> -> To use those extra blocks on the disk download the program
> -> i uploaded to
> What what the filename of that program?

There are two program Ultra.Format (written by a friend) and ProFormat
also written by another friend.