Repository navigation
feat(src): four functions in C (sky renderers, level-8 emitter, beam), three original assembly routines - #425
Open
DrLegitamate wants to merge 4 commits into
Open
DrLegitamate wants to merge 4 commits into
DrLegitamate wants to merge 4 commits into
Conversation
…mbly routines - func_002E3998 and func_002E3BD8, the sky's textured and Gouraud piece renderers (28 places each), in a new src/game/002E10B8-sky-g8.c. The old near misses stopped at a `daddu $a3` copy because they passed a fourth argument to func_002E3E54. That handwritten vertex transform takes three: its body never reads $a3, and its functional C already said "arg3 is unused". In retail, $a3 only holds the +0x2C halfword because that value dies before the call. With the real interface both functions match. - func_L08_0041E790 (levels 8 and 19): the retained draft matches unchanged on the current compiler, in its own L08_0041E790-g8.c with its recorded -O2 -G8 -ffunction-sections -g profile. The one missing division nop was a compiler difference, fixed in 1e7eac4. - func_002A05A8, func_002A0F48, func_002A1490 marked ASM_FUNC under the second criterion of AGENTS.md "Handwritten assembly" (needs a maintainer's agreement). The disassembler flags their trapping add/addi/sub as handwritten: 29, 7 and 32 of them. All three use $at as a working register. func_002A0F48 has 31 VU0 macro/COP2 instructions; func_002A1490 leaves by jumps with no return, like func_002A1130; func_002A05A8 has two cvt.w.s words in an encoding the compiler never emits. Removes the superseded near-miss and functional entries for the three matched functions. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017f7s8LKfAFAYnD6HxXEGy9
…t compiler - func_L03_0041DAD0: 7 rows (was 8), with the three $gp globals plain again (the `const` on two was an experiment, not evidence) and a struct view for the three rate stores. Only a $f2/$f3 swap is left. - func_L18_0043FFF8, func_L02_002EFB60, func_L00_00426C78: dated notes on what was tried today and what tied, so it is not repeated. - func_L00_00426C78 gets its missing README row. - docs/MATCHING-BLOCKERS.md: the func_002E3E54 interface finding behind the two sky matches. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017f7s8LKfAFAYnD6HxXEGy9
ByteMatch progress reportSCES_516.07
No function changes. SCUS_972.68_v2
No function changes. SCUS_972.68
No function changes. Commit 6375003 · Ratchet & Clank: Going Commando on ByteMatch |
The 1,600-byte beam renderer in the boot, in its own unit src/game/00308600-uv-g8.c (default -G8 profile). Its retained draft, adapted from RAC1's visibomb_and_pyrocitor.c, uses only approved SDATA aliases for the corner and UV arrays. On 31 October it stopped at one reloaded V pointer in the first UV loop. On the current compiler it matches unchanged; it was found by re-measuring the retained near misses. tools/build.py all --strict (USA v1.01): 28 programs OK, no C fallback; the boot now places 2,603 C functions. Unit tests, tests/check_repository.py and tools/progress.py --check pass. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017f7s8LKfAFAYnD6HxXEGy9
fd24afe removed the near-miss draft but, through a failed `git add`, left out the C itself: src/game/00308600-uv-g8.c and the marker change in src/game/00308600.c. This commit adds them. The checks reported in fd24afe were run on this complete tree. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017f7s8LKfAFAYnD6HxXEGy9
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 this changes
Four functions in C (USA v1.01: 59 placements):
func_002E3998src/game/002E10B8-sky-g8.c(new)func_002E3BD8src/game/002E10B8-sky-g8.c(new)func_L08_0041E790src/levels/shared/L08_0041E790-g8.c(new,-O2 -G8 -ffunction-sections -g)func_00308768src/game/00308600-uv-g8.c(new, default-G8)func_002E3E54, which takes three: its body never reads$a3, as its functional C already said.With the real interface both match. Recorded in
docs/MATCHING-BLOCKERS.md.func_L08_0041E790: the retained draft matches unchanged on the current compiler (the missingdivision
nopwas fixed in 1e7eac4).func_00308768: found by re-measuring every unreserved retained near miss on the currentcompiler. Its draft (adapted from RAC1, approved
SDATAaliases only) now matches unchanged.Two other drafts that now match were left out:
func_003136D0needs 15 dead initial values(over the ruled limit of five) and
func_L00_003ADCD8needs an ad-hoc swap asm. Note: commit6375003 adds this function's unit, which fd24afe left out by mistake; squashing them is fine.
Three original assembly routines (
ASM_FUNC, AGENTS.md "Handwritten assembly", secondcriterion, so this needs a maintainer's agreement):
func_002A05A8,func_002A0F48,func_002A1490insrc/game/002A0430.c. Trappingadd/addi/subthroughout (29, 7, 32),$atas a working register in all three;func_002A0F48also has 31 VU0 macro/COP2 instructions,func_002A1490has no return (it leaves by jumps, likefunc_002A1130), andfunc_002A05A8hastwo
cvt.w.swords in an encoding the compiler does not emit. No RAC1 identity is claimed.Near-miss records:
func_L03_0041DAD0improves from 8 to 7 rows without the earlierconstdeclarations; dated notes forfunc_L18_0043FFF8,func_L02_002EFB60andfunc_L00_00426C78(plus its missing README row) record what tied, so it is not repeated.The superseded near-miss and functional entries of the three matched functions are removed.
Checks run
python3 tools/build.py all --strict(USA v1.01): 28 programs OK, no C fallback; every new function is present in each carryingplaced.json; the boot places 2,603 C functionspython3 -m unittest discover -s tests: 415 tests, OK (1 skipped)python3 tests/check_repository.py: repository checks passedpython3 tools/progress.py --check: passed (the report awaits the maintainer's refresh)Not run
apply to the same function identities there, but they are unchecked.
🤖 Generated with Claude Code
https://claude.ai/code/session_017f7s8LKfAFAYnD6HxXEGy9