Rockbox.org home
release
dev builds
extras
themes manual
wiki
device status forums
mailing lists
IRC bugs
patches
dev guide



Rockbox mail archive

Subject: Re: Status report

Re: Status report

From: Paul Suade <paul.suade_at_laposte.net>
Date: Wed, 8 May 2002 19:54:10 +0200

Each file has a start CLUSTER, that is the start point is not per sector unit
but a fix power-of-two group of sectors (ususally 8 sectors for a 4-KB
cluster)...

FAT files are in fact are not a bunch of sectors but a bunch of clusters. If
FAT16 files were only on sectors basis, FAT16 partitions on harddisk would not
be able to handle more than 65520 sectors, so clusters as a group of sectors
were introduced to help a FAT16 partition to work with larger harddisk.

Anyway, the only solution to split a file is truncating the first file after
recopying byte after byte the rest of the first file in a second file.

----- Original Message -----
From: perterm <perterm_at_vce.de>
To: <rockbox_at_cool.haxx.se>
Sent: Wednesday, May 08, 2002 6:44 PM
Subject: Re: Status report


Björn Stenberg wrote:


> And finally, the disk i/o code is now ready. The ATA driver, FAT32 driver,
> directory handling layer and file layer are tested and green-flagged for
> use.


The usual case would be that we want to split a file somewhere right in
the middle of a sector of the disc. Assume the situation that we want to
split a file that uses sector 1 - 3 and we want to split the file within
sector 2.

              splitpoint
                  V
|xxxxxxxxxx|xxxxxxxxxx|xxxxxxx---|----------|
   sector 1 sector 2 sector 3 sector 4


x : used by the file
- : free space
| : sector boundaries

Our goal is to obtain two files: FileA and FileB.
This probably means that the content of sector 2 has to be duplicated to
be used in both files. In this example we copy the content of sector 2
to sector 4. FileA consists of sector 1;2 and FileB of sector 4;3.

        endpoint FileA startpoint FileB
                  V V
|xxxxxxxxxx|xxxxx-----|xxxxxxx---|-----xxxxx|
   sector 1 sector 2 sector 3 sector 4

But now the startpoint of FileB is in the middle of sector 4. Is
somehting like this possible with FAT? Or must each file start at a
sector boundary? And if so - does the mp3 file format allow to fill the
empty space with dummy data?

Still wished I had time to do more than questions...

Phil
Received on 2002-05-08

Page template was last modified "Tue Sep 7 00:00:02 2021" The Rockbox Crew -- Privacy Policy