Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
The Management
Jan 2, 2010

sup, bitch?
sup, yospos?

today we will be looking at the fat filesystem. it’s called fat but it’s actually pretty skinny. file allocation table, or msdosfs, is an old tyme file system from back in the days when computers had no ram and floppies were a thing.

there are many versions of fat. well, not really versions because there isn’t actually any kind of standard, just random poo poo that evolved over the years.

fat12 - a 12-bit file system for tiny things like floppy disks and goon dicks.
fat16 - for when you want to go big. like, 32 MB with native sector size. or supersize your clusters for your massive storage on that new 600 MB scsi disc you stole from work.
fat32 - 2fat2furious. 32 bits of cluster addresses let you store so much data, your brain would melt. or get rid of the pesky internal fragmentation eating up valuable megabytes on your disk by going with small clusters.
exfat - some new horseshit, whatever.

some important things to know
a sector is 512 bytes. yes, bytes. sectors used to be the native hard drive storage size minimum unit.
a cluster is a bunch of sectors tied together. in powers of two. turns out sectors are small and dumb, you want at least 4kb chunks because your 386 cpu has 4k pages.
a file allocation table is a linked list, where every entry maps to one cluster on disk. the value in the entry either points to the address of the next entry or some other magic value. it’s extremely simple. fun fact, fat32 files are limited to 4gb, not because of limitations if the allocation table, but because the directory entry has a 32 bit size field. which is dumb as hell.

fat has short file names, or as we called them, file names. cool names like COMMAND.COM, IMG_0420.JPG, and COPYOF~1.DOC
short names had 8 byte names and 3 byte extensions. you could put whatever you want in them, because fat doesn’t give a poo poo, but your os will probably hate you unless you stick to ascii.

at some point Microsoft created a hack to add long file names to fat. they are just fake directory entries that contain more file name. LFNs are long and boring like “Copy of yospos quotes.bak.docx”, but it also had a short file name which was some mangled garbage form of this.

more fun facts: fat can be case sensitive if you want it to be. but windows will barf on a disk written with file names that differ only by case.

fat is cool. you could even say it’s phat. ask questions about fat or just go to Wikipedia

Adbot
ADBOT LOVES YOU

carry on then
Jul 10, 2010

by VideoGames

