Understanding the FAT32 allocation table

Discussions on more advanced topics such as monolithic vs micro-kernels, transactional memory models, and paging vs segmentation should go here. Use this forum to expand and improve the wiki!
User avatar
Firestryke31
Member
Member
Posts: 550
Joined: Sat Nov 29, 2008 1:07 pm
Location: Throw a dart at central Texas
Contact:

Re: Understanding the FAT32 allocation table

Post by Firestryke31 »

I use ImDisk Virtual Disk Driver, which lets Windows handle formatting it, but due to the way it works you can't partition the image (it emulates a logical drive, not a physical one). However, the code for partitioned and unpartitioned drives should be the same if you do it right. You just add HiddenSectors to FirstDataCluster and FirstFATSector.

Edit: Weird, Windows tends to set HiddenSectors to 1 on disk images, when it should be 0. Now I'm going to have to have 2 versions of my boot loader: one for flat images and one for partitioned ones.
Owner of Fawkes Software.
Wierd Al wrote: You think your Commodore 64 is really neato,
What kind of chip you got in there, a Dorito?
mangaluve
Member
Member
Posts: 110
Joined: Mon Feb 23, 2009 6:53 am

Re: Understanding the FAT32 allocation table

Post by mangaluve »

Thanks I'll try that! Any good information about how to use ImDisk (couldn't find much on the site where I downloaded it). What I want to do is to create a fat32 image and mount it, put some files there, and then unmount it and try to "parse" it with my own code
User avatar
Combuster
Member
Member
Posts: 9301
Joined: Wed Oct 18, 2006 3:45 am
Libera.chat IRC: [com]buster
Location: On the balcony, where I can actually keep 1½m distance
Contact:

Re: Understanding the FAT32 allocation table

Post by Combuster »

Frequently asked question. Disk Images
"Certainly avoid yourself. He is a newbie and might not realize it. You'll hate his code deeply a few years down the road." - Sortie
[ My OS ] [ VDisk/SFS ]
User avatar
Firestryke31
Member
Member
Posts: 550
Joined: Sat Nov 29, 2008 1:07 pm
Location: Throw a dart at central Texas
Contact:

Re: Understanding the FAT32 allocation table

Post by Firestryke31 »

mangaluve wrote:Thanks I'll try that! Any good information about how to use ImDisk (couldn't find much on the site where I downloaded it). What I want to do is to create a fat32 image and mount it, put some files there, and then unmount it and try to "parse" it with my own code
Create a file of the appropriate size (I used the Bochs image program thing) and just right click it, select Mount (IIRC it's the second option), go to My Computer, format the new drive as usual, right click the drive, and unmount. Then you can play around with the image file. Whenever you want to add/remove files, just mount it and use it like a normal drive.
Owner of Fawkes Software.
Wierd Al wrote: You think your Commodore 64 is really neato,
What kind of chip you got in there, a Dorito?
Post Reply