Commit graph

421 commits

Author SHA1 Message Date
water111 b0686b1ea7
fix decompiler crash (#294) 2021-02-28 19:22:53 -05:00
water111 9d3b056b7a
Fix asize bug, decompile a few files (#293)
* fix bug in asize of basic

* more decomp
2021-02-28 18:05:07 -05:00
water111 c15c163333
[Decomp] Add SSA based check for expression building (#292)
* wip

* tests pass

* fix warnings
2021-02-28 12:38:29 -05:00
water111 57eca1dee9
[Decomp] Decompile more files. (#290)
* decompile ocean trans tables

* more

* exclude tables from decomp progress

* format'
2021-02-27 14:40:18 -05:00
Tyler Wilding 049489c85b
Fix a small regression impacting MSVC debug builds (#285)
* decomp: Fix nonempty_intersection impl for MSVC Debugging use-case

* docs: Add info on getting ASan builds running on Visual Studio w/o exceptions
2021-02-27 13:38:04 -05:00
water111 b7f040986e
[Decomp] Decompile connect.gc (#288)
* decompile connect

* decompile lots of types
2021-02-26 22:22:54 -05:00
water111 d6d5203695
[Decomp] Minor fixes plus some math camera decomp (#287)
* make some progress on math camera

* minor fixes plus start of decomp of math camera
2021-02-26 15:27:13 -05:00
ManDude d952475c77
[glist/glist-h] Decompile this stupidity (#286)
* [glist/glist-h] Decompile this stupidity

* [glist] fix macros

* [glist] fix return types
2021-02-26 08:59:28 -05:00
water111 cadd014add
[Compiler] Support array fields in static objects (#284)
* first part of static inline array fields

* level h
2021-02-25 22:49:46 -05:00
water111 791c4abfc0
[Decompiler] Static Data Decomp (#280)
* update all-types

* begin work on static data decompiler

* working for vif disasm array

* mostly working

* finish static data decompilation
2021-02-25 09:51:28 -05:00
ManDude 9d84ba8ca4
Decomp assert and debug-h (#282)
* [assert-h] decomp

* [assert] decomp

* Update assert.gc

* [debug-h] decomp

* oops
2021-02-24 22:58:20 -05:00
water111 f6a6b4c107
[Decompiler] Fix coloring moves (#281)
* fixed

* final fix
2021-02-24 19:08:55 -05:00
water111 5ec9a91eb9
Decompiler fixes + decompiling (#276)
* decomp pad

* more decompilation

* update

* fix test name
2021-02-22 09:36:30 -05:00
ManDude ac24b2ab15
[goalc-test] Apply windows cmd color fix (lg::initialize is not called here) (#278) 2021-02-22 01:03:14 -05:00
ManDude b92a2823bb
Make a fake-asm macro for (mips) assembly we want to show but not use + some other fixes (#277)
* use new fake-asm macro

* [timer] update some docs and code for clarity

* Fix typos

* uncomment "sync" instructions

* some decimal to hex

* move fake-asm's to gcommon

* [timer] document timer-mode more.

* Fix errors

* i dont like this
2021-02-22 01:02:12 -05:00
water111 4b1b7e9507
[Decompile] DMA and similar (#275)
* add some dma

* clean up

* add progress script and make codacy happy
2021-02-21 11:02:28 -05:00
ManDude ea1a4ef1bb
specify a label_types_file variable in jak1 config (#274)
* ObjectFileDB: Fix crash if obj list text has no objects

* rename "decomp.bat" to "decomp-jak1.bat"

* config: enable expression analysis

* decompile timer-h

* Tab to space.

* add a note to deftype profile-name for the future

* timer-mode: use register name instead of full name

looking at the other types, it looks like NDI seemed to have preferred it this way

* [timer-h] set -> timer-bank mode type to timer-mode

* [timer-h] use register-friendly return value for method

* [timer-h] comment out unsupported feature

* [main-h] remove redundant quote

* Update .gitignore

* Update main-h.gc

* specify a label_types_file variable in jak1 config
2021-02-20 23:05:52 -05:00
water111 8775840265
[Decomp] Decompile engine math library types (#272)
* decompile some stuff

* fix typo

* playing around with trigonometry

* more progress on trig

* more trig

* comments and small fixes

* finish trig
2021-02-20 11:42:46 -05:00
ManDude 87f2984cf5
add emacs temp files to gitignore + remove some redundant quotes (#273)
* ObjectFileDB: Fix crash if obj list text has no objects

* rename "decomp.bat" to "decomp-jak1.bat"

* config: enable expression analysis

* decompile timer-h

* Tab to space.

* add a note to deftype profile-name for the future

* timer-mode: use register name instead of full name

looking at the other types, it looks like NDI seemed to have preferred it this way

* [timer-h] set -> timer-bank mode type to timer-mode

* [timer-h] use register-friendly return value for method

* [timer-h] comment out unsupported feature

* [main-h] remove redundant quote

* Update .gitignore

* Update main-h.gc
2021-02-18 22:24:10 -05:00
water111 db48d94270
[Decompiler] Clean Up (#271)
* clean up

* fix up until generic ops

* finish kernel

* documentation

* types

* add missing file
2021-02-18 11:35:45 -05:00
water111 1b5b9a2469
add sqrt (#270) 2021-02-17 00:57:21 -05:00
Tyler Wilding cdce4d9612
compiler: Support the majority of the remaining VU VF instructions (#258)
* compiler: Support the majority of the remaining VU VF instructions

- VWAIT
- VMADD variants
- VMSUB variants
- VSQRT
- VDIV
- outer product (VOPMULA + VOPMSUB)

* compiler: Fix some bugs / optimize some instructions

* tests/compiler: Add test coverage for new instructions

* docs: Add documentation for new inline assembly functions

* lint: Formatting / fix failing test

* Remove my comment about ftf/fsf encoding, it's been fixed

* address review feedback

* correct VSQRTPS implementation
2021-02-16 21:41:33 -05:00
water111 f1a93886e7
[Decomp] Decompile gstring (#267)
* decompile gstring

* update

* Update code_status.md

* Update code_status.md

* decompile gstate

* add test for states, hope it passes

* also test throw and catch xmms

* update doc
2021-02-16 20:37:48 -05:00
water111 aa9bcd07f4
[Decompiler] Flag uses of vf registers for values outside of functions (#263)
* clean up warning system

* add bad dependency warning

* add q and acc
2021-02-15 11:55:10 -05:00
water111 af1691a0bc
[Decompiler] More progress on method stuff (#264)
* more progress on method

* fix method issues
2021-02-15 11:36:59 -05:00
water111 14d602c594
[Decompiler] More fixes for gkernel (#261)
* fix bugs and more address of support

* support for zero checks

* fix tests
2021-02-14 18:50:45 -05:00
water111 d01ecf0a9e
[Decompiler] Support virtual method calls (#260)
* support virtual methods kinda

* more
2021-02-13 16:35:27 -05:00
water111 fab2e6c9b6
Merge pull request #259 from water111/w/fix-vsqrt-vrsqrt-vdiv
[Decompiler] Disassemble vdiv/vsqrt/vrsqrt properly
2021-02-13 12:30:24 -05:00
water b0780ce2c8 fix some instruction decodings 2021-02-13 12:05:50 -05:00
water111 126dfc1c45
[Decompiler] Misc fixes for gkernel/math (#257)
* more cases

* some work on math and floating point stuff

* some decompiling for fun
2021-02-13 11:32:52 -05:00
water111 a3b31d3c0e
Merge pull request #256 from bb010g/master
Correct Nix flake licensing & add ISC License
2021-02-11 22:32:57 -05:00
Dusk Banks 28682ba37f Correct Nix flake licensing & add ISC License
woo, removal of miniLZO means no more GPLv3+!

(All contributors signed off on this relicense.)
2021-02-11 19:29:51 -08:00
water111 87ad3985c9
Merge pull request #253 from water111/w/constants-in-conditions
[Decompiler] Fixes for gkernel and pad
2021-02-11 16:21:38 -05:00
water e8231c2708 fix 2021-02-11 16:13:03 -05:00
water111 d9a8f28e52
remove useless sets (#252) 2021-02-11 14:35:28 -05:00
water111 43c1d223a6
[Decomp] Decompile gcommon, gstring-h, and gkernel-h (#249)
* begin decomp

* untabify

* finish decomp of gcommon

* warning with function name

* clean up gkernel-h

* fix all types
2021-02-11 09:49:15 -05:00
water111 6e0ff4c9d0
[Decompiler] Clean up the output (#245)
* fix parent issue

* fix compiler issue

* update

* add error messages

* fix error

* fix array access, temporary

* more clean

* fix

* rename arg variables better

* fix method name

* fix no return value in decompiler

* many small fixes

* cheat types so it works

* name map

* fix old test'
2021-02-09 20:59:14 -05:00
ManDude fa061ef7eb
[timer decomp] (#248)
* [timer decomp] preliminary decomp

* [goal-lib] add inplace macros for logior, logxor, lognor and logand

* [timer decomp] Finish decomp for now

* [timer decomp] OCD whitespace

* [all-types] fix type consistency

Sorry mr. decompiler but you will have to take the hit

* [timer decomp] Fix more type consistency

* [timer decomp] ACTUALLY fix it + script so I don't forget

* [timer] automatically choose gpr for rlet's
2021-02-09 20:24:33 -05:00
ManDude 3c7067fe4a
[timer-h decomp] timer-h decomp (#246)
* ObjectFileDB: Fix crash if obj list text has no objects

* rename "decomp.bat" to "decomp-jak1.bat"

* config: enable expression analysis

* decompile timer-h

* Tab to space.

* add a note to deftype profile-name for the future

* timer-mode: use register name instead of full name

looking at the other types, it looks like NDI seemed to have preferred it this way

* [timer-h] set -> timer-bank mode type to timer-mode

* [timer-h] use register-friendly return value for method

* [timer-h] comment out unsupported feature
2021-02-09 11:00:49 -05:00
ManDude 47fbc5e106
update decomp.bat in accordance to project directory changes + bugfix (#243)
* ObjectFileDB: Fix crash if obj list text has no objects

* rename "decomp.bat" to "decomp-jak1.bat"
2021-02-07 21:51:44 -05:00
water111 499f614cd1
create output folder (#242) 2021-02-07 19:06:05 -05:00
water111 e01e065170
[gcommon decomp] compiler and decompiler fixes (#239)
* wip

* decompile file-io

* a

* fix
2021-02-07 18:21:00 -05:00
water111 f8b63a3f92
[Decompiler] Put likely delay slots in their own block (#237)
* first part of fix

* atomic op conversion fix

* update tests

* oops
2021-02-06 17:04:03 -05:00
Tyler Wilding 5b6a8dcf98
third-party/licensing: Switch miniLZO usage to LZOkay (#232)
* add rough jak 2 config so the decompiler can atleast unpack dgos

* third-party: commit lzokay

* Switch to lzokay for DGO decompression

* third-party: Remove minilzo library

* third-party: Add lzokay as a SHARED lib
2021-02-06 09:54:23 -05:00
water111 ddffda1e8c
[Decompilation] Fixes to compiler/decompiler for gcommon (#227)
* fix shift naming issue

* fix bad argument variable names

* fix missing variable issue

* small missing things

* wip

* cleanup

* wip

* fix conditions

* small bug fix in rewriter

* fix incredibly stupid printing bug
2021-02-05 19:41:09 -05:00
Tyler Wilding 65206823ef
Compiler - Implementing more VU Instructions (Part 1 of 2) (#221)
* A little project cleanup

* Script to grep decompiler results

* Compiler: Implement VNOP -> FNOP (.nop.vf)


temp: test new addition

* Compiler: Implement VMUL.xyzw (.mul.vf)


squash: cleaning up files i don't want to accidentally stage

* Compiler: Implement V[ADD|SUB|MUL].dest instructions

* Compiler:  Implement V[ADD|SUB|MUL][x|y|w|z].dest instructions

* Compiler: Implement V[MIN|MAX]{[x|y|z|w]}.dest instructions

* Compiler: Implement V[ABS]{[x|y|z|w]}.dest instructions

* Cleanup review feedback before adding tests and docs

* Tests: Added missing emitter tests

* tests/compiler: Comprehensively test all new instructions

* docs: Add documentation for newly supported operations

* Remove unused vector-h function

* Address review feedback
2021-02-05 15:00:17 -05: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 45f74f078a
[Compiler] Implement and/or in the compiler instead of a macro (#231)
* fix sc

* doc update

* another doc update
2021-02-03 16:12:51 -05:00
water111 425cc6794c
[Compiler] Bug fixes (#230)
* fix method name and use-after-free during compile error

* doc fix
2021-02-03 11:07:47 -05:00
water111 bbe5a10d76
fix stuck inline test (#229) 2021-02-03 08:36:22 -05:00