OSDev.org

The Place to Start for Operating System Developers
It is currently Tue Apr 16, 2024 5:49 pm

All times are UTC - 6 hours




Post new topic Reply to topic  [ 9 posts ] 
Author Message
 Post subject: Fading Floppy on Laptop or USB Drives, But They Are Good
PostPosted: Wed Jun 28, 2017 10:06 am 
Offline
Member
Member
User avatar

Joined: Tue Mar 06, 2007 11:17 am
Posts: 1225
Do you know some actual information or self experience of the electronics implementation internals about this effect when working with floppies for PC, floppies for laptops in expansion bay and USB floppies?

I have perfectly good Sony floppies, a box of 10, still from 2009.

When I mostly used my regular PC these floppies always worked well. Now I almost only use laptops to save on power consumption, to go at most to 150 KwH per month in my house.

When I started using floppies from laptops like the Thinkpad 390X, I would sporadically have trouble accessing floppies. I thought that those floppies were becoming bad fast.

But now after many booting tries with a custom OS of mine that works more and more for me, I find that the floppies work perfectly in my PCs. I just need to write the compiled files in those machines to leave them like new. Then the correct access to the media fades each time I write a file in a laptop or an USB floppy. It's like portable laptop floppies were improperly directing the focus of the affecting magnetism for reading or writing, or as if the voltage was too low in those drives.

I can read the floppies normally in a laptop floppy drive if I don't write the media again in it. I haven't tested enough to see if it can fade just by reading, but I have a Windows 98 startup disk of more than a year of having been formatted, and it still works well, so it tells me that just reading doesn't affect it, but writing with non-ideal drives. I think it's the same situation where people recommended not to write the same floppy carelessly in different drives, or kinds of drives, for 5.25" at least. But it obviously applies to any floppy.

It also seems to affect the files that are created in the lower quality drives, not the all the files.

I suspect that floppies could get permanently or temporarily damaged if floppy drives cannot really format the media to a low enough level, so when this problem arises, the best is to check which floppy drive is the best we have, and reformat an apparently floppy drive. The best floppy drives seem to be the classic white ones for PCs from 2009 and older. Chances are that the media doesn't really have bad sectors at all really. It would probably be better to also keep floppies as read-only when reading in lower-quality floppy drives.

This is why I will need to implement at the very least functions to specifically read and write ATA disks, for use with FAT32 LBA partitions, before all of my floppies really go bad, so I can reliably run tests, because with this problem in some floppy drives, I can't know if it's my code or the floppy drive that makes my system fail when loading external programs.

_________________
Live PC 1: Image Live PC 2: Image

YouTube:
http://youtube.com/@AltComp126/streams
http://youtube.com/@proyectos/streams

http://master.dl.sourceforge.net/projec ... 7z?viasf=1


Top
 Profile  
 
 Post subject: Re: Fading Floppy on Laptop or USB Drives, But They Are Good
PostPosted: Wed Jun 28, 2017 8:18 pm 
Offline
Member
Member

Joined: Thu Aug 13, 2015 4:57 pm
Posts: 384
Haven't touched a floppy in years and I have no intention of touching them ever again, not even for nostalgia.

I don't test often with real hardware (but I do things a bit differently, so I don't need to), I mostly test with compiler and occasionally with Qemu or other virtualization/emulation.

When I do want to test with real hardware I much rather use USB sticks or PXE, is there a reason why anyone wants to use floppies? I seriously doubt any of your potential users would ever want to install your OS from a floppy =)


Top
 Profile  
 
 Post subject: Re: Fading Floppy on Laptop or USB Drives, But They Are Good
PostPosted: Wed Jun 28, 2017 9:02 pm 
Offline
Member
Member
User avatar

Joined: Tue Mar 06, 2007 11:17 am
Posts: 1225
It can be booted from any disk that DOS recognizes. You just need to copy the files to the BOOTCFG subdirectory in the root directory, then run lowest.com and then run the default fourth stage boot loader ldr\4\patio.com, for my kernel (first stage is the boot sector, second stage is DOS, third stage is the lowest.com configurator and the fourth stage is patio.com and my kernel).

I only need to add support for FAT32 LBA and ATA disks as the minimum to load programs and files reliably, as I stated before. Currently it can only run external programs in a floppy.

I used it because it's the simplest mass storage device. I just need to read the FAT table to a cache in memory and scan short file names in the root directory. Otherwise I would need to use ATA commands, detect recognized partitions, probably add USB or SATA drivers, and then scan the FAT table without caching it all, it's simply too big to be kept at once. It's realistically too difficult for a starting system based on learning how to implement solutions to common personal needs first to make it immediately usable and still scalable with future additional features added basically as additional separate cases with increasing complexity. And configuration options typically passed at boot time, instead as commands driven by a kernel console that would always remain available no matter how advanced the system becomes, to tweak special low level options at run time.

And still the floppy is difficult enough to use, with all of its commands and the obligatory usage of ISA DMA. And I'm still figuring out how to detect read errors to abort loading a badly-read program binary code, or just let the system crash until I add exceptions and multitasking to isolate the task from the state of the kernel itself.

Here's a map of the current system, which shows clearly all of the features that the code implements at the end of its superficial functional chain:
Image

_________________
Live PC 1: Image Live PC 2: Image

YouTube:
http://youtube.com/@AltComp126/streams
http://youtube.com/@proyectos/streams

http://master.dl.sourceforge.net/projec ... 7z?viasf=1


Top
 Profile  
 
 Post subject: Re: Fading Floppy on Laptop or USB Drives, But They Are Good
