Author Topic: XDF disk extractor  (Read 64443 times)

xynixme

  • Guest
Re: XDF disk extractor
« Reply #15 on: November 02, 2018, 03:43:31 pm »
Is it like DOS in that you just write to 0xb8000, or is it like Windows with AllocConsole() and WriteLn(), etc, all API-function based?

https://www.os2world.com/forum/index.php/topic,1859.msg18915.html#msg18915

RickCHodgin

  • Guest
Re: XDF disk extractor
« Reply #16 on: November 02, 2018, 03:47:52 pm »
Is it like DOS in that you just write to 0xb8000, or is it like Windows with AllocConsole() and WriteLn(), etc, all API-function based?

https://www.os2world.com/forum/index.php/topic,1859.msg18915.html#msg18915

+1

xynixme

  • Guest
Re: XDF disk extractor
« Reply #17 on: November 02, 2018, 04:01:06 pm »

Have you tried vfdisk.  Virtual floppy disk 6.0 and necessary control programs.

I got it to work.  But, I can't find the settings to set the drive letter.  It automatically assigns the next available letter.  I assume it's a device=...vfdisk.sys option.  I tried "A: 1" but that didn't do it.  It still goes to the next letter.  Does anyone know?

That's a rather old NetLabs RFC, FWIW.

Quote
RFC: the ability to assign a fixed drive letter, so it doesn't change depending on wether drive S: snd/or T: exists or not.
« Last Edit: November 02, 2018, 04:03:04 pm by André Heldoorn »

Valery Sedletski

  • Sr. Member
  • ****
  • Posts: 368
  • Karma: +2/-0
    • View Profile
Re: XDF disk extractor
« Reply #18 on: November 03, 2018, 01:43:54 am »
As it was said above, XDF format floppies work with an ISA floppy disk, only (driven
by ibm1flpy.add driver). XDF floppies work via a xdfloppy.flt filter driver, which works
on top of ibm1flpy.add. vfdisk.sys is a virtual floppy ramdisk driver. It is a pre-ADD-model
block device driver, so filters like xdfloppy.flt won't work with it. They work only with
ADD block drivers. So, xdfloppy.flt won't work with vfdisk.sys. Also, vfdisk.sys doesn't
support XDF itself.

vfdisk.sys has the vfctrl.exe command line utility to configure the emulated floppy disk
sizes. Also, there is a vfctrlpm.exe, which is a PM-based version of vfctrl.exe. The default
disk size can also be specified on a driver command line. The drive letter specified in the
driver command line, doesn't matter. The driver just uses the first available drive letter
after RESERVEDRIVELETTER.

To emulate XDF floppies, you can use the Super Virtual Disk (svdisk.sys). Though, it is
shareware, and makes a delay during the boot if it is unregistered. This is annoying. The
PM program used to configure it, also fails to start if it is unregistered, but the command
line program works fine. The nice feature of SVDISK is also the ability to use the HPFS-
formatted ramdisks. It has own disk formatting utility, which, unfortunately, works only
with SVDISK ramdisks. Also, I managed to format a virtual floppy disk as HPFS, then
did savedskf on it, and created a 1.44 MB HPFS floppy disk image. This disk image can
be then copied to a physical floppy disk with loaddskf.exe. So, this way it's possible to
create the HPFS-formatted floppies. The cool hack, BTW :)

There is also a diunpack.exe utility, which can extract the IBM *.dsk format disk images
(including the compressed ones). It works just like an archiver. So, it extracts a floppy image
to a subdirectory. But I doubt that diunpack.exe can handle XDF floppy images.

Mtools are used to access the FAT disk images, including floppies and hard disks. There
is also an USB flash-aware version written by Froloff, which is able to copy files from FAT/FAT32
flash sticks.

In mtools, you just specify a path to all images in its config file, and assigns drive letters to them.
The drive letters are internal (separate from OS/2 drive letters). In case of Froloff's USB-aware
version, you specify a USB MSD device Vendor ID and Product ID, instead of an image path.

Unfortunately, Froloff no more uses OS/2 and his site is down. But I could upload his mtools
to my ftp, if someone interested.

