[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: disk image emulator on the GS - possible?



"Michael J. Mahon" <mjmahon@aol.com> wrote in message 
1OydnUMe6ZzUY9HXnZ2dnUVZ_gidnZ2d@giganews.com">news:1OydnUMe6ZzUY9HXnZ2dnUVZ_gidnZ2d@giganews.com...
> Charlie wrote:
>
>> Also the 2mg format allows for comments anywhere in the image. 
>> Although I've never seen an image that used this feature, it wouldn't 
>> surprise me to find one.
>
> That sounds like a *terrible* idea.
>

:-)

> A disk image is a regular structure that can be indexed into.
> Interpolating "comments" demands sequential reading for a
> negligible value.

As I mentioned it may have never been done.  I should explain that there 
is only one comment pointer and one creator data pointer in the header 
(and cooresponding length longwords).  So at most there would be only 
two breaks in the disk data if someone was perverse enough to put it 
anywhere other than before or after the disk data.

>
> This "feature" should be removed from the .2mg "standard".
>

Well, it actually has been but quite a while after many 2mg images were 
already made.  There are two slightly different 2mg format specs that I 
have seen and the later one specifically says that the comment and 
creator data chunks must come after the disk data.

> If the comments are part of the header, they would make it a
> variable-length header, which is also a big downside for a
> small upside.

Normally the header is 64 bytes long but there is a header length word 
in the header leading me to believe that the original intent was for it 
to be extensible.

> The only "minimally-distruptive" way to add comments to an
> image would be to suffix them--and even that makes the size
> of an image vary, which most would interpret as an error.

My intention wasn't to make it sound worse than it is (although I admit 
that's what I accomplished).  It was just to make people aware that just 
chopping off a header isn't a good thing for a program to do if it wants 
to be reasonably robust.  The header is there for a reason and it 
carries important information about itself as well as the original disk 
it was made from (write protect, volume number and data order).
Even with its ambiguities I like the 2mg format. At least it is 
documented.

Charlie