Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > alt.lang.asm > #6630

Re: The Virtual Partition - say goodbye to FAT12

From "Mike Gonta" <mikegonta@gmail.com>
Newsgroups alt.lang.asm, alt.os.development
Subject Re: The Virtual Partition - say goodbye to FAT12
Date 2016-04-02 18:55 -0400
Organization Aioe.org NNTP Server
Message-ID <ndpim5$14os$1@gioia.aioe.org> (permalink)
References (1 earlier) <qhkrfbhc62mp6kve2n1u6gfj5prnv8o4pt@4ax.com> <ndljqo$s9s$1@gioia.aioe.org> <ji6tfbl4a3tk91mit17ttlns6hm5kp5c3h@4ax.com> <ndmc55$8n5$1@gioia.aioe.org> <9uqtfb5fvu9qm9q63ennkhjhljums346oc@4ax.com>

Cross-posted to 2 groups.

Show all headers | View raw


"Robert Wessel" wrote:
> "Mike Gonta" wrote:

>>I didn't know that defrag could/would do that.
>>This is only for simple hobby OS's, etc - just don't
>>defrag.
>
> Seems like a really user unfriendly policy: Don't do
> something normally perfectly legal and often used.
> Windows' built-in defrag is pretty basic.  Some of the
> better ones have done drastically more work.  In any
> event it's up to \you to prove it *won't* happen for some
> reason.

Fact is, it absolutely doesn't matter even if it did.
Remember, the reason I am pre-allocating enough root
directory cluster to provide at least 16 sectors is so that
they are contiguous, defragging will only result in more
contiguous sectors. The Virtual Partition protocol will only
permit access to those first 16 anyways, so there will be
no benefit gained (or loosed) by doing so. The business of
the "fixed" location was only as analogy to the subset of
the simple system FAT12 driver. To keep thing simple that
driver "assumes" that the fat and root are located at a
"fixed" locations and for simplicity "hard codes" these
values in the code. But of course, in the FAT file system
(even a 1.44MB floppy disk) any number of Reserved Sectors
are permitted. Best programming practices dictate the the
values should be calculated using the BPB. For an example
of this check out the difference between the 16 bit real
mode MikeOS http://mikeos.sourceforge.net/ and the 32 bit
protected mode MikeOS FAT(ter)12
https://github.com/mikegonta/MikeOS32
Other than the fact that the latter is a PM32 translation
of the former, the main difference is that I removed all
the "hard coding" and thereby lifted the floppy disk
restriction and "promoted" it to actual FAT12 (including
hard drives).

> I still don't get it.  Does the "standard OS" see this
> "virtual FAT32"volume or not? Just part of it as a
> (subset) of a "real" FAT32 volume?

There is nothing "virtual" or "unreal" about the FAT32
volume (only the Virtual Partition is virtual). There is
_absolutely_ no modifications to the FAT32 volume. The
Virtual Partition is only different from the standard
FAT32 volume in the pre-allocation of the root directory
clusters. The FAT32 root directory is like the
sub directories which are like files. There is nothing in
the specification that says you can not pre-allocate a
file.

> If so, how are you preventing the "standard OS" from
> doing something that messes up the subset your device
> needs to see?

The Virtual Partition is 100% compatible with the
specification. Short of hacking, stupidity and ignorance
there is no way to "mess it up".

>>3.  Only the simple system FAT32 driver knows about it.
>>4.  The simple system FAT32 driver is exactly the same as
>>    the FAT12 driver - the only difference is FAT32.
>>5.  The simple driver can only see and access the files
>>    in  the first 2048 clusters at the beginning of the
>>    volume.
>>    This is what makes it as simple as FAT12.

> How do you ensure that the files you want are in either
> the beginning of the root directory, or in the first
> 2048 clusters of the volume?

All files written to a FAT32 volume appear on the drive in
the order they are written starting at the beginning of the
data and root directory. If you write too many file and
fill up the Virtual Partition then, (just like a floppy
disk) you are SOL, sorry no more room. By following the
Virtual Partition protocol the simple system _can not_
read or write files outside of the Virtual Partition.

>>6.  The Virtual Partition is aid to the small system
>>    developer (hobby OS) and absolutely free of cost,
>>    patents or copyright.
>>7.  The Virtual Partition in no way hampers the
>>    development of a full FAT32 driver.

> That's fine, but since you're talking about a tiny amount
> of additional code, why should anyone care?

A full blown FAT32 driver is anything but tiny (or simple).
The simple system FAT32 driver that I've written (based on
the Virtual Partition protocol) on the other hand is tiny
(and simple).

>>8.  The rest of the world has said goodbye to FAT12 and
>>    FAT16 a long time ago. Windows won't format anything
>>    FAT12.

> Sure it will.  Just format a partition too small to put a
> FAT16 volume on it.  Or use the /A: parameter to force
> big enough cluster sizes that the total number of
> clusters drop below 4085.  Or attach a floppy drive to
> your computer.  There are obviously upper limits to the
> size of a FAT12 or FAT16 volume (~131MiB and ~1.1GiB)
> based on the maximum possible cluster size (32KB).

