Back to home page

DOS ain't dead

Forum index page

Log in | Register

Back to index page
Thread view  Board view
avoskov(R)

03.05.2010, 15:09
 

exFAT reader for DOS (Announce)

Hello!
exFAT is a new version of FAT system from Microsoft. It was discussed on dr-dos forums. Recently I've created a cross-platform exFAT reader, it can work under DOS, but requires HX DOS extender. The implementation is still experimental, alpha-version.

http://narod.ru/disk/20353303000/EFAT001.zip.html

Zyzzle(R)

04.05.2010, 00:52

@ avoskov
 

exFAT reader for DOS

Looks very promising, but I can't download the file. Will anyone provide another link? Site says enter a number, which doesn't display, so I can't d/l the file.

Thanks, your efforts are much appreciated, hopefully we can now read our FAT64-formatted memory sticks in pure DOS! Will new updates be coming when you get it more stable? Is a native, non-HX driver impossible?

RayeR(R)

Homepage

CZ,
04.05.2010, 01:28

@ Zyzzle
 

exFAT reader for DOS

> Looks very promising, but I can't download the file. Will anyone provide
> another link? Site says enter a number, which doesn't display, so I can't
> d/l the file.

DL worked for me, but here's temp. reup:
http://rayer.ic.cz/350d/EFAT001.zip
But I don't know how to test it. How do I create and format exfat partition?

---
DOS gives me freedom to unlimited HW access.

RayeR(R)

Homepage

CZ,
04.05.2010, 01:36

@ RayeR
 

exFAT reader for DOS

BTW The dependency on windows in just readsect() function? It yes then it would be easy to port it to true DOS.

---
DOS gives me freedom to unlimited HW access.

avoskov(R)

04.05.2010, 09:30

@ RayeR
 

exFAT reader for DOS

> BTW The dependency on windows in just readsect() function? It yes then it
> would be easy to port it to true DOS.

Yes, I specially made such thing, the memory consumption of reader is rather moderate (several Kb for buffers), so it will be possible to port it to the real mode.

Zyzzle(R)

04.05.2010, 04:43

@ RayeR
 

exFAT reader for DOS

> > Looks very promising, but I can't download the file. Will anyone provide
> > another link? Site says enter a number, which doesn't display, so I
> can't
> > d/l the file.
>
> DL worked for me, but here's temp. reup:
> http://rayer.ic.cz/350d/EFAT001.zip
> But I don't know how to test it. How do I create and format exfat
> partition?

You need to be running XP sp2 minimum to format an ExFAT partition, download the drivers at

http://support.microsoft.com/kb/955704

I was able to download the EXFAT001.zip at your temp location, thanks. I'll test it now. I think it should be possible to eliminate dependency on HX.

RayeR(R)

Homepage

CZ,
04.05.2010, 13:14

@ Zyzzle
 

exFAT reader for DOS

> You need to be running XP sp2 minimum to format an ExFAT partition,
> download the drivers at
>
> http://support.microsoft.com/kb/955704

OK, but what next? I installed the update which includes new version of format.com but /? tells me /FS: can be only FAT, FAT32, NTFS. What is the right option for exFAT?

---
DOS gives me freedom to unlimited HW access.

avoskov(R)

04.05.2010, 13:22

@ RayeR
 

exFAT reader for DOS

The correct option is exFAT, but you can also use GUI - after update pack you will have option "exFAT" in the formatting dialog

avoskov(R)

04.05.2010, 09:37

@ Zyzzle
 

exFAT reader for DOS

> Looks very promising, but I can't download the file. Will anyone provide
> another link? Site says enter a number, which doesn't display, so I can't
> d/l the file.
>
> Thanks, your efforts are much appreciated, hopefully we can now read our
> FAT64-formatted memory sticks in pure DOS! Will new updates be coming when
> you get it more stable? Is a native, non-HX driver impossible?

I created exFAT partition under WinXP SP3 with exFAT driver from Microsoft and I'm using it for experiments. I'm developing the reader under WinXP, and using HX DOS extender to run it in pure DOS (in future it will be possible to replace it to another extender or even go to real mode). May be, in future releases I'll implement FORMAT and UNERASE for exFAT. I'll continue working on exFAT reader.

