ISO file or loop device as real optical disk

Questions about Wine on Linux
Post Reply
MasterKTO
Newbie
Newbie
Posts: 4
Joined: Sat Feb 18, 2017 8:47 am

ISO file or loop device as real optical disk

Post by MasterKTO » Wed Jul 10, 2019 5:13 am

Hello everybody.

I have been struggling for weeks with this problem so I'm now turning to you.

Long story short
I try (but obviously fail) to make my Wine prefix believe that a loop block device is a real CD-ROM device.

Full story
I play the old game Toy Story 2: Buzz Lightyear to the Rescue on my Linux computers via Wine. It mostly works like a charm (at least way better than on modern Windows) but comes with a major drawback: at launch, the game checks the optical disk drive for its CD-ROM and refuses to run without it. As optical disks are falling into oblivion, more and more modern computers do not come with an optical disk drive (and I must say that laptops are thus lighter and ISO files are easier to play with anyway and all this does not displease me). But I still want to play this game, even without the actual CD-ROM handy.

I have tried many things:
  • Mounting an ISO of the disk to a certain mount point and pointing my Wine prefix's D: drive to said mount point;
  • Using the "Bypass disk check" tip (which, in a nutshell, proposes to copy the CD's content to the hard drive and to set accordingly the relevant Registry keys);
  • Creating a loop device file from the ISO using the losetup command in order to really simulate a block disk device.
Neither one nor any combinations of the above did work out. Still, the last one raised a question: When I create the virtual loop device, a new device (symlink to said loop device) appears in my <WINEPREFIX>/dosdrives. But it does not appear in winecfg GUI. Also, in winecfg GUI's Drives tab, there is an unusable field Device, which I'd like (don't know why) to set to my loop device. Any clue on this field would be welcome as well.

Although I don't think there is any relation with specific versions of Wine or with my distros, here are my setups:
  • Arch Linux (64 bits) with Wine Staging 4.11 (same problem with 4.10);
  • Ubuntu 19.04 (64 bits) with Wine Stable 4.0.1;
  • Ubuntu 16.04 (32 bits) with Wine Stable 4.0.1;
There were more, which I do not recall exactly, but as you can see, I have tried different setups (both with 32-bit and 64-bit prefixes, although considering the game in question, I tend to stick with 32-bit prefixes, usually set as XP). All my systems are kept up to date.

So I call for help. I believe my last try (with the loop device) is the right path. It would be the cleanest and most generic way to make it work, while answering a bigger question as well. But I am of course open to other suggestions.

Thank you in advance (and if you need any more details, do not hesitate)!

Note: I have searched this forum (and carefully read this thread) but could not find any solutions...

jkfloris
Level 6
Level 6
Posts: 664
Joined: Thu Aug 14, 2014 10:10 am

Re: ISO file or loop device as real optical disk

Post by jkfloris » Wed Jul 10, 2019 12:17 pm

Mount the iso with:

Code: Select all

udisksctl loop-setup -f ToyStory2.iso
The iso should be mounted at /media/$USER/ToyStory2
(if not run udisksctl mount -b /dev/loop0)

Create a clean Wineprefix and check if Wine find the mounted iso

Code: Select all

WINEPREFIX=~/toystory2 WINEARCH=win32 wine cmd /c "vol d:&&vol e:&&vol f:"
# The output should be something like:
Not ready.

Volume in drive e is ToyStory2
Volume Serial Number is b19c-9e83

Path not found.
Install and run the the game from the mounted iso.
The first time there is a "Install" button, the second time there will be a "play" button.

Code: Select all

WINEPREFIX=~/toystory2 wine start /unix /media/$USER/ToyStory2/Setup.exe

MasterKTO
Newbie
Newbie
Posts: 4
Joined: Sat Feb 18, 2017 8:47 am

Re: ISO file or loop device as real optical disk

Post by MasterKTO » Wed Jul 10, 2019 1:30 pm

Hey jkfloris, thanks for trying to help.

I tired to mount my ISO as you specified: your first command only mapped my ISO to /dev/loop0, I then had to run udisksctl mount.
jkfloris wrote: Create a clean Wineprefix and check if Wine find the mounted iso
I created a clean 32-bit prefix and ran your command; Find below the ouptut:

Code: Select all

Not ready.

Volume in drive e has no label.
Volume Serial Number is 0000-0000

Path not found.
It seems that my ISO is not recognised as it should? Once mounted in my host system, I can see its label...

Anyway, I still went to the end of your process and installed the game in this new prefix. At launch, I got the usual error "No disc inserted".

User avatar
dimesio
Moderator
Moderator
Posts: 12677
Joined: Tue Mar 25, 2008 10:30 pm

Re: ISO file or loop device as real optical disk

Post by dimesio » Wed Jul 10, 2019 8:40 pm

First, try the method in https://wiki.winehq.org/FAQ#The_applica ... e_files.21.

If that doesn't work, try a hardware emulator such as CDEmu.

FYI, the issue could simply be copy protection, and it is against forum rules to discuss how to circumvent that.

MasterKTO
Newbie
Newbie
Posts: 4
Joined: Sat Feb 18, 2017 8:47 am

Re: ISO file or loop device as real optical disk

Post by MasterKTO » Thu Jul 11, 2019 6:40 am

dimesio, thank you! CDemu did the trick: once mounted in a block device "really identified" as a CD, everything worked like a charm.

Thank you for your help!

Post Reply