Commit Graph

39 Commits

Author SHA1 Message Date
water
acb91dbf48 some work on vector types 2020-10-25 18:02:03 -04:00
water
710f6be13b Merge branch 'master' of https://github.com/water111/jak-project into w/add-types-to-all-types 2020-10-25 13:21:34 -04:00
water
a198196842 more types 2020-10-25 13:21:27 -04:00
water
15a66d9c62 add types 2020-10-25 12:07:10 -04:00
Tyler Wilding
5a5d88eb17 Amalgamate FileIO and remove duplicate Timer header
Closes #8
2020-10-25 02:27:48 -04: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
b561cdfade
Make decompiler naming consistent (#94)
* use a fixed object file naming by default, option to allow new map file creation

* fix prints

* fixing up edge cases

* update json config
2020-10-24 14:27:50 -04:00
water111
0bc2466f86
Add prototype decompiler GUI (#93)
* json output for basic ops

* add prototype gui

* add some more fields and layout the gui a little bit nicer
2020-10-23 17:20:04 -04:00
water111
fc1a8f37c6
Partially Implement Decompiler Type Analysis (#90)
* implement basic framework for decompiler type analysis

* before type system changes

* add some decompiler stuff to the type system

* try algorithm on a few functions
2020-10-18 15:44:19 -04:00
doctashay
9410e01aaf
Implement logging features for decompiler (#78)
* Begin spdlog integration for decompiler

* Replace old prints with spdlog equivalents

* clang-format

* Fixes

* Log output to /logs/decompiler.log.

The console now prints that the disassembly has begun and it may take a few minutes to complete. This will reduce the amount of verbose logging output directly to a console stream.

* Update .gitignore

Ignore decompiler output for now

* Resolve more issues

Fixed percentage printing and various other issues

* Fixed stuff I broke (sorry)

* Fix more broke stuff
2020-10-15 20:59:30 -04:00
water111
8d91b47d00
Print strings in assembly (#81)
* print strings in disasm

* format
2020-10-14 14:21:47 -04:00
water
b1759dbd13 Merge branch 'doctashay-logging2' 2020-10-11 19:12:14 -04:00
water111
1e1b5e7c00
Make decompiler more successful (#66)
* w/early-return-and-break

* more edge cases

* all instructions in non asm functions now convert to ir

* cleanup

* implement rarely used control flow in IR

* clang format
2020-10-11 18:27:44 -04:00
Shay
0f916ed81e More minor fixes
spdlog now builds as a library with nasm workaround
2020-10-08 22:39:12 -06:00
doctashay
8d9b87cfed Cleanup PR 2020-10-08 09:16:34 -06:00
water111
a64dd6c90b
Add CFG to IR decompiler pass (#60)
* add some more cfg ir stuff

* add cond with else

* add type of recognition

* add cond to compare conversion

* finally all conds are passing

* started sc recognize, but ash min and max should be recognized first

* fix ash showing up as sc

* add abs

* fix merge issues

* try building goos with optimizations on

* sc mostly working, still need to fix right aligned nesting

* ands and ors are converting correctly now

* clean up
2020-10-06 18:14:27 -04:00
Shay
c5681a6cc7 Auto stash before merge of "logging" and "upstream/w/cfg_2_ir" 2020-10-06 15:35:57 -06:00
water
387cce962d sc mostly working, still need to fix right aligned nesting 2020-10-05 21:38:45 -04:00
water
5e2b9ddf6e fix merge issues 2020-10-04 17:23:30 -04:00
water
d464ad549b Merge branch 'master' of https://github.com/water111/jak-project into w/cfg_2_ir 2020-10-04 17:23:07 -04:00
water111
b102d22dd9
Replace Form with goos::Object (#64)
* add pretty printing to goos form

* temp

* fix format

* fix format

* fix windows build

* again

* windows

* Revert "windows"

This reverts commit b7d448e733.

* windows again

* give up and just add a getter function
2020-10-04 17:08:10 -04:00
water
f70ae6dad3 add abs 2020-10-04 11:37:47 -04:00
water
4b90634e93 fix ash showing up as sc 2020-10-04 10:44:28 -04:00
water
e195e2b299 started sc recognize, but ash min and max should be recognized first 2020-10-03 21:30:58 -04:00
water
5bcd10b5b0 finally all conds are passing 2020-10-03 20:36:21 -04:00
water
0fbffcd409 add cond to compare conversion 2020-10-03 18:36:02 -04:00
water
b7cee7b666 add type of recognition 2020-10-03 15:27:17 -04:00
water
0094594f69 add cond with else 2020-10-03 09:32:26 -04:00
water
072283e442 add some more cfg ir stuff 2020-10-02 16:21:25 -04:00
water111
376c273845
Add decompiler IR, basic operations, all-types file (#57)
* framework for basic op

* started IR framework

* check in type info file

* add some basic operations to the first pass ir conversion

* use a single condition system

* add more basic op decoding

* more ir
2020-09-29 20:24:15 -04:00
water111
7ffcfc4703
Merge pull request #41 from xTVaser/pragma-once
Add #pragma once to all header files
2020-09-14 20:31:41 -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
Tyler Wilding
9737dfad34 Add #pragma once to all headers
Resolves #19
2020-09-13 21:36:35 -04: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
c5de535f50 guesses at folders 2020-09-03 22:32:16 -04:00
water
bd15e47506 add object names 2020-09-03 20:11:31 -04:00
Tyler Wilding
3c4fcbdd34 clang-format all the things 2020-08-26 01:21:33 -04:00
water
c3aff47886 add decompiler 2020-08-22 23:30:17 -04:00
water
acf086a3d2 check in existing work 2020-08-22 22:30:12 -04:00