Reply 280 of 2085, by truth_deleted
Under the mode_sense function, changing a register value from 0x29 to 0x28 unlocks the tray, presumably a prerequisite to 95 ejecting a CD. However, changing this value to unlocked prevents the CD audio tracks from updating after switching the CD image; I would guess the fact that the locked tray allows for an updated TOC is caused by an artifact and not the way for 95 to detect a new CD.
Given the"eject" function is allowed, then the eject event(?) is generated by the start/stop unit command (0x1B; along with LoEj bit set). Bochs and qemu report values such as "ASC_MEDIUM_MAY_HAVE_CHANGED" (Additional Sense Code [28 or 3A] of Request Sense 0x03 command; bit 13) and "UNIT ATTENTION" (Sense Key 0x6 of 0x03 command; bit 2) which seem to be connected to 95 recognizing a new CD.
I recall that pressing "eject" inside 95 activates 0x1E and 0x1B, the Medium Removal and the Start/Stop commands. Perhaps these could generate a TOC update, but would 95 be able to detect the new CD information without further code? Instead, would 95 have to receive the above register values before Ctrl-F4 activates the media change? Would it help to recruit SetDevice or "CDROM_Interface_Image::LoadIsoFile"?
I also checked into the open source mscdex replacements, but these don't support CD audio, so changing their code would not easily help.