On at 2023-02-20 22:03 +0100, Eric Auer wrote:
Hi! As we have various drivers which use the network redirector API,
CD/DVD redirector API or both,
There is no distinction between those, that's the same file system
redirector interface. It can be used for optical storage, for networked
file systems, or for local hard disk partitions with file systems not
natively supported by the DOS (eg the free software iHPFS redirector for
HPFS drives).
Also note that the low-level format is not visible through IFS, so it
does not matter whether you use FAT32, FAT16 or NTFS. However, it may
matter whether you want long file names or files > 2 GB. For those,
I hope that the usual Win9x DOS 7.x int 21 calls have counterparts in
the network and CD redirector API space of the same DOS generations.
They do not. Redirectors that want to support Long File Names (eg
dosemu2 MachFS) need to intercept interrupt 21h service 71h subfunctions
manually and handle the LFN functions themselves. (Possibly in part by
calling down to SFN functions of the DOS.)
The 64-bit file seek service originated by Enhanced DR-DOS, on interrupt
21h service 7142h, is also not supported on redirected drives by
default. (This service and the underlying support is required for random
access to file data beyond the first 4 GiB - 1 Byte.)
EDR-DOS itself crashes a little when you try to call this service on a
redirected drive's file handle (it does return an error, but that is
rather random and not intended). The dosemu2-related fdpp project and
dosemu2 added a redirector interface extension to use for this, first on
interrupt 2Fh service 1142h, later moved to service 11C2h. This is
implemented in dosemu2's mfs.c [1].
When using redirectors such as dosemu2 MachFS with DOS kernels other
than fdpp, *someone* still has to hook interrupt 21h to make this call
available to DOS users the way they expect. I wrote a tool called
SEEKEXT [2] which provides the service 7142h hook on redirected drives
and will attempt to call the dosemu2 extensions if they're available, or
give up with an error otherwise. On local drives it just chains to the DOS.
(SEEKEXT also hooks the traditional 32-bit seek interface on service 42h
and tries to translate the inputs and outputs to use the 64-bit seek
function, which is also required for proper operation in case the DOS
does not support this natively.)
For an example of the 64-bit seek DOS call, I can point to my instsect
program which supports operation on image files. To support image files
larger than 4 GiB (including partitions on a partitioned image file that
may start beyond 4 GiB into the file) it tries to call the service 7142h
first [3]. I specifically contributed the dosemu2/fdpp interface to
enable this use case, with the DOS service 7142h intentionally done in a
way compatible to EDR-DOS.
Other than that, dosemu2 also provides a function provided as interrupt
2Fh service 11A6h, implemented in mfs.c as well [4]. I believe this is
used to back function 71A6h though I am not sure who hooks interrupt 21h
in that case, probably fdpp too.
Regards,
ecm
[1]:
https://github.com/dosemu2/dosemu2/blob/019dcff5711b5763fe5231cbeb933715cc65a2e4/src/dosext/mfs/mfs.c#L5022
[2]: https://hg.pushbx.org/ecm/seekext/file/bbfcfa0d1c0b/resident.asm#l17
[3]: https://hg.pushbx.org/ecm/instsect/file/18edcefc9877/instsect.asm#l4363
[4]:
https://github.com/dosemu2/dosemu2/blob/019dcff5711b5763fe5231cbeb933715cc65a2e4/src/dosext/mfs/mfs.c#L5076
_______________________________________________
Freedos-devel mailing list
Freedos-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freedos-devel