PSA: Lemmings/NeoLemmix Emulation with Wine on MacOS

Started by oxes, August 15, 2023, 10:31:26 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

oxes

I signed up to make this post as a warning to others who might try to go down the path I did. It is inadvisable to spend time trying to get any of the 32bit Lemmings or Lix executables to work using Wine on MacOS, post Catalina. Support for this sort of 32bit application has been dropped. Wine will still attempt to run the executables in 64bit mode but will crash with a fairly generic error message. Unfortunately I learned this after about 2-3 hours of fussing around trying all sorts of different things to resolve the error. Don't be like me!

It may still be possible to run things on MacOS in DOSbox - I am not certain - but I also ran into some trouble trying that. I know for certain it is possible to emulate Windows (with VirtualBox, for instance) and then run the executables in the virtual machine that way. Certainly a lot of work, though.

Hopefully this post saves someone a bit of time : )

Simon

Welcome to the forums!

Quote from: oxes on August 15, 2023, 10:31:26 AM
run the executables in 64bit mode but will crash

I assume you're still referring to the the 32-bit executables here. What exactly do mean with 64-bit mode for a 32-bit Windows executable then?

Have you tried the 64-bit Windows release of Lix in Wine instead of the 32-bit Windows release of Lix in Wine? 64-bit Windows Lix runs largely well in Wine on Linux. That's my main way to smoke-test for Windows. Do you see 64-bit Lix crash in Wine on macOS?

For more adventures, you can build Lix natively for macOS.

I don't offer a binary release for Mac yet: I have no Mac myself and haven't looked into cross-compiling from Linux for Mac. Still, Lix is designed to run on most common platforms, and ideally I'd ship Mac binaries with every release.

Virtualizing a full Windows sounds like an extreme measure indeed. For NeoLemmix though, I see few alternatives if Wine fails for the released NeoLemmix executables.

-- Simon

oxes

About wine on MacOS and 32 vs 64bit, see here: https://formulae.brew.sh/cask/wine-stable My wording may have been a bit confusing.

I haven't tried natively compiling, actually. I was poking around pretty late at night and I didn't realize I could do that on a Mac, I thought all the compiling would be Windows-only. I will give that a try. I also think I got a bit confused about NeoLemmix vs Lix, and I thought they were part of the same project. Thanks for that info!

oxes

Well after all that effort last night, i just got original Lemmings running in DOSbox Staging with minimal effort! I used a different source for the original game files (a famous site which was recently sued by a bunch of awful publishers for lending out digital books, i'm sure you know it, and i'm not sure the rules here about mentioning download sites....) and it worked like a charm.

Next time I need to get a DOS game running on MacOS I'll go straight to DOSbox instead of trying Wine. Way less hassle!

Simon

All right, you tested 32-bit Windows binaries of Lix and NL, and both failed in Wine on Mac regardless of Wine config, possibly in different ways. You made no statement about the 64-bit Lix Windows binaries.

Yeah, Dosbox is better than Wine for DOS games.

When you build Lix for Mac, let me know about any problems, I'll be happy to troubleshoot. During play, the Mac-only magic pink bug #431 from 2022 is still unsolved, but has a workaround for singleplayer.

-- Simon

oxes

Thanks Simon. I tested specifically the Lix 64bit binary in wine last night but I was unable to get it to run. I can't tell if it's my wine config or not, but for your benefit I'm attaching a traceback of the error. I'm unlikely to try this approach again since it's more complicated than building from source.

Today I tested building Lix natively on macOS (10.15.7) and I can report it does work well. I've played several levels (all great fun) and no bugs observed yet. I'll be mindful of the bug you mentioned though and read through the workaround thread if I encounter it.

Simon

Happy to hear you've got Lix built and running on Mac first try!

The magic pink bug will glaringly surface in level 17, Beneath the Lab, if you continue to play the levels that Lix selects by default (lemforum/Lovely). It's possible that the bug won't hit you.

I agree that we shouldn't invest more time into Windows versions of Lix in Wine on Mac then. Thanks for posting the backtrace still!

Thoughts about the backtrace

I'm posting this for my own possible future investigation.

Unhandled exception: page fault on read access to 0x000000e300000013 in 64-bit code (0x000001401bb350).
Backtrace:
=>0 0x000001401bb350 in lix (+0x1bb350) (0x0000000011f590)
  1 0x000001401a00eb in lix (+0x1a00eb) (0x0000000011f720)
  2 0x000001401a8753 in lix (+0x1a8753) (0x0000000011f720)
[...]
  13 0x000001401c95ca in lix (+0x1c95ca) (0000000000000000)
  14 0x0000007b627fe9 in kernel32 (+0x27fe9) (0000000000000000)
  15 0x0000017005d668 in ntdll (+0x5d668) (0000000000000000)


It loads and runs Lix, then crashes from within Lix with page fault.

Page fault from Wine can be anything: Bug in Wine, strangeness in the Windows D compilers, a latent crashing bug in Lix that has never surfaced in native builds, ...

I can build a 64-bit debugging Windows version, i.e., identical to the Windows 64-bit build that oxes has run, but in debug mode instead of release mode. When we run that in Wine on Mac, we'll see the function names in the stack trace instead of the opaque function addresses.

-- Simon