http://bugs.winehq.org/show_bug.cgi?id=20323
--- Comment #7 from Charles Davis cdavis@mines.edu 2011-02-18 11:55:56 CST --- (In reply to comment #6)
Charles Davis sent me privately a patch that makes RAW_READ work on MacOS. We'll hopefully see in git soon. I summarise the new state.
- MCI_PLAY FROM TO works with his patch!
MCI_PLAY fails because READ_Q_CHANNEL is used to get the current position. It should not, see bug #26160, comment #2.
MCI_SEEK fails because of an IOCTL_CDROM_SEEK_AUDIO_MSF which it should not
invoke at all when using RAW_READ, not PLAY_AUDIO. See again bug #26160, comment #2. mcicda should maintain its own position variable.
I agree that it doesn't make sense to use the other audio CD IOCTLs when we're not even using the most important one of all (PLAY_AUDIO). I believe I've said earlier that I won't ever be able to implement the rest of READ_Q_CHANNEL or the other audio CD IOCTLs because Apple ripped that support out of Tiger.
- SET c DOOR OPEN messes up with the internal state (see bug #26160, comment
#1).
Huh. It must be because we have to close all the FDs to the device before ejecting the disk. ntdll even NtClose()s the Wine handle to the device.
Let's face it. This whole coupling of handles and FDs is stupid--at least on Mac. Most devices on Mac OS don't even have device files behind them. We need some way to represent devices in wineserver that doesn't depend on the device file. But that's a whole other story.
- READ_Q_CHANNEL?
status c mode -> be able to return "open" status c media present status c ready Actually, any means to determine whether a disk is present would be fine IMHO. I believe Loïc Maury's recent patch to CDROM_Verify should not give the idea that these commands should always return open/present/ready (because a device node is only present for as long as a disk is present on Mac OS), but that should be discussed and solved in bug #26158. On Mac OS currently, MCICDA can only be opened when an audio CD-ROM is inserted (and correctly configured in winecfg), unlike native or Linux.
As you said, the device node only exists on Mac when there's actually a CD (or DVD, or whatever) in the drive. To be able to access the drive without a device node, we'll (well, I'll) have to go beyond the device file into the strange (for UNIX, anyway) world of I/O Kit--or maybe Disk Arbitration. Which takes us right back to what I was talking about earlier about coupling device handles to FDs.