Page 1 of 1

Zork Nemesis and Zork Grand Inquisitor on Linux with Wine

Posted: Mon Mar 28, 2011 2:21 pm
by KM3K
EDIT: Please note, this first post shows some initial work I did trying to get ZN and ZGI working in Linux. See the latest posts further down for the latest info.

I've been attempting off and on for years to get Zork Nemesis and Zork Grand Inquisitor (the Windows versions) working on Linux using Wine with mixed results. I'm making this thread to aggregate my resources. Hopefully, we can find a good solution to this so that instructions can be added to the Zork Installation Guides. I'll keep this top post updated with my progress.

Warning: This is only about running the Windows versions of ZN and ZGI. I realize other games/versions can be run in other ways.

Notes on my work:
  • To clarify, I'm using Arch Linux.
  • I'm not interested in the installation process of the games yet. I'm currently ok with copying the folder that was installed in Windows using the Zork Installation Guides. I'm more concerned about the game running ok. Based on previous experience with Wine, the installers should work ok, so the Zork Installation Guides instructions will probably work.
Progress so far:
  • The big problem is Wine bug #1347. It causes redraw issues with certain DirectDraw programs in Wine. This bug is currently unfixed, but there is a patch that has been made. The patch has been most recently updated to work with Wine v1.1.27. The current version of Wine is v1.3.19.
  • A few years ago, I got Zork Nemesis and Zork Grand Inquisitor running under Wine with an older version of the bug #1347 patch. I didn't test the games very much though, so I'm not sure if other things are broken.
  • The second big limitation is that this game requires 16-bit color. The X-server doesn't have any easy way (like xrandr) to change color depth on the fly like Windows does. I created scripts (modified from a script for Zork Nemesis) to run ZN and ZGI in a second X instance with 16-bit color. I'll upload my current versions soon, but older ones that should still work are at this post
  • There are also a few registry edits that may or may not still be needed, as noted here.
  • Wine bug #2467 may also be related as it appears to have the same symptions as bug #1347. Unfortunately, I recently tried the wine-starcraft package for Arch Linux which bundles Wine v1.3.5 and the patch for bug #2467, but the games didn't run. I think it crashed Wine if I remember right.
  • Diablo has the same problems due to bug #1347. Diablo's AppDB page has info on some hacks to get it working. They may or may not be applicable here. It also references Wine bug #2082.
  • [edited 3/30/11] Upon re-reading this page, the registry entry there and my script for running in a second X instance at 16-bit color may be all that is needed. Need to retest. (didn't work)
  • [edited 3/30/11] Looked into wine-hacks repo and Arch Linux package, but it didn't work. Same crash as wine-starcraft package.
  • [edited 5/2/11] I looked into testing the Wine patches for Diablo and bug #2082, but it looks like this may not work, just like the Starcraft patches. If the patch outlined below fails, I'll re-examine this.
  • [edited 5/2/11] After some adjustments to the patch listed above for Wine v1.1.27, I got Wine to build with the patch. I also updated the patch to work with Wine v1.3.1. The patch and an Arch Linux PKGBUILD are attached below. I haven't tested these with ZGI or ZNEM yet, but will do that soon. There is a change in Wine that was put into v1.3.2 that breaks this patch. If this patch makes Wine work with ZN/ZGI, I'll add "fixing the patch for the latest version of Wine" to the list of plans below.
  • [edit 5/15/11] For some reason these patched builds aren't working. This will need further investigation.
  • [edit 5/2/11]I got a little farther with this Wine patch. I got it to support up to Wine v1.3.17. I'll upload the new patch and PKGBUILD later after further testing. I'm currently stuck on supporting the changes in this git commit.
1347fix.patch
Patch with fix for Wine bug #1347, rediffed against Wine v1.3.1
(4.25 KiB) Downloaded 1833 times
wine1347.pkgbuild
Arch Linux PKGBUILD for Wine v1.3.1 with the bug #1347 patch. Rename to PKGBUILD. The integrity checks aren't fixed yet, so run makepkg with --skipinteg.
(2.96 KiB) Downloaded 1900 times
Future plans:
  • (Once the games are running,) attempt full playthroughs to see if games are completeable.
  • Look into getting DVD version of ZGI to show MPEG2 video.
  • Test game installers with Wine.
  • Write guides for installing and running ZN/ZGI with Wine.
References: Has anyone else tried this? What results did you get?

Re: Zork Nemesis and Zork Grand Inquisitor on Linux with Win

Posted: Tue Aug 23, 2011 11:06 am
by Zidane
Already created opensource engine for running ZGI and Nemesis on linux, freebsd, macos, windows and other platforms. For ZGI already all done, and auto-converter scripts too(but we may find already converted distrib for linux/windows on underground-gamer torrents, it's not advertisement!).
Project's git-hub page github[dot]com/Marisa-Chan/Zengine

Re: Zork Nemesis and Zork Grand Inquisitor on Linux with Win

Posted: Tue Aug 23, 2011 11:32 am
by KM3K
Wow, that's really impressive. I looked into developing my own implementation of the Z-engine in the past, but couldn't find any good documentation on it and I didn't have the time to reverse engineer it.

I'll grab a copy of your code from your git repo and try it out soon (hopefully this weekend).

Feel free to start a new post about your engine when you're ready to get more people testing it out. I'm sure others would be interested in trying it or at least hearing more about your progress on it.

Re: Zork Nemesis and Zork Grand Inquisitor on Linux with Win

Posted: Mon Jun 18, 2012 8:54 am
by KM3K
Here's an update on the status of Zork Nemesis and Zork Grand Inquisitor in Linux:

Wine
According to Wine's bugtracker, bug 1347 has been fixed. The bug report lists this being fixed as of 1.5.0, but from looking through the Wine git repo, it looks like it was fixed as of 1.3.32.
Edit: June 20, 2012 - I have tried ZGI with Wine 1.5.6, but the black screen issue still is a problem. I'm pretty close to abandoning Wine at this point since Marisa-Chan's Zengine is working so well. However Wine will probably still be required for running the installer for these games.

Marisa-Chan's Zengine
According to Marisa-Chan's GitHub page, the Zengine project has reached version 1.0 and now works for both Zork Nemesis and Zork Grand Inquisitor. I tested this project several months ago and it worked well for Zork Grand Inquisitor at the time. Marisa-Chan is Zidane on this forum.

Future Plans
I plan to test the latest Wine and Marsia-Chan's Zengine with Zork Nemesis and Zork Grand Inquisitor soon. If they work well, I will begin to work on guides for installing and setting up the games using these methods. To be clear, both of these methods will only work on Linux. Marisa-Chan's Zengine may support other operating systems in the future, but it only works with Linux at this time.