To use mtools, you need to put mtools.exe in the same directory together with mtools.conf,
on PATH. And create wrapper .cmd files like this:

Quote
/* */
Parse Arg argstr

'@set MTOOLSRC=./mtools.conf'
'@set COUNTRY=007,866'
'@msup mdir' argstr

-- this is for a "mdir" mtools subcommand. There is the "msup.exe" helper which
calls mtools with required parameters. As people said here above, a newer kLIBC-
based version uses kLIBC symlinks instead, but I did not tried it. Also, the disadvantage
of kLIBC symlinks is that they don't work in non-kLIBC-based programs, like CMD.EXE,
4OS/2 or FC/2. You still need wrapper .cmd files.

Though, as far as I can see, mtools won't help you to access the XDF floppy image contents.

PS: For accessing the disk images, including floppy images, CD iso images and VM images
of VBox/VirtualPC/QEMU/etc, you can use fat32.ifs with it's loop.add driver. But note that
it is in development, yet, and not everything is working at the moment. But accessing the
FAT/FAT32/exFAT/CDFS images works fine. But it does not support XDF floppy images as
well.
« Last Edit: November 03, 2018, 01:45:38 am by Valery Sedletski »

Valery Sedletski

  • Sr. Member
  • ****
  • Posts: 368
  • Karma: +2/-0
    • View Profile
Re: XDF disk extractor
« Reply #19 on: November 03, 2018, 02:43:07 am »
Here is Froloff's MTools version: ftp://osfree.org/upload/froloff/mtools-usb.zip

Dave Yeo

  • Hero Member
  • *****
  • Posts: 4805
  • Karma: +99/-1
    • View Profile
Re: XDF disk extractor
« Reply #20 on: November 03, 2018, 03:55:55 am »
Yea, I misread the info on Hobbes about the one version of mtools having XDF reading capability, it doesn't.

Bogdan

  • Jr. Member
  • **
  • Posts: 93
  • Karma: +1/-0
    • View Profile
Re: XDF disk extractor
« Reply #21 on: November 03, 2018, 01:07:55 pm »
As it was said above, XDF format floppies work with an ISA floppy disk, only (driven
by ibm1flpy.add driver). XDF floppies work via a xdfloppy.flt filter driver, which works
on top of ibm1flpy.add.
Almost, but ISA is a wrong term used here. In fact it will work with AT- and PS/2-compatible floppy controllers. I'm not sure about SCSI connections or SuperDisk devices. One of the reasons the CONFIG.SYS contains the following lines:
Code: [Select]
BASEDEV=IBM1FLPY.ADD
BASEDEV=IBM2FLPY.ADD
Righr, XDFLOPPY is just the filter driver. The XDF itself is implemented inside IBM1FLPY.ADD.

Quote
To emulate XDF floppies, you can use the Super Virtual Disk (svdisk.sys). Though, it is
shareware, and makes a delay during the boot if it is unregistered. This is annoying. The
PM program used to configure it, also fails to start if it is unregistered, but the command
line program works fine.
It's not expensive to register ;-)

Quote
The nice feature of SVDISK is also the ability to use the HPFS-
formatted ramdisks. It has own disk formatting utility, which, unfortunately, works only
with SVDISK ramdisks. Also, I managed to format a virtual floppy disk as HPFS, then
did savedskf on it, and created a 1.44 MB HPFS floppy disk image. This disk image can
be then copied to a physical floppy disk with loaddskf.exe. So, this way it's possible to
create the HPFS-formatted floppies. The cool hack, BTW :)
Is it possible to boot from them?

Further reading: http://www.os2museum.com/wp/the-xdf-diskette-format/

RickCHodgin

  • Guest
Re: XDF disk extractor
« Reply #22 on: November 03, 2018, 05:18:58 pm »
I'm creating a utility called xdflibsf.  It should work in DOS or OS/2 and has simple syntax:

Code: [Select]
xdflibsf -b \input\path\ output.xdf    // Build an XDF file
xdflibsf -x input.xdf \output\path\    // Extract an XDF to disk

The \intput\path\ will serve as the root directory of the XDF disk.

