Im trying to make a simple os that can do the following and only the following
+read and write to a floppy (simple floppy drive, without dma support)
+display a .gif file
there u have it thats it, any suggestions?[/i]
simple os
Re: simple os
Take a look on http://osdever.net/ and http://256.com/gray/docs/gifspecs/general.html
Re: simple os
the first part is pretty easy,if you mean raw and not filesystems, if you are using real mode then int 13h awaits you and for protected mode- you got to learn about gdts,idts,making interrupt functions,(i think) dma and reading/writing to ports
the second part im not familar with the gif format so i cant offer any advice but if its in real mode then int 10h else then,well research vga and stuff
oh and visit those places above me
the second part im not familar with the gif format so i cant offer any advice but if its in real mode then int 10h else then,well research vga and stuff
oh and visit those places above me
Re: simple os
setting up FAT12 is actually quite easy (and more usefull since you can then copy files onto the disk from any operating system and read the files in yours (which RAW disk access cannot do)
displaying a gif is going to be harder and will require graphics mode manipulation and pixel setting (still not hard)
if this is the extent of a _very_ basic bootable program then stick with RMode but if you will be adding more functionality then the move to PMode will be well worth the additional (significant) effort
displaying a gif is going to be harder and will require graphics mode manipulation and pixel setting (still not hard)
if this is the extent of a _very_ basic bootable program then stick with RMode but if you will be adding more functionality then the move to PMode will be well worth the additional (significant) effort
Re: simple os
can u reccommend any beginner fat12 tutorials(not documents that say what is in a fat and stuff) cause i looked at some things and i just dont know where to start really
Re: simple os
well i doubt you will find any FAT12 "tutorials" but its really simple to use (or perhaps because it is)
your boot sector must start with the bpb which defines a lot of values and identifies the disk as being FAT12
hidden sectors actually refers to other partitions (and the MBR) and gives you the offset of the boot sector (on floppy disks it should always be 0)
the first sector after the reserved sectors(almost always 1 and many programs will break if you make it more than 1) will be your FAT table -- one entry per FAT cluster(entries are 12bits for FAT12, 16bits for FAT16 and 32 bits for FAT32) starting with cluster#1
find the number of sectors in the fat from the bpb and multiply by number of fats(also in bpb -- and almost always 2) and add the number of reserved and hidden sectors(hidden will usually be 0 on FDD) to find the start of the root dir
then parse the root dir to find the file you need: the dir entry will tell you which FAT cluster the file starts in
cluster 1 begins with the first sector after the root dir(the bpb should tell you the #of 32byte entries in the root dir) and look up the cluster entry in the FAT table -if the entry is FFF it is the last cluster in the file if not it will point to the next cluster (if the entry is 0 then the FAT is corrupt because 0 means the cluster is unused)
the number of sectors in each cluster is also listed in the bpb
it sounds alot harder than it really is -- just get the FAT12 docs and look them over
your boot sector must start with the bpb which defines a lot of values and identifies the disk as being FAT12
hidden sectors actually refers to other partitions (and the MBR) and gives you the offset of the boot sector (on floppy disks it should always be 0)
the first sector after the reserved sectors(almost always 1 and many programs will break if you make it more than 1) will be your FAT table -- one entry per FAT cluster(entries are 12bits for FAT12, 16bits for FAT16 and 32 bits for FAT32) starting with cluster#1
find the number of sectors in the fat from the bpb and multiply by number of fats(also in bpb -- and almost always 2) and add the number of reserved and hidden sectors(hidden will usually be 0 on FDD) to find the start of the root dir
then parse the root dir to find the file you need: the dir entry will tell you which FAT cluster the file starts in
cluster 1 begins with the first sector after the root dir(the bpb should tell you the #of 32byte entries in the root dir) and look up the cluster entry in the FAT table -if the entry is FFF it is the last cluster in the file if not it will point to the next cluster (if the entry is 0 then the FAT is corrupt because 0 means the cluster is unused)
the number of sectors in each cluster is also listed in the bpb
it sounds alot harder than it really is -- just get the FAT12 docs and look them over
Re: simple os
if you have any more specific questions just ask
Re: simple os
ok i think im going to start off with the floppy driver first, i have the manual from intel but some of it is haze so if u know any good floppy manuals that will help me. also i am developing a c++, c hybrid kernel because i dont know that much asm.
Just because your phone is "smart" doesn't mean the user is... ijs