Apple says emulation in macOS can show devs how Windows games could run

Posted:
in Mac Software
Apple's push to improve gaming on Mac may involve some form of emulation, with its Game Porting Toolkit including a way for developers to try out existing Windows games within macOS.




Apple's announcements during WWDC for macOS and Mac include quite a few quality-of-life features aimed at gamers. However, the inclusion of a Game Mode in macOS Sonoma and improved Bluetooth sampling rates for controllers may pale compared to what it included in the Game Porting Toolkit.

The Game Porting Toolkit is a set of tools that developers can use to bring their Windows or console games over to macOS, including a more straightforward conversion process and a quicker evaluation of what it could look like.

While the toolkit includes things like the Metal Shader Converter and debugging tools for Metal, Andrew Tsai posted to YouTube that there was some emulation included in the kit. As mentioned in the Platforms State of the Union, Apple allows developers to run existing Windows games in a "provided emulation environment."

During the session "Bring your game to Mac, Part 1: Make a game plan," Apple directly mentions how the emulation interface lists the "Instruction and Direct3D translation type" among other key details.

A screenshot showing the Direct3D translation type is shown to developers when emulating for a game.
A screenshot showing the Direct3D translation type is shown to developers when emulating for a game.

The intention of the environment is to allow developers to see the "game's potential performance immediately, eliminating months of upfront work," according to Apple. It is to help developers work out whether it's worth porting the Windows game, and to realize the amount of work required to accomplish that task.

Tsai later determined after checking the source code that the tool is really a modification of Wine, based on CrossOver 21.1.1.

One unusual element is that the game shown in one demonstration video seems to be running under Rosetta 2, and is able to handle games using DirectX 12.



Subscribe to AppleInsider on YouTube{"@context":"https://schema.org/","@type":"VideoObject","name":"Apple hid something AMAZING for Mac gaming at WWDC","description":"Windows on M1 Mac Tutorial: ","thumbnailUrl":"https://i.ytimg.com/vi/g3n62FOX1Go/sddefault.jpg","uploadDate":"2023-06-06T12:44:32Z","duration":"PT4M44S","embedUrl":""}

Before WWDC, CrossOver developers CodeWeavers blogged that while CrossOver was to get formal DirectX 12 support from CrossOver 23, dealing with DirectX 12 itself was difficult. The team wasn't able to find a "single magic key that unlocked DirectX 12 support on macOS," and believed that enabling such support would have to be done on a per-title basis.

It is unclear if Apple has created a solution that actually can run DirectX 12 without issues, but if it does, there may be more utility beyond being a developer testing tool. If Apple wished, and if the emulation or translation layer worked sufficiently enough, there would be the potential to make it a publicly-accessible feature.

Of course, that's unlikely to occur, as Apple would stand to benefit more from games being ported to work on macOS than to enable Windows games to run directly.

Read on AppleInsider

