Apple’s new Proton-like tool can run Windows games on a Mac - It looks like Apple is finally taking macOS gaming seriously

Celebrate Nite

Come On Baby It's Party Time!
kiwifarms.net
Joined
Jan 2, 2020
Article: https://www.theverge.com/2023/6/7/23752164/apple-mac-gaming-game-porting-toolkit-windows-games-macos
Archive: https://archive.is/oTaZe
--------------------------------------------------------------
If you’re hoping to see more Windows games on Mac then those dreams might finally come true soon. Apple has dropped some big news for game developers at its annual Worldwide Developers Conference (WWDC) this week, making it far easier and quicker to port Windows games to Mac thanks to a Proton-like environment that can translate and run the latest DirectX 12 Windows games on macOS.

Apple has created a new Game Porting Toolkit that’s similar to the work Valve has done with Proton and the Steam Deck. It’s powered by source code from CrossOver, a Wine-based solution for running Windows games on macOS. Apple’s tool will instantly translate Windows games to run on macOS, allowing developers to launch an unmodified version of a Windows game on a Mac and see how well it runs before fully porting a game.

Mac gaming has been a long running meme among the PC gaming community, despite Resident Evil Village and No Man’s Sky ports being some rare recent exceptions to macOS gaming being largely ignored.

“The new Game Porting Toolkit provides an emulation environment to run your existing unmodified Windows game and you can use it to quickly understand the graphics feature usage and performance potential of your game when running on a Mac,” explains Aiswariya Sreenivassan, an engineering project manager for GPUs and graphics at Apple, in a WWDC session earlier this week.

This Game Porting Toolkit even supports DirectX 12 games like The Medium, with Sreenivassan demonstrating running the game through Apple’s translation layer. Much like how Wine and Proton combine to create a software layer to translate Windows API calls to Linux, Apple is doing something similar here to convert these Windows API calls to its Metal API.

Apple’s new Game Porting Toolkit translates Intel-based x86 instructions and Windows APIs to Apple Silicon instead. APIs related to keyboard, mouse, controller input, audio playback, networking, the file system, and Direct3D are all translated to the corresponding APIs in macOS.

The result is Windows games running on macOS without any porting or modification. Apple says this is more for evaluating games right now before they’re ported across to macOS, but there’s nothing stopping macOS users from installing this Game Porting Toolkit and trying games out.

The big issue will be exactly how games run in this environment. Most won’t be optimized through this tool and there are bound to be performance issues and bugs until developers create their own ports. Reddit users have already got Cyberpunk 2077 up and running on an M1 MacBook Pro, alongside Diablo IV on an M1 Max MacBook Pro and Hogwarts Legacy on an M2 Max. The early results look promising despite some obvious performance limitations, but there could also be potential bugs from running games on Mac this way.

CodeWeavers announced its own highly-anticipated DirectX 12 support for CrossOver Mac (a similar Windows compatibility layer that’s source code is powering Apple’s tool) earlier this month. But it also warned that despite its advancement “there was no single magic key” that unlocked DirectX 12 support on macOS.

“To get just Diablo II Resurrected running, we had to fix a multitude of bugs involving MoltenVK and SPIRV-Cross,” explained CrossOver Product Manager Meredith Johnson in a blog post. “We anticipate that this will be the case for other DirectX 12 games: we will need to add support on a per-title basis, and each game will likely involve multiple bugs.”

Apple’s own translation layer is still significant, though. Apple has often talked up how high performance its GPU cores are on its M1 and M2 chips, even announcing an M2 Ultra chip this week with a 76-core GPU that’s 30 percent faster than the M1 Ultra. We just haven’t seen that GPU performance in games on Mac because so few get ported across.

Porting Windows games to Mac hasn’t been easy for developers, and typically involves a complex process of recompiling source code, converting custom shaders, reimplementing the graphics subsystem, and converting audio, input, and HDR rendering. Developers can use a cross-platform game engine to cut down on all that complexity if they’re targeting multiple platforms, but they still have to debug a game and optimize the performance on macOS.

Apple now has a tool to let developers understand how much porting work will be required to fix bugs and optimize their games on macOS, and it also has a new Metal Shader Converter to automatically convert existing GPU shaders to Metal. Both of these tools significantly cut down the time and work to port games from Windows to Mac.

