Commit graph

52 commits

Author SHA1 Message Date
water111 95366d21df
Get started on collide-func and clean up log forms in decompiler (#713)
* wip

* temp

* temp2

* first part of log macros

* more log macros

* logtest

* clean up

* dont initialize game info because we are missing stuff
2021-07-23 20:51:26 -04:00
ManDude 1e11a588f5
[decomp] loader prelim work + some cleanup (#697)
* [decomp] `loader` prelim work + some cleanup

* more things

* more

* even more

* yet even more

* minor fixes

* decompiler fix + use behaviors for two funcs

* last functions

* Create loader_REF.gc

* more work

* change vag tool config format + unrelated farmer and yakow stuff

* update some things

* fix some decomp

* cleanup things i came across + make dgo compileable

* fix consistency test

* update refs

* offline test: skip buggy `external-art-buffer` method

* fix test
2021-07-23 18:30:49 -04:00
water111 ef011f4fe8
[goalc] add a build system (#704)
* add first attempt at build system

* fix stupid bug

* try again
2021-07-15 21:37:15 -04:00
water111 6366068bc0
Support dir tpages (#671)
* support dir tpages

* fix warnings and bad return

* one more try

* revive the offline test script

* fix this null bug
2021-07-02 14:50:58 -04:00
water111 a81aef889a
Level load test (#656)
* tweaks for loading VI1

* temp

* clean up
2021-06-30 19:20:31 -04:00
ManDude 1af0f4a1a7
[decomp] most of level and some game loop functions + couple decomp… (#651)
* [decomp] most of `level` and some game loop functions + couple decompiler fixes

* add ART.CGO to fake-iso
2021-06-29 20:30:52 -04:00
water111 2506325f30
fix cast bug (#640) 2021-06-27 22:23:27 -04:00
water111 bfc1173ed5
Clean up files in kernel (#625)
* clean up gcommon

* cleanup kernel
2021-06-25 17:55:50 -04:00
water111 8faded6400
[decompiler] bitfield support for sound-name (#582)
* fix 64-bit fields in 128-bit bitfields

* support sound-name

* fix merge

* support some more sound stuff in overlord
2021-06-12 12:55:38 -04:00
ManDude 877e3d161c
[decomp] gsound (#583) 2021-06-12 10:48:38 -04:00
ManDude 9b905f903c
random clean-up (#551)
* clean-up various files, do `game-h` and `generic-obs-h`

* cleanup `smush-control-h`

* cleanup `collide-edge-grab-h`, `collide-mesh-h`, `collide-shape-h`

* [goal lib]organize minor things

* Fix a library command before I forget again

* fix
2021-06-04 13:22:50 -04:00
ManDude 784119188c
[decomp] even more res (#529)
* [decomp] even more `res`

* [decompiler] make `logand` with pointers and constants return pointer

* [decomp] more work

* update offline tests

* fix tests(?)

* `*res-static-buf*`

* fixes

* fix reference

* [opengoal] make `logand` work directly with pointers

* [decomp] `inspect res-lump`

* use the inline methods

* don't use a math mode for pointers

* [compiler] allow optionally setting disassembly output file

* [x86 disasm] Keep casing consistent between instructions and offsets
2021-06-01 16:07:45 -04:00
ManDude ec45182b42
[decomp] more of res + change a few macros (#527)
* disable asan for windows because it is too slow

* add `deref` and `&deref` macros, change `case` construct

* update `res`

* update `case` usages

* Fix some `res` methods

* `res-lump` method 9
2021-05-25 16:36:36 -04:00
Tyler Wilding 2a315419de
tests: Automate the offline reference tests better (#427)
* tests: Move all files to new directories

* scripts: Update decomp scripts

* tests: Remove hard-coded list for offline tests

* linting
2021-05-09 17:03:58 -04:00
ManDude cc3f8ffbf5
[decomp] headers for generic, mercneric, tieneric, merc, cpu shadow renderers, art, joint and bone (#424)
* decomp a bunch of renderer files

* fixes
2021-05-07 00:41:42 -04:00
ManDude 812efd92ca
[decomp] prototype-h, a few enums and other random things (#422)
* [decompiler] fix missing error in asm output

* decomp prototype-h, cleanup pat-h and res-h, prep for fact-h & res

* fix types

* Update all-types.gc

* fix a methos in `res-h`
2021-05-06 19:00:30 -04:00
ManDude 26accb8714
Fix +1 macros to 1+ and update some timer types (#375)
* Correct `+1` macros to `1+`

* update some `timer-h` types
2021-04-22 18:31:54 -04:00
ManDude 496f8a3fbb
Add case macro for switch-case constructs (#362) 2021-04-16 21:50:38 -04:00
water111 e5f0fecf17
[Decompiler] bitfield support and clean up of DMA (#350)
* get to vif

* support basic bitfield access

* make bitfields in dma work

* clean up dma

* fix merge conflict
2021-04-11 16:07:01 -04:00
water111 4262145c99
fix set! missing typecast (#324) 2021-03-17 19:26:35 -04:00
water111 e93d97dd07
[decompiler] gkernel offline test (#321)
* working on pointer math

* bug fixes

* gkernel passing with no anon functions

* update tests
2021-03-14 16:11:42 -04:00
water111 8f68d35cbb
[Decomp] Some more collision header files and speed up tests (#296)
* some more

* faster tests

* on by default
2021-03-01 11:15:24 -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 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 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
water111 e01e065170
[gcommon decomp] compiler and decompiler fixes (#239)
* wip

* decompile file-io

* a

* fix
2021-02-07 18:21:00 -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 a870bb53e4
[Decompiler] Expression 5 (#218)
* new method of inline-array-class

* up to new array

* wip side effect stuff

* prepare for pop barrier stuff

* add pop barrier

* add local vars hack to compiler

* fix bug, make sort work

* add test for array

* bug fixes

* another bug fix

* refactoring env variable print for casts

* more tweaks

* updates

* final cleanup

* codacy fixes
2021-02-01 20:41:37 -05:00
water111 e05f3ceefc
Implement gkernel: Part 2 (#155)
* update

* small fixes

* deactivate

* simple kernel test
2020-12-08 21:41:36 -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 71dda76e2b
Add some compiler features and documentation (#147)
* update doc

* add disassemble and type checking

* improve compiler error messages
2020-12-01 21:39:46 -05:00
water111 09142d1712
Support "game count" and v4 objects (#140)
* generate object, but not supported in linker yet

* add link and tests

* update types
2020-11-24 20:48:38 -05:00
water111 19b8bb81c9
Add the STR RPC to overlord and game code (#134)
* work in progress streaming rpc, simple test is working

* actually add the test

* debug windows failure

* windows fix maybe

* windows 2

* use str-load-status

* update types
2020-11-22 12:59:55 -05:00
water111 953c1512db
Process Text Files in Decompiler (#122)
* begin support for v2

* export game text

* generate text files

* working text load

* fix windows

* add test and clean up game tests a bit

* load the right file

* add separate program to launch the data compiler

* add offline test script
2020-11-19 21:22:16 -05:00
water111 c09541fa98
Add some debugger memory utilities (#109)
* add some memory utilities

* run waitpid in a separate thread and support very simple breakpoints

* fix breakpoints

* add missing windows stub function

* fix error message on exit
2020-11-06 13:59:39 -05:00
water111 b56025412b
Recognize auto-generated inspect methods and create deftypes from them (#95)
- Recognize new type definitions/parents/type flags in the decompiler
- Analyze autogenerated inspect methods and dump guesses at fields to a file
- Utility functions for accessing static data by label
- Better ordering in the decompiler to go through functions in the order they appeared in the source
- Added a decent number of types to `all-types.gc` based on the new field analyzer
- Correct a few `int`/`integer` mistakes in `gcommon.gc` (this should really be a warning)
- Correct a few type issues in `gcommon` and `gkernel-h`
- Option in the decompiler to be strict about `define-extern` redefining a type of a symbol
- Add a test to check consistency in types between `all-types.gc` (used by decompiler) and `goal_src` (used by the compiler)
2020-10-24 22:51:40 -04:00
water111 c9b53d51ff
Compiler Cleanup (Part 2) (#56)
* check on windows

* fix windows build

* version test

* clean up - will it work on windows

* fix formatting
2020-09-25 21:11:27 -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 27b865c0df
Add methods and pointers (#53)
* method calls and sorting

* add more tests and fix some alias stuff
2020-09-19 16:50:42 -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
water a47620fd6d add more math 2020-09-14 20:24:05 -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