RayeR

CZ, 25.09.2025, 16:25 |
YSDDT 0.1.2 (DOS Toolkit for Working with Disks & Partitions) (Announce) |
When searching about DOS partition / data alignment on a SSD I found this relative new tool http://ysbits.net/ysddt that should take a care about proper disk structures /data alignment when creating DOS partitions. Simple alignment start of partition (as e.g. Gparted do) is not enough. This tool should use reserved sectors number in EPB to tune aligned data start taking in cound the size of FATs and rootdir.
Does anybody else take a care? What tools do you use?
AFAIK Free Fdisk doesn't offer such options? --- DOS gives me freedom to unlimited HW access. |
Laaca

Czech republic, 25.09.2025, 21:23
@ RayeR
|
YSDDT 0.1.2 (DOS Toolkit for Working with Disks & Partitions) |
Hm, the webpage also offers the bug fixed versions of disk caching drivers UHDD and UIDE. And what is even more noteworty is the fact that it comes with source code. As far I remember these drivers were always distrubuted without source code. --- DOS-u-akbar! |
mceric
Germany, 25.09.2025, 22:27
@ Laaca
|
YSDDT 0.1.2 (DOS Toolkit for Working with Disks & Partitions) |
> Hm, the webpage also offers the bug fixed versions of disk caching drivers
> UHDD and UIDE. And what is even more noteworty is the fact that it comes
> with source code. As far I remember these drivers were always distrubuted
> without source code.
Some versions are closed source, others are not.
https://www.ibiblio.org/pub/micro/pc-stuff/freedos...able/html/en/drivers/uide/20250410.1/index.html
https://www.ibiblio.org/pub/micro/pc-stuff/freedos...able/html/en/drivers/uhdd/20250410.1/index.html
please generate a diff and share it on the mailing list or here if the UHDD and UIDE shipped with FreeDOS have a bug that got fixed by that YSDDT person. Thank you! --- FreeDOS / DOSEMU2 / ... |
Rugxulo

Usono, 26.09.2025, 04:57
@ mceric
|
YSDDT 0.1.2 (DOS Toolkit for Working with Disks & Partitions) |
> > Hm, the webpage also offers the bug fixed versions of disk caching
> drivers
> > UHDD and UIDE. And what is even more noteworty is the fact that it comes
> > with source code. As far I remember these drivers were always
> distrubuted
> > without source code.
>
> Some versions are closed source, others are not.
There have been many renames and changes over the years, so I honestly don't keep track of them all. (Jack has gone closed source three times over many years. He tried to coerce FreeDOS to remove all mirrored old copies too, but that didn't happen.) I don't personally see the point of using his closed source drivers, and now that the BIOS/CSM is long dead, probably few besides us even care.
Johnson Lam's website still lists 1-Jul-22 as last update to the closed source drivers (XHDD, XDVD2, XMGR, RDISK).
It also says this:
> 19-Aug-2025
>
> Bad news! Author Jack Ellis was disconnected from Internet
> due to personal health reason, since his email stop working,
> there's no way to contact him. I wish sometimes later he can
> contact me when back online.
But I don't recommend interacting with him. |
mceric
Germany, 26.09.2025, 10:05
@ Rugxulo
|
YSDDT 0.1.2 (DOS Toolkit for Working with Disks & Partitions) |
> > 19-Aug-2025
> >
> > Bad news! Author Jack Ellis was disconnected from Internet
> > due to personal health reason, since his email stop working,
> > there's no way to contact him. I wish sometimes later he can
> > contact me when back online.
Bad news indeed :-o Best wishes for Jack, I hope he gets well soon! |
boeckmann
Aachen, Germany, 26.09.2025, 10:53
@ RayeR
|
YSDDT 0.1.2 (DOS Toolkit for Working with Disks & Partitions) |
> AFAIK Free Fdisk doesn't offer such options?
Free FDISK offers the EXPERIMENTAL ALIGN_4K option, which aligns the start of partitions. This is however not enough. The important thing is that the data clusters are aligned to 4K (which implies they are at least 4K in size). It is the job of the format utility to make sure that this is the case. FreeDOS FORMAT to my knowledge cannot do this automatically. You could do this manually though by adjusting the reserved sector count etc. for a partition with appropriate cluster size. But I think we agree that this is a pain in the a...
Even if everything is aligned nicely for 4K, I think this is worthless under DOS, as we are still accessing the disks on a 512 byte per sector basis through the usual INT13 calls (not considering potential BIOS disk access "optimizations"). Nevertheless, the firmware of every decent SSD should handle this gracefully, so I do not think this is something we have to worry about. If at all, aligning the data clusters should become relevant when an operating system is involved that is able to actually perform non-512 byte sector reads... |
ecm

Düsseldorf, Germany, 26.09.2025, 15:23
@ boeckmann
|
YSDDT 0.1.2 (DOS Toolkit for Working with Disks & Partitions) |
> > AFAIK Free Fdisk doesn't offer such options?
>
> Free FDISK offers the EXPERIMENTAL ALIGN_4K option, which aligns the start
> of partitions. This is however not enough. The important thing is that the
> data clusters are aligned to 4K (which implies they are at least 4K in
> size). It is the job of the format utility to make sure that this is the
> case. FreeDOS FORMAT to my knowledge cannot do this automatically. You
> could do this manually though by adjusting the reserved sector count etc.
> for a partition with appropriate cluster size. But I think we agree that
> this is a pain in the a...
My bootimg script uses NASM to create a file system image. It supports two relevant options: _ALIGNDATA and _MBR_ADD_GAP_TO_ALIGN. They're used to align the data start relative to the partition start or relative to the MBR here. As you suggest this is done by adding to the reserved sectors of the file system. --- l |
RayeR