Apple’s Mac gaming push also includes a new game mode in macOS Sonoma and game developer Hideo Kojima appearing during Apple’s WWDC keynote to announce that Death Stranding Director’s Cut will be coming to macOS.

If Apple continues with this work on its translation layer, maybe one day it’ll be good enough for end users to run Windows games on macOS just like they do on a Steam Deck. That dream is still a ways off, but Apple has showed this week that it might eventually become reality.
--------------------------------------------------------------
 
Interesting, this seems more interesting because it implies a CPU compatibility layer for running amd64 programs on Apple's ARM chips.
 
I would be extremely salty if I was CodeWeavers, since Apple just unceremoniously grabbed their Wine build for this toolkit, and didn't even bother to send a thank you note after the presentation. Their blog post seems to indicate this.
If Apple continues with this work on its translation layer, maybe one day it’ll be good enough for end users to run Windows games on macOS just like they do on a Steam Deck. That dream is still a ways off, but Apple has showed this week that it might eventually become reality.
That's not what this is for, nor will it ever be. Apple will never work with other companies on anything they see as defining their product and brand. Which means no Vulkan, no Wine. The only way this will happen is if moltenvk gets as good as Apple's translation library, and devs simply package unaltered Wine, moltenvk and vkd3d builds with their game on Steam.

This toolkit is for companies to quickly build and document changes required to run games natively on the Mac. Their license for the DX12 to Metal translation layer explicitly prohibits commercial use.

Now for those individuals who can learn to pull in parts of this toolkit and build a working solution, Apple doesn't care enough to go after them, even if they are packaging their software in ways that break licenses. There already are people who managed to get Cyberpunk running on M1 chips, and there already is a Bottles-like UI to make this easy: https://github.com/IsaacMarovitz/Whisky
Interesting, this seems more interesting because it implies a CPU compatibility layer for running amd64 programs on Apple's ARM chips.
It's called Rosetta 2, and was launched alongside the M1 three years ago.
 
I would be extremely salty if I was CodeWeavers, since Apple just unceremoniously grabbed their Wine build for this toolkit, and didn't even bother to send a thank you note after the presentation. Their blog post seems to indicate this.

That's not what this is for, nor will it ever be. Apple will never work with other companies on anything they see as defining their product and brand. Which means no Vulkan, no Wine. The only way this will happen is if moltenvk gets as good as Apple's translation library, and devs simply package unaltered Wine, moltenvk and vkd3d builds with their game on Steam.

This toolkit is for companies to quickly build and document changes required to run games natively on the Mac. Their license for the DX12 to Metal translation layer explicitly prohibits commercial use.

Now for those individuals who can learn to pull in parts of this toolkit and build a working solution, Apple doesn't care enough to go after them, even if they are packaging their software in ways that break licenses. There already are people who managed to get Cyberpunk running on M1 chips, and there already is a Bottles-like UI to make this easy: https://github.com/IsaacMarovitz/Whisky

It's called Rosetta 2, and was launched alongside the M1 three years ago.
So can you explain what the fuck this 76 core cpu is? I get why that would be hard to code for, but why even do it if a regular 8 core does the job and doesn't fuck with deveopers?
 
76 core is the GPU.
M2 - 8 or 10 cores
M2 Pro - 16 or 19 cores
M2 Max - 30 or 38 cores
M2 Ultra - 60 or 76 cores

M2 and M2 Pro and M2 Max are their own dies. M2 Ultra is 2x M2 Max with an interconnect between them.
 
  • Like
Reactions: The Ghost of Kviv
76 cores seem like something that'd be best suited for servers and really high end uses. By high end, I don't mean maxing out Cyberpunk 2077 at 4K. Would be funny to play Fallout 76 on a computer with a 76 core CPU.
 
  • Agree
Reactions: Toolbox
Interesting, this seems more interesting because it implies a CPU compatibility layer for running amd64 programs on Apple's ARM chips.
That already exists in Rosetta 2 which is pretty good because Apple specifically designed M1 to support x86 memory reordering so dynamic translation can be fast. I think most x86 stuff runs ~80% as fast as native Apple silicon software.

The big problem with running games on macOS right now though is that Apple only officially supports Metal. They've deprecated OpenGL and declared a fatwa against Vulkan, so even if you want to port your game to macOS, the barrier to entry is stupidly high. Everyone's hoping the game porting toolkit is a sign that Apple is actually going to take gaming seriously and try to get more devs on board (they won't and it's pure copium).
 
