ScummVM and Windows for ARM64

General chat related to ScummVM, adventure gaming, and so on.

Moderator: ScummVM Team

Post Reply
carlo_bramini
Posts: 26
Joined: Sat Aug 08, 2015 3:27 pm

ScummVM and Windows for ARM64

Post by carlo_bramini »

Hello,
I was wondering what you think about releasing ScummVM for running natively on Windows 10 for ARM64.
This platform is known to be able to run also 32bit x86 code by using a software emulator, but often with poor performance, while a Snapdragon is able to reach much greater results when it executes native code.
In the same way of the 64-bit version for x86-64 Windows, everything in the codebase of ScummVM is ready, you just need to decide if you would like to host such executable in the download section or not. :wink:

Sincerely.
digitall
ScummVM Developer
Posts: 1172
Joined: Thu Aug 02, 2012 1:40 pm

Re: ScummVM and Windows for ARM64

Post by digitall »

This would be a question for our Windows porters ... but there is support for ARM64 in https://mingw-w64.org/doku.php so quite possible to add a builder to buildbot and provide releases if we can get a porter who could test...
NiQ
Posts: 9
Joined: Sun Oct 17, 2010 11:52 am

Re: ScummVM and Windows for ARM64

Post by NiQ »

Hi,
I've just built ScummVM 2.0.0 ARM64 and it wasn't that difficult, though it took a while to compile all the dependency tree (everything's enabled except Fluidsynth and updates).

I've uploaded it here if you want it -
https://mega.nz/#F!PclhDIRB!-yhBZ6UM7S596ijNU3dx0A
If it doesn't run, install MSVC 2017 ARM64 runtime.

The build required very minor changes -
1. Edit common/scummsys.h
#if defined(__x86_64__) || \
defined(_M_X64) || \
+ defined(_M_ARM64) || \
defined(__ppc64__) || \
defined(__powerpc64__) || \
defined(__LP64__)
This is needed because otherwise it assumes 32-bit pointers. Maybe it would be wise to simply check for _WIN64, which it a catch-all macro for 64-bit Windows.

2. Edit backends/saves/windows/windows-saves.cpp
Look for #include <windows.h>, undef setjmp and longjmp before it and redefine them as forbidden after it (just copy-paste from backends/platform/sdl-sys.h). This has nothing to do with ARM64, it seems that MSVC builds are broken even on x86/x64.

3. When compiling, disable OpenGL because WoA doesn't support it at all. All other methods (e.g. DirectX) are available and SDL2 works fine.

Regarding the attached binary, I've tried running DOTT (scumm), Monkey Island II (scumm) and SQ5 (sci) and they seemed to play fine, though by "trying" I mean ~2 minutes each so it's basically just sanity. Also these games are not intensive enough for serious performance checks. If someone has an ARM64 laptop and some CPU-intensive games supported by ScummVM please do test.
Post Reply