Comments

  • Reply 1 of 7
    MarvinMarvin Posts: 15,326moderator
    A screenshot showing the Direct3D translation type is shown to developers when emulating for a game.

    The intention of the environment is to allow developers to see the "game's potential performance immediately, eliminating months of upfront work," according to Apple. It is to help developers work out whether it's worth porting the Windows game, and to realize the amount of work required to accomplish that task.

    Tsai later determined after checking the source code that the tool is really a modification of Wine, based on CrossOver 21.1.1.

    One unusual element is that the game shown in one demonstration video seems to be running under Rosetta 2, and is able to handle games using DirectX 12.

    Before WWDC, CrossOver developers CodeWeavers blogged that while CrossOver was to get formal DirectX 12 support from CrossOver 23, dealing with DirectX 12 itself was difficult. The team wasn't able to find a "single magic key that unlocked DirectX 12 support on macOS," and believed that enabling such support would have to be done on a per-title basis.

    It is unclear if Apple has created a solution that actually can run DirectX 12 without issues, but if it does, there may be more utility beyond being a developer testing tool. If Apple wished, and if the emulation or translation layer worked sufficiently enough, there would be the potential to make it a publicly-accessible feature.

    Of course, that's unlikely to occur, as Apple would stand to benefit more from games being ported to work on macOS than to enable Windows games to run directly.
    Valve managed to support DirectX 12 in Proton with Vulkan.

    https://www.gamingonlinux.com/2020/07/vkd3d-proton-is-the-new-official-direct3d-12-to-vulkan-layer-for-proton/

    Apple could have done the same kind of thing for Metal, possibly via Vulkan and MoltenVK.

    This would enable support for a lot of good games. Here's a Proton game running on an AMD GPU equivalent to M2 Max:



    Although it's less optimal than native, it's better than not having the game at all. DirectX 12 support will probably make it into open source products eventually.
  • Reply 2 of 7
    9secondkox29secondkox2 Posts: 2,727member
    Dang. Apple just may actually be starting to care about AAA gaming. 
    watto_cobra
  • Reply 3 of 7
    The problem with the state of gaming on the Mac is not that much that macOS is a platform that difficult to develop for and port games to, but the well documented fact that games on Mac don't sell (when put in comparison to other platforms).

    They can make a translation layer all they want, I don't see Mac gaming getting any traction in the future if Mac users (as a mass) are either not interested to play games on their machine, and/or aren't inclined to buy their games (many people do pirate their software on the platform because it's often easy to do it). 

    My two cents.
    williamlondondewmewatto_cobra
  • Reply 4 of 7
    aderutteraderutter Posts: 605member
    https://youtu.be/CcYyvzHtJVM

    https://www.applegamingwiki.com/wiki/Game_Porting_Toolkit

    Working games:

    • Cyberpunk 2077
    • Elden Ring
    • SpongeBob SquarePants: The Cosmic Shake
    • Diablo IV [1]
    • Hogwarts Legacy - requires Windows ver fix [2]
    • Deep Rock Galactic
    • Sonic Omens
    • Spider-Man (2018)
    • Spider-Man Miles Morales - requires Windows ver fix
    • Warframe - To get installer/launcher working add dwrite (disabled) to library overrides in winecfg
    • Deep Rock Galactic
    • HI-Fi RUSH

    Not working so well:

    • Horizon Zero Dawn - slowdown issues

    watto_cobra
  • Reply 5 of 7
    MarvinMarvin Posts: 15,326moderator
    aderutter said:
    https://youtu.be/CcYyvzHtJVM

    https://www.applegamingwiki.com/wiki/Game_Porting_Toolkit

    Working games:

    • Cyberpunk 2077
    • Elden Ring
    • SpongeBob SquarePants: The Cosmic Shake
    • Diablo IV [1]
    • Hogwarts Legacy - requires Windows ver fix [2]
    • Deep Rock Galactic
    • Sonic Omens
    • Spider-Man (2018)
    • Spider-Man Miles Morales - requires Windows ver fix
    • Warframe - To get installer/launcher working add dwrite (disabled) to library overrides in winecfg
    • Deep Rock Galactic
    • HI-Fi RUSH

    Not working so well:

    • Horizon Zero Dawn - slowdown issues

    The results are pretty amazing only having it available for 24 hours. Diablo IV just came out in the last week.

    https://www.reddit.com/r/macgaming/
    https://www.reddit.com/r/macgaming/comments/1435ukq/cyberpunk_on_m2_max_wgame_porting_toolkit/
    https://www.reddit.com/r/macgaming/comments/14307be/diablo_iv_on_m2_max_using_macos_sonoma_and_game/
    https://www.reddit.com/r/macgaming/comments/14342uz/hogwarts_legacy_on_m2_max/

    Cyberpunk 2077 is getting around 40FPS at around 1080p ultra. It's probably around 50% performance drop vs native so Apple would obviously prefer it to be ported but it takes way more resources to port than to just run it as is and 1080p/60 is fine for most people. The more people buying games will encourage more native ports.

    It would be good if they could partner with Valve and integrate the kit with Steam so that it worked like the Steam Deck. The M-series Mac userbase will be close to 100 million by now and they all have powerful GPUs. There may only be 20 million willing to buy games but they will likely buy more older games. 20m x $100 = $2b in sales.

    If they can get the big titles running with straight installation, that would be such a big improvement in Mac gaming and it would help the Vision Pro headset because the VR titles can play on the Mac and show on the headset.
    watto_cobra
  • Reply 6 of 7
    looplessloopless Posts: 330member
    Wine is a hot mess and I am pretty appalled Apple has sunk to using Wine to get games on the Mac. I looked at using Wine to 'port' a Win32 application and there were so many problems it was easier to just tell users to run Parallels.

    watto_cobra
  • Reply 7 of 7
    MarvinMarvin Posts: 15,326moderator
    loopless said:
    Wine is a hot mess and I am pretty appalled Apple has sunk to using Wine to get games on the Mac. I looked at using Wine to 'port' a Win32 application and there were so many problems it was easier to just tell users to run Parallels.
    Apple is using it as a testing tool so that companies looking into doing a Mac port will see the performance they can get. The Macbook Air is the most popular Mac and represents the most sales for a game developer/publisher. If a developer opens a Windows game in the testing tool, sees the game running at 10FPS on low, there's no point in trying to do a port. If it runs at 40FPS on high, they will likely get 60FPS or more with a native build and it's worth doing a native build.

    Wine/Crossover are very messy for setting up games vs Parallels but it's easier when the port has been done and it just installs. If the publisher wrapped their game in the compatibility environment and shipped it like that, there would be no setup needed by the end user.

    Big game companies do this themselves. Nintendo has used emulators for their old games because it's easier than porting the source code and assets. Old games can even run in browsers now:

    https://sneslive.com
    https://sneslive.com/super-mario-world/
    https://sneslive.com/donkey-kong-country/
    https://sneslive.com/street-fighter-v/

    Games designed for lower performance hardware run well in emulation:


Sign In or Register to comment.