Implementing FAT12/16/32 (and VFAT) support in XBMC
#1
i'm interested in implementing support for the standard fat filesystems (fat12/16/32) in xbmc. this will allow the use of usb storage devices that are not fatx-formatted - e.g. ipods, usb flash disks, card readers, etc.

i'm an os developer by trade and have implemented a fat driver from scratch before (though it only did fat12/16 *grin*), and have poked around at various bits of xbox code enough that i think i have raw disk access figured out (xbpartitioner does it in order to access sector 0 of the xbox disk, which is not part of a partition). i also have the required tools.

however, i don't know a great deal about programming with the xdk, and know little/nothing about the internals of xbmc. i'm wondering if there's any documentation aimed at new developers, or similar explanation of the code. Wink

also, i'm wondering if anyone else is working on anything similar; i can't find any reference to it on the forums or on the sf project, but duplication of effort sucks *grin*.

thanks for any help in advance, and here's hoping i can contribute.
Reply
#2
i can only speak for the xbmc part.

the logical way to do it in xbmc is via it's file system, i.e. you have to make a class inheriting cdirectory and one inheriting cfile and then activate these in the corresponding factories, cdirectoryfactory and cfilefactory.

the documentation is very sparse atm, only thing i can recommend is browsing through the code. atleast i find it very selfdocumenting, once you get hold of the basic ideas. there's a _very_ brief explanation of some of the key elements in the manual.

good luck Smile
Reply
#3
yes, good luck indeed

<span id='me'><center>pike cheers on</center></span>
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


Image
Reply
#4
hello,

the idea is very great i would say, but is this possible without having a seperate driver for every device (mp3-players, harddisks, ipods, usb-sticks)Huh

is there a common way to get access to these over an usb-standard?

cheers lolol
Reply
#5
i'd love to see this..

well as spiff said, to get this to work in xbmc you create another virtual filesystem like smb:// shout://... check the filesystem dir in the vs. solution..

thou, i suggest you start with a bare project to just get it up and running. when you atleast can list a directory on the disk, you can pickup xbmc since it might be easier to debug with a filemanager (remeber thou that xbmc is damn heavy to build)..

one hurdle i can see is that the xbox has a bad habit of reformatting disks connected to it's usb port in fatx (only happens on supported memory).. but if you do get this working i'm sure a bios change could make sure that never happens.
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


Image
Reply
#6
(lolol @ april 26 2006,16:19 Wrote:the idea is very great i would say, but is this possible without having a seperate driver for every device (mp3-players, harddisks, ipods, usb-sticks)Huh

all sane usb storage devices follow the mass storage profile, which the xbox kernel has a driver for (memory cards are mass storage devices). all that's required is to open the entire device object as a file in order to be able to parse the fat filesystem in xbmc.

the xbox's propensity for reformatting mass storage devices as fatx seems to only be triggered by certain xdk calls that request access to it as a memory card, which i won't be using.

i was planning on dropping it straight into xbmc, because i have no idea how to get an xdk app to display anything useful or otherwise talk to me in any meaningful fashion, and it'd probably take longer to figure *that* out Wink



Reply
#7
could this mean ipod support? that'd be huge.
Reply
#8
it'd be the first step toward ipod support. you could use the ipod as a disk with this, but to be able to get at the music on it, one of the utils that can understand the itunes database format would have to be ported too. i haven't got an ipod and know nothing about itunes, so don't expect me to do that, but if i can get fat to work then it'd be easy for someone who did know that stuff to get ipodly goodness to work.
Reply
#9
if you want to do a standard project, the easiest way is just to grab one of the xdk samplers, make sure you have a debug setup running, then just hack it in to the app::create() routine. it'll be around 100 times quicker than dumping it straight into xbmc just due to linking time.

you can use outputdebugstring() to dump stuff to the debug window in vs, and ofcourse all the usual debugging stuff (breakpoints, step through code, call stack etc. etc.) are all there.

if you need a hand getting the debug stuff setup on your xbox, drop me a pm or pop in to #xbmc on efnet and we'll get you sorted.

looking forward to this Smile
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


Image
Reply
#10
aha, thanks for that jmarshall - that's probably a good plan. i shall have a crack at getting a debug setup installed on my box probably over this weekend, and see if i can't get going with this Wink
Reply
#11
if you get the fs going i'll gladly volunteer to port the db stuff.
Reply
#12
i appreciate your efforts torne.

good luck!
Reply
#13
this would be great Smile very much so....
Reply
#14
goodluck, this is something many people would find extremely useful, all the best :thumbsup:
Reply
#15
hi!

how far is the project? is it possible... ?

i would be extremly useful for me, because housebreakers robbed my pc :veryangry:
and now i only have my portable hdd with movies left...

pluging it to the xbox would be so nice...

cu lolol
Reply

Logout Mark Read Team Forum Stats Members Help
Implementing FAT12/16/32 (and VFAT) support in XBMC1