1864 Commits
Author SHA1 Message Date
Ryan Myers 06cf09bab2 Cleanup work (#757)
* Minor documenting

* trackbg_render_flashy cleanup

* Cleanup plane function

* trackmenu_render_names

* Run formatter

* Bitfields for trackmenu_render_names

* Add doc comment to trackmenu_render_names for adeventure two

* Cleanup pads in trackmenu_render_names

* Fix a + 0x1f into a -1
2026-07-27 11:54:06 -04:00
akratchandakratch 95afa856a6 Fix GCC builds and verification workflows (#760)
Co-authored-by: akratch <kratch.adam@gmail.com>
2026-07-27 08:52:49 -04:00
akratchandakratch dac6ded74d Document vsprintf (#759)
Co-authored-by: akratch <kratch.adam@gmail.com>
2026-07-27 08:39:16 -04:00
AloXado320 14237c383a Fix NON_MATCHING build after GCC fix (#755) 2026-07-25 20:36:23 -04:00
AloXado320 3cb5e8216e Score cleanup, updated README due to milestone (#758)
* Score cleanup, updated README due to milestone

* crlf to lf (how did i miss this?)

* Don't count lib files for documentation (cleaner)
2026-07-25 13:55:29 -04:00
David Benepe 69818b2e44 Upgraded workflows to checkout v7 (#756) 2026-07-24 22:20:21 -04:00
David Benepe 9c9f33dc39 updated workflows (#750) 2026-07-24 21:14:01 -04:00
Ryan Myers 6c386ed86c Woops! Fixed the last mess I made lol (#753) 2026-07-24 21:12:04 -04:00
db7482cc28 match: func_80017A18 (#749) OK
Object-collision resolution routine in objects.c. Compiled from C with
GLOBAL_ASM removed; ROM builds and verifies OK.

The last thing standing in the way was a misreading of the stack traffic
around the facet loop. The target stores f18/f20/f22 to 0xA4/0xA0/0x9C
immediately after the facet-count blez and reloads them after the loop,
which looks like a second set of origin variables being saved and restored
around the guard. It isn't - those are the compiler spilling the origin
values, because f18 is reused inside the loop as the scaled radius. Reading
the origins straight into x2/y2/z2 once per point, with no save/restore,
gives the exact instruction sequence; computing the interpolation deltas in
x, y, z order settles the remaining register allocation.

Two other constructs are load-bearing and are commented in place: var_a2
must be u32 and assigned after the interpolation-factor branch, otherwise
IDO reuses the 1 it hoists into a3 for the k-loop test; and the unused
f32 pad holds the stack slot at 0xEC.

Also drops the now-stale "NON EQUIVALENT" marker on the prototype in
objects.h and the WIP scratch link above the function.

Co-authored-by: akratch <kratch.adam@gmail.com>
Co-authored-by: Ryan Myers <ryan.p.myers@gmail.com>
2026-07-24 21:06:01 -04:00
8131d0da10 match: func_8008FF1C (#751) OK
* match: func_8008FF1C

* Remove comments

Removed comments

---------

Co-authored-by: akratch <kratch.adam@gmail.com>
Co-authored-by: Ryan Myers <ryan.p.myers@gmail.com>
2026-07-24 21:03:17 -04:00
github-actions[bot]andRyan-Myers ed3a12b1cb Update score (#748)
Co-authored-by: Ryan-Myers <Ryan-Myers@users.noreply.github.com>
2026-07-24 14:04:47 -04:00
akratchandakratch 6c626c9b79 Match func_80049794 (#747)
Plane physics, the largest function in the game.

Two things were needed on top of the existing WIP:

1. Assign the squared magnitude into the same local that receives the
   sqrtf result, as two statements. This merges the pre-call input and
   the post-call factor into one live range, which is what gets the
   normalization factor promoted into f20 and recovers the 248-byte
   frame and the whole FP allocation.

2. In the final R_TRIG if/else, hoist the shift into its own statement
   at the top of each arm (var_t0 >>= 1) instead of writing
   (var_t0 >> 1) * 19 inline. That allocates and releases the shift's
   temporary before the damping statement's temporaries, which fixes
   the last 19 register differences.

The empty conditions in the wave loop, the dead double-assign into
var_t9, and the (var_v0 ^ 0) comparison are load-bearing for register
allocation.

Co-authored-by: akratch <kratch.adam@gmail.com>
2026-07-24 14:01:19 -04:00
AloXado320andProjectRevoTPP 1301ba7899 Properly fix GCC building alongside related improvements (#746)
* Fix GCC build and boot, now goes ingame

* Fix waves.c UB data

Co-authored-by: ProjectRevoTPP <projectrevotpp@hotmail.com>

---------

Co-authored-by: ProjectRevoTPP <projectrevotpp@hotmail.com>
2026-07-24 13:59:47 -04:00
github-actions[bot]andRyan-Myers 7b7466d7cc Update score (#745)
Co-authored-by: Ryan-Myers <Ryan-Myers@users.noreply.github.com>
2026-07-23 14:48:58 -04:00
akratchandakratch e166252179 Match trackbg_render_flashy (#744)
* Match trackbg_render_flashy

Byte-identical on us.v80 (full ROM Verify: OK from C; GLOBAL_ASM removed).

Found by tracing IDO 5.3 uopt's register allocator: priority ties break by
expression-table creation order, so the dead defs (pad_sp100/pad_sp108)
emit no code but reorder the table and flip the f16/f18 tie. The explicit
unary-minus in zPositions[5] forces the target's homed temp (store at
0x2C), scaledXCos = 1280.0f keeps 320.0f register-resident past constant
folding, and pos.f[2] in uCoords[7] flips operand order in the final add.s.

Also resolves the old "@bug? sp78 is never set": it's the compiler's
uninitialized-variable join reload (levelHeader is simply unassigned on
the else path), not a game bug.

* Improve func_80017A18 WIP: frame, k-loop, and named registers now exact

---------

Co-authored-by: akratch <kratch.adam@gmail.com>
2026-07-23 10:04:53 -04:00
Ryan Myers 851b15dd14 Matchfunc 80059208 (#742)
* Match func_80059208!

* MAtch all versions

* Update score

* Cleanup and minor docs
2026-07-11 16:08:07 -04:00
Jordan Longstaff 0adab62700 Document func_8002B0F4 (#738) 2026-07-07 14:43:59 -04:00
github-actions[bot]andRyan-Myers bba0365d92 Update score (#737)
Co-authored-by: Ryan-Myers <Ryan-Myers@users.noreply.github.com>
2026-06-21 07:29:42 -04:00
Ryan Myers 0f7f99bc25 Match func_8002B0F4! (#736)
* Upgrade func_8002B0F4 to NON_MATCHING status

* Match func_8002B0F4!
2026-06-20 21:33:40 -04:00
Ryan Myers f40ac014a5 ObjectModel struct Update (#735)
* unk14 to attachPoints

* unk18 to numberOfAttachPoints

* unk1C to collisionSpheres

* unk20 to collisionSpheresSize

* unk4A to numberOfAnimatedVertices

* unk4C to animatedVertexIndices

* unk50 to hasAnimatedTexture

* Run `python3 tools/format.py`
2026-06-18 06:24:20 -04:00
Dominik Petersandtreybae9 dcec92a2b4 match: init_particle_buffers (#734)
* match: init_particle_buffers
Co-authored-by: treybae9

* update score
2026-06-17 21:26:12 -04:00
Ryan Myers 812ba58ba1 Clranup some minor stuff in printf. (#731)
* Clranup some minor stuff in printf.

* Fix formatting
2026-06-15 08:13:37 -04:00
Dominik Peters d940feda47 match: vsprintf (#729)
* match: vsprintf

* score update, small renamings

* fix: readme score description

* fix: formatting

* refac: remove duplicated code
2026-05-09 21:57:37 -04:00
AloXado320 80a0c08640 Score script rewrite (#715)
* Score script update

* Fix score duplication and add blacklist jpn list

* remove dumb debug

* Update README.md

* Revamp score calculation, nolib arg to exclude libultra files

* Revamp score top files view

* Cleanup commend and treemap fixes

* Update README with new score script arguments
2026-05-09 19:51:44 -05:00
Ryan Myers 7e3e69798c Cleanup and document math_utils HASM (#712)
* WIP

* makefile up to date

* Get the first match for math_util!

* Do some cleanup and documenting

* slightly better comments now

* Document mtxf_transform_dir

* 2 more hasm docs

* vec3s_reflect

* mtx_to_mtxs_2

* Document mtxs_transform_point

* mtxs_transform_point and mtxs_transform_dir

* Better vec3s_reflect

* Better matches with docs

* Doc mtxf_from_inverse_transform

* Doc func_80070058

* Doc mtxf_billboard

* Doc vec3f_rotate

* Doc vec3f_rotate_ypr

* Doc vec3f_rotate_py

* Doc mtxf_from_translation

* Doc mtxf_from_scale

* Doc atan2s

* Doc arctan2_f

* more docs

* calc_dyn_lighting_for_level_segment cleanup

* fix build

* Document area_triangle_2d

* more docs

* dmacopy_doubleword

* more docs

* work on standardizing some comments

* small cleanup for calc_dyn_lighting_for_level_segment

* sins funcs cleanup and mild docs

* Remove old file

* Fix yamls

* woops, data too
2026-04-17 06:38:29 -04:00