PostPosted: Wed Jun 28, 2017 9:41 pm 
Offline
Member
Member
User avatar

Joined: Mon Apr 18, 2016 9:50 am
Posts: 138
Location: New York New York
Tilde, I've browsed through your youtube videos and at this point I am honestly concerned for you, dude.

_________________
The OS is P5. Don't expect it to build.


Top
 Profile  
 
 Post subject: Re: Fading Floppy on Laptop or USB Drives, But They Are Good
PostPosted: Wed Jun 28, 2017 10:12 pm 
Offline
Member
Member

Joined: Thu Aug 13, 2015 4:57 pm
Posts: 384
jojo wrote:
Tilde, I've browsed through your youtube videos and at this point I am honestly concerned for you, dude.


Made me look a couple =)


Top
 Profile  
 
 Post subject: Re: Fading Floppy on Laptop or USB Drives, But They Are Good
PostPosted: Wed Jun 28, 2017 10:15 pm 
Offline
Member
Member

Joined: Thu Aug 13, 2015 4:57 pm
Posts: 384
Tilde, fair enough, there's nothing wrong with using/supporting floppies, if you want to.

I was simply saying that basically everyone will want HDD support, so making a detour via floppy (which nobody wants) isn't really useful, and ATA PIO mode isn't really that complicated I think..

USB I haven't even attempted and is a lot more complex, though you can load all that you need from USB flash disk with the help of BIOS and only after that start your OS proper, that way you don't need USB support in your OS until a lot later..

Floppies don't really teach you anything useful (except about floppies), they are unreliable, slow and nobody wants them, so I see it as only wasted effort.


Top
 Profile  
 
 Post subject: Re: Fading Floppy on Laptop or USB Drives, But They Are Good
PostPosted: Thu Jun 29, 2017 8:02 am 
Offline
Member
Member
User avatar

Joined: Sat Jan 15, 2005 12:00 am
Posts: 8561
Location: At his keyboard!
Hi,

LtG wrote:
Haven't touched a floppy in years and I have no intention of touching them ever again, not even for nostalgia.

LtG wrote:
Floppies don't really teach you anything useful (except about floppies), they are unreliable, slow and nobody wants them, so I see it as only wasted effort.


Ironically, I've used real floppies (and not for OS development, but for "sneaker net" file transfer) more recently than I've used DOS.

Everything you've said about floppies applies equally well to DOS:
  • I haven't touched DOS in years and I have no intention of touching DOS ever again, not even for nostalgia.
  • DOS doesn't really teach you anything useful (except about DOS), and it's unreliable, slow and nobody wants it, so I see using DOS as wasted effort.
;)


Cheers,

Brendan

_________________
For all things; perfection is, and will always remain, impossible to achieve in practice. However; by striving for perfection we create things that are as perfect as practically possible. Let the pursuit of perfection be our guide.


Top
 Profile  
 
 Post subject: Re: Fading Floppy on Laptop or USB Drives, But They Are Good
PostPosted: Thu Jun 29, 2017 1:18 pm 
Offline
Member
Member

Joined: Thu Aug 13, 2015 4:57 pm
Posts: 384
Brendan wrote:
Ironically, I've used real floppies (and not for OS development, but for "sneaker net" file transfer) more recently than I've used DOS.

Thinking it quickly, I can't really come up with any case where I'd use floppy sneaker net, care to elaborate? Apart from the obvious of using some ancient 386 with no PXE support, but then I'd assume it would be for OSdev, which you said it's wasn't.. I would assume all relevant hardware allows firmware updates without the use of floppies as well..

I'm pretty sure none of my machines even have a floppy drive, though there might be a drive dusting on some shelf somewhere..

Transferring files over RDP is stupid slow (I have no idea how MS managed to get RDP over 1Gbps network to only transfer around 1-3MB/s), so I rarely sneaker net external HDD's.

Out of curiosity I tried couple of the largest stores in the area and neither actually sells internal floppy drives anymore, both have a single USB floppy drive model available, though one didn't seem to have any floppies available the other did, I guess there's still some people that use them =)


Top
 Profile  
 
 Post subject: Re: Fading Floppy on Laptop or USB Drives, But They Are Good
PostPosted: Thu Jun 29, 2017 2:33 pm 
Offline
Member
Member
User avatar

Joined: Sat Jan 15, 2005 12:00 am
Posts: 8561
Location: At his keyboard!
Hi,

LtG wrote:
Brendan wrote:
Ironically, I've used real floppies (and not for OS development, but for "sneaker net" file transfer) more recently than I've used DOS.

Thinking it quickly, I can't really come up with any case where I'd use floppy sneaker net, care to elaborate? Apart from the obvious of using some ancient 386 with no PXE support, but then I'd assume it would be for OSdev, which you said it's wasn't.. I would assume all relevant hardware allows firmware updates without the use of floppies as well..


A long time ago (at least 10 years) I was doing a course at a TAFE college, and initially used floppies to store and transport assignments, etc; partly because I was too lazy to buy a USB flash stick at the time and had plenty of old floppy disks (and still do - I never throw things out - I even have drawer full of 5.25 inch floppies disks for a Commodore and the floppy drive, etc).


Cheers,

Brendan

_________________
For all things; perfection is, and will always remain, impossible to achieve in practice. However; by striving for perfection we create things that are as perfect as practically possible. Let the pursuit of perfection be our guide.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 9 posts ] 

All times are UTC - 6 hours


Who is online

Users browsing this forum: Bing [Bot], DotBot [Bot] and 783 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group