No CD detected with Pharaoh

Questions about Wine on Linux
Locked
User avatar
Djedouas
Level 1
Level 1
Posts: 7
Joined: Wed Oct 21, 2020 3:53 am

No CD detected with Pharaoh

Post by Djedouas »

Hello :)

I know this topic has been addressed already but the threads are too old and locked.
All the solutions I found don't work :(

Distro: elementaryOS
Software: Pharaoh

Steps:
- Have a folder (not an ISO image) of Pharaoh in my linux home directory
- Create a drive on D: with winecfg and set up the type to CD-ROM and the target to $HOME/PHARAON
- Install Pharaoh with
cd $HOME/.wine/dosdevices/d\:/
wine SETUP.EXE
- All the installation process OK
- When I run the exe, I have the popup error saying that I have to insert the CD-ROM
wine $HOME/.wine/dosdevices/c\:/SIERRA/Pharaon/Pharaoh.exe

Screenshot of the explorer showing that the D: drive is mounted as a CD-ROM:
Capture d’écran de 2020-10-21 11-07-58@2x.png
User avatar
succodifrutta
Level 2
Level 2
Posts: 21
Joined: Sat Mar 28, 2020 5:26 am

Re: No CD detected with Pharaoh

Post by succodifrutta »

Djedouas wrote: Wed Oct 21, 2020 4:10 am
- When I run the exe, I have the popup error saying that I have to insert the CD-ROM
wine $HOME/.wine/dosdevices/c\:/SIERRA/Pharaon/Pharaoh.exe
Hey I suggest you to try:
  1. create ad-hoc prefix for you desired program, e.g.:

    Code: Select all

    WINEPREFIX=/home/yourusername/wine_prefixes/wine_pharaoh wineboot -i
  2. Code: Select all

    WINEPREFIX=/home/yourusername/wine_prefixes/wine_pharaoh wine start /unix /path/to/pharaoh-CDROM/setup.exe
  3. let the paraoh CDROM still inserted / mounted
  4. Code: Select all

    WINEPREFIX=/home/yourusername/wine_prefixes/wine_pharaoh wine start /unix /home/yourusername/wine_prefixes/wine_pharaoh/drive_c/path/to/paraoh/install/folder/start.exe
User avatar
Djedouas
Level 1
Level 1
Posts: 7
Joined: Wed Oct 21, 2020 3:53 am

Re: No CD detected with Pharaoh

Post by Djedouas »

Thanks for helping me :D !

Here are the steps that I followed according to your suggestions:

Code: Select all

mkdir -p ~/wine_prefixes/wine_pharaoh
WINEPREFIX=~/wine_prefixes/wine_pharaoh wineboot -i
Then using winecfg to mount the folder on the D: drive as CD-ROM type

Code: Select all

WINEPREFIX=~/wine_prefixes/wine_pharaoh winecfg
Then installing and running Pharaoh, with same error: no CD detected :(

Code: Select all

WINEPREFIX=~/wine_prefixes/wine_pharaoh wine start /unix ~/wine_prefixes/wine_pharaoh/dosdevices/d\:/SETUP.EXE
WINEPREFIX=~/wine_prefixes/wine_pharaoh wine start /unix ~/wine_prefixes/wine_pharaoh/drive_c/SIERRA/Pharaon/Pharaoh.exe
Any idea?
Thanks again :wink:
spoon0042
Level 6
Level 6
Posts: 572
Joined: Thu Dec 24, 2009 11:00 am

Re: No CD detected with Pharaoh

Post by spoon0042 »

Can you add WINEDEBUG=+volume when you run the game and post the output?

e: and also the output of 'wine --version' just to be sure
User avatar
Djedouas
Level 1
Level 1
Posts: 7
Joined: Wed Oct 21, 2020 3:53 am

Re: No CD detected with Pharaoh

Post by Djedouas »

Thanks spoon0042 for helping :)
spoon0042 wrote: Sun Oct 25, 2020 6:48 pm Can you add WINEDEBUG=+volume when you run the game and post the output?

Code: Select all

WINEDEBUG=+volume WINEPREFIX=~/wine_prefixes/wine_pharaoh wine start /unix ~/wine_prefixes/wine_pharaoh/drive_c/SIERRA/Pharaon/Pharaoh.exe
002e:trace:volume:GetDriveTypeW L"D:\\" -> 5
002e:trace:volume:GetVolumeInformationW L"\\??\\D:\\": found fs type 1
002e:trace:volume:GetDriveTypeW L"Z:\\" -> 3
002e:trace:volume:GetDriveTypeW L"D:\\" -> 5
002e:trace:volume:GetDriveTypeW L"D:\\" -> 5
002e:trace:volume:GetVolumeInformationW L"\\??\\D:\\": found fs type 1
002e:trace:volume:GetDriveTypeW L"Z:\\" -> 3
spoon0042 wrote: Sun Oct 25, 2020 6:48 pm e: and also the output of 'wine --version' just to be sure

Code: Select all

wine-3.0 (Ubuntu 3.0-1ubuntu1)

Also I noticed errors at prefix creation:

Code: Select all

