Send connect codes to game during playback #413
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.
Goes hand in hand with this PR for the gecko codes.
Sends 40 additional bytes in the Game Info Block that contain connect codes.
TL;DR this allows dashboard applications that read into dolphin's memory during playback (e.g. M'Overlay) to reliably auto-grab the port# of a specific player. This is especially helpful for replay queues where the same connect code changes ports from replay to replay
I long-posted about this in the discord, but suffice it to say the alternatives all kinda suck. The only place they currently exist in dolphin's memory at all is in the metadata element [somewhere in dolphin's heap]. The location isn't quite reliable enough to narrow down search locations and keep the scanning overhead low. Trying to find the filename (and somehow match that to the currently running game) isn't much better unless you also build your app to send the replays to dolphin in the first place.
This is my first time directly modifying the ASM and dolphin so let me know if anything needs to be changed. I was able to compile and run a replay to confirm that nothing seemed immediately broken, but I'm not sure I'd even be able to tell what broke lol.
A quick pass with Cheat Engine also confirmed that the connect code showed up within spitting distance of the display names as expected.