GMSP01: decompile video height getters - #135
Open
999sian 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.
In GMSP01 the three video height getters take the TV format from the caller (
__FUl) instead of querying VI themselves (__Fvin GMSJ01). They were undecompiled, which was two of the six undefined symbols at PAL link time.System/Resolution.cppis now 12/12 matching for GMSP01 (SMSGetGCLogoVideoHeight0x20,SMSGetTitleVideoHeight0x40,SMSGetGameVideoHeight0x40). Structure is unchanged from the JPN source; only the format source differs, and the GCLogo -> Title -> Game chain still collapses to a singlebl SMSGetGameVideoHeight__FUlvia one-level inlining, as in the retail binary.Call sites updated so GMSP01 still compiles. Reusing the format each function already queries also improves
RenderModeObj74.23% -> 78.86% (SMSSetupGCLogoRenderMode79.58% -> 87.92%,SMSSetupTitleRenderMode81.91% -> 88.21%).GMSJ01 is unaffected:
Resolution.cpp,RenderModeObj.cppandMarDirectorSetupObjects.cppall compile to byte-identical objects before and after (checked by compiling both revisions with-DVERSION_GMSJ01and comparing).Verification (GMSP01):
validate-symbol-order.pypasses presence/order/linkage on all three TUs againstmarioEU.MAP; symbol order including the two UNUSED entries matches the map exactly.Open question: this is the first use of
-DVERSION_GMSP01, whichconfigure.pyhas always emitted but nothing consumed. Happy to reshape it if you'd prefer a different mechanism for version divergence.Not addressed:
OSGetConsoleType()/OSGetEuRgb60Mode(). That isn't implemented, so those functions stay non-matching.MarDirectorSetupObjectsgoes 96.89% -> 96.85%; the target inlines the call there and we can't inline cross-TU.OSGetEuRgb60Mode,OSSetEuRgb60Mode,OSGetLanguage(OSRtc) remain undefined.marioEU.MAPlistsSMSGetDisplayWidthMax/SMSGetDisplayHeightMaxas UNUSED at 0x74; the currentreturn 720/return 574bodies compile to 0x8, so PAL's are probably format-dependent too.