P.S. exFAT is not FAT64, it uses 32-bit cluster numbers and very simular to FAT32. It however uses bitmap for free clusters and its own format for directory entries. It also has no short file names and has no information about CHS geometry in VBR.

P.P.S. RayeR already reuploaded my driver into another link, it was mentioned in this thread.

Laaca(R)

Homepage

Czech republic,
04.05.2010, 10:47

@ avoskov
 

exFAT reader for DOS

It is great!
I don't have an exFAT formated disc now but anyway it is amasing to have the ability to read it under DOS.

If I understand right, it is only read-only driver so far, isn't?
Do you think you will be able to add the writting ability?

Maybe when it will be more mature I could try to rewrite your code into pascal as a patch into Necromancer's DOS navigator.

---
DOS-u-akbar!

avoskov(R)

04.05.2010, 11:55

@ Laaca
 

exFAT reader for DOS

Currently it is read-only, and has some limitations (e.g., it uses codepage 866 permanently and doesn't use uppercase tables of exFAT - "thinks" that Abc and abc are different filenames), bugs are possible to, because testing was rather limited (but I've tested it under HX DOS extender under plain DOS).

I'm planning to add writing ability in the future.

P.S. About rewriting: idea about integration with NDN is great, but may be, it will be more effective to write only "envelope" in Pascal and use C binaries?

RayeR(R)

Homepage

CZ,
04.05.2010, 13:07

@ avoskov
 

exFAT reader for DOS

And how about to implement it into FreeDOS kernel? As #ifdef option :) Read-only is OK at beginning.

I tried to compile sources under mingw32 but it needed some modifications (adding some include files and fixing %lld to %I64d [msvcrt stuff]). It also spit tens of warnings at -Wall. Then I finally build the exe. But it displays me uncorrect sizes of some partitions e.g. ~2000000MB instead 490MB, btw you should write MB or MiB instead of "Mb" - a Megabit vs MegaByte. I tried to fix it adding atribute packed around typedef of structures but got the same. Maybe there's some other data type mismatch...

---
DOS gives me freedom to unlimited HW access.

avoskov(R)

04.05.2010, 13:27

@ RayeR
 

exFAT reader for DOS

> And how about to implement it into FreeDOS kernel? As #ifdef option :)
> Read-only is OK at beginning.
I don't know FreeDOS kernel very well (but I've seen its source code), moreover, exFAT significantly differs from FAT12/16/32. I think about external resident exFAT driver, may be, it will be even easier and will allow to add exFAT into DR-DOS, MS-DOS, PC-DOS etc.

P.S. Thanks for testing, I'll fix warnings and another type mismatch issues (Open Watcom, which I use for development, shows some of them too). May be, incorrect partitions sizes is connected with it too.

RayeR(R)

Homepage

CZ,
04.05.2010, 13:51

@ avoskov
 

exFAT reader for DOS

> P.S. Thanks for testing, I'll fix warnings and another type mismatch
> issues (Open Watcom, which I use for development, shows some of them too).
> May be, incorrect partitions sizes is connected with it too.

Hi, here's my mingw modified sources. It compiles with one warning - passing NULL to ReadFile() function - I don't know how to fix it.

http://rayer.ic.cz/350d/efdir.mingw.zip

And here is output on my HDD^Work

C:\3>efdir.exe 0
MBR partition table
0: 00 FFFFFFDE 0000003F 47Mb
2: 00 FFFFFF83 FFFFFFBF 2093956Mb
3: 00 00 00000000 0Mb
exFAT partitions not found!

And here is output of your build

C:\3>efdir2.exe 0
MBR partition table
0: 00 DE 0000003F 47Mb
1: 80 07 00017886 147542Mb
2: 00 83 12042ABF 4996Mb
3: 00 00 00000000 0Mb
exFAT partitions not found!

It looks like some signed vs unsigned mismatch

---
DOS gives me freedom to unlimited HW access.

tom(R)

Homepage

Germany,
13.05.2010, 17:42

@ avoskov
 

exFAT reader for DOS

> Currently it is read-only, and has some limitations (e.g., it uses codepage
> 866 permanently and doesn't use uppercase tables of exFAT - "thinks" that
> Abc and abc are different filenames), bugs are possible to, because
> testing was rather limited (but I've tested it under HX DOS extender under
> plain DOS).

