r/programming • • 2d ago

Understanding FAT16

https://fat16.asciitweezers.com/
207 Upvotes

15 comments sorted by

56

u/happyscrappy 2d ago

The article explains why FAT32 is more common than exFAT. That's not the whole reason. Another part of the reason is MS used very open free licensing for FAT32 (completely free for FAT16) but with exFAT decided to charge money and have restrictions.

They tried to split hairs like giving no cost licenses if you had an SD card reader. But they tried to limit it sufficiently that some companies would pay them.

Because of this a lot of companies just chose not to support exFAT. It was more cost or more hassle.

10

u/kalilamodow 1d ago

is it kinda like what happened with h265/hevc?

14

u/matthieuC 1d ago

h26x was always for pay.
h265 fucked it up because there were two different patent pools.
So not only do you have to pay twice, but as there is no single entity saying they cover all the patents you're now wondering who'else is going to ask you money.

1

u/cake-day-on-feb-29 10h ago

I believe H.265 requires the streaming service to pay as well, right? Which is why companies like YouTube or twitch are resistant to it, while subscription-based services like Netflix are far more on-board?

3

u/plugwash 1d ago

Are you too young to remember the whole kerfuffle about the patent on long filenames for fat?

4

u/sequentious 1d ago

I've got that in my important notes file: IMPORT~1.txt

21

u/S4N7R0 2d ago

really cool, i like the disk formatting demo

6

u/BogdanPradatu 2d ago

I would play that game on my phone to lose time. Who's gonna do it?

5

u/dacort 2d ago edited 2d ago

Tempted. Also what a great domain name.

[edit]: https://inkset.games/experiments/tidy-disk/

0

u/sysop073 2d ago

Does your phone not have a browser?

14

u/davidbalbino 2d ago

worth adding to the exFAT licensing point: that only changed in 2019, when MS published the spec and said they'd support getting it into the linux kernel. it landed in staging in 5.4 and Samsung's proper driver replaced it in 5.7. before that, on linux you pretty much had to use exfat-fuse, which was slow, so lots of embedded stuff just stuck with FAT32 and lived with the 4GB file limit

7

u/yeeStwind 2d ago

The 2 GB cap is just 65,536 clusters at 32 KB. Windows 2000 and later allow 64 KB clusters to reach 4 GB, but enough drivers and tools choke on them that nobody does it. Fine for a boot partition, awful for data.

5

u/nukem996 1d ago

Windows shifted to NTFS starting with NT. FAT is a terrible filesystem whose only advantage is it's widely implemented. Even MSFT knows that.

2

u/Sgeo 1d ago

I've been exploring old operating systems for a while now, and it's given me an appreciation for filesystems. On OS/360, I've seen people argue whether it even has a "filesystem" (I'd say it does, if a limited one). When making a file (called a dataset), the programmer needs to declare a primary size, and a secondary size, the file can grow an additional 15 times the secondary size. Clustering files and arranging them as needed is a luxury of modern filesystems.

OS/8 (and probably early other OSes from DEC but I don't know which) don't require predeclaration and don't need to do blocks, but instead you can have only one file open for writing at a time, and the entire space of the HD is reserved for that file until it's closed for writing.

1

u/__konrad 1d ago

I remember a MS-DOS trick where you could stop FORMAT (quick mode) command on 99% and no data was lost