WINEPREFIX=~/wine_prefixes/wine_pharaoh wineboot -i
0012:err:ole:marshal_object couldn't get IPSFactory buffer for interface {00000131-0000-0000-c000-000000000046}
0012:err:ole:marshal_object couldn't get IPSFactory buffer for interface {6d5140c1-7436-11ce-8034-00aa006009fa}
0012:err:ole:StdMarshalImpl_MarshalInterface Failed to create ifstub, hres=0x80004002
0012:err:ole:CoMarshalInterface Failed to marshal the interface {6d5140c1-7436-11ce-8034-00aa006009fa}, 80004002
0012:err:ole:get_local_server_stream Failed: 80004002
0014:err:ole:marshal_object couldn't get IPSFactory buffer for interface {00000131-0000-0000-c000-000000000046}
0014:err:ole:marshal_object couldn't get IPSFactory buffer for interface {6d5140c1-7436-11ce-8034-00aa006009fa}
0014:err:ole:StdMarshalImpl_MarshalInterface Failed to create ifstub, hres=0x80004002
0014:err:ole:CoMarshalInterface Failed to marshal the interface {6d5140c1-7436-11ce-8034-00aa006009fa}, 80004002
0014:err:ole:get_local_server_stream Failed: 80004002
Could not load wine-gecko. HTML rendering will be disabled.
Could not load wine-gecko. HTML rendering will be disabled.
wine: configuration in '/home/jacky/wine_prefixes/wine_pharaoh' has been updated.
003b:err:winedevice:async_create_driver failed to create driver L"MountMgr": c0000035
spoon0042
Level 6
Level 6
Posts: 572
Joined: Thu Dec 24, 2009 11:00 am

Re: No CD detected with Pharaoh

Post by spoon0042 »

You'll probably want to upgrade wine to a current version, instructions for Ubuntu are here: https://wiki.winehq.org/Ubuntu
You may have to look up or ask someone which version of Ubuntu your elementaryOS is based on.

The wineboot log doesn't show any problem other than missing gecko which probably doesn't matter.

As for the game itself it's calling GetDriveTypeW and wine is returning the right value for a CD (5). The other call there to GetVolumeInformationW may be a problem if the game is expecting a CD (1 is "unknown"). Or that could be nothing, unfortunately I don't know of anything easy to check. Or it could just work in current wine, that would be the first thing to try.

Also there is wine's appdb, I assume this is the same "Pharaoh" anyway: https://appdb.winehq.org/objectManager. ... on&iId=223
People seem to report it working but I didn't see any mention of CD issues in the ones I looked at.
User avatar
Djedouas
Level 1
Level 1
Posts: 7
Joined: Wed Oct 21, 2020 3:53 am

Re: No CD detected with Pharaoh

Post by Djedouas »

spoon0042 wrote: Mon Oct 26, 2020 3:36 pm You'll probably want to upgrade wine to a current version, instructions for Ubuntu are here: https://wiki.winehq.org/Ubuntu
You may have to look up or ask someone which version of Ubuntu your elementaryOS is based on.
My elementaryOS is based on Ubuntu 18.04.
I uninstalled wine

Code: Select all

sudo apt remove wine
sudo apt autoremove
and reinstalled it following the instructions on
https://wiki.winehq.org/Ubuntu
and on https://wiki.winehq.org/FAQ#How_do_I_so ... ll_Wine.3F because of dependencies problems.
and on viewtopic.php?f=8&t=32192 because of missing FAudio on Ubuntu 18.04.

Now I can't run wine any more :shock: even after rebooting.

Translated from french:

Code: Select all

$ wine

« wine » command has not been found, but can be installed with:

sudo apt install wine-development
sudo apt install wine-stable     

$ sudo apt install wine-stable
Reading packages list... Done
Building dependency tree
Reading state informations... Done
wine-stable is already at its most recent version (5.0.2~bionic).
0 updated, 0 installed, 0 to remove and 0 not updated.
jkfloris
Level 12
Level 12
Posts: 3154
Joined: Thu Aug 14, 2014 10:10 am

Re: No CD detected with Pharaoh

Post by jkfloris »

The wine command is in the winehq-stable package

Code: Select all

sudo apt install --install-recommends winehq-stable
User avatar
Djedouas
Level 1
Level 1
Posts: 7
Joined: Wed Oct 21, 2020 3:53 am

Re: No CD detected with Pharaoh

Post by Djedouas »

jkfloris wrote: Wed Oct 28, 2020 3:44 pm The wine command is in the winehq-stable package
:mrgreen: :oops:

Yeah... works better with this package :mrgreen:
spoon0042 wrote: Mon Oct 26, 2020 3:36 pm Or it could just work in current wine, that would be the first thing to try.
But unfortunately, with wine 5.0.2 I have the same problem... the CD-ROM is still not found :!:

I still have the following output with WINEDEBUG=+volume

Code: Select all

