Commit graph

491 commits

Author SHA1 Message Date
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
Tyler Wilding 233d887790
decomp: Avoid ' in error output (#421) 2021-05-06 18:47:32 -04:00
water111 21fefa0aaa
[decompiler] small fixes for methods and more reference tests (#419)
* clean up method stuff, fix a few small bugs, and add references for easy -h files

* more small fixes and reference tests
2021-05-06 00:42:49 -04:00
water111 0a6602e320
[Decompile] connect, text-h, settings-h, capture, memory-usage-h (#410)
* decompile stuff

* temp

* temp2

* fix

* temp

* preparing for merge

* working

* fix stupid format

* fix codacy
2021-05-05 17:38:16 -04:00
ManDude 8d99bee88c
[decompile] decomp time-of-day-h, fix mood-h, update sky-h, make art-h almost work (#415)
* [decompiler] make certain floats decompile to constants

* update various types in `mood-h`, `time-of-day-h` and `art-h`

* fix `time-of-day-context`

* add some offline tests

* make `new-dynamic-structure` decompile at least

* formatting

* Update all-types.gc

* Update all-types.gc
2021-05-04 21:36:22 -04:00
ManDude 2beaa7a340
[decomp] cleanup drawable and ocean stuff (#414)
* use `kmalloc-flags` for goal `kmalloc`

* cleanup some drawable stuff, add offline tests

* cleanup generic-h a bit

* make decompiler work on 16-bit static data

* cleanup ocean stuff

* fix `ocean-spheres`

* oops forgot this

* I forgot to actually make `ocean-tables`
2021-05-03 08:54:49 -04:00
Tyler Wilding 928cb48dd4
docs: Overhaul and organize all of the existing documentation we have (#412)
* docs: Overhaul and organize all of the existing documentation we have

* docs: Autoscroll to top when changing pages
2021-05-02 14:58:22 -04:00
ManDude 7cb04c6cd5
[decomp] font-h, fix a vector type, minor decompiler fixes (#411)
* Make `:do-not-decompile` work on field lookup as well

* decompile `font-h` and update a vector type + minor fixes

* fix some types

* fix font-h

* fix font-h (again)

* update a script

* fixes

* Fix segfault

* Fix `PROT_NONE` page protection on windows
2021-05-01 21:09:48 -04:00
water111 7018827a50
decompile display (#408) 2021-05-01 15:51:53 -04:00
Tyler Wilding 7c182db7ea
Compiler: Auto-generate inspect methods for bitfields (#407)
* goalc: Auto-generate inspect methods for bitfields

* goalc: Don't generate inspect methods for 128-bit bitfields
2021-05-01 15:29:56 -04:00
Tyler Wilding 44fa183922
repl: Add auto-listening capabilities -auto-lt (#405)
Closes #403
2021-05-01 10:33:41 -04:00
ManDude 8cc63ff35c
Add a debug PS2 VM to the runtime (#401)
* update VS launch target params

* remove redundant VS launch option

* Add a debug PS2 VM to the runtime, currently only for the DMAC

* Formatting

* remove broken assert

* Avoid weird buffer overflow bug

* Test on `VIF0_DMA_BANK`!

* Add a docstring

* patch pointers for the other dma channels

* patch DMAC pointer

* remove dead leftover code

* Change default return value for `get_vm_ptr`
2021-05-01 00:32:19 -04:00
Tyler Wilding fab73cab75
Initial spike of Github Pages project status / documentation portal (#400)
* docs: move markdown documentation to be caught by docsify

* docs: Initial spike of project status / doc portal

* docs: Add searchbar to docsify page

* docs: Remove the package-lock.json file, not critical for us

* docs: Fix search plugin link

* docs: Fix search results colors

* docs: Remove the navbar, now redundant.
2021-04-30 01:13:15 -04:00
water111 56625bb0ee
Make buttons a bitfield and fix let bug (#399)
* make pad buttons bitfields

* fix stupid let bug

* update tests
2021-04-29 20:25:45 -04:00
water111 70d93354eb
[Decompile] file-io, loader-h, texture-h, level-h, math-camera-h (#397)
* file-io and loader-h

* add test for level-h

* math camera-h
2021-04-28 20:51:17 -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 53a70d8e43
clean up display-h (#392) 2021-04-27 19:40:14 -04:00
water111 3d2ca71fe3
[Decompile] pad and gs (#389)
* update stuff

* gs reference added

* update config
2021-04-26 21:40:08 -04:00
ManDude 8619e6df19
Fix gs-bgcolor and display-frame + decompiler types (#390) 2021-04-26 08:44:13 -04:00
water111 2002db359a
[Decompiler] WIP: Stack Spills (#382)
* set up types

* cleaned up type analysis and got things working through atomic ops

* expression working, need types

* improved types and names

* getting close

* finish up dma-disasm

* fix
2021-04-25 14:48:54 -04:00
ManDude 54ccc9db97
Increment enum entry values if no value's supplied (#385) 2021-04-24 23:51:47 -04:00
water111 fa122356ec
[Decompiler] Fixes for dma-disasm (#377)
* small tweaks

* fix up some more dma stuff
2021-04-23 20:29:15 -04:00
water111 0b8a878533
[Compiler] Fix branch targets in disassembly (#379)
* fix diassembly

* update changelog

* fix exit crash

* doc
2021-04-23 15:07:22 -04:00
water111 060b125324
[Compiler/Decompiler] Better support for Bitfield and Enum types (#374)
* compiler fixes, a decent amount of decompiler stuff is working too

* more support in decompiler, fix some casts

* decompile static data too
2021-04-22 19:08:58 -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 0560136f08
Allow enum names to serve as types (using the enum's type) (#372)
* Allow enum names to serve as types (using the enum's type)

* Formatting

* add doc to `get_enum_type_name`

* Ban enum forward-declaring, and remove unneeded checks
2021-04-19 20:29:38 -04:00
water111 c09e18f3a7
Fix stack new and add size-of to compiler (#370)
* make decompiler output stack-no-clear

* add size-of
2021-04-18 19:51:15 -04:00
water111 7737817ac7
[Decomp] Fix bitfields in dma-bucket (#367)
* fix bitfields in dma-bucket

* fix dma-bucket
2021-04-18 12:08:08 -04:00
water111 9867155e7c
[Decompiler] More support for bitfields (#363)
* temp

* initial support for dynamic bitfields

* some more progress on display

* dma-buffer good

* small fixes
2021-04-17 18:35:50 -04:00
ManDude ab6a40a352
Add string-format macro for in-place formatted strings (#364)
* Add `string-format` macro for in-place formatted strings

this will be very useful for debugging and just making new strings in general

* add a warning to `string-format` about recursive usage

* clarify warning
2021-04-17 18:00:39 -04:00
ManDude 496f8a3fbb
Add case macro for switch-case constructs (#362) 2021-04-16 21:50:38 -04:00
ManDude 9fbbe1a79c
prepare for decompiling display (#359)
* prepare for decompiling display

Needs some work on the decompiler (mostly bitfield stuff) before a more proper decomp can be done

* make `(profile-bar draw)`, `set-display-gs-state-offset` and `set-display-env` decompile

decompiler should now support unsigned divide

* fill in some dma-h types

* Fill in a few VIF bitfields + other minor fixes

* Update all-types.gc

* Fix stupid mistake in `vif-mask`

* update dma-h reference

* this uint32 is actually a `vif-tag` (oops)
2021-04-16 18:36:19 -04:00
ManDude 8b62de35ea
[texture-h] fixes (#356)
* move commonly used scripts to specific folders

* fixes

* Update test.sh

* Update test.sh

* Fix file permission

* move commonly used scripts to specific folders

* fixes

* Update test.sh

* Update test.sh

* Fix file permission

* [texture-h] fixes

* [display-h] use bitfield types
2021-04-13 20:22:34 -04:00
ManDude fcbf5b60ff
[gs] fill in most of the register types (#355)
* [gs] fill in most of the register types

that was kinda boring to do

* [display-h] minor decompiler fixes

* Update all-types.gc
2021-04-13 00:36:05 -04:00
water111 a863542fa3
[Compiler] Support dynamically constructed bitfields (#354)
* support dynamic bitfields

* update doc
2021-04-11 19:21:49 -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
ManDude 64ae2d6d39
[decomp] sync-info 1 (#351)
* move commonly used scripts to specific folders

* fixes

* Update test.sh

* Update test.sh

* Fix file permission

* move commonly used scripts to specific folders

* fixes

* Update test.sh

* Update test.sh

* Fix file permission

* [dynamics-h] clean-up

* make things neat

* update surface-h

* [sync-info] decomp 1

* move commonly used scripts to specific folders

* fixes

* Update test.sh

* Update test.sh

* Fix file permission

* move commonly used scripts to specific folders

* fixes

* Update test.sh

* Update test.sh

* Fix file permission

* [sync-info] update decomp

* Update gravity-h.gc

* [windows] separate scripts for runtime w/ or w/o display

* Update dynamics-h.gc

* Add offline test for sync-info

* clang
2021-04-10 21:17:36 -04:00
ManDude 17b05a9e40
[FileUtil] windows directories fix (#352) 2021-04-10 21:17:12 -04:00
water111 9969445cf7
[Decomp] Math library: transform and quaternion (#344)
* decompile transform

* types for quaternion

* part of quaternion

* finish quaternion

* fix offline test reference

* wip fix to let issue

* fix
2021-04-02 11:35:14 -04:00
ManDude 7867de8fd7
update some physics code (#347)
* move commonly used scripts to specific folders

* fixes

* Update test.sh

* Update test.sh

* Fix file permission

* move commonly used scripts to specific folders

* fixes

* Update test.sh

* Update test.sh

* Fix file permission

* scripts to annoy me less

* [dynamics-h] clean-up

* make things neat

* more cleanup

* update surface-h

* fix error

* fix typo

* Spoonfeed the compiler

* [surface-h] rename sqrt to sqrtf
2021-03-29 18:30:58 -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 64c35ca453
[Decompiler] Stack Variables (#338)
* clean up type analysis

* get everything set up

* basic stack variables working

* partial load fix

* most of matrix

* add offline tests
2021-03-27 15:18:59 -04:00
water111 7fac11ddf5
Support 128-bit variables (#336)
* wip 128 bit support

* add a few more files to offline test
2021-03-25 16:02:48 -04:00
water111 99683c0dac
[decompiler] Add tests and fixes for vector-h and math (#333)
* before messing with ssa stuff

* fix ash

* bounding box
2021-03-24 19:16:31 -04:00
water111 0d8742241b
support for i128 (#331) 2021-03-23 15:56:23 -04:00
water111 9ffc6014e1
fix printing and add gstate (#330) 2021-03-22 20:04:00 -04:00
water111 123f3b509d
[Decompiler] Fix let bug (#328)
* fix let definition bug

* remove debug prints and add test
2021-03-22 16:46:02 -04:00
ManDude 8e1c147ad8
move commonly used scripts to specific folders (#325)
* move commonly used scripts to specific folders

* fixes

* Update test.sh

* Update test.sh

* Fix file permission
2021-03-18 16:43:37 -04:00
water111 4262145c99
fix set! missing typecast (#324) 2021-03-17 19:26:35 -04:00
water111 d60d9b639a
support anonymous functions (#323) 2021-03-14 19:06:51 -04:00