get floppy sector filename

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
User avatar
matias_beretta
Member
Member
Posts: 101
Joined: Mon Feb 26, 2007 3:39 pm

get floppy sector filename

Post by matias_beretta »

Hello, i am making a real mode os and i would like to know how can i get the filename of a disk sector. lots of thanks. MATI argentina
xsix
Member
Member
Posts: 59
Joined: Tue Oct 24, 2006 10:52 am

Post by xsix »

Are you stupid? Before you ask out, THINK about a question a little bit. Ok, i think you want a filename of any file on the floppy yeah? so Floppy has 2 heads, each of them has 80cylinders, each cylinder has 18 sectors in it. Sector size is 512bytes so 2*80*18*512 / 1024 = 1.44mb capacity. I'm talking about 1.44mb 3.5inches floppy. Files exists only virtually, really filesystem owns them. Filesystem is in the beginning of the floppy, probably FAT12, cause nobody uses anothers FS for floppies. Now, you must to calculate the addresses of where filenames in the FS header structure are, and where data begins. If you are a newbie, don't hope to get answer like "oh yeah it's easy as a piece of ****, just send filename to the floppy and it will read it. Floppy is difficult to programm device and FAT12 filesystem is simple, but NOT FOR NEWBIES so maybe get out to work on something easier, like writing Hello world from bootsector ah?
User avatar
matias_beretta
Member
Member
Posts: 101
Joined: Mon Feb 26, 2007 3:39 pm

thanks

Post by matias_beretta »

thanks for the answer
User avatar
Brynet-Inc
Member
Member
Posts: 2426
Joined: Tue Oct 17, 2006 9:29 pm
Libera.chat IRC: brynet
Location: Canada
Contact:

Post by Brynet-Inc »

That was rather blunt.... xsix..:lol:

Although I can't say I agree with this:
xsix wrote:cause nobody uses anothers FS for floppies..
I won't comment on your lack of English skills, But I will say.. Not everyone uses FAT on floppies.

I myself have no desire to use such a limited file system, Even on floppy disks..
Image
Twitter: @canadianbryan. Award by smcerm, I stole it. Original was larger.
xsix
Member
Member
Posts: 59
Joined: Tue Oct 24, 2006 10:52 am

Post by xsix »

any other ideas? floppy is not big enough for a file system with advanced features. I haven't seen that anyone else used another filesystem than FAT12 on standart floppy. Oh no, i saw, RAW filesystem when only head:track:sector is loaded when needed. Anyway you can create your own, or just modificate FAT12 as you wish
User avatar
Alboin
Member
Member
Posts: 1466
Joined: Thu Jan 04, 2007 3:29 pm
Location: Noricum and Pannonia

Post by Alboin »

xsix wrote:any other ideas?
mke2fs /dev/fd0
C8H10N4O2 | #446691 | Trust the nodes.
User avatar
Brynet-Inc
Member
Member
Posts: 2426
Joined: Tue Oct 17, 2006 9:29 pm
Libera.chat IRC: brynet
Location: Canada
Contact:

Post by Brynet-Inc »

xsix wrote:any other ideas? floppy is not big enough for a file system with advanced features. I haven't seen that anyone else used another filesystem than FAT12 on standart floppy. Oh no, i saw, RAW filesystem when only head:track:sector is loaded when needed. Anyway you can create your own, or just modificate FAT12 as you wish
People format floppies using the EXT2 file system all the time.. Taking advantage of things like permissions.

I myself have formatted a few disks using OpenBSD's FFS many times..

So stop spreading lies..
xsix wrote:Are you stupid? Before you ask out, THINK about a question a little bit.
Good advice, Try following it... :lol:
Image
Twitter: @canadianbryan. Award by smcerm, I stole it. Original was larger.
User avatar
mystran
Member
Member
Posts: 670
Joined: Thu Mar 08, 2007 11:08 am

Post by mystran »

I personally rarely bother to mount floppies at all. I use mtools to deal with them instead, if I'm on Linux..
The real problem with goto is not with the control transfer, but with environments. Properly tail-recursive closures get both right.
User avatar
B.E
Member
Member
Posts: 275
Joined: Sat Oct 21, 2006 5:29 pm
Location: Brisbane Australia
Contact:

