VOGONS


First post, by superfury

User metadata
Rank l33t++
Rank
l33t++

When I try to use the UniPCemu CD-ROM emulation, it works fine while no disks are changed. But when I load another CD-ROM in the drive(which causes an IRQ with reason C/D=1, I/O=1), no handling by the MSCDEX.EXE/VIDE-CDD.SYS happens. Then, when I try to use MS-DOS to execute dir on the newly inserted disk, it executes a TEST UNIT READY and locks up?

Last edited by superfury on 2017-08-01, 16:25. 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 5, by superfury

User metadata
Rank l33t++
Rank
l33t++

After some time, it continues(with huge delays between and after reads), but after that specific IRQ, it goes slowly instead of the usual fast(huge delays)?

https://bitbucket.org/superfury/unipcemu/src/ … ide.c?at=master

Can anyone see what's the cause of this?

After changing disks, I see it reading sector 16(The ISO9660 Volume Descriptor).

Last edited by superfury on 2017-08-01, 20:00. Edited 3 times in total.

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

Reply 2 of 5, by Jepael

User metadata
Rank Oldbie
Rank
Oldbie

I don't know how drive specific drivers work, but MSCDEX and DOS do not actively care about disc changes.

Only when disc is accessed like opening a file it is checked if it is still the same CD than before.

Reply 3 of 5, by superfury

User metadata
Rank l33t++
Rank
l33t++

It eventually ends up with an "CDR101: Not ready reading drive X"? This happens while it's still transferring said sector? It isn't being read by the drive? The reading of the sector isn't happening?

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

Reply 4 of 5, by superfury

User metadata
Rank l33t++
Rank
l33t++

I've modified the code a bit, to act like Bochs(removing the disk, waiting a bit(100us), inserting a disk), while the removing and inserting of the disk trigger IRQs with the Sense Packet filled with data for the driver to read. Now, I see it emitting a TEST UNIT READY command(0x00), but after that it delays a long time(many seconds, at least, in emulated time), then a Read sectors command and another very long inactivity from the driver?

https://bitbucket.org/superfury/unipcemu/src/ … ide.c?at=master

For some reason, the driver becomes very slow, finally giving up on the disk?

Filename
debugger.log
File size
671.88 KiB
Downloads
36 downloads
File comment
Loop that executes after executing a Read sectors command to the CD-ROM.
File license
Fair use/fair dealing exception
408.jpg
Filename
408.jpg
File size
64.11 KiB
Views
343 views
File comment
Message after the Read sectors command.
File license
Fair use/fair dealing exception

Edit: It seems to be waiting for a hard disk interrupt to fire?

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

Reply 5 of 5, by superfury

User metadata
Rank l33t++
Rank
l33t++

Even after changing the IRQ to give improved status, it still responds incorrectly to it? Why isn't it executing a proper read afterwards?

https://bitbucket.org/superfury/unipcemu/src/ … ide.c?at=master

No matter what I do, the IRQ that triggers because of ATAPI_diskchangedhandler keeps making the following instructions fail, according to the program that's running? It will report C/D=1, I/O=1, REL=0, Sense key Unit Attention, Abort 0, Status register Error bit 1 and handle it like a result phase(it essentially is just a hardware-induced result phase)?

Anyone knows why the VIDE-CDD.SYS driver doesn't seem to like the disk being changed?

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