Commit graph

240 commits

Author SHA1 Message Date
water111 a0d2bce27b
Minor bug fixes (#2128)
- make sure bsp is processed on `l` levels in extraction (caused missing
remaps)
- clean up a few prints in extraction
- handle the <15 byte differences in art group files automatically (no
more errors about file naming)
- fix potential exception thrown by merc2 in a few ways: fixed bad data
in FR3's, check texture index just in case, and handle exceptions a
little bit better (still a crash, but at least you get a print)
- fix mips2 ocean stuff causing ocean far crashes
2023-01-14 16:26:17 -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
Hat Kid bdee98323d
decomp: add a bunch of enemy files (#2101)
Adds the following files:

- `amphibian`
- `centurion`
- `ginsu`
- `grenadier`
- `hopper`
- `metalmonk`
- `monster-frog`
- `predator-graph`
- `predator-h`
- `predator`
- `rapid-gunner`
- `rhino`
- `rhino-wall`
- `tomb-baby-spider`

Also adds the DGOs for the following levels:

- Mar's Tomb
- Mountain Temple
- Drill Platform
- Sacred Site (Sage Hut)

Manual patches:

- The decompiler emits `(b! #t cfg-17)` in `(trans hostile hopper)`
without putting a `(label cfg-17)` anywhere
- Added cast to `art-joint-anim` in `(code broken rhino-wall)` and
`(code hit rhino-wall)`

Other notes:

- `amphibian` seems to occasionally crash when using its tongue attack.
Haven't investigated this yet
- `ginsu` crashes after being killed somewhere in the `deactivate`
method, possibly because of its `part-spawner`
- Predators aren't spawning in the forest hunt mission, not sure if
`forest-obs` might be needed for that or if it's something else
- The `rhino-wall` STR animation seems to load (albeit a bit broken due
to missing VAG stream playback), but causes the viewport to shrink as
soon as it's played
- I added `pegasus::74` to the `event_handler_hack` bool in
`variable_naming.cpp` because I got a `none` cast after changing the
return value of `enemy::74`
2023-01-07 17:14:12 -05:00
ManDude 15a8a9c8ef
add ja zero func (#2074)
fixes #2071
2023-01-02 18:23:33 +00:00
water111 0cddf6b6a5
W/nav debugging (#2077)
Co-authored-by: Tyler Wilding <xtvaser@gmail.com>
2023-01-01 12:11:18 -05:00
water111 f6c5504f6f
[decomp] fix up gun decomp (#2067)
I did some manual modifications in a few places to work around some
truly mysterious control flow, and some unsupported stack array stuff.

Also fixes a bug in decompiling static improper lists.

As far as I can tell, guns work, other than some graphical issues and
the crazy particle spawning issue, but I strongly suspect these are
problems with the sparticle/graphics side.
2022-12-30 14:07:32 -05:00
Tyler Wilding 6181c6c997
decomp: output mips2c method/function declarations to the _disasm.gc file (#2054)
When working with mips2c recently, I noticed adding the
`defmethod-mips2c` or `def-mips2c` code was a manual step. This is a bit
tedious to have to go and do yourself, but more importantly you have to
manually go and find the right spot in the source file else you might be
declaring it too early or too late.

This will automatically output the declaration for methods, and a
half-finished comment for the functions. I wasn't able to fully output
the function one because it seems the signature info from `all-types`
doesn't make it all the way through -- but maybe I'm wrong or this is an
easy fix?
2022-12-30 12:03:06 -05:00
water111 7a1a64acba
target code bugfixes (#2034) 2022-11-21 20:25:20 -05:00
water111 e0ebc5a68e
[decomp] target-handler (#2027) 2022-11-20 09:21:25 -05:00
water111 029983270e
[decomp] target cleanup (#2021)
everything up to collide-reaction-target (which is mostly done, but
could use a few more names)

Fixes issues with gun-part and target-part
2022-11-13 19:09:34 -05:00
water111 f39b993f79
[decommp] generic-obs (#2013) 2022-11-12 17:56:07 -05:00
water111 b2b47eec5c
[decomp] spatial-hash (#2009) 2022-11-11 16:23:26 -05:00
water111 811b5de6cb
[decomp] collide-mesh (#1999) 2022-10-30 15:54:10 -04:00
water111 8ae4829f48
[decomp] collide-hash, collide-frag, collide-probe (#1998)
The only interesting one is `collide-hash`, which is untested.
The other two are very likely unused. I skipped the annoying code in
`collide-probe` because it's not used and the same as jak 1.
2022-10-29 20:32:03 -04:00
ManDude b0e8cba6f1
[decomp2] game-save (#1988)
memory card code was not done!
2022-10-29 16:08:04 -04:00
water111 ddd60fca48
[decompiler] handle pointer to symbol value, clean up prints on offline test (#1978)
- fix issue described in
https://github.com/open-goal/jak-project/issues/1939
- fix `text`, which was manually patched with the wrong offset (was
reading the symbol value off by one byte)
- clean up some random useless prints
- make the offline tests keep trying if there's a comparison error,
clean up the output a bit so the diffs are all at the end.
2022-10-16 18:19:59 -04:00
water111 e443676889
[decomp] sky-tng (#1972)
https://www.youtube.com/watch?v=fkAMvEYXOGc
2022-10-15 18:21:17 -04:00
Hat Kid da5aef8d60
decomp: finish target-[util|darkjak|swim|gun] | water | water-anim | crates | dark-eco-pool, fix skelgroup detection, add failed store/load warnings and clean up jak 3 config (#1958)
Almost done:
- `target-handler` (`(none)` event handler casts and CFG error)
- `target2` (`(none)` event handler casts)
- `powerups` (`cloud-track` does some weird stuff with `handle`s)
- `gun-states` (CFG error)

Some progress in:
- `water-flow`

Additionally:

- Clean up the two year old Jak 3 config file and add a config skeleton
(disassembling seems to not have worked, but I was able to dump obj
files and the `all_scripts` file)
- Fix automatic skelgroup detection and `defskelgroup` macro for Jak 2
(closes #1950)
- When a function decompiles without any major errors, a warning is
generated with the op id for each unresolved load and store that will
likely fail to compile (closes #1933)
2022-10-14 19:35:57 -04:00
water111 9a04c7e311
[decomp] sparticle, sparticle-launcher, set up sprite (#1949)
- fix crash with unhandled sparticle definition (happens with the weird
array int32s that I don't understand yet)
- update mips2c stuff
- add part-tester
- fix some issues around texture uploads
 

![image](https://user-images.githubusercontent.com/48171810/194784675-54e3dc58-7846-450d-a1e9-cefd841dda94.png)
2022-10-09 19:56:07 -04:00
ManDude af5009a29e
[decomp] make defpart and defpartgroup work in jak 2 (#1947) 2022-10-09 12:53:44 -04:00
water111 405a144815
[decomp] finish up debug.gc, get boundary rendering working (#1944)
![image](https://user-images.githubusercontent.com/48171810/194726152-74167185-0297-4982-8ed9-42936ad80fe7.png)
2022-10-08 17:02:40 -04:00
Tyler Wilding be1e40a041
d/jak2: decompile conveyor | elevator | plat | bouncer | basebutton | base-plat | most of sampler | simple-nav-sphere | simple-focus | elec-gate and blocking-plane (#1942)
Most of these have been atleast partially documented / named / cleaned
up as well.

Co-authored-by: water <awaterford111445@gmail.com>
2022-10-08 12:42:52 -04:00
water111 d52739226c
[decomp] decompile decomp.gc (#1936)
A few issues:
- lwidea's fr3 is getting loaded and unloaded all the time
- the debug line drawing clipping is wrong (doesn't seem wrong in pcsx2,
so I think this is on us)
- nothing actually using vis data yet
- at a large distance, our view frustum culling seems slightly too
aggressive (might be that viewport scissoring is wrong)
- in the city, things seem darker as you move away. unclear how this is
happening (fog?)
2022-10-01 13:39:56 -04:00
Tyler Wilding 4d751af38e
logs: replace every fmt::print with a lg call instead (#1368)
Favors the `lg` namespace over `fmt` directly, as this will output the
logs to a file / has log levels.

I also made assertion errors go to a file, this unfortunately means
importing `lg` and hence `fmt` which was attempted to be avoided before.
But I'm not sure how else to do this aspect without re-inventing the
file logging.

We have a lot of commented out prints as well that we should probably
cleanup at some point / switch them to trace level and default to `info`
level.

I noticed the pattern of disabling debug logs behind some boolean,
something to consider cleaning up in the future -- if our logs were more
structured (knowing where they are coming from) then a lot this
boilerplate could be eliminated.

Closes #1358
2022-10-01 11:58:36 -04:00
water111 e3a4627eeb
[decompiler] recognize jak 2 vector-float*!, fix some vector inline casting bugs (#1926) 2022-09-26 20:57:44 -04:00
water111 a22d49ab11
[decompiler] fix rare bug with casts (#1920) 2022-09-26 18:14:54 -04:00
Hat Kid a53c06fe2b
decomp: target, target-board, board-states (#1915)
Just missing `target-board-handler` because it errored with `Bad delay
slot in clean_up_cond_no_else_final` and I wasn't able to figure out
where the asm branch was.

Commented out `target-board-clone-anim` because it crashes even after
adding `clone-anim` and `clone-anim-once`.
2022-09-25 12:07:37 -04:00
water111 903450b878
[decompiler] recognize mfc nop (#1911)
Forgot to include in previous PR.
2022-09-24 14:56:22 -04:00
water111 6a1bde4168
[decomp] fix up debug menu rendering, add a few others (#1892)
![image](https://user-images.githubusercontent.com/48171810/190832869-e609d346-9c4a-43fb-ad94-2a9690521adc.png)
actor vis boxes for PRI.DGO
2022-09-16 20:42:33 -04:00
Tyler Wilding 4620f96574
d/jak2: mostly finish mysql-nav-graph and fix docstring handling around with-pp/local-vars (#1869) 2022-09-13 18:15:02 -04:00
ManDude cfb6abb24d
[decompiler] rewrite set lets as just sets (#1858)
Rewrites specific kinds of lets where the return value of the `set!`
itself is meant to be used to just be `set!`s. Implemented at the let
rewrite level. Seems to work for Jak 2 so far.

Fixes #1854 .
2022-09-07 18:28:01 -04:00
water111 b5d21be9c5
W/misc fixes (#1838)
* temp

* temp

* before cleaning up

* cleanup merge

* fix warnings

* merge fix

* clang format
2022-09-05 20:29:12 -04:00
ManDude f1f18e7e05
[decomp2] joint-mod, chain-physics, loader (#1816)
* prep

* Update repo-settings-mark.bat

* Update repo-settings-unmark.bat

* decomp `joint-mod`

* add `joint-mod-ik-callback` to ref exceptions

* `chain-physics`

* Update jak2_ntsc_v1.jsonc

* update bat scripts

* `loader`

* pretty

* refs

* support `process->handle` (and `ppointer->handle`?)

* refs

* source and fixes

* fix `ja` detect

* `ja` macro implement

* fix a method

* update source

* merge fixes

* annoying fixes

* format

* arg

* hack

* fix test
2022-09-02 18:13:38 -04:00
water111 f8007cc84b
[decomp] Jak 2 mips2c, collide-func (#1805) 2022-08-26 18:03:48 -04:00
Tyler Wilding 090b2984a2
decomp: add docstring support to relevant places in all-types (#1753)
* decomp: add `docstring` support to relevant places in `all-types`

* decomp: output method docstring into the `defmethod` instead

* goalc: handle docstrings in `define[-extern]` (gracefully ignore for now)

* decomp: output docstrings for bitfield deftypes too

* goalc: fix `defenum` parsing when coming from the compiler (no symbol metadata to store to)

* lsp/tests: fix ups

* lint: formatting

* goalc: handle edge-case of defining a string constant

* cleanup leftovers, fix codacy issues, rename struct
2022-08-23 00:32:07 -04: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
water111 666a19dd96
[decompiler] handle types without inspects better in all-types (#1735)
* [decompiler] handle types without inspects better in all-types

* move a few types I missed
2022-08-06 12:17:24 -04:00
Tyler Wilding b3e77c673f
decomp/lsp: Differentiate warnings from likely/definite errors (#1725)
* decomp: differentiate potential false positive warnings from likely/certain failures

* lsp: handle IR2 errors

* decomp: downgrade an expr building warning as often expressions build fine

* tests: update reference tests since comments aren't ignored

* decomp: simplify warnings interface

* tests: update ref tests
2022-08-06 11:52:36 -04:00
Tyler Wilding a66ec7c601
all-types: Improve Jak 2's all-types (#1728)
* all-types: improve all-types generation

* all-types: re-generate all-types

* tests: remove the test reporting feature

the format indeed doesn't work, and all current actions require too many permissions for forked PRs.

I'll make my own eventually that works properly (use the new markdown feature)

* all-types: put the states in the method table instead

* all-types: replace all `*time*...uint64` fields with `time-frame` type

* all-types: address feedback
2022-08-05 17:39:32 -04:00
water111 da4ec008c3
Add a gltf level exporter (#1719)
* Add a gltf level exporter

* more fixes

* disable by default

* compile fixes for windows

* improve collide packer

* bug fix

* clang format

* fix texture bug
2022-08-05 12:25:35 -04:00
water111 dc652d10c5
[jak2] decomp gkernel, setup offline tests (#1638)
* add comments

* oops

* format'

* spelling is hard
2022-07-12 18:50:18 -04:00
water111 822dc73970
[decompiler] jak2-style rtype-of, setup gcommon stuff (#1616)
* [decompiler] support jak2-style rtype-of, get gcommon decompiling to use for tests

* more decompiler debugging
2022-07-05 20:39:24 -04:00
water111 dd41640448
[decompiler] missing features in inspect method detection (#1613)
missing features in inspect method detection
2022-07-05 15:30:42 -04:00
water111 e630b50690
[ckernel] split by game version (#1559)
* temp

* split up kprint, other than format

* start kmachine

* split kmachine

* split kscheme

* split klink

* split klisten

* split remaining

* jak2 ckernel gets to nokernel loop
2022-06-26 18:17:11 -04:00
water111 91fa0122d8
[decompiler] Jak 2 modifications, new all-types code (#1553)
* temp

* look at old game types

* clean up
2022-06-25 21:26:15 -04:00
ManDude df991470f7
cleanup settings stuff (#1444)
* rename `setting-control` methods

* macros around settings stuff

* fix some `process-spawn`s

* update source 1

* update remaining stuff + fix silly bug

* clang

* AGH
2022-06-12 12:23:08 -04:00
water111 7bf19759d3
fix goalc crash and clang warnings (#1441) 2022-06-11 16:52:27 -04:00
ManDude 7ce58f709f
process-spawn + pretty printer improvements (#1428)
* some jp support to fix some errors in the original game

* music fade toggle

* recognize `process-new` macros!!

* strip casts in this macro

* rename macro

* fix cast typecheck

* update source 1

* detect kernel stack case

* less boilerplate

* `manipy-spawn` special case

* pretty printer improvements

* revert dumb thing from earlier

* use shell detection on `send-event`

* fix some events

* remove unused argument

* detect `static-attack-info` and add `CondNoElse` to shell detect

* better `attack-info` detect

* support `process-spawn` in multi-lets

* detect `rand-float-gen` pt 1

* detect as return value

* detect in `countdown` and  `dotimes`

* oops this wasnt working

* fancier `send-event`s

* clang

* update source!!

* fix tests

* fine jeez

* uh okay

* fix some accidental regressions

* fix more regressions

* regression fixes

* fix big bug...

* extra safety!
2022-06-10 02:18:08 +01:00
water111 ecb2781a89
[decompiler] cleanup to get atomic ops working on jak2 inputs (#1426)
* [decompiler] cleanup to get atomic ops working on jak2 inputs

* clang format
2022-06-08 18:34:52 -04:00
water111 148f52876a
[decomp] add import statements for art groups (#1372)
* new code

* update goal_src and remove all_imports

* update reference

* add decompiler list of imports

* deduplicate and move below decomp begins
2022-05-23 18:53:02 -04:00
ManDude 0212aa10c9
[decomp] better handling of animation code and art files (#1352)
* update refs

* [decompiler] read and process art groups

* finish decompiler art group selection & detect in `ja-group?`

* make art stuff work on offline tests!

* [decompiler] detect `ja-group!` (primitive)

* corrections.

* more

* use new feature on skel groups!

* find `loop!` as well

* fully fledged `ja` macro & decomp + `loop` detect

* fancy fixed point printing!

* update source

* `:num! max` (i knew i should've done this)

* Update jak1_ntsc_black_label.jsonc

* hi imports

* make compiling the game work

* fix `defskelgroup`

* clang

* update refs

* fix chan

* fix seek and finalboss

* fix tests

* delete unused function

* track let rewrite stats

* reorder `rewrite_let`

* Update .gitattributes

* fix bug with `:num! max`

* Update robotboss-part.gc

* Update goal-lib.gc

* document `ja`

* get rid of pc fixes thing

* use std::abs
2022-05-20 02:30:14 +01:00
ManDude 4d634cf50d
[decomp] add a bunch of flag enums (#1350)
* update refs

* first pass

* update refs 2

* update

* update

* update

* stuff and things

* accidentally wiped this

* fancy decomp for static sound specs

* clang

* 5 more refs
2022-05-02 18:35:17 -04:00
water111 a51536de8d
[graphics] tie generic (#1341)
* [gtie] tie inst and proto functions

* first chain input to generic ee looks good

* m

* works

* ugh

* add tie generic

* rm debug print

* rm generic ties from fr3
2022-04-29 23:44:53 -04:00
ManDude e4c2f81e3a
Smarter send-event detection and fix touching-list bugs (#1320) 2022-04-18 18:31:59 -04:00
ManDude 0cdeed9be7
minor windows fixes (#1311)
* [pp2] put `define` dest on a single line

* update source!

* Update type_analysis.cpp

* update old credits & racer code

* change clang-cl args (REALLY force avx)

* Update credits_REF.gc

* comment small unused code

* add timer to decompiler

* fix unnecessary copy-constructors (no speed increase)

* fixes

* Update expression_build.cpp

* wtf is this thing anyway

* im bored.

* clang

* fix!

* Revert "fix!"

This reverts commit 5b1ce6c718.

* Revert "clang"

This reverts commit 5e67d9ccd1.

* Revert "im bored."

This reverts commit 070e957ce8.

* Revert "Update expression_build.cpp"

This reverts commit b94d092fc5.

* Revert "fixes"

This reverts commit f3d871f60a.

* Revert "fix unnecessary copy-constructors (no speed increase)"

This reverts commit 9100725802.

* Keep the random inoffensive changes

* Revert "Update type_analysis.cpp"

This reverts commit d2456a5c75.

* Update type_analysis.cpp
2022-04-17 21:11:09 -04:00
Tyler Wilding c4a92571b2
Improve ASSERT macro, fix linux file paths in Taskfile and hopefully fix the windows release (#1295)
* ci: fix windows releases (hopefully)

* scripts: fix Taskfile file references for linux

* asserts: add `ASSERT_MSG` macro and ensure `stdout` is flushed before `abort`ing

* asserts: refactor all `assert(false);` with a preceeding message instances

* lint: format

* temp...

* fix compiler errors

* assert: allow for string literals in `ASSERT_MSG`

* lint: formatting

* revert temp change for testing
2022-04-12 18:48:27 -04:00
water111 b2ed9313bd
[graphics] First part of shrub extraction (#1258)
* decompile 90% of shrubbery

* some more progress

* some more

* big function decompiled

* went through `draw-prototype-inline-array-shrub` and made more notes

* shrub: start implementing extract_shrub

* read through current notes and add the info to current decomp

* decomp: allow skipping inline-asm from output

* add code to BspHeader to get GOAL types for shrubs

* add doc

* wip

* fix bad merge

Co-authored-by: Tyler Wilding <xtvaser@gmail.com>
Co-authored-by: Tyler Wilding <xTVaser@users.noreply.github.com>
2022-03-28 18:14:25 -04:00
water111 4a0ac6c155
[graphics] first half of shadow renderer (#1246)
* start on dma stuff

* temp

* temp

* add shadow cpu
2022-03-22 21:42:37 -04:00
water111 9c00b0c135
[graphics] generic merc (#1192)
* begin generic merc

* more generic stuff

* generic dma generation not crashing, at least until high-speed-reject

* c

* unpacker for generic

* starting to work

* small fixes

* more fixes

* more progress

* cleanup

* fix tests

* no custom imgui assert on windows
2022-02-24 22:33:10 -05:00
water111 78cde74d5a
update readme and fix always playing str (#1139)
* update readme deps

* replace assert

* bump timeout

* fix memory corruption in kernel

* use unknown if level name is invalid
2022-02-08 19:02:47 -05:00
water111 2342b6fb0f
[graphics] MERC (#1124)
* merc dma generation

* wip very early version of merc

* small fixes

* fix

* fix more merc bugs

* derp fixed min

* oops we did need something weird on max

* merc for everything

* program optimization 1

* more optimization

* windows

* windows 2

* clean up

* fix test

* BLERC
2022-02-03 22:45:41 -05:00
ManDude bd1718dc9c
A lot of fixes (game is 100%'able!) (#1118)
* a crapton of fixes

* Update cavecrystal-light.gc

* damn you

* fix bunnies

* change codegen for int -> float cast (just add sign extension now)

* fix test

* this file is tagged anyway

* fix some stack types

* remove bad camera debug funcs

* add more heap bars and entity pick menu

* finish entity menu and make `music-flava` enum

* fix some `process-taskable` fields

* citadel sage crash fix

* fix citadel drop plats

* fix tests

* fix some casts

* update refs

* finish `village3-obs` and `snow-ball`

* Update README.md

* fix sidekick too

* fix issue?

* more entity inspect hardcoded checks

* more

* use `*display-actor-anim*` for something!

* CRAP

* also clear actor anim when deselecting entity

* *display-actor-anim* already renders this!

* do not display `path` tag info

* entity debug inspect tool

* one more

* make debug string even larger

* missing res tag types

* more polish and more known tags

* last few
2022-01-31 20:44:54 -05:00
water111 57649d243f
[bones] Part 1: Joint (#1110)
* joints

* bones

* align spr to 16k

* fix bug

* lack of sound hack

* clean up
2022-01-28 21:32:03 -05:00
Tyler Wilding 142961a747
decomp: the majority of navigate and rolling-lightning-mole (#741)
* decomp: Add texture-upload to ref tests

* maybe 50% done?

* 5 functions to go!

* decomp: stuck in `navigate`

* work-around fp issue

* some cleanup and label casts

* working on supporting asm instructions -- this is currently WRONG

* support ASM operations

* fixes for asm op support

* decomp: finish the vast majority of `navigate`

* format

* update test though i think this suggests a regression!

* decomp: cleanup some more of navigate

* decomp: finish `rolling-lightning-mole`

* revert `r0` handling for `pcpyud` and `pextuw`

* update ref tests

* lint

* fix a failing test

* help

* navigate mostly works now, with some potential bugs

* remove my debugging logs

* update ref tests

* review feedback cleanup

* these are all likely fine

* can't get the crab to chase me anymore

* the crab is back
2022-01-18 01:14:47 -05:00
ManDude 27bb6c6384
[decompiler] decompile particle defs using specialized macros (#1077)
* [decompiler] `defpart` and `defpartgroup`

* support sounds in part defs natively

* make `meters_to_string`

* update refs

* clang

* make macros in pair only work inside `(unquote ...`

* update source

* update finish

* fix
2022-01-15 20:01:38 -05:00
water111 e84b5a2346
[collision] implement most of background collision, spawn target! (#1076)
* fill collide cache with bounding box working

* yprobe fully working for background at least

* target

* final cleanup, add a bit more foreground mesh stuff that is untested

* warnings, merge issues

* tests

* revert debug changes, format'

* rendering perf
2022-01-15 16:52:47 -05:00
water111 c3b6e7eb7e
some cleanup and docs on collide-touch and the tie extractor (#1074)
* some cleanup and docs on collide-touch and the tie extractor

* temp

* more updates

* update ref tests

* type fix

* rest of collide shape

* another set of updates
2022-01-12 10:47:17 -05:00
water111 f6f1cadb8e
collide probe works, amazingly (#1072)
* collide probe works, amazingly

* add ref test
2022-01-10 19:28:17 -05:00
water111 38c805ca7c
unused version of collide line sphere collide list (#1071) 2022-01-09 17:45:19 -05:00
Tyler Wilding a2e6413b76
goalc: reduce cleverness of outer product (#1059)
* goalc: reduce cleverness of outer product

* decomp: update existing outer product usages

* let the tests still run the fancy one
2022-01-09 11:39:22 -05:00
ManDude c9204f2a9b
Fix Windows asserts (#1045)
* fix release mode asserts

* clang

* dummy
2022-01-02 18:02:10 -05:00
ManDude 9ff71412e5
[runtime] pckernel implementation (#1032)
* toggle for ripping level models

* Create pckernel.gc

* builds and works

* fix defs

* resolution info works

* native letterboxing

* menu

* Fullscreen buttons

* Update glfw

* fix fullscreen taking over everything for some reason

* fix screenshots and add more menu options

* Cleanup DMA mess in load boundary render code (first try!!)

* Update default-menu.gc

* clang

* fix accidental macros in pairs

* refs

* fix null reference bugs

* add lavatube

* custom aspect ratios work (3D only)

* custom aspect ratios work (3D only)

* fix aspect ratio and non-4x3 debug text

* change `sceOpen`

* deadzone setting

* merge fixes

* check out `debug-pad-display`

* update readme imgs

* settings save works

* oops

* settings read/load (incomplete)

* add `:stop` to debugger and fix detach on Windows

* settings load works

* fullscreen and aspect ratio setting fixes

* swap menu options for convenience

* settings loads automatically properly

* fix panic and font hack edge case

* add rolling, ogre, snow, swamp, sunken b, jungle b

* Fixed borderless on windows please work

* Update fake_iso.txt

* remove error from opengl debug filter

* update refs

* minor tfrag tod palette lookup change

* accidentally nuked all opengl errors
2021-12-30 18:48:37 -05:00
Tyler Wilding c6f0c5cd29
decomp: merge all s6-* remappings and finish training-obs | villagep-obs | lavatube-obs | rolling-robber | snow-obs (#1018)
* decompiler: merge all `s6-*` usages

* decomp: finish `training-obs`

* decomp: finish `rolling-robber`

* decomp: finish `villagep-obs`

* decomp: finish `lavatube-obs`

* skip function in `lavatube-obs` over #1029

* closes #1029

* kick nasm

* merge s6 and sp in variable naming pass

* revert my fix

* fix mistakes and a bad method signature

Co-authored-by: water111 <awaterford111445@gmail.com>
2021-12-28 23:16:42 -05:00
water111 9b0ae373f0
[decomp] collide-func (#1034)
* add mips2c collide functions

* add ref test for collide-func

* fix test
2021-12-28 16:43:13 -05:00
ManDude c245f37feb
[decomp] joint and related (#1003)
* update jak 2 config and hack to make game text dumpable

* update stuff

* update src

* do `cspace<-parented-transformq-joint!`

* progress.... kind of...

* more drawable stuff

* clagng

* bones begin

* more bones

* even more bones

* everything builds

* touches

* errors

* ?

* fix `quicksandlurker`

* updates

* update refs

* more fixes

* update refs
2021-12-26 11:43:16 -05:00
water111 083202929c
[graphics] tfrag3 renderer (#978)
* begin work

* work

* working objs

* exporting

* it works

* before some time of day fixes

* add time of day interp and also fix zbuffer

* some small blending fixes

* improve randomess

* clean up extraction and missing blend mode

* culling, time of day, more level fixes

* more cleanup

* cleanup memory usage

* windows fix
2021-12-04 12:33:18 -05:00
ManDude d845524c23
[decompiler] detect cpad-hold? and cpad-pressed? (#986)
* [decompiler] detect `cpad-hold?` and `cpad-pressed?`

* cleanup cpad macro button lookup

* better

* fix
2021-12-01 19:41:49 -05:00
ManDude 25b0e1be7d
[decomp] collectables + works ingame! (#971)
* decomp: `collectables`

* fix types

* `powerups` and fixes

* fixes

* Merge branch 'pr/929' into d/temp/collectables

* fix collide stuff

* update things...

* update

* update

* temp bump global heap mem

* fix `defstate` hooks wrong/unnecessary sets & collide stuff for collectables

* dumb mistakes :)

* stub out broken process-drawable stuff

* update refs

* add `:no-inspect` key and save some memory & remove birth logs

* Update kmachine.h

* clang

* add citadel

* fix no-inspect key

* fix tests!!

* fix stupid mistake in `collide-shape-prim-sphere` alloc

* comment annoying print

* feedback

* fix edge-case probably

* remove `:no-inspect`s
2021-11-23 18:25:57 -05:00
water111 3afd99a8e3
[graphics] partial tfrag implementation (#958)
* temp

* some decomp

* tfrag dma setup

* fix negative label bug

* tfrag dma setup

* tfrag, with pipeline tricks

* kinda works

* cleanup before trying some color stuff

* time of day works

* clean up

* temp before render changes

* a few more fixes

* fix up tests

* clean up

* fix

* fix alignment

* one more cleanup
2021-11-13 20:44:17 -05:00
ManDude 2ea2d6a58a
[decompiler] implement defskelgroup (#955)
* implement `defskelgroup` in decompiler

0 lines removed!

* clang

* fix matcher code

* it was fine actually

* update all files (pt 1)

* update all files

* remaining fixes!

* null deref

* use METER_LENGTH

* move max lod warning

* clang

* math error

* fix macros too

* fix bug in a print
2021-11-04 19:10:39 -04:00
water111 8846968963
[Debugger] windows debugger and process drawable (#953)
* Update assert.h

* stuff for `process-drawable` to work

* add windows code for debugger

* debugger attaches

* something works

* remove bad ideas

* `(:break)` works

* connection fixes

* fixes + update docs

* crates & `defskelgroup` macro

* clang

* update tests and a few types

* temp

* temp

* fix files

* game builds

* reverse TypeConsistency operation

* add eye stuff for merc art login

* add `(:sym-name)`

* oops

* add `--auto-dbg` option to gc args

* codacy

* improve robustness of dgo unpacker and objectfiledb reading

* `cavegeyserrock`

* hopefully fix linux

* windows FormatMessage weirdness?

* mutex fixes

* fix merge conflicts

Co-authored-by: ManDude <7569514+ManDude@users.noreply.github.com>
2021-10-31 11:01:15 -04:00
water111 18714ba536
[decomp] load boundaries (#922)
* mostly working

* fixes

* very small fixes

* fix tests

* clang
2021-10-20 19:49:32 -04:00
Tyler Wilding 45318be063
decomp: finish _almost all of_ the remaining camera code (#845)
* 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

* address feedback - leave the float labels alone for now

* address feedback

* linting/formatting

* update gsrc and ref tests

Co-authored-by: ManDude <7569514+ManDude@users.noreply.github.com>
2021-10-16 21:01:23 -04:00
water111 993f348c93
[decomp] recognize most cases send-event macro (#906)
* recognize send-event macro

* missing forward def

* resolve merge conflicts
2021-10-16 15:12:01 -04:00
water111 3a1c9eaf75
[decompiler] clean up offline test program, reorganize decomp order (#895)
* make a new offline test

* finish up offline test and fix crash bugs
2021-10-12 20:33:26 -04:00
water111 b2052016e2
[decomp] sky/time of day (#883)
* time of day

* goal code seems to work

* stars at wrong spot

* stars and sun work

* debugging clouds

* fix texture correction

* sky works

* cleanup, add profiler

* clean up

* final clean up

* offline tests

* missing include
2021-10-10 20:07:03 -04:00
water111 184720b7ca
finish up some functions in mood (#875) 2021-10-02 12:47:39 -04:00
water111 f0ceea8b2e
[sparticle] 2d hud particles (#849)
* wip, taking a break to work on asm stuff first

* the goal code for sparticle

* mips2c the first sparticle asm function

* temp

* particle processing no longer crashing

* temp

* working texture cache for vi1 and hud textures

* sprites

* cleanup 1

* temp

* temp

* add zstd library

* temp

* working

* tests

* include fix

* uncomment

* better decomp of sparticle stuff, part 1

* update references
2021-09-26 11:41:58 -04:00
water111 f9d8fcd6e4
[decomp] add mips2c converter (#842)
* mips 2 c basic version, not yet tested

* calling works without crashing, but the function doesn't

* it works

* add test

* cleanup and actually add the test

* dont use mips2c by default for font

* clean up formatting
2021-09-11 20:52:35 -04:00
water111 a96eb800c4
update readme and fix unused function issue (#821) 2021-09-03 19:19:51 -04:00
water111 b58d9ec65d
support vector 4 (#803) 2021-09-01 10:02:20 -04:00
water111 d9f9e076af
[decompiler] automatically label things when possible (#784)
* improve label system

* clean up menu

* debug menu working, still need to fix tests

* fix tests and clean up
2021-08-29 11:13:06 -04:00
water111 403bb5f4de
[decomp] game-info (#779)
* support more process stuff

* more of game info

* add ref file

* progress on save
2021-08-22 20:12:47 -04:00
water111 11e11d2c04
[decompiler] Several small fixes (#775)
* fix assorted bugs

* stricter return types

* only look for functions in code files
2021-08-19 20:35:12 -04:00
water111 e4f5e8eebd
improve warnings (#770) 2021-08-18 20:19:01 -04:00
water111 4a896aaa71
fix bug (#765) 2021-08-17 21:19:52 -04:00
water111 97ab6a4e12
add support for non virtual states (#764)
* add support for non virtual states

* typecheck go

* start on virtual states

* more support for virtual states

* offline passes

* fix tests

* use behavior shortcut instead of lambda

* final cleanup of virtual go

* unused var warnings and fix inconsistent enum decompile order on win vs linux

* fix thread safety bug with goal symbol table and vif1 interrupt handler

* fix type mistake
2021-08-17 20:54:03 -04:00
water 72340811e5 decomp decomp 2021-08-14 16:49:45 -04:00
water 097ae07bb8 clean up font color 2021-08-14 13:06:43 -04:00
water a65357642d fix debugger 2021-08-11 20:21:58 -04:00