Another FAT32 imlpementation (Pure C)

Programming the 6502 microprocessor and its relatives in assembly and other languages.
Post Reply
User avatar
drogon
Posts: 1671
Joined: 14 Feb 2018
Location: Scotland
Contact:

Another FAT32 imlpementation (Pure C)

Post by drogon »

Just to add to the list, I have been using this implementation of FAT for a few years now - On my Ruby6502 and Ruby816 boards where it runs in the AVR co-processor taking to an SD card and also on a Raspberry Pi under my bare-metal framework where it also talks to the SD card. The low-level block IO part is the only thing you have to supply. It's been very stable and is configurable for what features you want, or don't want.

https://elm-chan.org/fsw/ff/

I have a "work in progress" to translate this to BCPL for my BCPL OS rather than go via an intermediary, but that may be a while off yet.

As for other Filing systems: I did write my own - based on Apple ProDOS8 - this works very well (and faster than FAT) but with a few limitations - Max. volume size of 32MB and (the biggest issue) almost total incompatibility with anything else. I had planned to write a FUSE driver for it so I could read it under Linux, but that never happened - and that is, I fear, one of the biggest issues today - no point having demountable media if you can't read it anywhere else...

The 32MB thing ... I could expand that to 64MB but beyond that is tricky. In the old/retro world of RAM measured in KB it's really not an issue, but the system I'm looking to move my BCPL OS onto right now has 520KB of fast RAM and 8MB of slower RAM and while I can't ever imagine needing to load a MB program or data file from storage, who knows.

I do have a plan for a very lightweight filing system intended for solid state media but again it's going to suffer from (physical media) portability issues.

-Gordon
--
Gordon Henderson.
See my Ruby 6502 and 65816 SBC projects here: https://projects.drogon.net/ruby/
pdragon
Posts: 126
Joined: 26 Sep 2023

Re: Another FAT32 imlpementation (Pure C)

Post by pdragon »

in case it's useful I wrote a simple python implementation of prodos8 which makes it easy to create and manage prodos images anywhere python runs.

see https://github.com/patricksurry/pyprodos

i've found this supports a painless build cycle for either simulated or hardware 6502 stuff, especially since it's relatively easy to implement p8 reader code in assembly or forth

feedback / PRs welcome :)
Post Reply