Commit graph

75 commits

Author SHA1 Message Date
Ziemas 50dfa9a25b
Fix GCC 12 build (#1530) 2022-06-23 16:16:48 -04:00
ManDude 7d5045ab3f
PAL & NTSC-J support + updates (#1490)
* PAL dumps files

* alrighty then

* make PAL warning slightly more specific

* PAL patches for `title-obs`

* Update all-types.gc

* PAL patch `beach-obs`

* `process-taskable` PAL patch

* `ambient` PAL patch

* `yakow` PAL patch

* `village-obs` PAL patch

* `sparticle-launcher` patch

* `swamp-obs` PAL patch

* `sequence-a-village1` PAL patch

* typo

* errors

* `powerups` PAL patch

* `ogreboss` PAL patch

* jak 1 v2 encoding

* `load-boundary` PAL patch

* `flying-lurker` PAL patch

* `mayor` PAL patch

* update game encoding to PAL (v2) encoding

* `cam-debug` and `cam-update` PAL patch

* `fisher` PAL patch

* `target` PAL patch

* `target2` PAL patch and fix text compiling

* `target-death` PAL patch

* `target-racer-h` PAL patch

* `logic-target` PAL patch

* `main` PAL patch

* `snow-flutflut-obs` PAL patch

* `rolling-obs` PAL patch

* `gsound` PAL patch

* update refs

* `progress` and `progress-draw` PAL patches

* clang

* wrong.

* complain

* clang

* fix test

* fix blurry jp text

* fix weird interrupt lag from setting window size

* patch more text lines, special handling for credits

* Update FontUtils.cpp

* Add xdelta3 and file patching interface

* add window lock toggle and update settings ver

* better particle hacks

* add PAL support to extractor

* Fix credits

* also NTSC-J support

* make xdelta3 a separate library

* address feedback

Co-authored-by: water <awaterford111445@gmail.com>
2022-06-22 05:16:34 +01:00
ManDude 78b6ba3d27
add xdelta3 library for binary file patching (#1514) 2022-06-21 20:45:45 -04:00
water111 196c09a232
Clean up libstb_image (#1494) 2022-06-19 19:48:34 -04:00
water111 3e7832e1a7
[custom levels] add 3rdparty library for gltf files (#1481) 2022-06-18 15:07:40 -04:00
water111 7bf19759d3
fix goalc crash and clang warnings (#1441) 2022-06-11 16:52:27 -04:00
Tyler Wilding 9fdf0bbc2f
tools: Add cutscene player / subtitle editor window (#1429)
* stash

* temp

* tools: subtitle tool works! just gotta fill out the db / polish UX

* tools: added configuration for every subtitle we have so far

* tools: add some colors to the editor, time for repl controls and make it run the code!

* tools: continuing polish of tool, getting very close

* tools: finished UX polish, just need to write deserializers

* tools: added deserializer for subtitle data

* tools: exported subtitle files, all data appears intact

* tools: more UX polish and test all the cutscenes, majority work

* assets: update subtitle files

* lint: formatting and cleanup

* lint: codacy lints
2022-06-11 16:32:27 +01:00
water111 0e91709063
fix a few compiler warnings (#1419) 2022-06-05 15:00:35 -04:00
water111 1432971e62
fix misc bugs preventing the game from starting (#1369)
* fix misc bugs preventing the game from starting

* winodws fix
2022-05-21 16:51:09 -04:00
Ziemas 07cc0ddc35
Initial Sound Implementation (#1325) 2022-05-19 16:54:36 -04:00
water111 f330b396a5
ignore warning on xxhsash (#1323) 2022-04-18 18:42:31 -04:00
Tyler Wilding c18502d5f5
extractor: Validate ISO contents and report specific errors (#1322)
* deps: add `xxhash` library

* extractor: hash ISO files as they are extracted

* extractor: report on game data validation errors

* lint: formatting

* extractor: automatically pick the right decompiler config
2022-04-18 18:33:55 -04:00
Tyler Wilding ab063bf7b0
extractor: split up extraction process and allow overriding data dir path (#1302)
* extractor: split up extraction process and allow overriding `data` dir path

* lint: formatting

* deps: add CLI11 dependency

* extractor: refactor CLI arg handling
2022-04-15 18:01:47 -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
water111 9c00b0c135
[graphics] generic merc (#1192)
* begin generic merc

* more generic stuff

* generic dma generation not crashing, at least until high-speed-reject

* c

* unpacker for generic

* starting to work

* small fixes

* more fixes

* more progress

* cleanup

* fix tests

* no custom imgui assert on windows
2022-02-24 22:33:10 -05:00
Tyler Wilding ffb04ddd10
Documentation cleanup and some feature improvements (#1155)
* ci: switch to codacy for coverage

* docs: update badges

* decomp: allow overriding config flags via CLI

* cleanup: top level file cleanup

* docs: big README overhaul

Attempt to close #1128 and #1086

* decomp: attempt to detect if `iso_data` is missing or wrongly extracted

* game: switch to `fpng` for screenshots, allow for compression

closes #1035

* game: switch vsync control to a checkbox

* lint: format cpp files

* lint: format json files

* docs/scripts: organize taskfile
2022-02-12 17:48:50 -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 9ff71412e5
[runtime] pckernel implementation (#1032)
* toggle for ripping level models

* Create pckernel.gc

* builds and works

* fix defs

* resolution info works

* native letterboxing

* menu

* Fullscreen buttons

* Update glfw

* fix fullscreen taking over everything for some reason

* fix screenshots and add more menu options

* Cleanup DMA mess in load boundary render code (first try!!)

* Update default-menu.gc

* clang

* fix accidental macros in pairs

* refs

* fix null reference bugs

* add lavatube

* custom aspect ratios work (3D only)

* custom aspect ratios work (3D only)

* fix aspect ratio and non-4x3 debug text

* change `sceOpen`

* deadzone setting

* merge fixes

* check out `debug-pad-display`

* update readme imgs

* settings save works

* oops

* settings read/load (incomplete)

* add `:stop` to debugger and fix detach on Windows

* settings load works

* fullscreen and aspect ratio setting fixes

* swap menu options for convenience

* settings loads automatically properly

* fix panic and font hack edge case

* add rolling, ogre, snow, swamp, sunken b, jungle b

* Fixed borderless on windows please work

* Update fake_iso.txt

* remove error from opengl debug filter

* update refs

* minor tfrag tod palette lookup change

* accidentally nuked all opengl errors
2021-12-30 18:48:37 -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 f605b0ee38
decomp: generic-obs (#894)
* stash

* more

* and more

* like 80% done

* trying to update things

* refreshed work on generic-obs

* blocked: down to only decompiler issues!

* decomp: finish `generic-obs` skip over the failing functions for now

* `pair` -> `object`s and fix 2/4 of the functions i had skipped

* address feedback
2021-11-13 23:31:29 -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 18714ba536
[decomp] load boundaries (#922)
* mostly working

* fixes

* very small fixes

* fix tests

* clang
2021-10-20 19:49:32 -04:00
Tyler Wilding 45318be063
decomp: finish _almost all of_ the remaining camera code (#845)
* decomp: mostly finish `cam-master`

* decomp/scripts: lots of work in cam-states

* stash

* Merge remote-tracking branch 'water111/master' into decomp/camera-master

Updated submodule third-party/googletest

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

* decomp: mostly finish `cam-states` need to fix a macro issue

* blocked: `cam-master` decompiler crash when adding casts

* decomp: finish `cam-states-dbg`

* decomp: mostly finish `pov-camera` with the exception of joint-related code

* decomp: `cam-debug` finished decompiling, no way does this compile yet though

* decomp: considerable work done in `cam-layout`

* decomp: `cam-layout` almost done!

* decomp: `pov-camera` finished, TC tests will fail for now

* decomp: working on resolving issues

* decomp: cam-layout decompiling

* fixing more issues in cam-master...one event handler remains

* skip problematic function in `cam-master` for now

* gsrc: update res macros

* decomp: finish `cam-states`

* decomp: giving up on `cam-debug`

* tests: allow skipping state handlers in ref tests

* decomp: working through cam-layout bugs

* decomp: allow for shifting non-integers

* decomp: finalize `cam-layout` and `cam-master`

* decomp: finalize `cam-states`

* cleanup: bi-annual formatting of the casting files

* formatting

* address feedback - leave the float labels alone for now

* address feedback

* linting/formatting

* update gsrc and ref tests

Co-authored-by: ManDude <7569514+ManDude@users.noreply.github.com>
2021-10-16 21:01:23 -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 d777337095
add zstd library (#854) 2021-09-21 22:52:18 -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
Tyler Wilding 4ff2130d55
decomp: decompile almost all the platform related files (#812)
* deocmp: `plat` finished, `baseplat` started

* decomp: finish `baseplat`

* decomp: finish `plat-button`

* decomp: finish `plat-eco`

* decomp: finish `citb-drop-plat-CIT`

* decomp: finish `cit-drop-plat-L1`

* decomp: finish `plat-flip`

* decomp: added a bunch of label defs

* decomp: `plat-button` ref test added

* stash

* decomp: finish `baseplat`

* decomp: finish `plat`

* decomp: finish `plat-button`

* tests: fix offline-test to handle multi-DGO files better

* decomp: finish `citb-drop-plat-CIT`

* decomp: finish `plat-flip`

* decomp: finish `wedge-plats`

* tools: fix memory analyzer, skip invalid type

* decomp: finish `wall-plat`

* fix ordering

* fix some casting issues

* cleanup after conflict resolution

* address reviews
2021-09-06 21:10:19 -04:00
water111 31d98cf0d0
update gtest, fix some small bugs (#818) 2021-09-02 18:32:22 -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
water111 551a9c4955
[decompiler] ASM Branching Support (#677)
* basic example working in geometry

* before updating offline'

* clean up

* temp

* progress
2021-07-05 16:07:07 -04:00
Tyler Wilding 17aedd894d
decomp: hint-control | menu | default-menu (as much as possible) (#632)
* decomp: mostly done `hint-control`

* decomp: Started and decent chunk of `menu` done

* temp stash

* decomp: escape from `menu` hell

* decomp: starting on `default-menu`

* decomp: As much as i can do in `default-menu` at this time

* decomp: clean up `hint-control`

* decomp: fix reference tests

* temp stash

* decomp: finalize `menu`

* decomp: add `menu` to goal_src

* decomp: finalize `hint-control`

* decomp: Resolve TypeConsistency issues

* and fix reference tests

* address feedback

* format and lint

* fix tests
2021-07-04 18:25:08 -04:00
0x715C 387a394be9
Update remote third-party/googletest (#602) 2021-06-18 21:12:55 -04:00
water111 0aa474f12b
[decomp] finish actor-link-h and a few more (#592)
* finish actor-link-h

* decompile files

* fix pp issue
2021-06-14 20:46:54 -04:00
water111 0c751dd13e
fix zip library bugs (#508) 2021-05-20 14:50:52 -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 60c670df3a
Use dragonbox to print floats (#481)
* add new float printer

* more includes

* compare as floats
2021-05-13 21:05:05 -04:00
Tyler Wilding acac7d0e4d
deps: Update {fmt} to 7.1.3 and include ranges.h cause its nice (#479) 2021-05-13 00:40:43 -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 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
water111 5093b97cda
[Decompiler - New IR] Add AtomicOp (#181)
* wip decompiler ir

* add AtomicOp stuff

* fix windows build and warnings

* add instruction parser

* include

* make minilzo shared

* odr fix

* a

* fix merge conflicts

* move decompiler into namespace

* update the code coverage to include the decompiler

* add demo test

* add register use test to example test
2021-01-06 20:04:15 -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
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 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 660ef41136
Update documentation and clean up (#129)
* cleanup

* clean up file layout
2020-11-21 12:52:38 -05:00