Commit graph

54 commits

Author SHA1 Message Date
water111 5e23057ed1
[goalc] compile/run code for jak2 ckernel, set up dummy KERNEL.CGO (#1625)
[goalc] start can compile and run code for jak2 ckernel, set up dummy KERNEL.CGO
2022-07-08 19:23:49 -04:00
Tyler Wilding 2d595c1ac0
lint: add include sorting config to clang-format (#1517) 2022-06-22 23:37:46 -04: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 b263e33e94
[goalc] fix mod bug and add div tests (#1296)
* fix mod bug and add div tests

* update changelog
2022-04-11 20:53:24 -04: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
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 798356802b
[game] make visibility work (#1031)
* make vis work

* update comments
2021-12-28 15:13:46 -05:00
ManDude d8e659df66
[decomp] flying-lurker (#846)
* `flying-lurker`

* why'd this get left behind?

* also `ambient` and add a `banned_objects` config and fix offline tests

* clang

* fix `ambient-type-sound`
2021-09-21 18:40:38 -04:00
water111 ac3092093c
fix really old compiler bug (#799) 2021-08-31 22:12:30 -04:00
water111 aa58d146c2
[goalc] register allocator v2 (#731)
* clean up allocator interface to be simpler

* working on functions without spills

* working for all

* fix missing includes for windows

* more windows includes

* initialize regs to zero so printing value unintiailized by game code is repeatable
2021-08-01 17:46:55 -04:00
Tyler Wilding d317497c64
decomp: main-collide and support a bunch of new inline-asm operations (#673)
* decomp/goal-lib: Implement all fixed point macros

* decompiler/goalc: Support half-word and byte parallel extend ops

* decompiler/goalc: Support all parallel compare instructions

* decompiler/goalc: Wire up PPACH and parallel bitwise operations

* goalc: Add emitter tests

* decomp: finalize `main-collide`

* codacy lint
2021-07-27 19:57:14 -04:00
water111 2b6684aa5c
[decompiler] Working toward bsp (#717)
* clean up

* before int to float stuff

* before trying to eliminate the separate read and write maps

* partial fix for register issues

* add missing include
2021-07-25 15:30:37 -04:00
water111 2506325f30
fix cast bug (#640) 2021-06-27 22:23:27 -04:00
water111 542edfb164
[compiler/decompiler] Take the address of a variable (#554)
* support taking the address of variables

* partially working stack variables

* implement type cast stuff

* remove final
2021-06-04 13:43:19 -04:00
water111 663b5c7899
[OpenGOAL] Support for 128-bit arguments and return values (WIP) (#510)
* xmm call and return working, needs some careful double checking and tests

* clean up and test
2021-05-20 20:12:49 -04:00
water111 d9f9d36f37
[OpenGOAL] make multiplication/divsion like GOAL and support in decompiler (#483)
* support in compiler

* multiplication in the decompiler

* update divisions
2021-05-14 18:43:12 -04:00
water111 14028b90bc
[Decompile] vector.gc (finally) (#394)
* support psubw

* do half of vector

* rest of vector

* add test

* format
2021-04-28 17:14:54 -04:00
water111 3d2ca71fe3
[Decompile] pad and gs (#389)
* update stuff

* gs reference added

* update config
2021-04-26 21:40:08 -04:00
water111 0a76e6e157
[Decompiler] Make matrix decompile (#341)
* small fixes

* update

* add instructions

* finish matrix

* add matrix test cases
2021-03-28 20:26:30 -04:00
water111 0d8742241b
support for i128 (#331) 2021-03-23 15:56:23 -04: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
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 e01e065170
[gcommon decomp] compiler and decompiler fixes (#239)
* wip

* decompile file-io

* a

* fix
2021-02-07 18:21:00 -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
water111 c8d382b35c
[Compiler] Improve spills and register backups (#175)
* xmm spill

* improve getting stack variables

* improve symbol getting

* update changelog
2020-12-31 15:59:11 -05:00
water111 a80b331c27
[Compiler] In-progress support for vector float (AVX) (#171)
* begin work on vf support

* split reg kind into reg hw kind and class, use class for ireg

* try test

* clang format

* add some more ops and some example functions

* better lvf on statics

* add documentation
2020-12-30 15:33:51 -05:00
water111 c811778d00
[Compiler] Add reset-here option to colored and constrained rlet vars (#169)
* add reset-here to clear coloring at entry to rlet

* update doc
2020-12-27 14:21:48 -05:00
water111 d86964985a
Improve Register Allocator (#154)
* before adding IRegSet stuff

* use bitsets for live analysis

* speed up

* add stack structures

* organize new better
2020-12-06 15:42:26 -05:00
water111 06918e1fea
Implement gkernel: Part 1 (#150)
* start gkernel implementation

* progress

* more of kernel

* swap to new dispatcher, will it work on windows

* update
2020-12-05 17:09:46 -05:00
water111 90e5c023f1
Basic Inline Assembly (#149)
* basic inline assembly support

* fix rlet

* clean up detail in IR and update documentation
2020-12-04 12:57:10 -05:00
water111 21fbdce7aa
[Compiler] Bitfield Types (#146)
* add the ability to define and read bitfield types

* new set

* add bitfield setting

* add static bitfields
2020-11-29 18:01:30 -05:00
water e93b54347f add float min max to the compiler 2020-11-29 10:46:14 -05:00
water dc32b59217 update 2020-11-28 20:53:13 -05:00
water111 460ec874bb
Add support for stack integers (#135)
* add support for stack integers

* update documentation

* revise value type stack variables
2020-11-22 12:22:19 -05:00
water111 951f31878e
[Source Line Debugger] Tracking objects and IR (#115)
* track where segments are when debugging

* missing windows include

* figure out what function we're in

* addr to IR is working
2020-11-13 22:33:57 -05:00
water111 a45d180f2c
Try to speed up the build (#106)
* first attempt

* attempt 2

* windows and formatting fix
2020-10-29 21:27:52 -04:00
water111 dfe129373a
fix float loads, add dgo loading to game test (#101)
* fix float loads, add dgo loading to game test

* build and load dgos in order
2020-10-25 20:30:25 -04:00
water111 2d11e44eaf
Compiler Cleanup and Documentation (#54)
* start cleanup

* fix typos

* fix syntax highlighting in doc

* lots of documentation updates

* clean and add tests

* more documentation and more error messages

* more document and try building kernel differently
2020-09-24 17:19:23 -04:00
water111 cee6c21603
Add basic features for types and objects (#52)
* started adding simple functions in gcommon

* more tests and features

* more tests, debug windows

* debug prints for windows

* back up some regs for windows

* remove debugging prints
2020-09-19 13:22:14 -04:00
water111 c7c342ce7e
Add defmethod and some uses of the deref operator (#51)
* add tests for various xmms

* use unaligned stores and loads to back up and restore xmm128s and also fix argument spilling bug

* add deftype

* add deref and fix some method _type_ things
2020-09-18 22:02:27 -04:00
water111 abcd444a3b
Add deftype (#48)
* initial deftype implementation

* fix library setup for windows

* implement deftype

* fix memory bug

* fix formatting
2020-09-17 21:47:52 -04:00
water b1b58230ee Merge branch 'master' of https://github.com/water111/jak-project into w/math_5 2020-09-14 20:31:19 -04:00
water a47620fd6d add more math 2020-09-14 20:24:05 -04:00
Tyler Wilding 345b8e30d8 Resolve a good chunk of windows compiler warnings
Mostly revolved around the new MSVC check for functions that don't cover all paths (ie. a switch statement without a default case).  It appears to not see an assert as a valid default case.

I switched assert(false) to exceptions in these cases.  I believe this should also abort the program, but will also provide a hopefully useful message?  Hopefully this is an improvement.

Resolves #32
2020-09-13 22:02:27 -04:00
water 9ec9b5a22a add conditional stuff 2020-09-13 17:34:02 -04:00
water e7f8620c92 add floats and inline stuff 2020-09-13 10:44:12 -04:00
water111 90a7e9b4b9
Add addition and subtraction for integers, build macros, dgo building, and build/load test (#35)
* see if math works on windows

* add dgo

* windows debug

* windows debug 2

* one more debug try

* add extra debug print and change logic for slashes

* update

* again

* try again

* remove build game

* remove build game

* add back build-game

* remove runtime from test

* test

* reduce number of files

* go to c++ 14

* big stacks

* increase stack size again

* clean up cmake files
2020-09-12 20:41:12 -04:00
water111 d56540f8c0
Add lambda and static objects (#30)
* add some more tests for let

* support static strings

* add function calling

* add prints for windows debgu

* one test only

* try swapping r14 and r15 in windows

* swap back

* disable defun for now

* fix massive bug

* fix formatting
2020-09-12 13:11:42 -04:00
water 1394cf13cd 17 of 124 compiler tests passing 2020-09-07 19:17:48 -04:00