It will initially only work with 3.5" formats.  It will extract files and write them.  I plan to eventually add a special utility to create a bootable XDF file with the indicated files on it.  A user will use xdflibsf to easiily build an XDF file, and then xdfcopy to physically put it onto a floppy disk.

In reading about XDF, it's taught me a lot about how the FDC works internally.

XDF is a most interesting disk format allowing 1,884,160 bytes per disk (80 tracks * 2 sides * (512+1024+2048+8192) bytes per sector for the non-uniform sector sizes).  And the original author was a genius in devising a way to interleave the tracks and read both sides of the disk track in only three revolutions even with the non-uniform sector sizes.  It means an effective throughput of ~22KB per three revolutions.  At 300-360 RPM, that equates to a theoretical maximum throughput of 39 seconds to read an entire disk, with that level being potentially achievable due to the genius interleaving layout.
« Last Edit: November 03, 2018, 05:40:25 pm by Rick C. Hodgin »

xynixme

  • Guest
Re: XDF disk extractor
« Reply #23 on: November 03, 2018, 06:57:58 pm »
Code: [Select]
xdflibsf -b \input\path\ output.xdf    // Build an XDF file
xdflibsf -x input.xdf \output\path\    // Extract an XDF to disk

Without expecting anything, you may want to consider arguments which are compatible with ZIP GUIs. Then it may be required to append one or more files, or to delete one or more files.

RickCHodgin

  • Guest
Re: XDF disk extractor
« Reply #24 on: November 03, 2018, 07:34:06 pm »
Code: [Select]
xdflibsf -b \input\path\ output.xdf    // Build an XDF file
xdflibsf -x input.xdf \output\path\    // Extract an XDF to disk

Without expecting anything, you may want to consider arguments which are compatible with ZIP GUIs. Then it may be required to append one or more files, or to delete one or more files.

Sure.  What are the ones I should support?

Valery Sedletski

  • Sr. Member
  • ****
  • Posts: 368
  • Karma: +2/-0
    • View Profile
Re: XDF disk extractor
« Reply #25 on: November 03, 2018, 10:34:33 pm »
2Bogdan Szmalcovnik:

Quote
Quote
BASEDEV=IBM1FLPY.ADD
BASEDEV=IBM2FLPY.ADD

Righr, XDFLOPPY is just the filter driver. The XDF itself is implemented inside IBM1FLPY.ADD.

Yes, IBM2FLPY.ADD is for PS/2 floppy drives. But if XDF is implemented inside ibm1flpy.add,
then why xdfloppy.flt is needed? I thought, all XDF suppport should be contained in one driver.

Quote
Quote
    To emulate XDF floppies, you can use the Super Virtual Disk (svdisk.sys). Though, it is
    shareware, and makes a delay during the boot if it is unregistered. This is annoying. The
    PM program used to configure it, also fails to start if it is unregistered, but the command
    line program works fine.

It's not expensive to register ;-)

Is it still sold? I thought, it's abandoned a long time ago...

Quote
Quote
    The nice feature of SVDISK is also the ability to use the HPFS-
    formatted ramdisks. It has own disk formatting utility, which, unfortunately, works only
    with SVDISK ramdisks. Also, I managed to format a virtual floppy disk as HPFS, then
    did savedskf on it, and created a 1.44 MB HPFS floppy disk image. This disk image can
    be then copied to a physical floppy disk with loaddskf.exe. So, this way it's possible to
    create the HPFS-formatted floppies. The cool hack, BTW :)

Is it possible to boot from them?

Why not? I think, it should work, though, I did not tried. The only thing you
need is to do sysinstx on it. Need to try...

David Graser

  • Hero Member
  • *****
  • Posts: 878
  • Karma: +87/-0
    • View Profile
Re: XDF disk extractor
« Reply #26 on: November 03, 2018, 11:48:16 pm »
2Bogdan Szmalcovnik:



Is it still sold? I thought, it's abandoned a long time ago...

[/quote]

It is listed at BMTMicro

https://www.bmtmicro.com/BMTCatalog/os2/svdisk.html

