Commit Graph

99 Commits

Author SHA1 Message Date
Tyler Wilding c3cc91c9ba jak2/3: update enemy method name related to playing sound effects (#4176)
Was investigating https://github.com/open-goal/jak-project/issues/3012
and found out it's no longer an issue, fixed at some point.

Updated the method name, it actually looks like quite a few methods were
nicely named / documented in jak 3, so i might automate backporting that
documentation (likely a bunch that can go all the way back to jak 1 as
well).

Closes #3012
2026-04-05 01:14:14 -04:00
Tyler Wilding 64bcd8c030 goalc: Get CodeTester tests passing on Arm64 (only targetting macOS atm) (#3290)
This PR does the following:
- Designs a mechanism by which arm64 instructions can be encoded and
emitted
- Dispatch our higher-level instruction emitting calls to either x86 or
arm64 instructions depending on what the compiler is set to (defaults to
x86)
- Bare minimum scaffolding to get the arm64 instructions successfully
executing atleast on apple silicon
- Implement enough instructions to get the codetester test suite passing
on arm
2026-03-30 20:20:47 -04:00
Tyler Wilding cbe21e3b4b docs: README pass, add alternative editor documentation (Zed) (#4137)
I'm switching away from visual studio (because its broken) so figured
I'd document / commit the minimum to get a working environment with the
editor I chose (Zed).

Also cleaned up the main README so it's not so verbose, link out to
secondary pages, etc.

I also deleted the Arch and Fedora dockerfiles, they were broken. The
ubuntu one still works, so i left it.
2026-03-22 13:17:56 -04:00
Tyler Wilding d3cc739e43 jakx: Commit existing work from other PRs (#4112)
This attempts to get into master whatever work was done in this PR /
it's earlier PR https://github.com/open-goal/jak-project/pull/3965

I don't want this work to be lost / floating around in massive PRs.

However the changes are:
- switch to ntsc_v1 instead of PAL as the development target, as we have
done for all other games
- remove most of the copied-from-jak2/3 changes as they need to be
confirmed during the decompilation process not just assumed
- avoids committing any changes to `game/kernel/common` as it was not
clear to me if these were changes made in jak x's kernel that were not
properly broken out into it's own functions. We don't want to
accidentally introduce bugs into jak1-3's kernel code.
- in other words, if the change in the kernel only happens in jak x...it
should likely be specific to jak x's kernel, not common.

---------

Co-authored-by: VodBox <dillon@vodbox.io>
Co-authored-by: yodah <greenboyyodah@gmail.com>
2025-12-31 21:08:44 -05:00
Tyler Wilding 9e8470e398 New Crowdin updates (#4027) 2025-09-26 20:36:15 -04:00
Matt Dallmeyer 61ad9f08cd Extract levels+collision to decompiler_out (adjacent to textures+audio) (#3882)
should make it nice and easy to jump to the `decompiler_out/<game>`
folder in the launcher and show the user all their exported things.

![image](https://github.com/user-attachments/assets/15ff9d0b-2c83-4f1a-a013-6ab3835e974b)

also adds a taskfile command for ripping audio.

and fixes jak1 collision extract scaling. I [previously fixed this for
jak2/3](https://github.com/open-goal/jak-project/pull/3292#discussion_r1442595308)
but never fixed for jak1 apparently

before:

![image](https://github.com/user-attachments/assets/ce3e3c59-e3d7-4fc2-b83b-c938fdb3bb02)

after:

![image](https://github.com/user-attachments/assets/bcc65ffb-b5ff-484e-8f60-d1913e239294)
2025-03-24 14:26:58 +01:00
Tyler Wilding 9759841e3b New Crowdin updates - February 2024 (#3857) 2025-02-28 19:31:50 -05:00
Brendan Shanks 3f7aca3c72 Taskfile: Call 'python3' on non-Windows platforms (#3752) 2024-11-25 13:40:56 -05:00
Tyler Wilding f8058f2138 Support Apple Silicon via Rosetta2 on MacOS Sequoia and Above (#3754) 2024-11-10 11:06:56 -05:00
Tyler Wilding e76a4399e5 game: Update game's GPU test to output the GPU vendor info (#3717)
This is so I can get rid of wgpu from the launcher, where it's only
purpose is to figure out the GPU name for the support package.

The problem with it is that on some environments, it errors, but the
function cannot have it's errors gracefully handled (it panics and
crashes instead).

So I'm tired of it, do it ourselves.


![image](https://github.com/user-attachments/assets/fa8ae365-b3f7-4794-81ed-fde0c2ffc651)
2024-10-19 15:56:43 -04:00
Tyler Wilding ccd47f8465 formatter: Format deftype correctly (#3391)
New configuration options to format column widths in deftype field
definitions. Also force each field/method/state to be inlined.
2024-02-27 20:12:44 -05:00
Tyler Wilding 5eeaffcde0 scripts: new linter script to detect goal_src files with trailing whitespace (#3387)
Removes trailing whitespace from goal_src files, eventually the
formatter will do this as well but it's not ready yet so this is a
decent interim solution.

A competent text editor will also do this / flag it for you.
2024-02-24 14:27:56 -05:00
Tyler Wilding 18903f0561 decomp: Copy over new docstrings back to jak 2's common code, write some scripts to help automate this (#3366) 2024-02-04 13:53:06 -05:00
Matt Dallmeyer 1979f94e45 Rip collision based on config flag (#3348)
Added a new `rip_collision` flag to the decompiler config and wired it
up. Cleaned up the comments around these fields in the JSON too for
clarity

Also refactored a bunch of the related extract functions to read from
`config` object rather than pass down a bunch of booleans
2024-01-29 22:15:42 +01:00
Tyler Wilding 4101d5d80e tests: add jak3 typeconsistency test and ensure offline tests are working (#3310) 2024-01-16 00:15:33 -05:00
jabermony 07427799a6 Jak3 Build Environment (#3098)
This sets out the bones of a Jak 3 build, many things are stubbed out,
guessed, or copied from Jak 2 but it should at least be good enough to:
run `task set-game-jak3`
launch the repl
run builds from the repl

build outputs themselves are untested but the build itself runs without
errors

---------

Co-authored-by: Tyler Wilding <xtvaser@gmail.com>
2024-01-15 20:37:16 -05:00
Hat Kid 6285c61662 decompiler: fix for v5 art group info dump, update taskfile for jak 3 (#3077) 2023-10-11 10:17:46 +02:00
Tyler Wilding 25e7c9bc5d New Crowdin updates (#2775) 2023-06-25 16:17:18 -04:00
Tyler Wilding a8a5f1e745 formatter: support comments better (including block comments) and constant pair formatting (#2745) 2023-06-18 17:19:35 -04:00
Tyler Wilding 0ffb912a04 formatter: add tree-sitter dependency and commit early draft work on a proper code formatter (#2536) 2023-04-24 23:46:55 -04:00
Tyler Wilding 83f43b7153 scripts: support new jak 2 decompiler config versions via task (#2543) 2023-04-24 20:14:59 -04:00
ManDude 59e0c5e264 decomp bigmap (#2460)
Probably the last major missing file.

The bigmap fetches the correct level and map info, but doesn't actually
render anything right now.


![image](https://user-images.githubusercontent.com/7569514/230701921-e3fde09e-9faa-4725-b7e6-5a02a77346bd.png)

![image](https://user-images.githubusercontent.com/7569514/230701928-fbe0847b-b79a-4275-83ec-b9c1d847d17d.png)
2023-04-08 20:30:27 +01:00
Tyler Wilding 630388229e cleanup gk CLI and fix issue that caused revert (#2310)
My mistake -- testing focused too much on preserving the existing
behaviour I clearly forgot to make sure the new stuff worked properly.

Just had to early out and not modify the args if they were in the new
format.
2023-03-09 23:13:01 -05:00
water111 15bf281377 Revert "game: cleanup gk's CLI documentation" (#2306)
Reverts open-goal/jak-project#2189

can't figure out how to use the new options yet
2023-03-09 20:24:43 -05:00
Tyler Wilding 2f6bfd2e64 game: cleanup gk's CLI documentation (#2189)
An attempt to cleanup the last CLI interface we have left to cleanup. 
- `gk` args now follow the typical convention ie. `--proj-path` instead
of `-proj-path`.
- args that are passed through to the rest of the application / the
game's runtime use the typical convention of following a `--`
- I'm thinking some args shouldn't be handled at this level ie
(`-nodisplay`, `-vm`, `-novm` or `-jak2`) These could be better
documented as legitimate flags and passed in via a nice struct. They
don't seem to be used in `InitParams` but I'll triple check.

There's a temporary shim here so there is no coupled release with the
launcher (right now it executes `gk` with a few args). So I just change
the old args into the new format. After one release cycle, I can change
it in the launcher and delete it here.

I am unsure if this will break the bash shellscript usages -- not sure
which args were usually passed into `$@`


![image](https://user-images.githubusercontent.com/13153231/222035309-b6601719-cdc9-40ee-b36e-e4b135d3f128.png)
2023-03-09 20:02:25 -05:00
Tyler Wilding 6d99f1bfc1 d/config: re-organize decompiler/config and eliminate most of the duplication (#2185)
Reasons for doing so include:
1. This should stop the confusion around editing the wrong config file's
flags -- when for example, extracting a level. Common settings can be in
one central place, with bespoke overrides being provided for each
version
2. Less verbose way of supporting multiple game versions. You don't have
to duplicate the entire `type_casts` file for example, just add or
override the json objects required.
3. Makes the folder structure consistent, Jak 1's `all-types` is now in
a `jak1` folder, etc.
2023-03-08 20:07:26 -05:00
Matt Dallmeyer 2645fed47a Jak 1 Checkpoint Select / IL Speedrun support (#2162) 2023-01-30 19:11:57 -05:00
Tyler Wilding e0d31a33bd d/jak2 - initial crimson-guard-level decomp and also the dig missions (#2092)
Finishes a bunch of files related to crimson guards / early missions:
- `crimson-guard-level`
- `dig-digger`
- `fordumpa-obs`
- `fort-robotank`
- `fort-robotank-turret`
- `fort-turret`
- `transport-level`
- `fordumpb-obs`
- `fort-floor-spike`
- `fordumpc-obs`
2023-01-11 19:07:35 -05:00
Tyler Wilding 00ac12094e goalc/repl: cleanup of goalc/REPL code and some QoL improvements (#2104)
- lets you split up your `startup.gc` file into two sections
  - one that runs on initial startup / reloads
  - the other that runs when you listen to a target
- allows for customization of the keybinds added a month or so ago
- removes a useless flag (--startup-cmd) and marks others for
deprecation.
- added another help prompt that lists all the keybinds and what they do

Co-authored-by: water <awaterford111445@gmail.com>
2023-01-07 11:24:02 -05:00
Tyler Wilding c24cdca380 offline-tests: fail on comparison in offline-tests (#2095)
Two main problems fixed here:
- offline tests will fail on a comparison failure (a mistake from the
re-write)
- art-group-info is committed to the repo and shared with every thread
(running the tests with 1 thread, for example on the CI, and locally
were producing different results)

art files are still not provided to the jak2 offline tests:
- `*-ag` files are not being output
- `art-elts.gc` is not complete, as a handful of files claim to be
missing stuff

lastly, in jak1's offline tests we were also running `tpage` and `*-vis`
files through the decompiler. This omits that (they came from the
`all_objs.json` file) -- is this an issue?
2023-01-04 18:26:59 -05:00
Tyler Wilding 8f4dfa27dd scripts: adjust scripts to ensure better decompiling consistency (#2093) 2023-01-04 18:21:27 -05:00
Tyler Wilding 2eca614870 d/jak2: finish remaining *-h files that aren't in progress or spoken for (#2059)
This finishes off all the remaining "header" files that someone isn't
already working on.
2022-12-30 12:09:04 -05:00
Tyler Wilding 1b2db09f51 d/jak2: pass through all simple / non-blocked *-part, *-ocean and *-scenes files (#2048)
A big one...

I figure even if we would like to change the way the particle/scene code
is output -- it'd be easier to find patterns with it all decompiled.

I've updated my script so it can easily be used to mass update these
files:
```bash
task update-gsrc-glob GLOB="**/*-part*.gc"
```
> for example will update gsrc files with `part` in their name -- if
they are in ref tests (so uncompleted ones aren't touched)

I found a few issues along the way that I'll have to make issues for
soon.
2022-12-22 13:57:57 -05:00
Tyler Wilding 9c631e11fe offline-test: Partition by DGO and colorize/condense output (#2045)
This solves two main problems:
- the looming threat of running out of memory since every thread would
consume duplicate (and probably not needed) resources
- though I will point out, jak 2's offline tests seem to hardly use any
memory even with 400+ files, duplicated across many threads. Where as
jak 1 does indeed use tons more memory. So I think there is something
going on besides just the source files
- condense the output so it's much easier to see what is happening / how
close the test is to completing.
- one annoying thing about the multiple thread change was errors were
typically buried far in the middle of the output, this fixes that
- refactors the offline test code in general to be a lot more modular

The pretty printing is not enabled by default, run with `-p` or
`--pretty-print` if you want to use it


https://user-images.githubusercontent.com/13153231/205513212-a65c20d4-ce36-44f6-826a-cd475505dbf9.mp4
2022-12-22 13:41:33 -05:00
Tyler Wilding a0a85eb60a repl: Add a few new quality of life improvements (#2030)
- You can define a `startup.gc` in your user folder, each line will be
executed on startup (deprecates the usefulness of some cli flags)
- You can define a `repl-config.json` file to override REPL settings.
Long-term this is a better approach than a bunch of CLI flags as well
- Via this, you can override the amount of time the repl will attempt to
listen for the target
- At the same time, I think i may have found why on Windows it can
sometimes take forever to timeout when the game dies, will dig into this
later
- Added some keybinds for common operations, shown here


https://user-images.githubusercontent.com/13153231/202890278-1ff2bb06-dddf-4bde-9178-aa0883799167.mp4
> builds the game, connects to it, attaches a debugger and continues,
launches it, gets the backtrace, stops the target -- all with only
keybinds.

If you want these keybinds to work inside VSCode's integrated terminal,
you need to add the following to your settings file
```json
"terminal.integrated.commandsToSkipShell": [
    "-workbench.action.quickOpen",
    "-workbench.action.quickOpenView"
  ]
```
2022-11-20 14:28:41 -05:00
Tyler Wilding 50076537b7 d/jak2: finish sidekick, target-carry and battle. Close to finishing target-death and warp-gate (#1990) 2022-10-29 18:27:31 -04:00
Tyler Wilding d13155bfd0 d/jak2: Decompile palace-ocean, ctysluma-part, nav-enemy-h and a bunch of work on enemy and nav-mesh related files (#1984)
Couldn't finish any of the enemy/nav-enemy related files for one reason
or another, but quite a bit of work that will be easier to merge and
iterate on instead of keeping track of the branch.

enemy/idle-control has some very weird focus related code.

nav-mesh/nav-control still has a bunch of CFG resolution problems that
need to be manually resolved.

Co-authored-by: water <awaterford111445@gmail.com>
2022-10-29 16:28:52 -04:00
ChillyPepper b9924e5501 Adding notes for building non black label versions (#1995) 2022-10-29 15:25:03 -04:00
Tyler Wilding 84497712ff d/jak2: finish task-arrow | carry-h | projectile | gun-[red|yellow|blue]-shot (#1864) 2022-10-29 15:22:57 -04:00
Tyler Wilding 41c3423767 d/jak2: finish viewer, texture-finish, process-taskable, main-collide, prototype and los-control (#1975) 2022-10-22 13:26:28 -04:00
Tyler Wilding d402ad8918 tests: parallelize offline-test execution (#1974)
The offline-tests are going to end up taking too long for jak 2, I did
some rough math and by the end of it we'll be spending almost 2 minutes
for a full offline test on my machine.

These changes allow us to throw hardware at the problem

Still some work to do to make the output nicer, but seems to be fairly
reliable. By default it still uses 1 thread, use `num_threads` to change
this.
2022-10-16 17:20:44 -04:00
Tyler Wilding f6bdc07990 d/jak2: finish progress menu code and initialize the camera (#1945)
This PR does a few main things:
- finish decompiling the progress related code
- implemented changes necessary to load the text files end-to-end
   - japanese/korean character encodings were not added
- finish more camera code, which is required to spawn the progress menu
/ init the default language settings needed for text
  - initialized the camera as well

Still havn't opened the menu as there are a lot of checks around
`*target*` which I havn't yet gone through and attempted to comment out.
2022-10-11 18:30:26 -04:00
Tyler Wilding 332f0b2f2b tools: add a tool to search for types based on size / type chain / fields (#1906)
Just a small simple tool that can search through `all-types` for a type
based on a bunch of criteria.

For example:

![image](https://user-images.githubusercontent.com/13153231/192043561-181e5c5d-d5b1-41a9-8891-5cc3ed1a0efa.png)

The results are printed to stdout, as well as output to a json file so
they can be consumed by another tool (in my plans, the VSCode extension)
2022-09-24 16:04:52 -04:00
Tyler Wilding d00ebe5397 tests: allow for a single file to be tested in the offline-tests at a time (#1907)
A small quality of life increase that is more impactful since jak 2 has
double the file count.

I often use the offline-tests to find compiler errors / automatically
resolve them when i am finalizing a file. As more and more files are
completed this becomes increasingly more inefficient. When I know that
only 1 file needs to be decompiled / compared / compiled, I'd prefer to
have a feature like this.
2022-09-24 13:04:52 -04:00
Tyler Wilding 8117ed3bc7 scripts: make update_decomp_ref.py respect the game we are operating on (#1880) 2022-09-13 20:03:00 -04:00
Tyler Wilding 017070525a d/jak2: finish vol | cam-layout | menu | default-menu and start working on nav code (#1867)
I also added font-color names since this PR adds quite a few:

![image](https://user-images.githubusercontent.com/13153231/189508209-c8849672-fac5-47cb-9652-f1d4648f0af8.png)
2022-09-11 13:42:46 -04:00
Tyler Wilding d264779173 d/jak2: finish glist | glist-h | camera | cam-interface | cam-states-dbg | cam-combiner | cam-debug | cam-start (#1829)
* d/jak2: finish `glist` and `glist-h` partially done `time-of-day`

* d/jak2: finish `camera` and `cam-interface`

* d/jak2: partially finish `cam-master` `cam-states`, and `cam-update` finish `cam-states-dbg` `cam-combiner` `cam-debug` and `cam-start`

* tests: update ref tests

* scripts: add scripts to automatically update gsrc files

* d/jak2: update gsrc
2022-08-31 19:22:47 -04:00
Tyler Wilding d176b294b9 d/jak2: finish entity-table | sky-data | relocate | and the majority of default-menu (#1812)
* d/jak2: finish `entity-table`

* d/jak2: finish `sky-data`

* d/jak2: finish `relocate`

* d/jak2: halfway through `default-menu`

* d/jak2: 75% done `default-menu`....

* d/jak2: add `default-menu` to ref tests (partially)

* d/jak2: finish updating related code

* scripts: add tooling to automatically keep code from `all-types` up to date

* d/jak2: fixed vector types
2022-08-29 18:49:57 -04:00
Tyler Wilding 01abde35d8 d/jak2: First few files, mood-tables and vol-h (#1796)
* decomp: format jak1 cast files

* decomp: finish `mood-tables` and `mood-tables2`

* jak2: stop disasm'ing

* jak2: format jak2 cast files, start working on the rest of the `mood` files

* scripts: fix running pcsx2 watcher

* d/jak2: finish `vol-h`

* d/jak2: address feedback
2022-08-24 19:34:09 -04:00
Tyler Wilding 4164a755b1 game: fix transition from fullscreen (not borderless) to windowed (#1786)
* scripts: remove references to non-existent script

* game: fix transition from fullscreen (not borderless) to windowed

* game: ensure window is position away from the corner of the display when switching from fullscreen
2022-08-22 18:56:11 -04:00