Fixes https://github.com/open-goal/jak-project/issues/2635 by zeroing
out the volume of the VAG command on the first chunk upload. This isn't
a "true" fix because I'm only addressing the symptom instead of the
actual problem.
But this did allow me to complete Mountain Temple without a single chirp
of static from the `mtn-step-plat-rocks` explosion sounds. They were
completely silent until I hit their buttons. All other sounds in the
game, to my untrained ears, sounded unaffected.
As an additional concern, I clear the IOP threads' `waitType` whenever
their `state` is set to Ready. This didn't seem to affect the sound bug,
but it seemed to be "the right thing to do." Will happily remove this
from the PR if it's deemed unnecessary, extraneous, or ought to be
addressed separately.
This includes all the collision stuff needed to spawn `target`,
decompiles the sparticle code and adds some of the PC hacks needed for
merc to run (it doesn't work quite right and looks bad, likely due to a
combination of code copied from Jak 2 and the time of day hacks).
There are a bunch of temporary hacks (see commits) in place to prevent
the game from crashing quite as much, but it is still extremely prone to
doing so due to lots of missing functions/potentially bad decomp.
---------
Co-authored-by: water <awaterford111445@gmail.com>
* Use sleepthread in RPC loop
* Keep a pointer to current IOP thread
* Implement IOP thread scheduling based on priority
And implement DelayThread as an actual delay.
* Run IOP flat out
* Use information from scheduler in wait_run_iop
* Lock sif mutex in set_rpc_queue
* always use kernel dispatch with wait_run
* Loop in dispatch until no thread is ready
* Use timestamp for next wakeup
instead of duration
* Wrap IOP thread entrypoints for safety
Libco threads are not supposed to return from their entrypoint
* Use a queue for IOP thread wakeups from EE thread
* IopThreadRecord -> IopThread
* add libco
* Use cooperative threading for IOP threads
* Ugly solution for overlord start
Needs to run in a thread
* Clean out thread shutdown logic
* Update comments
* extractor: refactor and cleanup for multi-game support
* deps: switch to `ghc::filesystem` as it is utf-8 everywhere by default
* extractor: finally working with unicode
* unicode: fix unicode cli args on windows in all `main` functions
* fix IOP getting stuck on music load
* fix regression? and clang
* fix a decomp
* fix another regression
* another
* fix "all actors"
* another regression!