Add function signatures for GAX 2.02#31
Open
dakrk wants to merge 1 commit into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I've been looking at FILA Decathlon, which uses this exact driver version.
I have identified the right GAX function signatures, however this isn't all that has changed between versions.
The Gax2Params structure in 2.02 doesn't appear to have
fx_mixing_rate(judging by the beginning ofgax2_init), but still has the unknown field that is betweenmixing_rateandflags. Aftervolumeand before the 24 byte field as documented in this gist is also another unknown 2 bytes. Not changing this order gives a song that's inaudible, asvolumeis at a mismatching offset. A diff for the driver constants file would be:I presume
unknownbeing 28 bytes there is a V3 change, since the offset constants past that point aren't used for the V2 GSF driver and only for V3, with V2 just being fed an immediate of 0x2C forfxdirectly.Finally, the WRAM location identified by
GaxDriver::FindGaxWorkRamPointerV2doesn't appear to work for this game. It points to a WRAM location that's used internally by GAX functions, but it's not one that works for playback when passed to the params struct. In the function at0800950cin the game is a condition that chooses between two different WRAM locations depending on the result ofgax2_estimate. These two WRAM locations are03004b00 : size=0xc80or030039a0 : size=0x1000. The smaller WRAM location only works for the few short tracks, while the larger one works for all songs.I'm not sure which way you'd ideally want this to be approached in gaxtapper, hence this all being mentioned here and not done in separate pull requests. What I propose though is that all struct offsets shall be inserted into the driver the same way the function pointers are, and if
DriverWorkRamSizeis 0 it shall fall back to usinggax2_estimate. This (and especially the latter proposal) should allow you to unify the GAX 2 and 3 driver code again.