I didn't mean that you can't do it, I meant that you can't
do it. Even I use an old computer that has a floppy disk
drive. (I disconnected the cable a long time ago because
of the "clicking and grinding" when the PC starts up. Who's
going to bother doing that when ...

>> The last time I looked a 32GB flash drive was selling
>> for 10 dollars, if you're lucky you can still get a 8GB
>> or 16GB drive. 2GB is the maximum size for FAT16.

> How is that relevant?

This explains that.

>>9.  Say goodbye to FAT12 and FAT16. Hello simple FAT32.

> Hello FAT32 that only works some of the time?  I'd like
> to avoid making that acquaintance.

Only because I didn't explain it properly. It does work
fine (and all of the time).

>  Why not just do it right in the first place?

It's not an issue of right or wrong, simply a matter of
learning to walk before running.

> Now there are certainly some simplifications you can make
> to full FAT32 support, that don't break the volume for
> other use.

As I explained _nothing_ is broken.

> You could avoid supporting LFNs, for example (although
> LFNs are not actually tied to FAT32),

I do.

> or you could just enable your device to read the root
> directory.

I do that to.

> OTOH, if you don't care about other systems accessing
> the volume, do whatever makes sense for your device, just
> don't pretend it's FAT32.

But I do care and they do.
I created the Virtual Partition to support Live USB.
There is _absolutely_ no pretense here.


Mike Gonta
look and see - many look but few see

http://mikegonta.com
http://tawk.to/mikegonta

Back to alt.lang.asm | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

The Virtual Partition - say goodbye to FAT12 "Mike Gonta" <mikegonta@gmail.com> - 2016-03-31 17:51 -0400
  Re: The Virtual Partition - say goodbye to FAT12 Robert Wessel <robertwessel2@yahoo.com> - 2016-03-31 20:48 -0500
    Re: The Virtual Partition - say goodbye to FAT12 "Mike Gonta" <mikegonta@gmail.com> - 2016-04-01 06:50 -0400
      Re: The Virtual Partition - say goodbye to FAT12 Robert Wessel <robertwessel2@yahoo.com> - 2016-04-01 11:06 -0500
        Re: The Virtual Partition - say goodbye to FAT12 "Mike Gonta" <mikegonta@gmail.com> - 2016-04-01 13:45 -0400
          Re: The Virtual Partition - say goodbye to FAT12 Robert Wessel <robertwessel2@yahoo.com> - 2016-04-01 17:06 -0500
            Re: The Virtual Partition - say goodbye to FAT12 James Harris <james.harris.1@gmail.com> - 2016-04-01 23:16 +0100
              Re: The Virtual Partition - say goodbye to FAT12 Robert Wessel <robertwessel2@yahoo.com> - 2016-04-01 17:29 -0500
                Re: The Virtual Partition - say goodbye to FAT12 Rod Pemberton <NoHaveNotOne@bcczxcfre.cmm> - 2016-04-01 20:24 -0400
                Re: The Virtual Partition - say goodbye to FAT12 Robert Wessel <robertwessel2@yahoo.com> - 2016-04-02 00:10 -0500
                Re: The Virtual Partition - say goodbye to FAT12 Rod Pemberton <NoHaveNotOne@bcczxcfre.cmm> - 2016-04-02 12:03 -0400
                Re: The Virtual Partition - say goodbye to FAT12 "Mike Gonta" <mikegonta@gmail.com> - 2016-04-02 20:19 -0400
                Re: The Virtual Partition - say goodbye to FAT12 "Mike Gonta" <mikegonta@gmail.com> - 2016-04-02 20:08 -0400
                Re: The Virtual Partition - say goodbye to FAT12 "Mike Gonta" <mikegonta@gmail.com> - 2016-04-02 20:02 -0400
                Re: The Virtual Partition - say goodbye to FAT12 "Mike Gonta" <mikegonta@gmail.com> - 2016-04-02 19:55 -0400
              Re: The Virtual Partition - say goodbye to FAT12 "Mike Gonta" <mikegonta@gmail.com> - 2016-04-02 19:30 -0400
            Re: The Virtual Partition - say goodbye to FAT12 "Mike Gonta" <mikegonta@gmail.com> - 2016-04-02 18:55 -0400
              Re: The Virtual Partition - say goodbye to FAT12 Robert Wessel <robertwessel2@yahoo.com> - 2016-04-04 00:40 -0500
  Re: The Virtual Partition - say goodbye to FAT12 "wolfgang kern" <nowhere@never.at> - 2016-04-01 09:20 +0200
    Re: The Virtual Partition - say goodbye to FAT12 "Mike Gonta" <mikegonta@gmail.com> - 2016-04-01 07:01 -0400
      Re: The Virtual Partition - say goodbye to FAT12 "wolfgang kern" <nowhere@never.at> - 2016-04-04 10:42 +0200
        Re: The Virtual Partition - say goodbye to FAT12 "Mike Gonta" <mikegonta@gmail.com> - 2016-04-05 15:58 -0400
          Re: The Virtual Partition - say goodbye to FAT12 "wolfgang kern" <nowhere@never.at> - 2016-04-05 22:19 +0200
            Re: The Virtual Partition - say goodbye to FAT12 "Mike Gonta" <mikegonta@gmail.com> - 2016-04-05 18:24 -0400
  Re: The Virtual Partition - say goodbye to FAT12 James Harris <james.harris.1@gmail.com> - 2016-04-01 09:55 +0100
    Re: The Virtual Partition - say goodbye to FAT12 "Mike Gonta" <mikegonta@gmail.com> - 2016-04-01 07:11 -0400
  Re: The Virtual Partition - say goodbye to FAT12 Rod Pemberton <NoHaveNotOne@bcczxcfre.cmm> - 2016-04-01 20:24 -0400
    Re: The Virtual Partition - say goodbye to FAT12 "Mike Gonta" <mikegonta@gmail.com> - 2016-04-02 21:30 -0400

csiph-web