edrdos icon indicating copy to clipboard operation
edrdos copied to clipboard

Behaviour on systems without floppy drives

Open boeckmann opened this issue 7 months ago • 3 comments

When the kernel runs on a system without floppy drives, the first hard drive is still C:. So drives A: and B: are some kind of "dummy" drives.

In the event that no floppy drive is installed, the kernel currently misbehaves in the sense that B: is setup as phantom drive for A:. However, it should only do this if A: is a valid floppy, and B: is no physical drive.

Further, it should be verified what BPB and UDSC gets created by MS-DOS for non-existant drivers, and then adapt the EDR kernel to match them. Also, the kind of error reported when trying to access such a non-existant drive shall match the behaviour of MS-DOS.

boeckmann avatar Apr 29 '25 12:04 boeckmann

For lMS-DOS in case there's no diskette drives the early msbio init reserves two UDSCs / BDS / UPBs at https://hg.pushbx.org/ecm/msdos4/file/2210671ee834/src/BIOS/msinit.nas#l1090

The two CDS entries for drives A: and B: then in the later system init get the CDS flags and DPB pointer both set to all-zeroes to disable access to these drives: https://hg.pushbx.org/ecm/msdos4/file/2210671ee834/src/BIOS/sysinit1.nas#l2623 (The two DPBs are still allocated despite not being used.)

The similarly named variables that control this are set from the int 11h return both times, in msinit.nas FakeFloppyDrv https://hg.pushbx.org/ecm/msdos4/file/2210671ee834/src/BIOS/msinit.nas#l612 and sysinit1.nas Fake_Floppy_Drv in https://hg.pushbx.org/ecm/msdos4/file/2210671ee834/src/BIOS/sysinit1.nas#l588

I changed very little to do with this behaviour so it should be similar to the stock v3.40-branch MS-DOS v4.00 kernel.

ecm-pushbx avatar Apr 29 '25 13:04 ecm-pushbx

Interesting, my first idea of solving this was to simply NOT remove the UDF_NOACCESS flag for these drives.

boeckmann avatar Apr 29 '25 14:04 boeckmann

Mentioned this thread in https://pushbx.org/ecm/dokuwiki/blog/pushbx/2025/0501_ms-dos_v3.40_versus_v4.00

ecm-pushbx avatar May 01 '25 16:05 ecm-pushbx