nice work :))

www.drivesnapshot.de/freedos/exfat5.zip

has the following (minor) enhancements:

compiles with MSVC
detects multiple partitions, including exetnded ones
works with drives with sectorsize up to 4096

thanks for the good work

Tom

avoskov(R)

14.05.2010, 16:40

@ tom
 

exFAT reader for DOS

Thanks, I'll add your patch in the next release. Now the main problem is the speed of reading data (it is 10 times slower than Windows XP built-in driver) and the reason of it: the current version doesn't use several sector reading per one function call (which implemented into WinAPI, HX DOS Extender and even ROM BIOS).

P.S. As I understood from your changes in the code, the extended partition can contain another extended partition inside?

RayeR(R)

Homepage

CZ,
15.05.2010, 01:12

@ avoskov
 

exFAT reader for DOS

> P.S. As I understood from your changes in the code, the extended partition
> can contain another extended partition inside?

AFAIK extended partition can be defined only in the 4 MBR entires and theoretically you can define more than one there. But I never seen this...

---
DOS gives me freedom to unlimited HW access.

Laaca(R)

Homepage

Czech republic,
15.05.2010, 07:59

@ RayeR
 

exFAT reader for DOS

In MBR you can have defined only 0 or 1 extended partitions. Not more as MS-DOS and Windows would not see it. (not sure about FreeDOS)
But inside extended partitions you can define another ones so you create a LINKED LIST of extended partitions.
Few weeks ago I created 10 such partitions for testing needs.
More info and pascal sources I wrote here (in czech):
http://www.int21h.ic.cz/?id=104

---
DOS-u-akbar!

RayeR(R)

Homepage

CZ,
15.05.2010, 13:40

@ Laaca
 

exFAT reader for DOS

> In MBR you can have defined only 0 or 1 extended partitions. Not more as
> MS-DOS and Windows would not see it. (not sure about FreeDOS)

Yes, dos/win wouldn't see them. May be other OS.

> But inside extended partitions you can define another ones so you create a
> LINKED LIST of extended partitions.

I think you mean logical drives under extended partition. In fact it is a chain list...

Now efdir (tom's version) displays sizes of all my driver OK (I use ext. part.)

exfat 10
MBR partition table
0: 80 06 0000003F 494Mb
1: 00 05 000F717F 7538Mb
DOS extended partition table at F717F
0: 00 06 0000003F 494Mb
1: 00 05 000F717F 988Mb
DOS extended partition table at 1EE2FE
0: 00 06 0000003F 988Mb
1: 00 05 002E547D 988Mb
DOS extended partition table at 3DC5FC
0: 00 06 0000003F 988Mb
1: 00 05 004D377B 980Mb
DOS extended partition table at 5CA8FA
0: 00 06 0000003F 980Mb
1: 00 05 006BDBB8 1953Mb
DOS extended partition table at 7B4D37
0: 00 06 0000003F 1953Mb
1: 00 05 00A8E571 1953Mb
DOS extended partition table at B856F0
0: 00 06 0000003F 1953Mb
1: 00 05 00E5EF2A 180Mb
DOS extended partition table at F560A9
0: 00 06 0000003F 180Mb
exFAT partitions not found!

Original version displayed only this:

efdir 10
MBR partition table
0: 80 06 0000003F 494Mb
1: 00 05 000F717F 7538Mb
DOS extended partition table
0: 00 06 0000003F 494Mb
1: 00 05 000F717F 988Mb
2: 00 00 00000000 0Mb
3: 00 00 00000000 0Mb
2: 00 0C 00FB0400 105418Mb
3: 00 82 0DD959BF 1019Mb
exFAT partitions not found!

---
DOS gives me freedom to unlimited HW access.

RayeR(R)

Homepage

CZ,
15.05.2010, 18:30

@ Laaca
 

exFAT reader for DOS

> More info and pascal sources I wrote here (in czech):
> http://www.int21h.ic.cz/?id=104

Mas tam ode me koment ;)

---
DOS gives me freedom to unlimited HW access.

Back to index page
Thread view  Board view
13718 Postings in 1214 Threads, 206 registered users, 11 users online (1 registered, 10 guests)
DOS ain't dead | Admin contact
RSS Feed
powered by my little forum