Skip to content

Instantly share code, notes, and snippets.

@GreenSwede
Last active June 17, 2022 17:50
Show Gist options
  • Star 9 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save GreenSwede/91c00c84c769e67251a473436df61da3 to your computer and use it in GitHub Desktop.
Save GreenSwede/91c00c84c769e67251a473436df61da3 to your computer and use it in GitHub Desktop.
Open Ocarina of Time (OOOT) PC Port Build Guide For Windows

These are my own documented steps to get ooot to build on Windows 10 using Python 3.10.2 and Visual Studio 2019/2022

written by GreenSwede#0001
last edited 2022-04-15

  1. Install Visual Studio 2019 (or 2022, it also works just fine) https://visualstudio.microsoft.com/vs/older-downloads/

    When installing Visual Studio 2019/2022, you'll want to make sure that you install "Desktop development with C++". Install Desktop development with C++

  2. Clone the ooot git repository. Do NOT download the Zip from the ooot GitHub page. Cloning through Git is the recommended approach and makes it easier for you to stay up to date whenever new changes are pushed to the repo. Updating the repo is as easy as running git fetch to see the latest changes and then running git pull to download them!

    You can clone the repo in different ways, but the fastest way if you don't already have Git installed is by using "Git for Windows".

    Download it here: https://gitforwindows.org/

    When installing Git for Windows, you can keep clicking on "Next" to proceed with the setup. The default options are fine.

  3. With git installed, open the Command Prompt (cmd.exe) in your Desktop (any place is fine but I personally prefer using Desktop)

  4. Clone the git repository by running the following:
    git clone --recursive https://github.com/blawar/ooot.git

    This will automatically make a new folder called "ooot" in the current directory, and the default branch will be "master".

    NOTE: If you're interested in the most up-to-date EXPERIMENTAL 60 FPS branch, you'll want to switch to the "dev" branch:
    git checkout dev
    git pull origin dev
    git submodule update --init --recursive

  5. To play the Master Quest Debug version, copy the Ocarina of Time Master Quest Debug ROM (PAL/EUR) to the "ooot/roms/EUR_MQD" folder.
    To play the retail version of Ocarina of Time, copy the Ocarina of Time 1.0 ROM (PAL/EUR) to the "ooot/roms/PAL_1.0" folder.
    Make sure the filename is "baserom_original.z64". The file extension can either be .n64, .z64 or .v64.

  6. If you do not have Python3 installed, you can download the Windows installer (64-bit) here: https://www.python.org/downloads/release/python-3102/

    Before installing Python, make sure you tick the "Add Python to PATH" checkbox in the Setup window.
    Add Python to PATH in setup

  7. Now after Python is installed, run the "setup.py" script in the ooot folder to extract the game assets. You can do this by running one of the following commands in the Command Prompt (cmd.exe):
    Retail version: python setup.py -b PAL_1.0

    Master Quest version: python setup.py -b EUR_MQD

    If you wish to try 60 FPS (or higher), you can by pressing F7 to decrease the FPS and by pressing F8 to increase it.

    This process might take a while depending on your PC performance. Do not click on the Python window with your cursor as that can freeze the entire process (an issue with "QuickEdit Mode" and "Insert Mode" for Command Prompt windows).

    Once the Python window says "Finished asset extraction and parsing" then it's done.

  8. Now open ooot/vs/OOT.sln in Visual Studio 2019/2022.

  9. If Visual Studio Installer asks to install "Desktop development with C++" then click "Install". Download size is approximately 1.2 GB.

  10. Now it's time to build OOT.sln. Make sure "Debug - Win32" is selected up top.
    If you want to play with higher FPS, then "Release - Win32" is recommended instead for optimization purposes.
    Debug - Win32
    Press Ctrl + Shift + B to build the entire solution, or click on "Build" > "Build Solution".

    Once it's done building, press F5 to play the Debug build of the game! Congratulations!
    The executable can be located at: ooot/vs/Debug/OOT.exe

