RAW SD Card reading?


Guys, could I use JUCE to read a SD Card in RAW format? EG: the card was formated in some non-fat format and I want to read it byte by byte. I have seen Windows programs that does that, but I want to create something that is JUCE based. ;-)



Here's an example for Windows, and what the user is doing is pretty much what I need. ;-) But I need for MAC and Linux too.



There'll never be anything in juce to do something as crazily low-level as that!

What on earth are you actually trying to build?


I've quite a bit of experience in this sort of thing. Exactly what you are trying to do will impact the complexity a great deal. If the SD card can mount, access in OS X and Linux is more straightforward. Windows is a little more indirect, primarily because the underlying drivers, on which file system drivers rely, are not well documented or widely used.

If the card is completely alien, say from a proprietary device, and won't mount. Sector by sector access can be a royal pain. I spent quite a bit of time trying to do 'generic' (machine/SD drive) portable versions of this for a project a few years ago and we kept running up against special cases all through beta testing. In that case we ended up selling our own SD->USB adapter with a custom driver. We OEM'ed the adapter, so it wasn't a big deal to support. But I always felt bad making users buy a widget when, chances are, the SD reader they had could be made to work. But I just couldn't justify all the customer support calls, etc. for what was a secondary, convenience feature.

Good luck!