All VU programs are unchanged except: - `ocean-near-vu1` DIFFERENT - `sparks-vu1` NEW - `sprite-glow-vu1` DIFFERENT - `tnear-vu1` DIFFERENT And `hfrag`, `ocean` and `ocean-texture` have been removed. A full breakdown: ``` ================================================================================ Checking: background-vu0.txt ================================================================================ OK: Files are the same. ================================================================================ Checking: bones-vu0.txt ================================================================================ OK: Files are the same. ================================================================================ Checking: collide-vu0.txt ================================================================================ OK: Files are the same. ================================================================================ Checking: emerc-vu1.txt ================================================================================ OK: Files are the same. ================================================================================ Checking: etie-vu1.txt ================================================================================ OK: Files are the same. ================================================================================ Checking: etn-vu1.txt ================================================================================ OK: Files are the same. ================================================================================ Checking: foreground-vu0.txt ================================================================================ OK: Files are the same. ================================================================================ Checking: generic-vu0.txt ================================================================================ OK: Files are the same. ================================================================================ Checking: generic-vu1.txt ================================================================================ OK: Files are the same. ================================================================================ Checking: merc-vu1.txt ================================================================================ OK: Files are the same. ================================================================================ Checking: mercneric-vu0.txt ================================================================================ OK: Files are the same. ================================================================================ Checking: ocean-mid-vu1.txt ================================================================================ OK: Files are the same. ================================================================================ Checking: ocean-near-vu1.txt ================================================================================ !!! DIFFERENT !!! --- ocean-near-vu1.txt +++ ../jak3/ocean-near-vu1.txt @@ -78,10 +78,20 @@ .word 0x2ff .word 0x800206bc .word 0x2ff +.word 0x903100a +.word 0x2ff +.word 0x884100a +.word 0x2ff .word 0x80050032 .word 0x2ff .word 0x800701f2 .word 0x2ff +.word 0x1fc1820 +.word 0x2ff +.word 0x1fd1821 +.word 0x2ff +.word 0x1fe2020 +.word 0x2ff .word 0x1f82922 .word 0x2ff .word 0x1f92925 @@ -91,23 +101,23 @@ .word 0x1fb292b .word 0x2ff .word 0x1ec292e -.word 0x800601 +.word 0x9c0600 .word 0x1ed2931 -.word 0x800641 +.word 0x9c0641 .word 0x1ee2934 -.word 0x800681 +.word 0x9c0682 .word 0x1ef2937 -.word 0x8006c1 +.word 0x9c06c3 .word 0x1e8293a -.word 0x800301 +.word 0x9d0300 .word 0x3e5c122 -.word 0x800341 +.word 0x9d0341 .word 0x3e5c925 -.word 0x800381 +.word 0x9d0382 .word 0x3e5d128 -.word 0x8003c1 +.word 0x9d03c3 .word 0x3e5d92b -.word 0x800201 +.word 0x9e0200 .word 0x3e5612e .word 0x2ff .word 0x3e56931 @@ -118,12 +128,26 @@ .word 0x2ff .word 0x3e5413a .word 0x2ff +.word 0x80031a32 +.word 0x2ff +.word 0x80042232 +.word 0x2ff .word 0x1005281b .word 0x2ff -.word 0x5a003fec +.word 0x5a003fe7 .word 0x2ff .word 0x80073ff2 .word 0x2ff +.word 0x843100a +.word 0x2ff +.word 0x824100a +.word 0x2ff +.word 0x1fc1820 +.word 0x2ff +.word 0x1fd1821 +.word 0x2ff +.word 0x1fe2020 +.word 0x2ff .word 0x1f82922 .word 0x2ff .word 0x1f92925 @@ -133,23 +157,23 @@ .word 0x1fb292b .word 0x2ff .word 0x1ec292e -.word 0x800601 +.word 0x9c0600 .word 0x1ed2931 -.word 0x800641 +.word 0x9c0641 .word 0x1ee2934 -.word 0x800681 +.word 0x9c0682 .word 0x1ef2937 -.word 0x8006c1 +.word 0x9c06c3 .word 0x1e8293a -.word 0x800301 +.word 0x9d0300 .word 0x3e5c122 -.word 0x800341 +.word 0x9d0341 .word 0x3e5c925 -.word 0x800381 +.word 0x9d0382 .word 0x3e5d128 -.word 0x8003c1 +.word 0x9d03c3 .word 0x3e5d92b -.word 0x800201 +.word 0x9e0200 .word 0x3e5612e .word 0x2ff .word 0x3e56931 ================================================================================ Checking: shadow-vu0.txt ================================================================================ OK: Files are the same. ================================================================================ Checking: shadow-vu1.txt ================================================================================ OK: Files are the same. ================================================================================ Checking: shrub-vu1.txt ================================================================================ OK: Files are the same. ================================================================================ Checking: sparks-vu1.txt ================================================================================ !!! MISSING: ../jak3/sparks-vu1.txt !!! MISSING: sparks-vu1.txt does not exist in ../jak3 ================================================================================ Checking: sprite-distort-vu1.txt ================================================================================ OK: Files are the same. ================================================================================ Checking: sprite-glow-vu1.txt ================================================================================ !!! DIFFERENT !!! --- sprite-glow-vu1.txt +++ ../jak3/sprite-glow-vu1.txt @@ -1,4 +1,4 @@ -.word 0x1005031e +.word 0x10050320 .word 0x2ff .word 0x1f903dc .word 0x2ff @@ -66,17 +66,17 @@ .word 0x2ff .word 0x1ed2004 .word 0x1042101 -.word 0x3e54845 +.word 0x3e54844 .word 0x5b1159 .word 0x8025033c .word 0x410083 -.word 0x3e55046 +.word 0x3e55045 .word 0x20025c -.word 0x3e55847 -.word 0x2ff -.word 0x3e56048 +.word 0x3e55846 +.word 0x2ff +.word 0x3e56047 .word 0x1002117 -.word 0x3e56849 +.word 0x3e56848 .word 0x2ff .word 0x80000030 .word 0x290247 @@ -178,7 +178,7 @@ .word 0x18aa52f .word 0x80000030 .word 0x1e5f1bf -.word 0x3e5184c +.word 0x3e5184b .word 0x1e5fc0a .word 0x3c5580b .word 0x191a46c @@ -230,33 +230,33 @@ .word 0x1ed697d .word 0x80000030 .word 0x1ee717d -.word 0x385583e +.word 0x385583d .word 0x1f1897d -.word 0x385603f +.word 0x385603e .word 0x1f2917d -.word 0x3856840 +.word 0x385683f .word 0x1f3997d -.word 0x3857041 +.word 0x3857040 .word 0x1f4a17d -.word 0x3858819 -.word 0x2ff -.word 0x385901b +.word 0x3858818 +.word 0x2ff +.word 0x385901a .word 0x2ff .word 0x3859808 .word 0x2ff .word 0x385a009 .word 0x2ff -.word 0x385584e -.word 0x2ff -.word 0x3856050 -.word 0x2ff -.word 0x3856852 -.word 0x2ff -.word 0x3857054 +.word 0x385584d +.word 0x2ff +.word 0x385604f +.word 0x2ff +.word 0x3856851 +.word 0x2ff +.word 0x3857053 .word 0x2ff .word 0x80002efc .word 0x2ff -.word 0x10010691 +.word 0x10010694 .word 0x2ff .word 0x52001f8c .word 0x2ff ================================================================================ Checking: sprite-vu1.txt ================================================================================ OK: Files are the same. ================================================================================ Checking: tfrag-vu1.txt ================================================================================ OK: Files are the same. ================================================================================ Checking: tie-near-vu1.txt ================================================================================ OK: Files are the same. ================================================================================ Checking: tie-vu1.txt ================================================================================ OK: Files are the same. ================================================================================ Checking: tnear-vu1.txt ================================================================================ !!! DIFFERENT !!! --- tnear-vu1.txt +++ ../jak3/tnear-vu1.txt @@ -1421,9 +1421,9 @@ .word 0x1916800 .word 0x400403 .word 0x40000008 +.word 0x2ff +.word 0x1927000 .word 0x400443 -.word 0x1927000 -.word 0x2ff .word 0x3eb802d .word 0x2ff .word 0x3eb882e @@ -1435,39 +1435,39 @@ .word 0x1916948 .word 0x400403 .word 0x40000001 +.word 0x2ff +.word 0x1927148 .word 0x400443 -.word 0x1927148 -.word 0x2ff .word 0x3eba02a .word 0x400483 .word 0x3eba82b +.word 0x2ff +.word 0x3ebb02c +.word 0x2ff +.word 0x1f4581d .word 0x1998407 -.word 0x3ebb02c +.word 0x1f55820 .word 0x1998c47 -.word 0x1f4581d -.word 0x1f6e93c -.word 0x1f55820 +.word 0x3eb6027 .word 0x1999487 -.word 0x3eb6027 -.word 0x191876f .word 0x3eb6828 -.word 0x19187ab +.word 0x2ff .word 0x3eb801e .word 0x1f4a13c .word 0x3eb8821 .word 0x1f5a93c .word 0x3eb9024 -.word 0x192ef6f +.word 0x1f6e93c .word 0x3eb7029 -.word 0x192f7ab +.word 0x2ff +.word 0x3eba01d +.word 0x2ff +.word 0x3eba820 +.word 0x2ff .word 0x3ebb023 .word 0x2ff .word 0x800e5872 .word 0x2ff -.word 0x3eba01d -.word 0x2ff -.word 0x3eba820 -.word 0x19de97c .word 0x1ff0297 .word 0x2ff .word 0xb0f03fe @@ -1475,7 +1475,7 @@ .word 0x80040032 .word 0x2ff .word 0x420f0007 -.word 0x19de93c +.word 0x2ff .word 0x1006581c .word 0x2ff .word 0x420f0005 @@ -1541,20 +1541,20 @@ .word 0x2c010002 .word 0x2ff .word 0x2c0d0002 -.word 0x2ff +.word 0x3eef87 .word 0x5200080c .word 0x2ff .word 0x1f13002 .word 0x2ff .word 0x52006803 .word 0x2ff -.word 0x80000030 +.word 0x81feebbc .word 0x2ff .word 0x400007e3 .word 0x2ff .word 0x800841f2 .word 0x2ff -.word 0x420a0082 +.word 0x420a0077 .word 0x2ff .word 0x80064072 .word 0x2ff @@ -1570,7 +1570,7 @@ .word 0x2ff .word 0x5200681c .word 0x2ff -.word 0x80000030 +.word 0x81feebbc .word 0x2ff .word 0x420a006e .word 0x2ff @@ -1594,16 +1594,16 @@ .word 0x2ff .word 0x80064772 .word 0x2ff +.word 0x1ec3000 +.word 0x2ff +.word 0x1f43001 +.word 0x2ff .word 0x1f03002 .word 0x2ff -.word 0x1ec3000 -.word 0x2ff -.word 0x1f43001 -.word 0x2ff .word 0x80042072 .word 0x2ff .word 0x80000030 -.word 0x19d842c +.word 0x2ff .word 0x81ec03bc .word 0x1ff632a .word 0x80000030 @@ -1671,14 +1671,14 @@ .word 0x2c010002 .word 0x2ff .word 0x2c0d0002 -.word 0x2ff +.word 0x3eef87 .word 0x500d0818 .word 0x2ff .word 0x1f13802 .word 0x2ff .word 0x5000080c .word 0x2ff -.word 0x80000030 +.word 0x81feebbc .word 0x2ff .word 0x420a0038 .word 0x2ff @@ -1702,7 +1702,7 @@ .word 0x2ff .word 0x80006235 .word 0x2ff -.word 0x420a0038 +.word 0x420a002d .word 0x2ff .word 0x80000030 .word 0x2ff @@ -1795,10 +1795,6 @@ .word 0x80000030 .word 0x2d6f86 .word 0x80000030 -.word 0x3eef87 -.word 0x81feebbc -.word 0x2ff -.word 0x80000030 .word 0x1ec6bac .word 0x80000030 .word 0x1f4adac @@ -1816,25 +1812,3 @@ .word 0x1f6a5a8 .word 0x80000030 .word 0x1f284a8 -.word 0x80000030 -.word 0x3eef47 -.word 0x81fdf3bc -.word 0x2ff -.word 0x80000030 -.word 0x1ed63ac -.word 0x80000030 -.word 0x1f5a5ac -.word 0x80000030 -.word 0x1f184ac -.word 0x800003bf -.word 0x1e0739c -.word 0x80000030 -.word 0x1e0b59c -.word 0x80000030 -.word 0x1e0949c -.word 0x80000030 -.word 0x1ee6bac -.word 0x48005000 -.word 0x1f6adac -.word 0x80000030 -.word 0x1f28cac ```
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


