Commit Graph

16 Commits

Author SHA1 Message Date
Tyler Wilding 6c719ae000 d/jx: Disassemble and compare VU programs, add reference tests, create a diff report (#4406)
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
```
2026-09-04 23:01:17 -04:00
Tyler Wilding 9c86c86c74 d/jx: More files (#4360)
Breaks the 300 file milestone, also includes the majority of mips2c
functions carried forward. Some functions need some fixes in the c++
code to mips2c properly, and a small handful of the mips2c functions
require manual patching -- all spots were marked with `TODO - fix` that
had to be commented out to get things compiling.
2026-09-04 09:27:06 -04:00
Tyler Wilding bfc4c18ada goalc: replicate tests for the majority of ARM64 non-simd cases (#4377)
- Adds `capstone` as a disassembling library that could eventually
replace Zydis (for now left that alone)
- Replicates all of the existing x86 tests to ARM64, fixed a bunch of
underlying issues along the way
- There are a very small handful of tests remaining that need to be
enabled / fixed
2026-08-16 15:34:37 -04:00
EvelynTSMG 7ac22e8449 Fix test crash on space in filepath (#2138)
Should be only one commit. I broke git if it shows more, whoops
2023-01-21 19:51:13 -05:00
water111 06ef52cd25 [decompiler] support for jak 2 (#1781)
* [decompiler] suppport jak 2

* cleanpu

* remove brief from gtest options

* fix test
2022-08-22 18:53:51 -04:00
Tyler Wilding 8651179aa3 tests: Cleanup decompiler test fixtures and try to improve the test output / add a readable report (#1724)
* tests: add a Jak2 `FormRegressionTest` fixture

* tests/ci: minimize test log output and produce a readable report

* improve naming of report due to underlying GitHub issue

* hopefully fix windows handling of this argument

* test...

* final test

* test linux coverage
2022-08-05 12:12:33 -04:00
Tyler Wilding 5f1ed7ab60 decomp: decompile *-obs files (#856)
* decomp: mostly finish `cam-master`

* decomp/scripts: lots of work in cam-states

* stash

* Merge remote-tracking branch 'water111/master' into decomp/camera-master

Updated submodule third-party/googletest

* decompiler: Add support for non power of 2 offsets for inline arr access

* decomp: mostly finish `cam-states` need to fix a macro issue

* blocked: `cam-master` decompiler crash when adding casts

* decomp: finish `cam-states-dbg`

* decomp: mostly finish `pov-camera` with the exception of joint-related code

* decomp: `cam-debug` finished decompiling, no way does this compile yet though

* decomp: considerable work done in `cam-layout`

* decomp: `cam-layout` almost done!

* decomp: `pov-camera` finished, TC tests will fail for now

* decomp: working on resolving issues

* decomp: cam-layout decompiling

* fixing more issues in cam-master...one event handler remains

* skip problematic function in `cam-master` for now

* gsrc: update res macros

* decomp: finish `cam-states`

* decomp: giving up on `cam-debug`

* tests: allow skipping state handlers in ref tests

* decomp: working through cam-layout bugs

* decomp: allow for shifting non-integers

* decomp: finalize `cam-layout` and `cam-master`

* decomp: finalize `cam-states`

* cleanup: bi-annual formatting of the casting files

* formatting

* decomp: start working on beach-obs

* blocked: `beach-obs` mostly finished, but handle cast issues and unknown `prebind` func signature

* blocked: `villagep-obs` done, `s6` not being referred to as `self`

* decomp: finish `citadel-obs`

* decomp: finish `darkcave-obs`

* blocked: need to allow `hud-h` to decompile properly (#f as static pointer)

* decomp: finish `jungle-obs`

* decomp: finish `village-obs`

* blocked: `misty-obs` handle cast issues

* decomp: finish `village2-obs`

* decomp: 1 function left in `swamp-obs`, particle related -- maybe we know now?

* decomp: finish `swamp-obs`

* blocked: `maincave-obs` handle casts

* decomp: finish `sunken-obs`

* blocked: `rolling-obs` handle casts and hud-parts

* decomp: finish `firecanyon-obs`

* decomp: finish `ogre-obs`

* blocked: `village3-obs` gives up type analysis!

* blocked: `snow-obs` has hud-parts and handle casts code

* decomp: finish `snow-flutflut-obs`

* blocked: `lavatube-obs` has s6-1 issue

* blocked: `title-obs` handle cast issues

* fixed post merge problems

* decomp: finish `jungleb-obs`

* blocked: `training-obs` has `s6-1` issue

* fix type consistency

* scripts: Extend update script to handle the game-text-id enum as well

* git: Update git attributes to effectively halve PR burden

* fixed `sound-play-by-name` signature

* fix particle definitions in firecanyon-obs

* fix func signature in racer-states

* update ref tests

* tests: update current ref tests

* tests: add `joint` to ref-tests

* tests: add `process-drawable` to ref-tests

* updated gsrc

* add back manual fix

* address most feedback, update source files

* get rid of forward declarations in `darkcave-obs`

Co-authored-by: ManDude <7569514+ManDude@users.noreply.github.com>
2021-11-05 21:29:32 -04:00
bb010g 2436a8a541 Nixpkgs support (#228)
* Use env shebangs

* CMake cleanup, install() invocations, & CTest

`ctest` & the `test` target work now

* Nixpkgs support
2021-02-03 21:29:46 -05:00
water111 de5aa7e5e4 Move duplicated utilities to the common util folder and remove NEXT_DIR (#29)
* move things to the common library and remove next_dir

* fix for windows

* one last windows fix

* last fix for real this time

* debug listener test

* fix listener threading bug
2020-09-10 20:03:31 -04:00
water c9e99b8ebe add a separate cmake configuration for code coverage builds 2020-09-08 19:15:38 -04:00
Tyler Wilding 570d64c6a3 Add coverage badge 2020-09-08 16:08:52 -04:00
Tyler Wilding 8f1ddca825 Add Coveralls.io 2020-09-08 15:47:25 -04:00
Tyler Wilding 39eb3a90ea Fix for cmake 2020-09-03 22:42:04 -04:00
water 7b6807ad6a type system builtin types 2020-08-27 20:53:11 -04:00
Tyler Wilding 50814f8529 Add Github Actions and cleanup most test spam 2020-08-26 01:19:54 -04:00
water acf086a3d2 check in existing work 2020-08-22 22:30:12 -04:00