Commit graph

231 commits

Author SHA1 Message Date
water111 dbc266c00b
New Pretty Printer (#994)
* begin work on improved pretty printer

* update ref

* finish pretty printer

* force line break for defstate
2021-12-04 16:06:01 -05:00
water111 083202929c
[graphics] tfrag3 renderer (#978)
* begin work

* work

* working objs

* exporting

* it works

* before some time of day fixes

* add time of day interp and also fix zbuffer

* some small blending fixes

* improve randomess

* clean up extraction and missing blend mode

* culling, time of day, more level fixes

* more cleanup

* cleanup memory usage

* windows fix
2021-12-04 12:33:18 -05:00
ManDude 59d071eccb
[goos/goal] user profiles (#977)
* implement user profiles

* example usage!

* typo

* use a cond

* fix errors

* fixes

* fix potential commandline args disaster
2021-11-24 00:44:04 -05:00
Tyler Wilding 111af1ec19
decomp: finish the remainder of untouched gameplay code (#893)
* decomp: finish `sidekick`

* decomp: got a lot of `target` done

* decompiler: Add support for non power of 2 offsets for inline arr access

* decomp: finish `target` mostly

* decomp: finish `water`

* decomp: finished `robotboss-weapon`

* decomp: finish `robotboss-misc`

* decomp: finish the majority of `robotboss`

* blocked: `racer` has an issue around entering a state

* blocked: `target-racer` done mostly, but NYI case in one function

* blocked: `racer-states` mostly finished, but bitfield issue

* blocked: `billy` on state decomping

* blocked: `bully` on state decomping

* waiting: `rolling-lightning-mole` waiting on navigate for 2 funcs

* blocked: `rolling-robber` finished but `s6-1` issue

* blocked: `ogreboss` uint64's for types cant label load em!

* blocked: `mother-spider` state decompilation

* half-done `target-flut`

* blocked: `target-flut` some sort of new bitfield state

* some improvements in `racer-states` with my new-found knowledge

* progress: started on `target-death`

* blocked: `target-death` handle casts

* decomp: finish `collide-reaction-racer`

* blocked: `target-handler` handler forced to return `none`

* decomp: 99% of `target2` finished

* decomp: finish `target2`

* gsrc: update

* update post merge

* address feedback

* scripts: add script to detect decomp issues

* fix wide-spread `collide-shape` method missing arg

* some small things i changed from master

* address feedback

* fix typeconsistency issue
2021-11-24 00:33:10 -05:00
ManDude 25b0e1be7d
[decomp] collectables + works ingame! (#971)
* decomp: `collectables`

* fix types

* `powerups` and fixes

* fixes

* Merge branch 'pr/929' into d/temp/collectables

* fix collide stuff

* update things...

* update

* update

* temp bump global heap mem

* fix `defstate` hooks wrong/unnecessary sets & collide stuff for collectables

* dumb mistakes :)

* stub out broken process-drawable stuff

* update refs

* add `:no-inspect` key and save some memory & remove birth logs

* Update kmachine.h

* clang

* add citadel

* fix no-inspect key

* fix tests!!

* fix stupid mistake in `collide-shape-prim-sphere` alloc

* comment annoying print

* feedback

* fix edge-case probably

* remove `:no-inspect`s
2021-11-23 18:25:57 -05:00
water111 7292cb5765
tfrag improvements (#970)
* tfrag improvements

* cleanup

* one last fix

* clang
2021-11-15 20:07:10 -05:00
ManDude 80a002f8c0
[decomp] entity birth (#964)
* make birthing work

* fix float representation on defskelgroup

* test

* update

* debugger improvements & dont upload aux sprites

* ?

* fix progress

* fixes

* fixes

* Create bea.gd

* fix test

* fix xmm reg clobbering in kernel (water)

* cleanup cam-start

* clear gamepad state every frame

* allow controller connects and disconnects while running
2021-11-15 19:05:28 -05:00
water111 380e7b3580
clean up a few small things (#968) 2021-11-14 12:45:47 -05:00
Tyler Wilding 44c43610ce
game: Get camera code working (#965)
* cmake: disable edit&continue flags

* goos: make the build system work for alternate file paths nicely

* vs: update vs config

* vscode: extend terminal buffer!

* vs: fix presets

* debugger: fix exception handler

* game: add logo to application

* decomp: get `cam-master` to "work" -- manually changed return type

* debugger: fix printing issue

* game: get the camera actually working

* game: neutralize the analog sticks

* game: support analog sticks

* tests: update ref tests

* temp commit - inprogress stuff

* fix `send-macro`

* turn camera stuff back on, seems to work.  Still kernel-dispatch problem though

* address feedback

* formatting
2021-11-13 22:41:15 -05:00
water111 3afd99a8e3
[graphics] partial tfrag implementation (#958)
* temp

* some decomp

* tfrag dma setup

* fix negative label bug

* tfrag dma setup

* tfrag, with pipeline tricks

* kinda works

* cleanup before trying some color stuff

* time of day works

* clean up

* temp before render changes

* a few more fixes

* fix up tests

* clean up

* fix

* fix alignment

* one more cleanup
2021-11-13 20:44:17 -05:00
ManDude ff50cf2552
improve debugger disasm, :sym-name and fix Windows builds (#959)
* improve debugger disasm, `:sym-name` and fix Windows builds

* >:(

* use this inline constexpr thing??

* fine use strings then

* please.... please work...

* fix windows debugger oopsie

* display rip as goal addr as well

* [debugger] attempt to backtrace even if landed on some garbage memory

* Update CMakePresets.json
2021-11-12 22:00:41 -05:00
water111 6a606d7222
Start a debug tool for looking through level data (#954)
* temp

* temp

* level inspection tool

* docs

* windows fix
2021-10-31 13:12:50 -04:00
water111 8846968963
[Debugger] windows debugger and process drawable (#953)
* Update assert.h

* stuff for `process-drawable` to work

* add windows code for debugger

* debugger attaches

* something works

* remove bad ideas

* `(:break)` works

* connection fixes

* fixes + update docs

* crates & `defskelgroup` macro

* clang

* update tests and a few types

* temp

* temp

* fix files

* game builds

* reverse TypeConsistency operation

* add eye stuff for merc art login

* add `(:sym-name)`

* oops

* add `--auto-dbg` option to gc args

* codacy

* improve robustness of dgo unpacker and objectfiledb reading

* `cavegeyserrock`

* hopefully fix linux

* windows FormatMessage weirdness?

* mutex fixes

* fix merge conflicts

Co-authored-by: ManDude <7569514+ManDude@users.noreply.github.com>
2021-10-31 11:01:15 -04:00
water111 d6f631383e
decomp more level stuff (#932)
* more level stuff

* vi1 to jun load working, with multiple skies

* small fixes

* add level ref test

* clang
2021-10-23 16:00:49 -04:00
water111 44626cfedd
fix issues and decompile racer-states (#924)
* fix issues and decompile racer-states

* type fix
2021-10-21 22:38:39 -04:00
water111 b7fe8447e2
[decomp] improve types around enter-state (#923)
* clean up

* restore hack
2021-10-20 20:55:25 -04:00
water111 18714ba536
[decomp] load boundaries (#922)
* mostly working

* fixes

* very small fixes

* fix tests

* clang
2021-10-20 19:49:32 -04:00
ManDude 0e96cdb6c5
[de/compiler] New text tool (#918)
* fix `citb-drop-plat` a bit and PAL `fisher`

* Clean up `pc-pad-utils`. Looks so clean!

* Increase process stacks by ~2x

* Convert `game_text` custom encoding to and from a readable one (UTF-8)

* clang

* add missing characters

* support all diacritic variants

* fix a character

* remaining cases

* fix tests

* fix memory leak?

* clang

* add custom characters w/ diacritics

* Update all-types.gc

* robustness

* minor bug

* move custom font decoding function to `FontUtils.cpp`

* Move valid source chars patching to Reader constructor
2021-10-19 00:02:18 -04:00
ManDude caac740aff
[decomp] fisher and FIN.DGO (finalboss) level (#899)
* decomp `fisher`, `robotboss`, `light-eco`, `green-eco-lurker`, `sage-finalboss`, `robotboss-weapon`, `robotboss-misc`

* fixes

* add files

* add `:states` list to `deftype` and fix files

* test state forward decl's on a few more types

* also the refs

* add light-eco

* whatever
2021-10-16 14:06:33 -04:00
water111 f87646e8ce
Small state fixes (#901)
* small fixes

* catch uncaught exception
2021-10-15 21:31:22 -04:00
water111 3a1c9eaf75
[decompiler] clean up offline test program, reorganize decomp order (#895)
* make a new offline test

* finish up offline test and fix crash bugs
2021-10-12 20:33:26 -04:00
water111 b2052016e2
[decomp] sky/time of day (#883)
* time of day

* goal code seems to work

* stars at wrong spot

* stars and sun work

* debugging clouds

* fix texture correction

* sky works

* cleanup, add profiler

* clean up

* final clean up

* offline tests

* missing include
2021-10-10 20:07:03 -04:00
ManDude 4665b5a246
change type of seconds and clean up opengl includes (#887)
* change type of `seconds`

* fixes to pc pad input (visual only)

* strip down openGL to the version we're actually using for now (4.3 no extensions)

* turn on this opengl message

* really minor inconsequential change
2021-10-06 19:32:58 -04:00
water111 845802ca45
memory cards (in progress) (#868)
* c++ memory card stuff

* saving kinda works

* load working

* more progress

* clean up
2021-10-01 23:12:34 -04:00
water111 188373a3f6
decompile some drawable stuff and fix a few small bugs (#859) 2021-09-28 19:24:09 -04:00
water111 f0ceea8b2e
[sparticle] 2d hud particles (#849)
* wip, taking a break to work on asm stuff first

* the goal code for sparticle

* mips2c the first sparticle asm function

* temp

* particle processing no longer crashing

* temp

* working texture cache for vi1 and hud textures

* sprites

* cleanup 1

* temp

* temp

* add zstd library

* temp

* working

* tests

* include fix

* uncomment

* better decomp of sparticle stuff, part 1

* update references
2021-09-26 11:41:58 -04:00
water111 d777337095
add zstd library (#854) 2021-09-21 22:52:18 -04: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 f9d8fcd6e4
[decomp] add mips2c converter (#842)
* mips 2 c basic version, not yet tested

* calling works without crashing, but the function doesn't

* it works

* add test

* cleanup and actually add the test

* dont use mips2c by default for font

* clean up formatting
2021-09-11 20:52:35 -04:00
water111 9fdbc2d974
[goalc] fix static array length (#836)
* fix static array length

* add some more small fixes
2021-09-08 18:49:49 -04:00
ManDude 89ccb8cbc7
[decomp] progress (#780)
* cleanup `main`

* whitespace

* start `progress` decomp pt1

* fill in more stuff

* Update label_types.jsonc

* run cheats

* clang

* make most of `progress` decompile

* `progress` pt 2

* [decompiler] support dynamic format strings

* Make `progress-draw` decompile and almost all `progress`

* make clang shut up

* fix unhandled format string

* fix `progress-draw`

* Update DecompilerTypeSystem.cpp

* fix?

* fixes

* fix a few functions

* make `language-enum`

* warn on weird floats

* fix minor pad bug

* dump stuff in `progress`

* make `progress-screen` enum

* progress progress

* update refs and fix stupid bug

* trying to get it to work

* it works!?

* disable sound functions

* fixes

* final touches

* tests

* tests

* add process allocations

* use the right register for windows

* another try for windows, counting is hard

* one more try

* use process allocations

Co-authored-by: water <awaterford111445@gmail.com>
2021-09-06 20:35:03 -04:00
water111 c2c6d3ba46
[decompiler] detect res-lump macros (#796)
* support res lump float

* handle data macro

* rest of res macros

* add vi3 to the build system

* missing close paren
2021-08-31 15:01:54 -04:00
water111 24fe2c78c0
[goalc] Address-to-line (#783)
* refactor debug info stuff before adding form to emit

* source mapping working for non-macro sourced forms

* support macros
2021-08-26 20:33:00 -04:00
water111 7a5562106e
Compiler performance improvements and error clean-up (#782)
* compiler cleanup and error improvement

* fix test
2021-08-24 22:15:26 -04:00
water111 403bb5f4de
[decomp] game-info (#779)
* support more process stuff

* more of game info

* add ref file

* progress on save
2021-08-22 20:12:47 -04:00
water111 97ab6a4e12
add support for non virtual states (#764)
* add support for non virtual states

* typecheck go

* start on virtual states

* more support for virtual states

* offline passes

* fix tests

* use behavior shortcut instead of lambda

* final cleanup of virtual go

* unused var warnings and fix inconsistent enum decompile order on win vs linux

* fix thread safety bug with goal symbol table and vif1 interrupt handler

* fix type mistake
2021-08-17 20:54:03 -04:00
water 9495e91259 online tests pass 2021-08-09 21:54:40 -04:00
water 40ecd92272 Merge branch 'master' of https://github.com/water111/jak-project into w/dma-for-font 2021-08-09 21:41:25 -04:00
Tyler Wilding f438ba4e84
decomp: shadow (#681)
* decomp: Almost finish `shadow` blocked on static inline-array

* decomp: Add support for `sparticle-launcher` static data

* decomp: finalize `shadow`

* add definitions for sparticle related symbols

* actually fix the crash
2021-08-09 19:07:11 -04:00
water b4846f0491 hook up profiler 2021-08-08 21:50:34 -04:00
water f25b0f0de2 some clean up 2021-08-08 13:20:54 -04:00
water ef6204e353 closer 2021-08-07 18:57:13 -04:00
water 21684bd104 misc bug fixes, now draw string generates dma data 2021-08-05 20:29:36 -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
ManDude 26c3fb65e9
make some macros for DMA stuff (#725)
* [compiler] allow infinite args for `logior`

* make some dma macros and use them on `display`

* [goos] add `string->symbol`

* make a sketchy macro

* fix tests

* `with-dma-bucket` and `dma-buffer-add-vector4w-2`

* cleanup `debug`

* cleanup `menu`

* go thru `texture` pt 1

* finish `texture`

* `sprite` pt 1

* `sprite` pt 2

* `generic`

* `gs` and `main`
2021-08-01 17:11:32 -04:00
Tyler Wilding d400ec3b2d
decomp: mood (#672)
* decomp: Almost finished `mood`, but confused over the `mood-context` type!

* only function that remains involves vftoi / ppach instructions

* stash

* decomp: fix inline array access issue

* decomp: finalize `mood`

* linting
2021-08-01 16:11:22 -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 f3f32cca5b
Make dgo unpacker work on pal dgos with wrong size (#714)
* make dgo unpacker work on pal dgos with wrong size

* format string
2021-07-24 11:17:27 -04:00
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