boltronics
2011-Jul-22 14:25 UTC
[Wine] Make WINE detect an image as a CD drive with an audio disc
I've been trying to figure this one out for some time now without success and can't find anyone else with this exact problem, so hopefully there's a guru around here that might be able to point me in the right direction. I've got a copy of Dark Reign I want to play on my netbook. The problem is that I only have a USB CD drive which I don't normally connect, but can for a once-off install. This is one of those weird multi-track CDs where the first track is data and the remaining tracks are normal CD audio... and I want audio in my game. So I ripped the whole image to bin format using AcetoneISO, and can mount that on the loopback (/dev/loop0) fine. Code: fdisk -l /dev/loop0 reports the expected size (658Mb) so I don't think there's any issue with the way the image was ripped or looped. So I've got: Code: $ sudo losetup /dev/loop0 dark_reign.bin $ sudo mount /dev/loop0 /media/loop0 and I configured d: device in winecfg to be type CD-ROM or Autodetect. Either will be sufficient to get the game to run. However, I just can't get CD audio tracks (the background music) working. It does work fine if I insert the disc, let it automount and change the path in winecfg to where it automounted, but as stated I don't always have the drive with me. There must be some way to get wine to recognise these tracks on a loopback device. I've tried setting various system link configurations under dosdevices based on hints I found via Google. eg: Code: c: -> ../drive_c cdrom0 -> /dev/loop0 d: -> /media/loop0/ d:: -> /dev/loop0 z: -> / Nothing works. How do I get Wine or the Linux kernel to make /dev/loop0 appear as a real CD-ROM device so I can hear the audio tracks? Or maybe I'm going about this all wrong?