MSCDEX.EXE+VIDE-CDD.SYS in UniPCemu having delays detecting disk changes?

Emulation of old PCs, PC hardware, or PC peripherals.

MSCDEX.EXE+VIDE-CDD.SYS in UniPCemu having delays detecting disk changes?

Postby superfury » 2017-12-16 @ 16:20

I've implemented the Media Status Notification Support Specification, Version 1.03 documentation by Microsoft into UniPCemu, but for some odd reason, the CD-ROM driver(MSCDEX.EXE from MS-DOS 6.22/VIDE-CDD.SYS combo on MS-DOS 5.0a) fails to see the disk has actually changed? If I insert a different disk, it will still see the old disk contents, and when cd-ing to a subdirectory and executing a simple DIR command it will crash with all sorts of data showing up on the corrupted directory listing(sector probably being read as from the old disk, which contains data on the new disk instead of directory records).

This is a simple media change from the original Megarace CD-ROM ISO to the Megarace Demo ISO I've created myself(works fine after restarting the emulator with the other disk mounted).

The interrupt that's on Bochs when inserting a disk isn't used, it's now entirely through the Microsoft Specs combined with Dosbox-X's insert/spinup/down method and UniPCemu's original CD-ROM emulation.
The Microsoft Specs' notification feature is disabled when doing so.

Got the specs from the "Windows Hardware Logo Program Requirements: Reference List" of "January 14, 2008". This one lists:
Media Status Notification Support Specification, Version 1.03
http://download.microsoft.com/download/ ... atamed.rtf

That's the information about the hardware which I've implemented into my emulator.

Anyone can see why the CD-ROM doesn't read the boot sector etc. to refresh it's directory listing to be correct? It doesn't seem to even use the specification, and MS-DOS reads the wrong data from the disk(probably a combination of the old data buffered in memory and newly inserted disk)?

UniPCemu IDE hdd/cd-rom code: https://bitbucket.org/superfury/unipcem ... ?at=master
Last edited by superfury on 2017-12-20 @ 19:00, edited 1 time in total.
superfury
l33t
 
Posts: 2186
Joined: 2014-3-08 @ 11:25
Location: Netherlands

Re: MSCDEX.EXE+VIDE-CDD.SYS in UniPCemu having problems detecting disk changes?

Postby superfury » 2017-12-20 @ 08:51

Just implemented missing disk change support(Some eject refusal support as well as a missing mandatory command: MECHANISM STATUS command reporting disk change and insertion status, prevent/allow medium removal command having seperate flags from the normal locking used by the Microsoft feature(using bit 1 instead of bit 0 of the flag)). Mechanism status now reports one slot, containing the insertion status(mounted status of the CD-ROM, which takes the Dosbox handling into account, as well as a second medium changed flag for reporting(set when changing the mounted disk, cleared when reaching Dosbox-X's LOAD_DISK_READIED status)), but the MSCDEX(from MS-DOS 6.22 boot disk) driver(with VIDE-CDD.SYS) still doesn't detect medium change?
superfury
l33t
 
Posts: 2186
Joined: 2014-3-08 @ 11:25
Location: Netherlands

Re: MSCDEX.EXE+VIDE-CDD.SYS in UniPCemu having problems detecting disk changes?

Postby superfury » 2017-12-20 @ 18:59

After messing a bit with the processing of the Sense Packets(being incorrectly filled and put in the error register(Sense code being invalid, as well as writing the contents to the wrong register)) and related code bugs, I've managed to make it see the disk changes correctly now(using the 10 second spinup and spindown, while insertion takes 4 seconds(fast user to switch that fast indeed! XD)).

There's still one odd thing going on: When the disk is reported as not present, for some odd reason the driver(VIDE-CDD.SYS/MSCDEX.EXE) seems to wait for about a minute(about 40-60 seconds) before even displaying the drive not ready error, which after telling it to (R)etry reads the new disk correctly? Anyone knows what the cause of that might be? I don't see it firing any other commands in the meanwhile, so complete radio silence from the software that's running? I don't see it emitting any ATAPI commands in that period until it says the drive isn't ready?
superfury
l33t
 
Posts: 2186
Joined: 2014-3-08 @ 11:25
Location: Netherlands


Return to PC Emulation

Who is online

Users browsing this forum: usernamed and 2 guests