KEYBOARD CONTROLS:
Control Stick - W A S D
C Buttons - Up ↑ / Down ↓ / Left ← / Right →
A Button - Spacebar / O
B Button - Left Click / F / P
Center Camera - Right Click
Z Button - Shift / C
L Trigger - X
R Trigger - V
START Button - Enter
DPAD Buttons - I ↑ / K ↓ / J ← / L →
F10 - Toggle Fullscreen
F9 - Toggle Language (English, Deutsch, Français)
F5 - Open debug level select menu
Press DPAD ↑↓←→ simultaneously - Open debug level select menu

Controllers are also supported.

Check the "KNOWN ISSUES" section down below in case you happen to have an error. If your error isn't listed there, please ask for help in the #help-compiling channel in the OOT PC Port Discord server: https://discord.com/invite/8tktBEhbZm

KNOWN ISSUES

If you get a Visual Studio error that says "gameplay_dangeon_keepTex_000000.i8.inc.c': No such file or directory" then the pip tqdm package probably didn't get installed properly. Try running the following in cmd.exe:
pip3 install tqdm

If that fails, try running the following:
python -m pip install --upgrade pip

Then run the pip3 install command again. If that fails however, you can try installing it by running this:
python -m pip install tqdm

If you still have issues getting pip to work, run the Python installer once more and make sure that PATH was checked. If you're sure that it was, click on "Customize installation" and make sure that the "pip" checkbox is ticked. If it isn't, tick the checkbox and then click Next.
Install pip

You can follow this great guide to see if Python is properly added to your PATH: https://projects.raspberrypi.org/en/projects/using-pip-on-windows/4

You can now restart setup.py and hope for the best. If you experience oddities, you can try to clean the build environment first by running:
python setup.py -co
This will clean the build environment so no file leftovers exist.

If Python or Pip is still misbehaving, try uninstalling Python and reinstall Python according to step 6.


"Error: Visual Studio Installer" "The Visual Studio Installer update failed to download. Make sure that you are connected to the network and try again."

If you get the error above when trying to download "Desktop development with C++", you may try to reinstall Visual Studio 2019. :) (this might apply to 2022 also) https://stackoverflow.com/a/45839251
Rename "Installer" folder to something else, e.g. "Installer_old" and run the vs_installer.exe Update once more. Awesome!


If you get multiple Visual Studio errors that say ".. is incorrect size" then you probably built OOT.sln in x64 mode instead of Win32. x64 is not supported.


If you need to update GLideN64 in your local repository, run the following in the ooot folder:
git submodule update --init --recursive

@Nateaaaaaaaaaaaaaaaaaaaa

so no ntsc rom support yet?

@GreenSwede
Copy link
Author

so no ntsc rom support yet?

Correct

@toucan4267
Copy link

toucan4267 commented Mar 19, 2022

You mention, "Controllers are also supported." How do I get a gamepad working? I see a "gamepad1.bindings.json" file, but unsure what to change these to supposing that's how it would be done.
Thanks in advance!

P.S. Great guide! One issue I had, was that I had to temporarily disable some Comodo Firewall utilities in order to get it to build. Thought it might be helpful info to someone.

@Deeinbetween
Copy link

Deeinbetween commented Apr 3, 2022

I've followed the above instructions but keep getting this error when I try to run the python setup command (running as administrator). I know the ROM is good. I've used it with P64 frequently. I'm not sure what to do from here.

image

@Deeinbetween
Copy link

I've followed the above instructions but keep getting this error when I try to run the python setup command (running as administrator). I know the ROM is good. I've used it with P64 frequently. I'm not sure what to do from here.

image

SOLVED! Check the video by nitrostwitch on youtube

@GreenSwede
Copy link
Author

GreenSwede commented Apr 4, 2022

I've followed the above instructions but keep getting this error when I try to run the python setup command (running as administrator). I know the ROM is good. I've used it with P64 frequently. I'm not sure what to do from here.
image

SOLVED! Check the video by nitrostwitch on youtube

Even if the rom works in PJ64, you will need the correct checksum hash.

@Redriderx64
Copy link

will it be possible to compile it to be compatible with opengl 1.4?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment