Filesystem
Filesystem
Is there any short example code to get bytes of a file, that is on the os image, because i want to draw a image from the bytes?
- furryfreak
- Member
- Posts: 28
- Joined: Mon Nov 03, 2008 12:45 pm
- Location: SW England
Re: Filesystem
are you wanting to make your own file system, or use an existing one?
if you want to use an existing one, check out the grub2 source code.
if you want to use an existing one, check out the grub2 source code.
Re: Filesystem
thanks, i want to use existing
Re: Filesystem
This is a very complex filesystem. Is there any easier example to get bytes from a file, which is on the os cd?
Re: Filesystem
Hi,
You could put the image in a reserved sector on disk. But you don't want to!
You can't just start writing an OS with the GUI. You first need a stable system (Kernel, VFS, etc).
I'm developing my OS for over a year now and there is still no GUI. There isn't a shell either. You really first need the essential things like drivers and so on.
If you just want to write a GUI this is the wrong forum for you (At least I hope so).
You could put the image in a reserved sector on disk. But you don't want to!
You can't just start writing an OS with the GUI. You first need a stable system (Kernel, VFS, etc).
I'm developing my OS for over a year now and there is still no GUI. There isn't a shell either. You really first need the essential things like drivers and so on.
If you just want to write a GUI this is the wrong forum for you (At least I hope so).
- furryfreak
- Member
- Posts: 28
- Joined: Mon Nov 03, 2008 12:45 pm
- Location: SW England
Re: Filesystem
a good file system to start with would be FAT12. It's a very crappy file system technically speaking, but its easy(ish) to work with, especially if your using floppy disks/.img's, as floppy's tend to be formatted as FAT12/16.
Here's a link to a FAT12 tutorial http://www.brokenthorn.com/Resources/OSDev6.html, many of the other tutorials on that site are also good as a starting point.
As for drawing an image to screen, search for the VGA and VBA standards, you should be able to find the pdf's on the VESA website. VGA is simple, limited, only any good for real-mode, and supported by just about every x86 BIOS. VBA on the other hand is much more flexible and works in protected mode, however its quite a bit more complicated. It should be relatively easy to draw a .bmp file, I wouldn't try any compressed file formats until you've got a bitmap on screen.
this wikipedia page should shed some light on the bitmap format: http://en.wikipedia.org/wiki/Windows_bitmap
Here's a link to a FAT12 tutorial http://www.brokenthorn.com/Resources/OSDev6.html, many of the other tutorials on that site are also good as a starting point.
As for drawing an image to screen, search for the VGA and VBA standards, you should be able to find the pdf's on the VESA website. VGA is simple, limited, only any good for real-mode, and supported by just about every x86 BIOS. VBA on the other hand is much more flexible and works in protected mode, however its quite a bit more complicated. It should be relatively easy to draw a .bmp file, I wouldn't try any compressed file formats until you've got a bitmap on screen.
this wikipedia page should shed some light on the bitmap format: http://en.wikipedia.org/wiki/Windows_bitmap