CZ, 26.09.2025, 15:51
@ Rugxulo
|
YSDDT 0.1.2 (DOS Toolkit for Working with Disks & Partitions) |
> I don't personally see the point of using his
> closed source drivers, and now that the BIOS/CSM is long dead, probably few
> besides us even care.
I still use his XHDD driver than can handle VDMA problem on my GB P67 MB, older versions of UDMA/UIDE don't work in V86 mode properly (don't have boot mode) so I can't use them. --- DOS gives me freedom to unlimited HW access. |
RayeR

CZ, 26.09.2025, 15:55
@ RayeR
|
YSDDT 0.1.2 (DOS Toolkit for Working with Disks & Partitions) |
I tried YSDDT.EXE but it hanged at disk detection phase. It crashes JEMM and without JEMM it just hangs. I found that -biosidentify- helps but not sure how it is important, if the utility gets all needed info then. It reports my partition is propely aligned including data beginning, so OK...
YSDDT.EXE v+
YSDDT v0.1.2 [25.09.2024] (c) YS
HDD#0 Max C/H/S = 1023/239/63 Ext Max C/H/S = 16382/15/63
Drive:UNKNOWN TYPE
ATAIO:1F0h.3F6h.dev0.irq14
Model:SamsungSSD840PROSeries Rev:DXM06B0Q S/N:***
HDD#0 > biosidentify ...
Jemm386: exception 0D occured at CS:EIP=C000:0000FFFF, ERRC=00000000
SS:ESP=9FC0:00000404 EBP=00AFFFFF EFL=00037086 CR0=80000011 CR4=00000650
EAX=9FC0FFFF EBX=01000007 ECX=46B8FFFF EDX=3136FFFF ESI=000DFFFF EDI=0001FFFF
DS=FFFF ES=FFFF FS=2156 GS=D943 [CS:IP]=7C 00 6C 38 7C 40 38 04
Press ESC to abort program
--- DOS gives me freedom to unlimited HW access. |
bretjohn

Rio Rancho, NM, 26.09.2025, 23:48
@ boeckmann
|
YSDDT 0.1.2 (DOS Toolkit for Working with Disks & Partitions) |
> Free FDISK offers the EXPERIMENTAL ALIGN_4K option, which aligns the start
> of partitions. This is however not enough. The important thing is that the
> data clusters are aligned to 4K (which implies they are at least 4K in
> size). It is the job of the format utility to make sure that this is the
> case. FreeDOS FORMAT to my knowledge cannot do this automatically. You
> could do this manually though by adjusting the reserved sector count etc.
> for a partition with appropriate cluster size. But I think we agree that
> this is a pain in the a...
>
> Even if everything is aligned nicely for 4K, I think this is worthless
> under DOS, as we are still accessing the disks on a 512 byte per sector
> basis through the usual INT13 calls (not considering potential BIOS disk
> access "optimizations"). Nevertheless, the firmware of every decent SSD
> should handle this gracefully, so I do not think this is something we have
> to worry about. If at all, aligning the data clusters should become
> relevant when an operating system is involved that is able to actually
> perform non-512 byte sector reads...
It depends on whether you're talking about DOS in general or FreeDOS specifically. The MS-DOS kernel can handle sector sizes other than 512 bytes, and I think some others can also (like PC-DOS). I'm also not sure about any of the DOS disk utility programs (FDISK, FORMAT, CHKDSK, etc.). |
boeckmann
Aachen, Germany, 27.09.2025, 13:12
@ bretjohn
|
YSDDT 0.1.2 (DOS Toolkit for Working with Disks & Partitions) |
> It depends on whether you're talking about DOS in general or FreeDOS
> specifically.
It is more about the DOS most likely using the BIOS to access the hard disk. A EDD3 specification draft (you find it under the name d1572r3-EDD3.pdf) states for the non-LBA access functions that "sector sizes shall be exactly 512 bytes". Albeit this is a draft, I never encountered a different sector size (for hard disks!). I am not sure what the situation regarding the extended disk access routines INT13.4x is. At least INT13.48 seems to expose the physical geometry of the disk. The document makes no statement regarding sector size for these functions. So it MIGHT be that these functions work on the physical sector size of the hard disk, but it MIGHT also be that there is a 512-byte emulation involved. For CDs the document clearly states that the sector size is 2048 bytes: "INT 13 Functions 41h-49h shall access the CD or DVD using non-emulated sector LBA’s in the native sector size
of the CD or DVD". Regarding the draft 1572, I was not able to find out whether there was an official release of this document.
So far for the INT13. Might be a different story when using custom DOS device drivers interacting on a more direct way with the hardware. How does your USBDRIVE handle this? Is it able to handle non-512 BPS devices? And if it is, how does it present such kind of device to the operating system? |