>> USBDRIVE does not try to "virtualize" the sector sizes as others are >> suggesting here as a possibility -- I figure doing that has the >> potential to cause as many problems as the alternative... > > Maybe you could make that configurable, so people can experiment > with virtual 512 byte sectors at their own risk? Might be useful > for people who want to make their disk oriented tools 4k-wrapped- > to-512-sane :-)
Possible, but a REALLY BAD IDEA if you ask me. The most obvious problem is that the disk will instantly become non-portable, and can't be used with other OS's or even other DOS drivers that don't virtualize the sectors. Internally, there are lots of technical issues with things like DMA and buffering that will probably cause at least as many, if not more, problems than trying to use hard-coded-512-byte programs with disks that aren't 512-bytes. There is also a significant speed and memory usage problem -- all disk transfers will need to be "double-buffered" (the driver will need to internally store the entire large sector and then transfer only the part that was requested). Again, possible, but NOT a good idea, IMHO. > Can you send the URL of that MS DOS patching instruction? Go to my web site: http://bretjohnson.us and download the source code for the USB drivers (USBSOURC.ZIP -- the link is near the bottom of the first section). Inside the zip file is USBDRIVE.A36, and the comment that shows how to do it is around line 300. > I am wondering how much it could tell us about how to patch FreeDOS > but of course FreeDOS already is known to have a bit more hard > coded "512 byte ish ness". On the other hand, FreeDOS sources > are easily available and easy to read... :-) >From what I understand, in MS-DOS and IBM-DOS, the maximum sector size is >stored in only one place (part of the List of Lists). This value is >"adjusted" while booting to match the largest sector size of any disk that the >kernel finds and assigns drive letters to. In the kernel code, it always uses >the value stored there in its various calculations, and never uses any >hard-coded values. That's the way FreeDOS _should_ be as well, though I don't >know if it actually is. > Interesting. Any known side effects? Not that I know of. I've been using a 2048-byte sector size in MS-DOS for a long time now (since USBDRIVE came out), and haven't had any problems. I should point out that I don't actually have any disks with other than 512-byte sectors, so my testing is not very complete. But this "trick" has been around for a LONG time, and I've never seen any mentions of problems. > Of course it will not help tools like FORMAT or CHKDSK unless they > already are sector-size flexible. In my opinion, there's no legitimate reason for programs like FORMAT and CHKDSK to disallow non-512-byte sectors. Other sector sizes have been around since before MS-DOS was created, and MS has always stated that programs should never assume 512 bytes. I can't say this for sure, but I don't think any MS utilities ever had problems with other sector sizes. ------------------------------------------------------------------------------ RSA(R) Conference 2012 Mar 27 - Feb 2 Save $400 by Jan. 27 Register now! http://p.sf.net/sfu/rsa-sfdev2dev2 _______________________________________________ Freedos-user mailing list Freedos-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/freedos-user