Commit graph

73 commits

Author SHA1 Message Date
Ziemas 07cc0ddc35
Initial Sound Implementation (#1325) 2022-05-19 16:54:36 -04:00
ManDude 0cdeed9be7
minor windows fixes (#1311)
* [pp2] put `define` dest on a single line

* update source!

* Update type_analysis.cpp

* update old credits & racer code

* change clang-cl args (REALLY force avx)

* Update credits_REF.gc

* comment small unused code

* add timer to decompiler

* fix unnecessary copy-constructors (no speed increase)

* fixes

* Update expression_build.cpp

* wtf is this thing anyway

* im bored.

* clang

* fix!

* Revert "fix!"

This reverts commit 5b1ce6c718.

* Revert "clang"

This reverts commit 5e67d9ccd1.

* Revert "im bored."

This reverts commit 070e957ce8.

* Revert "Update expression_build.cpp"

This reverts commit b94d092fc5.

* Revert "fixes"

This reverts commit f3d871f60a.

* Revert "fix unnecessary copy-constructors (no speed increase)"

This reverts commit 9100725802.

* Keep the random inoffensive changes

* Revert "Update type_analysis.cpp"

This reverts commit d2456a5c75.

* Update type_analysis.cpp
2022-04-17 21:11:09 -04:00
ManDude 65de778b5c
some fixes (#1308)
* Only append compiler flags in cmake

* add `RelWithDebInfo-clang` windows build

* bump serializer initial buffer size to 32mb

* extra flags for msvc

* proper anaphoric goal macros

* specify windows sdk version?

* fix "Object files are not named properly" fake error

* Update goal-lib.gc
2022-04-15 18:32:37 -04:00
Tyler Wilding dba95660ea
release: fix windows artifacts and stop building asan when releasing on linux (#1283)
* release: fix windows artifacts and stop building asan when releasing on linux

* release: use valid paths in the container's context
2022-04-04 20:50:08 -04:00
Tyler Wilding e74bd3b32b
ci: Add an automated release process (#1262)
* ci: bring over some of my code to enable the process

* ci: cleanup builds a bit and add release stuff

* ci: fix paths and such after debugging

* ci: fix flowchart

* cmake: easily toggle between building everything dyn or statically linked

* ci: build release artifacts statically linked

* ci: fix some issues after testing once again, linux binaries are still too big
2022-03-29 22:47:08 -04:00
Tyler Wilding 014da6f59d
game: auto-save pc-settings to user's home directory as well as memcard files (#1233)
* cmake: reduce warning spam especially from libs

* runtime: add FS helper functions

* game: save/restore pc-settings | add original aspect option

* game: overwrite unloadable settings with defaults

* temp: unable to set the games aspect-ratio in the boot else crash?

* runtime: save memcard files to user directory as well

* runtime: fix `pckernel` load order which resolves setting the orig aspect ratio

* lint: format

* cmake: revert warning suppression, it's just causing problems it seems

* fix the order of the rest of `pckernel` and creation of obj file paths

* lint: formatting

* game: don't save settings on startup even if they are corrupted
2022-03-20 20:29:44 -04:00
ManDude 8adac544cf
Allow symbol table expansion. (#1191)
* Allow symbol table expansion.

* fix debugger

* fix bits_for_sym

* use a `static_assert` over `throw`
2022-02-24 22:43:00 -05:00
ManDude af447aeab7
[game] subtitles support (tools + goal + text file). (#1174)
* add subtitles support (tools + goal + text file).

* add to build system proper

* better handling of line speakers

* billy test subtitles

* adjust timings

* better handling of subtitle timing + citadel subs

* press square to toggle cutscene subtitles

* improve DirectRenderer performance

* clang

* dont error out if there's no user files

* make system supports multiple inputs for subtitles

* clang

* oh no typo!!

* avoid future issues

* fix warp gate crash

* remove no longer necessary code in DirectRenderer

* remove temp prints

* delete triplicate code

* i found a better way

* fix make issues with subtitles

* force avx compilation
2022-02-19 13:10:10 -05:00
water111 5135ea9659
[graphics] reduce the size of fr3 files (#1175)
* first pass

* first pass at shrinking fr3s

* only need to load vertices once

* avx2 detect and switch

* fix build

* another ifx'

* one more

* fix the sky and stupid math bug in size check
2022-02-16 22:13:18 -05:00
Hat Kid bde49ea079
Implement Discord Rich Presence (#1137)
* add discord rpc library

* add discord rpc

* add cutscene check

* fix build (hopefully)

* fix build

* edit paths

* Replace prebuilt discord-rpc lib with repo clone
2022-02-07 23:53:36 -05:00
ManDude 5b44aece75
random fixes + support clang-cl on visual studio (#1129)
* delete unused shaders

* hide some options in debug menu

* change fullscreen logic a bit

* add "all actors" toggle

* borderless fix and fix alpha in direct renderer untextured (do we need a separate shader for that?)

* fix fuel cell orbit icons in widescreen

* fix `curve` types

* refs

* fix levitator task...

* fix some task stuff

* update font code a bit (temp)

* cmake, third-party and visual studio overhaul

* Update .gitmodules

* update modules

* clone repos

* fix encoding in zydis

* where did these come from

* try again

* add submodule

* Update 11zip

* Update 11zip

* Update 11zip

* delete

* try again

* clang

* update compiler flags

* delete 11zip. go away.

* Create memory-dump-p2s.py

* properly

* fix minimum architecture c++ compiler flags

* fix zydis

* oops

* Update all-types.gc

* fix clang-cl tests

* make "all actors" work better, entity debug qol

* update game-text conversion code to be more modularized

* Create vendor.txt

* fix typos and minor things

* update refs

* clang

* Attempt to add clang-cl support to vs2019 and CI

* vs2022 + clang-cl

* srsly? fix clang build

* Update launch.vs.json

* extend windows CI timer
2022-02-07 19:15:37 -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
Tyler Wilding 08d3294fcd
vs: add presets and flags to take advantage of VS 2022 stuff (#957) 2021-11-09 23:22:49 -05:00
ManDude bacf9fd130
PAL jak 1 decompiler profile (#891)
* [decompiler] pal "support"

* inoffensively add some PAL-updated types

* fixes!

* clarify some things for windows

* Update README.md

* dummy

* config fixes

* dummy
2021-10-15 18:17:51 -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
Tyler Wilding b95ec1062e
ci: Add buildcache to all CI builds (#828) 2021-09-06 14:29:34 -04:00
water111 ccdfa01a88
Add the imgui library (#785)
* add the imgui library

* use third-party glfw include

* another try at includes

* again

* another try
2021-08-29 14:54:16 -04:00
Tyler Wilding 9e2b49abaa
Automatically watch PCSX2 savestate directory and analyze the EE Memory (#507)
* add elzip library (doesn't require zlib)

* Can analyze directly from a PCSX2 save-state now

* Add scaffolding to auto-watch for new save-states

* .gitattributes fix
2021-05-20 14:18:28 -04:00
water111 fe336b7b5f
[compiler] fix warnings in repl lib and add macros to autocomplete (#317)
* fix warnings in repl lib and add macros to autocomplete

* fix crash on ctrl-c, build runtime as static lib and make goos prompt look fancier

* some tweaks for linux build
2021-03-11 12:54:16 -05:00
ManDude 9430b4772a
Implement runtime display (test) (#318)
* Implement runtime display (test)

* Update runtime.cpp

* [game display] add "-nodisplay" argument

* style fixes

* Update gfx.cpp

* [deci2server] fix deadlock when killing a Deci2Server

* add libxrandr to linux github test

* correct package name to libxrandr-dev

* set g_main_thread_id in exec_runtime

* add libxinerama to linux test packages

* correct the name

* add libxcursor1 package

* Update linux-workflow.yaml

* add libxi-dev

* fix constructor for g_main_thread_id

* fix submodules + use -nodisplay during tests

* move the gfx loop to its own function and use a lambda for exit conditions

* fix include

* fix include

* fix includes (for real this time)
2021-03-09 23:51:28 -05:00
Tyler Wilding 8bba3d7fd7
REPL: Add clear-screen / auto-complete / basic hints and syntax highlighting (#316)
* swap to replxx from linenoise

* repl: Implement form auto-tab-completion

* repl: color coordinate the prompts

* repl: Add some basic syntax highlighting, bracket pairs and forms (all one color)

* repl: A more consistent starting screen for the repl

* repl: bug fix for auto-complete

* debug linux

* linting
2021-03-07 23:41:21 -05:00
Tyler Wilding 5b6a8dcf98
third-party/licensing: Switch miniLZO usage to LZOkay (#232)
* add rough jak 2 config so the decompiler can atleast unpack dgos

* third-party: commit lzokay

* Switch to lzokay for DGO decompression

* third-party: Remove minilzo library

* third-party: Add lzokay as a SHARED lib
2021-02-06 09:54:23 -05:00
bb010g 2436a8a541
Nixpkgs support (#228)
* Use env shebangs

* CMake cleanup, install() invocations, & CTest

`ctest` & the `test` target work now

* Nixpkgs support
2021-02-03 21:29:46 -05:00
water111 51f70b6f4b
[Tools] Add DGO packer and unpacker (#219)
* add dgo tools

* make codacy happy
2021-01-27 20:46:58 -05:00
water111 3331e9cd00
Replace spdlog (#185)
* remove spdlog

* clang format and fix windows

* add format shared

* windows sucks
2021-01-06 12:16:39 -05:00
Tyler Wilding 69f7f46477
Add Address Sanitizer support to MSVC and CMake (#182)
* msvc: Add Address Sanitizer

https://devblogs.microsoft.com/cppblog/addresssanitizer-asan-for-windows-with-msvc/

* cmake: Add Address Sanitizer

* docs: Update ReadME

* see if we can replicate the test failure

* windows fixes maybe

* cmake: Compile with gcc and clang (only coverage on

* hacky try again

* clean up

* fix clang issues

* linting

Co-authored-by: water <awaterford111445@gmail.com>
2021-01-04 23:32:51 -05:00
water111 95c81b675a
add asan build (#179) 2021-01-03 12:31:42 -05:00
water111 25301a8bbc
[Decompiler, Game] Run type prop on gstring (#168)
* run type prop on gstring

* add types-h

* new settings

* cmake switch

* down to 4 failing functions

* clang format
2020-12-26 11:09:59 -05:00
water111 5cb6368b9a
Clean up asm for format (#164)
* clean up asm for format

* fix windows

* remove rpc-call hack

* revert cmake version change

* clang format

* asm fix for windows
2020-12-23 11:15:41 -05:00
water111 ea479bee98
Add enums and some cleanup (#148)
* support enums

* better compiler warnings

* tweaks to build with clang
2020-12-02 19:51:42 -05:00
water111 660ef41136
Update documentation and clean up (#129)
* cleanup

* clean up file layout
2020-11-21 12:52:38 -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 566dc6070f
add zydis library and a simple test (#108) 2020-10-31 14:31:13 -04:00
water111 0451a06d76
Set up the compiler to ptrace the runtime (#107)
* set up the compiler to ptrace the runtime

* clang format

* move debugger state to a separate Debugger class

* support registers and break and continue

* documentation and fix windows

* make listener part of compiler, not a separate library

* implement memory read and write

* fix for windows
2020-10-31 14:07:43 -04:00
water 3d7ca5fb50 fix cmake setting for spdlog 2020-10-28 20:15:31 -04:00
water b1759dbd13 Merge branch 'doctashay-logging2' 2020-10-11 19:12:14 -04:00
water 651579c4bb Merge branch 'logging' of https://github.com/doctashay/jak-project into doctashay-logging2 2020-10-11 19:07:50 -04:00
water f7abe9c5f8 clean up some warnings and add some extra integer tests 2020-10-09 21:28:41 -04:00
Tyler Wilding 6e1dea4a65 Disable -Wshadow, also flakey test, or linux issue? 2020-10-09 20:23:31 -04:00
Tyler Wilding 76bede157d Merge remote-tracking branch 'water111/master' into generative-tests 2020-10-09 13:31:08 -04:00
Shay 0f916ed81e More minor fixes
spdlog now builds as a library with nasm workaround
2020-10-08 22:39:12 -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
doctashay 953e7c1ad5 Temp fix for spdlog + initial log to file implementation
Reduces verbose output by logging additional information to logs/game.log.
2020-10-06 16:03:33 -06:00
water 0fbffcd409 add cond to compare conversion 2020-10-03 18:36:02 -04:00
Tyler Wilding 663453769c Final polish on the integer tests, time to start converting the rest 2020-10-03 18:32:01 -04:00
water111 d03080c463
Build spdlog as a shared library (#59)
* change build settings for spdlog

* fix typo

* trying with j4 now

* try as a shared library

* add shadow warning back
2020-10-03 10:33:20 -04:00
doctashay c2cb053a5d
spdlog implementation (#58)
* Commit new spdlog implementation 

Hopefully resolves Linux build dependency errors

* clang formatting

* Fix Linux-only definition

Found the culprit!

* More Linux fixes

Linus Torvalds have mercy on my soul

* Replace printf logging with spdlog equivalent

Preserve previous printfs in comments for now. Spdlog needs to be configured to be thread-safe. Few additional printfs to convert later. No changes have been made to GOAL's internal printing system

* clang-format stuff

* ugh more clang-format

why

* Another shot

* CMakeLists.txt update

Fix issues related to spdlog version targeting

* Remove old prints + fix log types

Up next is the transition to a git submodule, should be simple enough

* spdlog is now a git submodule

* adapted for project

* Linux fix

* More fixes

Yikes

* Update for linux

I should really fix my WSL environment

* Update workflow.yaml

Hopefully will resolve issues with GitHub Actions on Linux
2020-10-03 09:39:04 -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
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