You may want to email them to see if it can still be bought and and a registration code sent.  Some of the programs they list are extremely old OS/2 programs.

I did buy ZTreeBold from them.

Bogdan

  • Jr. Member
  • **
  • Posts: 93
  • Karma: +1/-0
    • View Profile
Re: XDF disk extractor
« Reply #27 on: November 04, 2018, 12:39:12 am »
2Bogdan Szmalcovnik:

Quote
Quote
BASEDEV=IBM1FLPY.ADD
BASEDEV=IBM2FLPY.ADD

Righr, XDFLOPPY is just the filter driver. The XDF itself is implemented inside IBM1FLPY.ADD.

Yes, IBM2FLPY.ADD is for PS/2 floppy drives. But if XDF is implemented inside ibm1flpy.add,
then why xdfloppy.flt is needed? I thought, all XDF support should be contained in one driver.
Sorry, the source was from "The Guide to OS/2 Warp Device Drivers" (SG24-4627-00) page 143:

"The question is sometime raised regarding why we have both IBM1FLPY.ADD and IBM2FLPY.ADD instead of just using a single driver. The answer is that during XDF (extended Density Format) development, IBM needed to patch Micro Channel OEM (Other Equipment Manufacturer) ABIOS code but of course did not have the ABIOS source for OEM systems. So a change was made from using IBM2FLPY.ADD on OEM Micro Channel systems to using IBM1FLPY.ADD or in other words no longer using the ABIOS interface. This caused a change in the initialization to detect 3 types of systems, non-ABIOS, OEM ABIOS and IBM ABIOS. The floppy drivers were changed to load the appropriate floppy driver on the appropriate system. IBM development felt it was to cumbersome for Install to query Syslnit (part of the installation procedure) and to install the appropriate driver, so instead the intelligence was incorporated into the driver."

Valery Sedletski

  • Sr. Member
  • ****
  • Posts: 368
  • Karma: +2/-0
    • View Profile
Re: XDF disk extractor
« Reply #28 on: November 04, 2018, 02:34:13 am »
2Bogdan: So, xdfloppy.flt is required to support XDF on OEM ABIOS machines with the
same ibm1flpy.add driver as with non-ABIOS machines? I.e., xdfloppy.flt handles the
differences between these two types of machines, so that, ibm1flpy.add is independent
from that? Or I misunderstand?

RickCHodgin

  • Guest
Re: XDF disk extractor
« Reply #29 on: November 04, 2018, 05:03:53 am »
It's working so far.  Here's the IBM PC DOS 7 disk 3 file contents extracted from the XDF format.  I have this format on a real floppy and was able to boot into my DOS 7 partition, run the XDF program, and then do a DIR A:\.

Here's my display:

Code: [Select]
XDFLibSF -- XDF Builder/Extractor Utility

 Volume in XDF is DISK      3
 Directory of g:\xdf\144us3.xdf

 SHELL1               48,117 11-17-1994 13:00:00 -----A-
 AV2                 183,919 11-17-1994 13:00:00 -----A-
 WBACKUP1            460,201 11-17-1994 13:00:00 -----A-
 BACKUP2             399,521 11-17-1994 13:00:00 -----A-
 STAC2               690,149 11-17-1994 13:00:00 -----A-
        5 file(s)        1,781,907 bytes
                            90,477 bytes free

Here's what DOS 7 displays:

Code: [Select]
A:\> DIR

 Volume in drive A is DISK      3
 Directory of A:\

SHELL1            48,117 11-17-94  1:00p
AV2              183,919 11-17-94  1:00p
WBACKUP1         460,201 11-17-94  1:00p
BACKUP2          399,521 11-17-94  1:00p
STAC2            690,149 11-17-94  1:00p
        5 file(s)        1,781,907 bytes
                            79,872 bytes free

A:\> _

My algorithm for calculating disk free space is incorrect.  It's not yet taking into account the sectors consumed by the root directory.  But, tomorrow's another day. :-)  Here's the source code so far.  I've only been developing it in Windows during debugging.  Will port to OS/2 when complete.
« Last Edit: November 04, 2018, 05:49:26 am by Rick C. Hodgin »