SvarDOS / edrdos

Enhanced DR-DOS kernel and command interpreter ported to JWasm and OpenWatcom C
http://svardos.org/
Other
28 stars 3 forks source link

Behaviour on uninitialized partitions differs to MS-DOS #15

Open boeckmann opened 9 months ago

boeckmann commented 9 months ago

The following are the DPBs of an uninitialized FAT-32 partition (boot sector filled with 0xF6). MS-DOS blocks access, the EDR kernel not the EDR kernel also blocks access since commit https://github.com/SvarDOS/edrdos/commit/4dbe13473d65b579e4c2cea4f5ca2016aed6567d:

MS-DOS DPB

Getting extended DPB for drive G: via INT 21h function 7302h.

device parameter block:
drive                            6           6
unit                             6           6
bytes per sector               200         512
cluster mask                     7           7
cluster shift                    3           3
reserved sectors                 1           1
number of FATs                   1           1
root directory entries           0           0
first data sector             1f5a        8026
highest cluster                  3           3
sectors per fat                  1           1
first root dir sector         ffff       65535
device driver header     0070:005e
media id                        f8         248
dpb flags                        0           0
next dpb                 ffff:ffff
next cluster                     0           0
free clusters             ffffffff  4294967295
active FAT / mirroring           0           0
fsinfo sector                 ffff       65535
backup boot sector            ffff       65535
first data sector (big)       1f5a        8026
highest cluster (big)            3           3
sectors per fat (big)            1           1
root dir start cluster           0           0
next cluster (big)               0           0

EDR-DOS DPB

Getting extended DPB for drive G: via INT 21h function 7302h.

device parameter block:
drive                            6           6
unit                             6           6
bytes per sector               200         512
cluster mask                     7           7
cluster shift                    3           3
reserved sectors                 3           3
number of FATs                   2           2
root directory entries           0           0
first data sector             1f45        8005
highest cluster                  0           0
sectors per fat                  0           0
first root dir sector         ffff       65535
device driver header     0070:016e
media id                        f8         248
dpb flags                        0           0
next dpb                 ffff:ffff
next cluster                     0           0
free clusters             f6f6f6f6  4143380214
active FAT / mirroring           0           0
fsinfo sector                    2           2
backup boot sector            ffff       65535
first data sector (big)       1f45        8005
highest cluster (big)        7cc58      511064
sectors per fat (big)          fa1        4001
root dir start cluster           2           2
next cluster (big)               0           0
ecm-pushbx commented 8 months ago

What program did you use to generate this output? If you wrote it yourself, maybe you can upload it? I also created one, as an Extension for lDebug, though it only operates on the FAT12/FAT16 parts for now: https://hg.pushbx.org/ecm/ldebug/file/66e2ad622d18/source/eld/dpb.asm

boeckmann commented 8 months ago

Yes, I wrote this by myself. It is a C program, able to display BPB, default BPB and DPB, optionally in their extended forms. I did only invest 1-2 hours on this, so there are probably bugs. Previously had no intention to publish it, but you asked, so here it is: https://github.com/boeckmann/dpbinfo