002b:trace:volume:GetDriveTypeW L"D:\\" -> 5
002b:trace:volume:GetDriveTypeW L"D:\\" -> 5
002b:trace:volume:GetVolumeInformationW L"\\??\\D:\\": found fs type 1
002b:trace:volume:GetDriveTypeW L"Z:\\" -> 3
Capture d’écran de 2020-10-28 22-59-56.png
Capture d’écran de 2020-10-28 22-59-56.png (3.4 KiB) Viewed 3691 times
spoon0042
Level 6
Level 6
Posts: 572
Joined: Thu Dec 24, 2009 11:00 am

Re: No CD detected with Pharaoh

Post by spoon0042 »

There are a few things you could try but the better(?) ones involve having either the CD or at least an .iso file. You could try creating an .iso from the directory you have but that could end up going nowhere too. There are other ways around cd checks but I can't say much more than that. otoh I seem to have found it on archive.org, heh.
User avatar
Bob Wya
Level 12
Level 12
Posts: 3068
Joined: Sat Oct 16, 2010 7:40 pm

Re: No CD detected with Pharaoh

Post by Bob Wya »

@Djedouas

As we've established that the Pharaoh game checks the filesystem of the CD drive...
You'd probably want to create an iso image of the directory you have the game stored in and mount that.

E.g. something like:

Code: Select all

mkisofs -r -o /tmp/cd.iso /tmp/directory/
Then mount, with something like:

Code: Select all

sudo mkdir -p /media/run/cd.iso
sudo mount -o loop /tmp/cd.iso /media/run/cd.iso
The iso image should be created / mounted with as an iso9660 filesystem (typically what is used on a game CD).

Bob
User avatar
Djedouas
Level 1
Level 1
Posts: 7
Joined: Wed Oct 21, 2020 3:53 am

Re: No CD detected with Pharaoh

Post by Djedouas »

Bob Wya wrote: Sun Nov 01, 2020 12:25 pm @Djedouas

As we've established that the Pharaoh game checks the filesystem of the CD drive...
You'd probably want to create an iso image of the directory you have the game stored in and mount that.

E.g. something like:

Code: Select all

mkisofs -r -o /tmp/cd.iso /tmp/directory/
Then mount, with something like:

Code: Select all

sudo mkdir -p /media/run/cd.iso
sudo mount -o loop /tmp/cd.iso /media/run/cd.iso
The iso image should be created / mounted with as an iso9660 filesystem (typically what is used on a game CD).

Bob
Thanks a lot Bob!

Now the game launches :D !
Only problem, no sound during the game, whereas I have the sound during the game installation where a test sound is played...

I have some warnings during the game execution but I think that's not relevant:

Code: Select all

wine: Read access denied for device L"\\??\\D:\\", FS volume label and serial are not available.
wine: Read access denied for device L"\\??\\D:\\", FS volume label and serial are not available.
wine: Read access denied for device L"\\??\\D:\\", FS volume label and serial are not available.
wine: Read access denied for device L"\\??\\D:\\", FS volume label and serial are not available.
wine: Read access denied for device L"\\??\\D:\\", FS volume label and serial are not available.
wine: Read access denied for device L"\\??\\D:\\", FS volume label and serial are not available.
wine: Read access denied for device L"\\??\\D:\\", FS volume label and serial are not available.
wine: Read access denied for device L"\\??\\D:\\", FS volume label and serial are not available.
wine: Read access denied for device L"\\??\\D:\\", FS volume label and serial are not available.
wine: Read access denied for device L"\\??\\D:\\", FS volume label and serial are not available.
0009:fixme:ntdll:NtQuerySystemInformation info_class SYSTEM_PERFORMANCE_INFORMATION
spoon0042
Level 6
Level 6
Posts: 572
Joined: Thu Dec 24, 2009 11:00 am

Re: No CD detected with Pharaoh

Post by spoon0042 »

Found a thread on the issue here: http://caesar3.heavengames.com/cgi-bin/ ... 9,7232,,20

Mentions either finding a patch to update the game or use compatibility mode in windows. For wine I was able to set the version to 95 in winecfg and get sound.
User avatar
Djedouas
Level 1
Level 1
Posts: 7
Joined: Wed Oct 21, 2020 3:53 am

Re: No CD detected with Pharaoh

Post by Djedouas »

spoon0042 wrote: Thu Nov 05, 2020 9:19 pm Found a thread on the issue here: http://caesar3.heavengames.com/cgi-bin/ ... 9,7232,,20

Mentions either finding a patch to update the game or use compatibility mode in windows. For wine I was able to set the version to 95 in winecfg and get sound.
Yes! The sound is here! 8)

To be able to select Windows 95 I had to create a win32 prefix:

Code: Select all

WINEARCH=win32 WINEPREFIX=~/wine_prefixes/wine_pharaoh  wineboot -i
WINEARCH=win32 WINEPREFIX=~/wine_prefixes/wine_pharaoh  winecfg
Thanks to all of you for helping me, and learning to use wine as well!
User avatar
Bob Wya
Level 12
Level 12
Posts: 3068
Joined: Sat Oct 16, 2010 7:40 pm

Re: No CD detected with Pharaoh

Post by Bob Wya »

@Djedouas

Ahhh, glad you got it working finally! 8)

Bob
Locked