VOGONS


First post, by superfury

User metadata
Rank l33t++
Rank
l33t++

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/1/6/1/ … 456c/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/unipcemu/src/ … ide.c?at=master

Last edited by superfury on 2017-12-20, 19:00. Edited 1 time in total.

Author of the UniPCemu emulator.
UniPCemu Git repository
UniPCemu for Android, Windows, PSP, Vita and Switch on itch.io

Reply 1 of 2, by superfury

User metadata
Rank l33t++
Rank
l33t++

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?

Author of the UniPCemu emulator.
UniPCemu Git repository
UniPCemu for Android, Windows, PSP, Vita and Switch on itch.io

Reply 2 of 2, by superfury

User metadata
Rank l33t++
Rank
l33t++

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! 🤣)).

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?

Author of the UniPCemu emulator.
UniPCemu Git repository
UniPCemu for Android, Windows, PSP, Vita and Switch on itch.io