• Our software update is now concluded. You will need to reset your password to log in. In order to do this, you will have to click "Log in" in the top right corner and then "Forgot your password?".
  • Welcome to PokéCommunity! Register now and join one of the best fan communities on the 'net to talk Pokémon and more! We are not affiliated with The Pokémon Company or Nintendo.

Making Windows ROM Hacking Tools Work With macOS

rheometric

certified smeargologist
7
Posts
5
Years
  • Table of Contents:
    1. Intro
    2. Wine
    3. Wineskin
    4. Troubleshooting Wineskin
    5. Outro
    INTRO
    Howdy, I'm Rheometric, I've been quietly messing around with ROM hacking for a while now. All of my computers at home and school run macOS or OS X; however, so I've had to learn to improvise when using many tools that only run as executable applications on Windows. In this brief tutorial, I want to cover how to use Wine and other tools to run these on Apple computers. I'm sure for most people, this will be mindbogglingly basic, but I'm stupid and would have loved something like this when I was just starting out. This will only be covering the utter basics of installing and working with these options, acting as a summary/TL;DR of the many, many existing guides.

    WINE
    Wine is by far the most common and well-documented method of running .exe files on macOS and OS X. It's been around for longer than I've been alive. Luckily, Wine is also relatively simple. So, what is it? As the WineHQ website states:
    Wine (originally an acronym for "Wine Is Not an Emulator") is a compatibility layer capable of running Windows applications on several POSIX-compliant operating systems, such as Linux, macOS, & BSD. Instead of simulating internal Windows logic like a virtual machine or emulator, Wine translates Windows API calls into POSIX calls on-the-fly, eliminating the performance and memory penalties of other methods and allowing you to cleanly integrate Windows applications into your desktop.
    All that means is that Wine reads .exe language and spits out stuff that macOS systems can understand. You know how Apple took the headphone jack off the new iPhones, so now almost none of your wire-using headphones work with your phone? That's Windows in this situation, except Windows has never been compliant with POSIX standards. So, Wine isn't making a mini Windows OS on your Mac, it's just being a translator. Some things don't translate all that well. Programs like Paint Tool SAI lack support for things like tablet pressure sensitivity. No programs I've tried have been able to interact with my Wacom tablet beyond just simply letting it control the cursor, so I can't work as efficiently as I'd like with stuff like AdvanceMap and all of its replacements. All that being said, I don't think anyone else cares, so I'll just leave that there as a warning of sorts. Don't expect magical functionality; expect Wine to stumble around a bit and puke errors and incompatibility on you when you least expect it.

    Download X11
    Unfortunately, macOS doesn't inherently come with X11, the framework for running Windows'... windows. Mac OS X actually came with it for a brief period, but you probably don't have it unless you're still running Leopard or Snow Leopard (10.5 through 10.7), which you're not doing unless you're still living in 2011 or had a prophetic vision that X11.app would be useful for you seven years later. So, you're gonna download XQuartz. You can find it at a website of the same name with a .org address. I can't include it because my account is still a little baby who's banned from linking things.

    Restart your computer after this, and you're ready to actually install Wine.

    Install Wine
    Go to the most recent stable release of wine on WineHQ (also a .org site). Don't download the source code, because it's completely useless to computer dummies like us. Download the .pkg because you love yourself and have no reason to use the tarball archive. After opening the package, you'll be greeted with the wonderful macOS install wizard. You already have XQuartz, so Wine won't yell at you about that unless you did it wrong. Check the box to download the 64-bit support to assure you won't have any issues with application compatibility. If you don't want all users on your system to have access to Wine, click the "Change Install Location" button.

    Congrats! You're Wine! To open any .exe file, you can simply double-click it and it'll open using Wine Stable. If you have a program on your computer such as The Unarchiver or other decompressers that might pick up the .exe, you're going to need to unassociate the application from executable files. Different programs have different in-app methods of doing this, but you can universally change this with the following: right-click the .exe, and press Open With > Other... and select Wine Stable, making sure to check off "Always Open With". Also, don't fret if your application looks like it came straight out of 1999 when you open it. That's just how default Wine/X11 is. You can install Windows themes to Wine for aesthetics, but I won't be covering that here.

    WINESKIN
    AKA, my personal preferred method. Note that you do not need Wine or any form of X11 to run Wineskin. Wineskin engines have their own form of X11, very creatively named WineskinX11.

    I let Wine explain itself with a quote, so I'll let Wineskin do that too:
    Wineskin is a tool used to make ports of Windows software to Mac OS X. The ports are in the form of normal Mac application bundle wrappers. It works like a wrapper around the Windows software, and you can share just the wrappers if you choose.
    All that means is that WIneskin creates an individual .app file for you by doing exactly what Wine does. With Wine, you have to open an application using Wine Stable every time. WIneskin allows you to make a file that acts nearly exactly like a macOS app, allowing you to give the file it's own position on the Dock, a place in the Applications folder, and a customizable icon. Wineskin doesn't require a wizard to set up like Wine does, so simply downloading the zipped file from Urge Software's website is all you gotta do. Inside should be Wineskin Winery. Move it to the applications folder.

    Wineskin Winery
    So, the Winery is where all of our wrapping/bottling is done. You will need to select an engine and a wrapper version. I highly suggest selecting the most recent stable version for both. Now that you've installed those, you should be greeted with a window that lists your installed engine(s), wrapper version, and two buttons. To begin, select "Create Blank New Wrapper" and give it the same name as whatever tool you want to make an app for. I'm gonna use unLZ, so I just named it that. Winery will take a moment to create your .app. Proceed to view it in Finder.

    If your tool came in a .zip or .rar or some other compressed format, uncompress it. Now you have a folder with your .exe and any other files that the tool requires. The version of unLZ I've downloaded just has unLZ.GBA.exe, but others may have .txt, .ini, or .dll files that the .exe needs in order to run. Right-click on your new .app and press "Show Package Contents". In Contents, you'll find all the stuff Wineskin needs to run. In drive_c, you'll find the place where you'll soon be installing your tool. You'll also find a metric shit-ton of other stuff in there, like executables for stuff like Internet Explorer and files like System32, which Wineskin doesn't even need AFAIK. I have no clue why these are in there, but don't mess with them unless you like breaking things. Alongside Contents and c_drive, we have Wineskin.app, finally! Open it up.

    Using Wineskin

    For 99% of ROM hacking tools you're ever gonna work with, they're not gonna require any setup. Select one of the two advanced options, "Copy a Folder Inside" or "Move a Folder Inside". I personally prefer to just copy it. Navigate to the folder with your .exe and any additional necessary files. Choose it. Wineskin will prompt you to select the correct .exe to run. Unless there are more .exe in the folder or you've selected the incorrect folder, your tool should be automatically selected. In the "Advanced" panel, feel free to modify the icon, but I don't suggest changing anything else. Press "Install Software", close the Winery, and you're ready to use your new app!

    TROUBLESHOOTING WINESKIN
    Remember how I mentioned that there are lots of issues in Wine? Well, there are just as many (if not more) in Wineskin -- BUT they're way easier to fix in Wineskin! Wineskin, god bless it's devs, has both an option for test-running programs and many excellent pre-installed options to fix weird problems.

    Your most common issue in Wineskin (and Wine, but it's more difficult to correct) is going to be missing files, specifically DLLs. Many times, this manifests in an app appearing to open correctly, but then closing just a few moments afterwards. When this happens (and it will for SO MANY tools), you're gonna want to go back to the Wineskin.app in your tool's Package Contents and open it. Select Advanced, and then Test Run. Wineskin will offer you two files, "LastRunX11.log" and "LastRunWine.log". Your issue is almost never with X11, but be sure to review both documents. Here's an example of an error in "LastRunWine.log" that I got while test running PTC:
    Code:
    err:module:import_dll Library MSVBVM60.DLL (which is needed by L"C:\\Program Files\\PTC\\PTC.exe") not found

    You don't have this file because it is preinstalled with Windows and the creator of the tool assumes you're running this on Windows. Wineskin can add this DLL, though! Back in the Advanced panel, select Winetricks. MSVBVM60 stands for something like MS Visual Basic 6.0, so we're gonna go down to vb6run and run it. After this, the program will work as intended!

    OUTRO
    I hope this helped someone out there -- as I mentioned before, it sure as hell would have helped me. There are plenty options out there aside from Wine/Wineskin, like macOS's built-in Boot Camp, but I wanted to cover the two simplest options that don't require you to emulate or literally just run a Windows OS on your Mac. On a final note, I'd like anyone who finds that a tool is missing a DLL to notify me. I want to create a list of well-known ones with the specific DLLs they're missing so people don't have to go through the whole test run process every time a tool doesn't work. Additionally, let me know if I've gotten anything wrong here or if I should go more in-depth on certain areas!

    Thanks for reading!
     
    222
    Posts
    6
    Years
    • Seen Nov 18, 2023
    Wine doesn't exactly have a good success rate in my experience. I use parallels mostly running Windows 10. Sure, it costs money, but there are ways around that you should still buy it because it runs really well and will never fail.
     
    Last edited:

    Chronosplit

    I play for keeps!
    492
    Posts
    13
    Years
    • Seen May 6, 2024
    Ah yes, this is a great tutorial! One thing you should mention though: High Sierra has a huge issue with Wineskin currently. There's a fix in the latest news on Wineskin's site.

    One issue I have with pokemon tools specificaly is that it just won't be 100%. Even after finding all the required Winetricks (word for the wise: be careful with dotnet40), I can sometimes run into bizarre natures like Advanced Sprite Editor crashing only when I start to save my work (importing and everything else is great though). This could be just me however.

    I will say though, with everything else I have a near 100% success rate as long as I have WineHQ or GOG's "will it run in Wine" thread at my side. So you have a pretty high probability of getting stuff done with it! It's also a handy tool around for extracting EXE setup files for source ports (OpenRCT2 for example).
     
    Last edited:
    Back
    Top