This PR fixes the alignment of text and other elements in several menus of Jak 3 (as well as some of Jak 2) when using Automatic or Custom aspect ratios. It also cleans up some of the relevant functions which are used to draw these menus (although I'm still learning how to clean goal code). I mostly used french text for testing (since the french text seems to push the font boundaries to their limits a bit more). I used Automatic 16:9 and Custom 4:1 aspect ratios for testing to see if my changes scale to other aspect ratios properly, comparing with PS2 4:3 for reference. ### Jak 3 ### Image Color Scale Before: - The black/white color scale would get stretched (beyond the limits of the menu in 4x1) <img width="1280" height="758" alt="color-scale-16x9-broken" src="https://github.com/user-attachments/assets/4b3b897e-1417-42da-86a1-dd78926ccb73" /> <img width="1283" height="747" alt="color-scale-4x1-broken" src="https://github.com/user-attachments/assets/44d192ba-5afe-43ae-9419-021123478a31" /> Reference (PS2 4:3 in OpenGoal): <img width="1278" height="773" alt="color-scale-reference" src="https://github.com/user-attachments/assets/d9bd8f4e-8f69-49a9-8a99-3fcd3d7a4097" /> After fixes: <img width="1283" height="765" alt="color-scale-16x9-fixed" src="https://github.com/user-attachments/assets/99422d7f-d688-4d91-8ce0-6ad0b7cb10df" /> <img width="1282" height="762" alt="color-scale-4x1-fixed" src="https://github.com/user-attachments/assets/6011f30a-0c31-4ea9-afe1-735ec36f3d32" /> ### Secrets menu Before: - The secret titles touch their costs (#4233). - The alignment of the top line showing orbs available/cost and total orbs collected is broken (more noticeable in 4:1) - The alignment of the titles for groups of secrets is broken (more noticeable in 4:1) - The indentation for secret titles relative to the group of secrets is also broken (again, more noticeable in 4:1) <img width="1286" height="758" alt="secrets-broken-16x9" src="https://github.com/user-attachments/assets/bd6c7dab-ce95-4349-bf1d-2a09f82fcbfe" /> <img width="1287" height="751" alt="secrets-broken-4x1" src="https://github.com/user-attachments/assets/3e1ce842-19ba-49b3-92f9-52034ae1982f" /> Reference (PS2 4:3 in OpenGoal): <img width="1280" height="761" alt="Screenshot from 2026-08-16 22-58-22" src="https://github.com/user-attachments/assets/7326a1c7-b479-4fb7-9450-377a05ab7963" /> After fixes: <img width="1280" height="722" alt="secrets-fixed-16x9" src="https://github.com/user-attachments/assets/0a66d45f-3aa3-4cc8-ac88-c6aef20f1319" /> <img width="1286" height="713" alt="secrets-fixed-4x1" src="https://github.com/user-attachments/assets/e8740739-42ac-4a12-aad1-e6620dfc73ed" /> ### Secrets purchase menu Before: - The text for the secret you're purchasing can get cut off if too big. - As before, the top line showing orb cost/orbs collected is misaligned. <img width="1288" height="754" alt="secrets-purchase-broken-16x9" src="https://github.com/user-attachments/assets/49b709e3-c015-42ba-b0aa-034769286d77" /> <img width="1281" height="756" alt="secrets-purchase-broken-4x1" src="https://github.com/user-attachments/assets/0c3c5e02-048a-4188-ada7-2413c384224b" /> Reference (PS2 4:3 in OpenGoal): <img width="1286" height="753" alt="secrets-purchase-reference" src="https://github.com/user-attachments/assets/bb0b1d1a-87f6-4343-8a82-2e1f968943cd" /> After fixes: <img width="1286" height="759" alt="secrets-purchase-fixed-16x9" src="https://github.com/user-attachments/assets/1d73593f-1d58-407e-9ce6-2da5bf0fd84b" /> <img width="1283" height="750" alt="secrets-purchase-fixed-4x1" src="https://github.com/user-attachments/assets/85c7e14d-c6b2-4b21-83e5-173af5cba185" /> ### Save/Load/Create Hero Mode Save menu Here I show the load game screen only but the bugs were the same among all 3 as the code is shared. The fixes apply to all 3 as well 😃 Before: - The header text is cut off in french. - There is a faint red rectangle to the right of the menu (look closely! It's a bit clearer and goes beyond the menu in 4x1). - The left yellow boxes around the save-games that are not selected do not scale properly (more noticeable in 4x1). <img width="1284" height="749" alt="load-broken-Automatic" src="https://github.com/user-attachments/assets/2ae3bd8b-42ec-49bc-9851-cbaace4ce64b" /> <img width="1285" height="751" alt="load-broken-4x1" src="https://github.com/user-attachments/assets/655de844-748c-43f9-a2e8-d779fe3a8e19" /> Reference (PS2 4:3 in OpenGoal): <img width="1281" height="762" alt="load-screen-4x3" src="https://github.com/user-attachments/assets/e4e320c9-999a-44a7-8b3e-34cfdbeef5a1" /> After Fixes: - Now headers that exceed the width of the menu screen will be shrunken down to fit. This will hopefully work for any other menus that need it as well 😃 - No more red rectangle on the right, and the yellow box to the left around the save games scales properly. <img width="1286" height="754" alt="load-fixed-automatic" src="https://github.com/user-attachments/assets/1a48d811-5684-4f7e-a12a-19e896e30b48" /> <img width="1288" height="749" alt="load-fixed-4x1" src="https://github.com/user-attachments/assets/f5a68cb1-576a-4927-977b-b3419aaf7c23" /> ### Missions menu Before: - Mission text is sometimes cut off on the right - Mission text is shifted to the right (more noticeable in 4x1) <img width="1286" height="753" alt="missions-alignment-broken-16x9" src="https://github.com/user-attachments/assets/37175eb7-e191-4c09-bb72-b40819acd99b" /> <img width="1281" height="750" alt="missions-alignment-broken-16x9-2" src="https://github.com/user-attachments/assets/482f351a-7386-4211-8434-cf60c0691fdb" /> <img width="1286" height="756" alt="missions-broken-4x1" src="https://github.com/user-attachments/assets/4cbfa4d0-999b-4265-bed0-957958663037" /> <img width="1290" height="750" alt="missions-broken-4x1-2" src="https://github.com/user-attachments/assets/4889b498-d6aa-4e6c-87fc-4dfadeac5827" /> Reference (PS2 4:3 in OpenGoal): <img width="1284" height="768" alt="missions-reference-1" src="https://github.com/user-attachments/assets/91a526c8-08c2-4a62-8219-09e967fab9c2" /> <img width="1276" height="755" alt="missions-reference-2" src="https://github.com/user-attachments/assets/65c4e944-5b1f-479a-bf7c-eca19c81f5d6" /> After: <img width="1281" height="760" alt="missions-fixed-16x9" src="https://github.com/user-attachments/assets/a972daf0-1872-46f0-a829-cd8d292df1d6" /> <img width="1282" height="750" alt="missions-fixed-16x9-2" src="https://github.com/user-attachments/assets/973611d6-a72c-43f8-b2f3-034e83f6c416" /> <img width="1289" height="760" alt="missions-alignment-fixed-4x1" src="https://github.com/user-attachments/assets/699c5dbc-8c39-468d-9e14-94007a789e48" /> <img width="1281" height="755" alt="missions-alignment-fixed-4x1-2" src="https://github.com/user-attachments/assets/89216187-d453-4d3e-8e8b-5ae365e7227d" /> ### Jak 2 ### Secrets menu orb icon Position was wrong in Automatic and some (but strangely, not all) Custom Aspect ratios. A correction for the aspect ratio was also being applied in the setter. Before: <img width="1284" height="755" alt="image" src="https://github.com/user-attachments/assets/0a15e238-1d98-4ba7-86ce-b295e8d78d7a" /> After: <img width="1283" height="755" alt="image" src="https://github.com/user-attachments/assets/bd97de44-ef41-426c-a76f-d4fe99a35285" /> ### Missions menu - Indentation was not working, even in 4:3, due to a typo. - Width was broken in Automatic and Custom Before: <img width="1281" height="753" alt="Screenshot from 2026-08-19 01-05-54" src="https://github.com/user-attachments/assets/6f5e3cc4-3522-45a5-a45b-34a46a7db544" /> After: <img width="1287" height="761" alt="image" src="https://github.com/user-attachments/assets/cae5498b-6ca4-40ab-a31c-feb8899bc1e7" />
Please read first
Important
Our repositories on GitHub are for development of the project and tracking active issues. Most of the information you will find here pertains to setting up the project for development purposes and is not relevant to the end-user.
For a setup guide on how to install and play the game there is the following video that you can check out: https://youtu.be/K84UUMnkJc4
For questions or additional information pertaining to the project, we have a Discord for discussion here: https://discord.gg/VZbXMHXzWv
Additionally, you can find further documentation and answers to frequently asked questions on the project's main website: https://opengoal.dev
Warning
Do not use this decompilation project without the use of your own legally purchased copy of the game. OpenGOAL does not include any assets from the original games, so you must provide your own legitimately obtained PS2 copy of the game. OpenGOAL supports every retail PAL, NTSC, and NTSC-J build, including Greatest Hits copies. Please note that does NOT include any of the later releases (PS3/PS4/PS5).
Project Description
The project's goal is to port the original trilogy (Jak 1 -> Jak 3) to PC. Over 98% of the games were written in GOAL, a custom LISP language developed by Naughty Dog. Our strategy is:
- decompile the original game code into human-readable GOAL code
- develop our own compiler for GOAL and recompile the game code for x86-64
- create a tool to extract game assets into formats that can be easily viewed or modified
- create tools to repack game assets into a format that our port uses.
Our objectives are:
- make the port a "native application" on x86-64, with high performance. It shouldn't be emulated, interpreted, or transpiled.
- Our GOAL compiler's performance should be around the same as unoptimized C.
- try to match things from the original game and development as possible. For example, the original GOAL compiler supported live modification of code while the game is running, so we do the same, even though it's not required for just porting the game.
- support modifications. It should be possible to make edits to the code without everything else breaking.
At the moment we support x86_64 on Windows, Linux and macOS (via Rosetta translation). There are no plans to ever make a mobile release.
Current Status
- Jak 1 has been considered in a polished, complete state for years at this point.
- Jak 2 is considered in beta due to a few issues we are aware of that need fixing, however to the casual user, the game is essentially complete.
- Jak 3 has a good amount of work left to do.
YouTube playlist showcasing some of the early progress for Jak 1: https://www.youtube.com/playlist?list=PLWx9T30aAT50cLnCTY1SAbt2TtWQzKfXX
Methodology
To assist with decompiling, we've built a decompiler that can process GOAL code and unpack game assets. We manually specify function types and locations where we believe the original code had type casts (or where they feel appropriate) until the decompilation succeeds, then we clean up the output of the decompiled code by adding comments and adjusting formatting, then save it in goal_src/.
Our decompiler is designed specifically for processing the output of the original GOAL compiler. As a result, when given correct casts, it often produces code that can be directly fed into a compiler and works perfectly. This is continually tested as part of our unit tests.
Setting up a Development Environment
The remainder of this README is aimed at people interested in building the project from source, typically with the intention of contributing as a developer.
If this does not sound like you and you just want to play the game, refer to the above section Quick Start
OS Setup
Editor Setup
You can of course use whatever editor you want, but here is some documentation that should help you get started on some of the editor's we have used and have written about:
Building and Running the Game
Getting a running game involves 4 main steps:
- Build C++ tools (follow Getting Started steps above for your platform)
- Extract assets from the game
- Build the game
- Run the game
Extract Assets
First, we have to setup our environment so we know which game and version we are operating with. For the black label version of Jak 1 we would run the following:
task set-game-jak1
task set-decomp-ntscv1 # or for example for PAL, `task set-decomp-pal`
Run
task --listto see the other available options
Next, ensure you extract your ISO file contents into the relevant iso_data/<game-name> folder. In the case of Jak 1 this is iso_data/jak1.
Once this is done, open a terminal in the jak-project folder and run the following:
task extract
Build the Game (Running the Compiler)
The next step is to build the game itself. To do so, in the same terminal run the following:
task repl
You will be greeted with a prompt like so:
_____ _____ _____ _____ __
| |___ ___ ___| __| | _ | |
| | | . | -_| | | | | | | |__
|_____| _|___|_|_|_____|_____|__|__|_____|
|_|
Welcome to OpenGOAL 0.8!
Run (repl-help) for help with common commands and REPL usage.
Run (lt) to connect to the local target.
g >
Run the following to build the game:
g > (mi)
IMPORTANT NOTE! If you're not using the non-default version of the game, you may hit issues trying to run
(mi)in this step. An example error might include something like:
Input file iso_data/jak1/MUS/TWEAKVAL.MUS does not exist.This is because the decompiler inputs/outputs using the
gameNameJSON field in the decompiler config. For example if you are using Jak 1 PAL, it will assumeiso_data/jak1_palanddecompiler_out/jak1_pal. Therefore, you can inform the REPL/compiler of this via thegameVersionFolderconfig field described here
Run the Game
Finally the game can be launched. Open a second terminal from the jak-project directory and run the following:
task boot-game
The game should boot automatically if everything was done correctly.
Connecting the REPL to the Game
Connecting the REPL to the game allows you to inspect and modify code or data while the game is running.
To do so, in the REPL after a successful (mi), run the following:
g > (lt)
If successful, your prompt should change to:
gc>
For example, running the following will print out some basic information about Jak:
gc> *target*
Running the Game Without Auto-Booting
You can also start up the game without booting. To do so run the following in one terminal
task run-game
And then in your REPL run the following (after a successful (mi)):
g > (lt)
[Listener] Socket connected established! (took 0 tries). Waiting for version...
Got version 0.8 OK!
[Debugger] Context: valid = true, s7 = 0x147d24, base = 0x2123000000, tid = 2438049
gc> (lg)
10836466 #xa559f2 0.0000 ("game" "kernel")
gc> (test-play)
(play :use-vis #t :init-game #f) has been called!
0 #x0 0.0000 0
gc>
Technical Project Overview
Some more detail about the various components of the project can be found here