(and can't post for 10 years!)

lose weight op

The Management
Jan 2, 2010

sup, bitch?
cool things about fat:

it’s extremely compact on disk, taking up very little overhead.
it takes an extremely small amount of RAM to implement. it will be slow as hell, but if you want fast get more ram.
there are internationalized short file names using code page hacks. it is a clusterfuck of bad decisions.

Bloody
Mar 3, 2013

I once used fat16 on an msp430. found some openfat implementation or something that would run with like 17 bytes of stack at most. slow as hell but it worked

Zlodo
Nov 25, 2006
the Amiga filesystem could fit 880k on a DD floppy disk instead of 720k and supported long filenames natively instead of using lovely hacks

Chopstick Dystopia
Jun 16, 2010


lowest high and highest low loser of: WEED WEE
k
Sure but how many murders are its creators responsible for?

CRIP EATIN BREAD
Jun 24, 2002

Hey stop worrying bout my acting bitch, and worry about your WACK ass music. In the mean time... Eat a hot bowl of Dicks! Ice T



Soiled Meat
there used to be a richard simmons virus/trojan horse for DOS that would show a little ascii richard simmons and say "lets get rid of that FAT" then it nuked your file system.

it was cool.

Captain Foo
May 11, 2004

we vibin'
we slidin'
we breathin'
we dyin'

fatty blunt fs

burning swine
May 26, 2004



I use FAT69 OP. suits my needs

Doc Block
Apr 15, 2003
Fun Shoe
ah yes, FAT, the only part of MS-DOS that was actually used instead of worked around.

Fallen Hamprince
Nov 12, 2016

all file systems are beautiful OP

echinopsis
Apr 13, 2004

by Fluffdaddy

Zlodo posted:

the Amiga filesystem could fit 880k on a DD floppy disk instead of 720k and supported long filenames natively instead of using lovely hacks

this raises a question of how many raw bits are on a floppy. same with a cd

like didn’t some cd movie file format use a different mode that had less error checking cos errors in a mpeg stream don’t matter much compared to just having more data overall

on my amiga i had a driver which put 900 something kb on a floppy. how did it do this? less error checking I presume. maybe it asked the head nicely to get closer to the edge idk

CommieGIR
Aug 22, 2006

The blue glow is a feature, not a bug


Pillbug
No love for FAT+?

Silver Alicorn
Mar 30, 2008

𝓪 𝓻𝓮𝓭 𝓹𝓪𝓷𝓭𝓪 𝓲𝓼 𝓪 𝓬𝓾𝓻𝓲𝓸𝓾𝓼 𝓼𝓸𝓻𝓽 𝓸𝓯 𝓬𝓻𝓮𝓪𝓽𝓾𝓻𝓮
I formatted my media drive exfat so I can use it on my mac

DELETE CASCADE
Oct 25, 2017

i haven't washed my penis since i jerked it to a phtotograph of george w. bush in 2003
i formatted a bootable windows installation image as exfat once
it didn't boot, which was the only thing i needed it to do
i couldn't use fat32 because the windows .img file was more than 4gb
:thunk:

psiox
Oct 15, 2001

Babylon 5 Street Team

CRIP EATIN BREAD posted:

there used to be a richard simmons virus/trojan horse for DOS that would show a little ascii richard simmons and say "lets get rid of that FAT" then it nuked your file system.

it was cool.

this owns

Captain Foo
May 11, 2004

we vibin'
we slidin'
we breathin'
we dyin'

where the gently caress is forums poster FAT32 SHAMER

The Management
Jan 2, 2010

sup, bitch?
I remember upgrading my windows machine to fat32. got so much space back on my 1.6 gig hard drive by going down to smaller clusters, gently caress yeah it was amazing.

jimmyjams
Jan 10, 2001


King Kong of Megadongs
Gobblin' them mega schlongs
Makin' sure they mega long
Stroke' 'em if they mega strong
FART32

klosterdev
Oct 10, 2006

Na na na na na na na na Batman!

The Management posted:

I remember upgrading my windows machine to fat32. got so much space back on my 1.6 gig hard drive by going down to smaller clusters, gently caress yeah it was amazing.

enjoy your poo poo I/O

fart simpson
Jul 2, 2005

DEATH TO AMERICA
:xickos:

it’s cool they named a file system afte you op

animist
Aug 28, 2018
to upgrade to ExFAT you just get liposuction

The Management
Jan 2, 2010

sup, bitch?

klosterdev posted:

enjoy your poo poo I/O

my io is great, I defrag regularly. thanks for your concern.

echinopsis
Apr 13, 2004

by Fluffdaddy
can FAT do TRIM

Silver Alicorn
Mar 30, 2008

𝓪 𝓻𝓮𝓭 𝓹𝓪𝓷𝓭𝓪 𝓲𝓼 𝓪 𝓬𝓾𝓻𝓲𝓸𝓾𝓼 𝓼𝓸𝓻𝓽 𝓸𝓯 𝓬𝓻𝓮𝓪𝓽𝓾𝓻𝓮
TRIM you'[re rear end hairs

Zlodo
Nov 25, 2006

echinopsis posted:

this raises a question of how many raw bits are on a floppy. same with a cd

like didn’t some cd movie file format use a different mode that had less error checking cos errors in a mpeg stream don’t matter much compared to just having more data overall

on my amiga i had a driver which put 900 something kb on a floppy. how did it do this? less error checking I presume. maybe it asked the head nicely to get closer to the edge idk

iirc the standard low level track format had some metadata and maybe some crcs (i don't remember exactly) I just remember that game devs that wrote their own disk routines would often just write a big blob of data on each track instead

the standard format was probably also a bit conservative and left more unused space at the end than necessary (to make sure that the end of a track didn't overwrite its beginning, considering that all floppy drives didn't have the exact same rotation speed), and the thing to put 900k on a disk was maybe leaving less unused space

Vomik
Jul 29, 2003

This post is dedicated to the brave Mujahideen fighters of Afghanistan

CRIP EATIN BREAD posted:

there used to be a richard simmons virus/trojan horse for DOS that would show a little ascii richard simmons and say "lets get rid of that FAT" then it nuked your file system.

it was cool.

drat that’s awesome. who could even be mad? viruses just don’t have that special touch anymore



my friend doesn’t know anything about filesystems and was wondering if there was anyone of a particular obsessive persuasion who has it all documented somewhere

echinopsis
Apr 13, 2004

by Fluffdaddy

Zlodo posted:

iirc the standard low level track format had some metadata and maybe some crcs (i don't remember exactly) I just remember that game devs that wrote their own disk routines would often just write a big blob of data on each track instead

the standard format was probably also a bit conservative and left more unused space at the end than necessary (to make sure that the end of a track didn't overwrite its beginning, considering that all floppy drives didn't have the exact same rotation speed), and the thing to put 900k on a disk was maybe leaving less unused space

hmm

loved it how on the amiga the devs just took over the hardware immediately upon game launch

Captain Foo
May 11, 2004

we vibin'
we slidin'
we breathin'
we dyin'

Vomik posted:

drat that’s awesome. who could even be mad? viruses just don’t have that special touch anymore



my friend doesn’t know anything about filesystems and was wondering if there was anyone of a particular obsessive persuasion who has it all documented somewhere

here u go op https://lwn.net/Kernel/Index/#Filesystems

The Management
Jan 2, 2010

sup, bitch?

echinopsis posted:

can FAT do TRIM

yes! it’s not really a part of the FS itself, it’s an implementation feature. however you will lose the ability to undelete a file if you trim the fat.

echinopsis
Apr 13, 2004

by Fluffdaddy
I wanted to make a milk based pun but you made one that was actually relevant. congrats OP you get the reward

ass
Sep 22, 2011
Young Orc
My Apple™ Macintosh® Portable Computer can't write to NTFS so I formatted my flash drives to FAT32 so that I can move stuff from my Windows PC to my laptop.

ass
Sep 22, 2011
Young Orc
Sounds like a piece of poo poo format overall. NTFS is the gold standard for all formats, everywhere, forever.

psiox
Oct 15, 2001

Babylon 5 Street Team
YFSPOS

just use zfs™

The Management
Jan 2, 2010

sup, bitch?

rear end posted:

Sounds like a piece of poo poo format overall. NTFS is the gold standard for all formats, everywhere, forever.

ntfs has short names too! C:\WINDOWS\PROGRA~1

Raere
Dec 13, 2007

when is FAT64 being released?

Vomik
Jul 29, 2003

This post is dedicated to the brave Mujahideen fighters of Afghanistan

Raere posted:

when is FAT64 being released?

SA Xenforo is using a fat64 server. just waiting for the final tweaks.

Vomik
Jul 29, 2003

This post is dedicated to the brave Mujahideen fighters of Afghanistan

:cheers:

that’s a lot of obsession in one link

ass
Sep 22, 2011
Young Orc

The Management posted:

ntfs has short names too! C:\WINDOWS\PROGRA~1

At first you were making a joke but I ended up trying it out and it actually loving works holy poo poo.

Adbot
ADBOT LOVES YOU

SpaceAceJase
Nov 8, 2008

and you
have proved
to be...

a real shitty poster,
and a real james
THICC platters

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply