model: 92.19% -> 92.29% (ObjModel_LoadModelData + modelLoadAnimations exact) - #40
Open
SirEnkido wants to merge 2 commits into
Open
model: 92.19% -> 92.29% (ObjModel_LoadModelData + modelLoadAnimations exact)#40SirEnkido wants to merge 2 commits into
SirEnkido wants to merge 2 commits into
Conversation
…nge on the fresh model buffer, allocSize local) Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…cursor is the u8* param, model id kept in a local reused for the amap data size) Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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.
What changed
Two small plain-C changes in
src/main/model.c(plus a prototype update ininclude/main/model.h):ObjModel_LoadModelData— retail callsDCInvalidateRange(model, allocSize)on the freshlymmAlloc'd, 16-aligned model buffer beforeloadAndDecompressDataFiledecompresses into it (the standard GC pattern before a DMA/decompress into a new buffer). The size is a named localallocSize = dataLen + amapSize + 0x1f4reused for both calls. 93.48% → 100%modelLoadAnimations— the animation write cursor is theu8*parameter advanced in place (buf += sz), while the model id lives in a localint id = modelIdlater reused for the amap data size — matching the surrounding style (hdr = modellocal copy). Only a register-order difference. 99.66% → 100%Evidence
main/main/modelfuzzy (report.json, GSAE01_rev1): 92.19% → 92.29%, matched functions 73 → 75 of 85ninja all_source progress build/GSAE01_rev1/report.jsonexits 0AGENTS.md: no pragmas, no asm, no hardcoded addresses, no debris; only the two intended files touchedNotes for review
modelApplyBoneTransform/modelBoneTransforms_nextcustom register convention,setGQR6/7mtspr, the three paired-singleObjModel_Transform*Vertices*loops) — asm is banned outsidesrc/dolphin/, so left as-is.modelInitBoneMtxs/ObjModel_Blend*Streamare pure nonvolatile register-order residue after ~10 clean-C shape experiments each.clang-format --dry-runfails onmodel.c, but every violation is pre-existing onmain(whole-TU brace style); this diff introduces none, and reformatting the whole TU is out of scope here.Produced by Claude agents following
AGENTS.md, operated by @SirEnkido.🤖 Generated with Claude Code