That already exists in Rosetta 2 which is pretty good because Apple specifically designed M1 to support x86 memory reordering so dynamic translation can be fast. I think most x86 stuff runs ~80% as fast as native Apple silicon software.

The big problem with running games on macOS right now though is that Apple only officially supports Metal. They've deprecated OpenGL and declared a fatwa against Vulkan, so even if you want to port your game to macOS, the barrier to entry is stupidly high. Everyone's hoping the game porting toolkit is a sign that Apple is actually going to take gaming seriously and try to get more devs on board (they won't and it's pure copium).
Honestly I think the more competition there is the better, that's how things should be in a market, even if it's not free. Having their own ecosystem and choosing to develop something that's catered specifically to their own hardware to me is one of the best things a company could possibly do to make the best experience possible. It's just a matter of taste with regards to who wants to use their products.
 
  • Agree
Reactions: The Ghost of Kviv
I just find it funny how with this toolkit we might end up in a situation of the dumbest hoops ever. Rosetta 2 > wine > dx12 > vulkan (VKd3d) > metal (moltenvk) might end up being a thing. An emulator to run multiple compatibility layers ontop of eachother for another layer to run ontop of that to convert it all to metal. I'm probably just reading this wrong or I have a poor understanding of the topic.
 
All this to what? turn a mac into a minecraft machine? Fortnite is never getting ported and no one would ever by a mac for real gaming because it wouldnt last 2 generations without needing some sort of upgrade.
 
I just find it funny how with this toolkit we might end up in a situation of the dumbest hoops ever. Rosetta 2 > wine > dx12 > vulkan (VKd3d) > metal (moltenvk) might end up being a thing. An emulator to run multiple compatibility layers ontop of eachother for another layer to run ontop of that to convert it all to metal. I'm probably just reading this wrong or I have a poor understanding of the topic.
The entire computing universe is built open layers of translation. Almost nobody writes applications that run on silicon, the only exceptions are ASICs for low latency, such as military hardware-the HUDs on pilot helmets, phased radar systems, etc.

None of the libraries you mention are emulation, they are all translation layers. When running a game using the toolkit there are two translation layers working in parallel:
  • General purpose code translated from Windows/NT syscalls to Mac/Darwin syscalls using Wine, and x86 assembly to armv8 using Rosetta. There is very little x86 in modern games, most games write logic for SSE3, AVX, and other ISAs that can exist independently of x86.
  • Shaders, and other parallelized d3d12 calls translated to Metal using Apple's proprietary translation layer.
moltenvk is only required if you're packaging your game for Macs using Wine instead of native builds. Apple isn't allowing those games on their store, and that's unlikely to change.
 
  • Like
Reactions: Fcret
The entire computing universe is built open layers of translation. Almost nobody writes applications that run on silicon, the only exceptions are ASICs for low latency, such as military hardware-the HUDs on pilot helmets, phased radar systems, etc.

None of the libraries you mention are emulation, they are all translation layers. When running a game using the toolkit there are two translation layers working in parallel:
  • General purpose code translated from Windows/NT syscalls to Mac/Darwin syscalls using Wine, and x86 assembly to armv8 using Rosetta. There is very little x86 in modern games, most games write logic for SSE3, AVX, and other ISAs that can exist independently of x86.
  • Shaders, and other parallelized d3d12 calls translated to Metal using Apple's proprietary translation layer.
moltenvk is only required if you're packaging your game for Macs using Wine instead of native builds. Apple isn't allowing those games on their store, and that's unlikely to change.
Rosetta 2 is an x86_64 emulator isn't it? or am I actually just retarded, I won't be surprised if am I a retard but from what I could tell it was Rosetta 2 itself was an emulator if it's a compatibility layer i'll accept that i'm a moron.
 
Rosetta 2 is an x86_64 emulator isn't it? or am I actually just retarded, I won't be surprised if am I a retard but from what I could tell it was Rosetta 2 itself was an emulator if it's a compatibility layer i'll accept that i'm a moron.
Rosetta 2 is a dynamic binary translator. It translates x86_64 code to ARM64 (either JIT or ahead-of-time). No hardware emulation is taking place, just translation of instructions. It doesn't emulate a full x86_64 computer.
 
  • Agree
Reactions: The Ghost of Kviv
The only game related shit I want from Apple is for them to stop pinning exclusives onto their gay mobile devices and behind even gayer subscription services for said gay devices.
 
Back