Post by B.E »

xsix wrote:cause nobody uses anothers FS for floppies.
This is because all the floppies that you have ever handled, are used on OSes made by companies that are ignorant and don't support any other filesystem except their own hacks.
Image
Microsoft: "let everyone run after us. We'll just INNOV~1"
User avatar
AndrewAPrice
Member
Member
Posts: 2311
Joined: Mon Jun 05, 2006 11:00 pm
Location: USA (and Australia)

Post by AndrewAPrice »

I used to use ext2, but I switched to FAT12. My reason for this is so other people can download a floppy image and add their own modules under any operating system (ext2 would require Windows users to download an ext2 IFS).
My OS is Perception.
User avatar
Brynet-Inc
Member
Member
Posts: 2426
Joined: Tue Oct 17, 2006 9:29 pm
Libera.chat IRC: brynet
Location: Canada
Contact:

Post by Brynet-Inc »

MessiahAndrw wrote:(ext2 would require Windows users to download an ext2 IFS)
Oh no!! We wouldn't want them to break a sweat or anything...

Seriously, Why do people accommodate "Windows" users.. It's silly.
Image
Twitter: @canadianbryan. Award by smcerm, I stole it. Original was larger.
xsix
Member
Member
Posts: 59
Joined: Tue Oct 24, 2006 10:52 am

Post by xsix »

oh yes, i haven't grown up on the computer, i own it just a few years but that's not a point. use another filesystem on floppy to set permissions or whatever. I don't know, maybe in the past this was usable i don't think that 1.44megabytes floppy disk is a perfect storage which needs advanced filesystem. I love floppies, but get with the times, now there are DVDs up to 20gb(or much more) and there is no reason to use floppies for information storage imho.
User avatar
Brynet-Inc
Member
Member
Posts: 2426
Joined: Tue Oct 17, 2006 9:29 pm
Libera.chat IRC: brynet
Location: Canada
Contact:

Post by Brynet-Inc »

xsix wrote:oh yes, i haven't grown up on the computer, i own it just a few years but that's not a point. use another filesystem on floppy to set permissions or whatever. I don't know, maybe in the past this was usable i don't think that 1.44megabytes floppy disk is a perfect storage which needs advanced filesystem. I love floppies, but get with the times, now there are DVDs up to 20gb(or much more) and there is no reason to use floppies for information storage imho.
I don't think you know very much about filesystems or storage mediums..
Using ext2 on a floppy would be helpful for someone doing work on an OS that supports file permissions.

And there are not any 20gb DVD's.. So you're dreaming..

DVD is 4.7 GB (single layer), 8.5 GB (dual layer)
HDDVD is 15 GB (single layer) and 30 GB (dual layer)..
Blu-Ray is 25 GB (single layer), 50 GB (dual layer)..

HDDVD and Blu-Ray have much higher capacities.. But writers and blank disks are not widely available or cheap.
Image
Twitter: @canadianbryan. Award by smcerm, I stole it. Original was larger.
xsix
Member
Member
Posts: 59
Joined: Tue Oct 24, 2006 10:52 am

Post by xsix »

i wrote in () "or much more" 20 was just a big number of gigabytes to imagine how much it is bigger that a 1.44mb floppy :D
Tyler
Member
Member
Posts: 514
Joined: Tue Nov 07, 2006 7:37 am
Location: York, England

Post by Tyler »

Brynet-Inc wrote:
MessiahAndrw wrote:(ext2 would require Windows users to download an ext2 IFS)
Oh no!! We wouldn't want them to break a sweat or anything...

Seriously, Why do people accommodate "Windows" users.. It's silly.
I know, its not like Windows has at least 90% market share... And it defiently isn't that computers are designed for ease of use and not so evey end user is forced to find, comiple, understand and install every little piece of code they need to use. So definetly crazy to suppor those 20 ignorant windows users whose lifes don't revolve around wanting to know all the details of computers.

The Windows philosophy might suck, but there is definetly not one better, the UNIX-likes are just not user friendly, however many Windows look alike desktops you throw over them.
Post Reply