63 Commits

Author SHA1 Message Date
Ryan Myers
1d089fad9f Update libultra asm (#701)
* Update func_8008FF1C to a closer match

* Update formatting

* single reg diff

* Generate end labels for all ucodes, rename the boot to rspboot, and have them all get generated together into the same object file, and standardize how they're defined in the headers.

* Use glabel, dlabel, and jlabel for different purposes in asm

* Working compile with ido for asm files.

* Fix other versions bss declaration

* Update exceptasm to show other build versions

* Fix NON_MATCHING build ld script

* Remove a change to libultra that we don't need anymore.

* Get it building with GCC, but it doesn't seem to boot...

* Slightly cleaned up the GCC builds by still ignoring warnings in libultra, and adding some extra assembly line breaks and flags.
2025-09-02 12:57:23 -04:00
Ryan Myers
055f9db867 Update gbi.h to use one found in libultra E version (#699)
* Fix some asm size stuff, really only impacts the elf binary.

* Change the gbi.h to one found in libultra version E, and run formatter

* Update m2c submodule
2025-08-14 09:29:46 -04:00
Unnunu
2ac56bae9c Match func_80083098 + minor cleanups across codebase (#581)
* make Camera struct

* wip

* wip

* fix gSPMatrix args

* gfx macros renamed

* wip

* document matrix functions

* match func_80083098

* update score and format

* JP version not matched

* build OK

* PR suggestions
2025-05-20 17:34:58 +03:00
Unnunu
b88bd4366e match and document audiosfx.c (#550)
* match func_80004668 and adjust types

* match _handleEvent

* documentation WIP

* wip

* document audiosfx.c

* fix build

* a few type renames

* update score

* remove comment

* fix type

* fix typo
2025-05-05 15:47:26 +03:00
Ryan Myers
c0228a75b2 Move over (Match func_80009968 as audioline_reverb_create), this one is build_tex_display_list! (#504)
* Match audioline_reverb_create

* Update score and run formatter

* Update audioline_distance to be more explicit

* Fix ifdef name

* Get build_tex_display_list to NON_MATCHING, with some documentation

* Match build_tex_display_list!

* Update score

* Woops, extra line break

* Add some of the names to the math_util.c file itself.

* Match func_80004520

* Update score
2025-04-09 15:17:50 -04:00
Ryan Myers
34508976cd Match audioline_init (#497)
* Fix some AVOID_UB stuff, and some small documenting.

* Fix m2ctx.py and add NON_EQUIV func_80045C48

* Minor issue cleanups

* Clean up audioline_ambient_create match

* Match func_80008040 as audioline_init, fix the generate ctx script, and some small warning stuff.

* Minor work on func_80008174 so it can be NON_EQUIVALENT again

* redefine asm abs

* Hackishly fix the ctx file when generated.

* Use some more constants and got rid of some start: auto stuff which is not recommended in splat anymore for BSS

* Do some documenting, and slightly better matches using JFG source.

* Formatting

* Clean up some more audio stuff

* Further cleanup and naming of things
2025-04-05 16:00:13 -04:00
Ryan Myers
d494d5dcf7 Audio struct fixes, and other random documenting things (#491)
* Migrade rodata for thread3_main, fix game.c not having a defined rodata in the splat yaml files, and run the formatter.

* func_80066CDC NON_MATCHING

* Minor stuff

* Small docs

* Fix some audio stuff

* Undo some var moving.
2025-03-26 20:43:33 -04:00
Ryan Myers
a005a4eb3d Match all libultra, and more closely match ultralib (#466)
* Massive libultra changes

* Fix the build!

* Remove crc comment that seemd to break the score script for some reason.

* Update README score.

* Apply some suggestions

* rename sins and coss funcs.
2025-02-24 11:45:02 -05:00
Ryan Myers
39c01d4f5e Splat changes (#462)
* Merge changes from splat where it makes sense at this stage.

* Update score, and script for what seems like new map file style.

* format

* Fix accidental inclusion of version specific details.

* Match camera_init

* Update Score

* Near match for func_80046524

* Format

* Woops, it's NON_MATCHING

* Missed button pressed value

* Work on documenting func_80046524

* MAtch func_80046524

* Match func_80046524

* Minor changes

* Fix warnings in func_80046524

* format.py

* Update README

* Match func_800230D0

* Fix UB in mode_init_taj_race
2025-02-21 09:23:36 -05:00
Fazana
88864107ab Finish labelling most functions in audio.c + camera.c (#431)
* name some camera things

* yea there

* lots of audio

* match a func

* better

* x

* egg

* all but one func in audio.c nopw

* audio looks good for now

* Update audio.c

* correct taj thing

* fix warnings

* Update audiosfx.h

* Update README.md
2023-11-02 18:53:53 +00:00
Ryan Myers
6dcdd256ee We are collecting silver coins in Pirate Lagoon. (2/8 silver coins) (#418)
* Match func_800C0B00

* Rename func_80065EA0 to camera_init

* Match menu_audio_options_loop

* Fix last commit

* Couple small changes

* Match 3 wave funcs

* update README
2023-10-10 10:09:08 -04:00
Fazana
3c97d5ea99 Identify and label a bunch of game.c stuff (#385)
* Fix warnings

* Update src/thread0_epc.c

Co-authored-by: Ryan Myers <ryan.p.myers@gmail.com>

* identify some texture init stuff

* match _Litob

* match cosf

* match sinf

* formatting

* Update math.h

* Delete sinf.s

* quick fix

* Update unknown_078050.c

* identify some time trial stuff

* my honest reaction

* Add a define for F3DDKR_GBI

* Add GCC define for stubbed_printf

Fixes a bunch of warnings, because IDO is such a brilliant compiler with zero flaws that for some reasons decides "#define text(...)" is against federal law.

* Update racer speed errors

* identify some game.c stuff

* Rename

* Fix inaccurate names for the displaylist heap

* more.

* quick fixes

* Update src/racer.c

Co-authored-by: David Benepe <benepe96@gmail.com>

* Update src/objects.c

Co-authored-by: David Benepe <benepe96@gmail.com>

* Update src/objects.c

Co-authored-by: David Benepe <benepe96@gmail.com>

* quicker fixes

---------

Co-authored-by: Ryan Myers <ryan.p.myers@gmail.com>
Co-authored-by: David Benepe <benepe96@gmail.com>
2023-04-23 20:21:39 +01:00
Ryan Myers
98d3be1b8f 50%! (#373)
* WIP

* WIP

* WIP func_80078190

* Do some minor documenting and cleanup in sched.c

* Restart func_80078190 and check in the WIP

* Get func_80078190 back to something looking presentable

* WIP render_texture_rectangle_scaled

* Just about matched render_texture_rectangle_scaled

* Match render_texture_rectangle_scaled

* Minor documenting and cleanup

* Minor cleanup

* Cleanup

* Some documenting

* Match func_8006ECFC

* Move some function definitions

* Match func_8006EFDC

* Minor documentation updates

* NAme some functions, and do some documneting on fade transitons

---------

Co-authored-by: Ryan Myers <foldor@gmail.com>
2023-02-17 10:04:49 -05:00
Fazana
c6351af6c3 lots of matching involving misc racers (#346)
* match func_8005E4C0

* label vehicle enums

* prelim

* match func_800B1130

* match func_8005F310

* prelim

* match func_8005C364

* rename and warning fix

* another wave of particle cleanup

* match func_8005E204

* fixed warnings

though it's just a plaster

* Update objects.c

* match func_8005D0D0

* macros

* some labels

* match func_8005D820

* reorganise boss headers

* stuff that I don't really feel like describing it's just lots of dumb stuff lol

* add collision.c

* one more

* some racer documentation

* fix blacklist bug in score.py

* more.

* nonequiv func_800314DC

* Update collision.c

* Update unknown_0255E0.h

* document two camera funcs

* Update racer.c

* quick fixes

* Update src/vehicle_tricky.c

Co-authored-by: David Benepe <benepe96@gmail.com>

* Update src/vehicle_smokey.c

Co-authored-by: David Benepe <benepe96@gmail.com>

* Update src/vehicle_misc.h

Co-authored-by: David Benepe <benepe96@gmail.com>

* Update src/particles.h

Co-authored-by: David Benepe <benepe96@gmail.com>

* Update src/vehicle_bluey.c

Co-authored-by: David Benepe <benepe96@gmail.com>

* requested changes

* Update vehicle_smokey.c

* oops missed one

* Update object_functions.c

* Update racer.c

Co-authored-by: David Benepe <benepe96@gmail.com>
2022-12-30 14:14:53 +00:00
Ryan Myers
d0ec047f47 Get past that flea and into 37% (#286)
* Minor tweaks

* Match func_80072718

* Update score

* Do some minor cleanup

* More cleanup and renaming

* Remove comment

* Minor clenaup again

* Remove semicolons

* Match init_controller_paks with a couple of minor fakematch stuff

* Udpate score
2022-11-16 18:55:08 -05:00
Fazana
f396463e95 Minor misc labelling (#246)
* Squashed commit of the following:

commit 3ab4716110
Author: Fazana <52551480+FazanaJ@users.noreply.github.com>
Date:   Mon May 23 23:11:46 2022 +0100

    Mostly misc labelling, but also weather too (#232)

    * bit more labelling

    * identify some weather stuff

    * Update sound_ids.h

    * yum

    * more random identification

    * last weather stuff for now

    * Update README.md

    * Update README.md

    * Fix non equivalent

* I found the 60fps button

* match func_80052B64

* match racer_attack_handler

* match func_80048C7C

* buncha function declaring

* e

* tweak

* match func_8004DE38

oh man oh man

* Small bit of labelling

* Merge remote-tracking branch 'upstream/master' into the-many-against-the-few

* Update README.md

* Fix monumentally poor bout of misinformation in the readme

we wouldn't want to mislead the readers, would we?

* github please

* Update README.md

* requested changes

kinda funny because I knew this struct existed, and knew it was used for this, but never made the connection lol

* Update objects.c

* match racer_enter_door

A nice easy one after the pure hellscape of the last few days :)

* names

* renames

* match func_8005250C

* heehee

* Update racer.c

* identify some misc asset calls

* identify some surface types

* match func_8005492C

* Delete func_8005492C.s

* match func_80052D7C

* move some enums

* label all existing misc asset calls

granted I know what almost none of them are lmao, buut will make things slightly easier in the long run

* Update README.md

* requested changes

pain

* Update README.md

* just a bit of labelling
2022-09-29 11:06:38 -04:00
Ryan Myers
924b89cc80 Match most of the remaining unmatched libultra functions, mostly from the audio library (#239)
* Fix alSynAllocFX

* Match alCSPNew and __CSPVoiceHandler, which had slight differences from libreultra

* WIP __CSPHandleMIDIMsg

* Match alFxPull

* Match func_8006492C and func_8006493C

* Match alFxParamHdl

* Match _loadOutputBuffer:

* Match _doModFunc and with it finish reverb.c

* Match alSynNew and finish synthesizer.c

* Match some unknown funcs cleaner

* Clean up func_80063BA0

* Clean up func_80063A90

* Fix warning

* Add missing header files from previous commits

* Match alBnkfNew.c

* Match alCSPGetState

* Match several more audio lib funcs

* Match alSynDelete, and alSynSetFXMix

* Properly move __osRcpImTable data into osSetIntMask and our of alSynSetPriority

* Kind of match alSynSetPriority, and match alSynSetVol

* Delcare functions as static again to fix the score script regex

* Seperate some al files out like they seem to be in ultralib

* Match event.c

* Match synallocvoice.c

* Match some more audio funcs

* More audio matches

* Yaya more audio, I know

* Couple more matched files

* Match filter.c

* Match resample.c

* Match load.c

* Get env.c closer to a real match

* Fix some code related to an assert in env.c

* Match env.c, which has many differences from later public versions

* Finish matching audio library code

* Deleted unnecessary asm files, and made tweaks to al files to fix score script

* Fix codebreaking formatting error ;)

* Update include/PR/libaudio.h

Co-authored-by: AntonioCastelli <aatcastelli@gmail.com>

* Update include/audio_internal.h

Co-authored-by: AntonioCastelli <aatcastelli@gmail.com>

* Renamed sl.c.c to fix that, and renamed NOPSNEEDED to make it more clear it's not to be used.

Co-authored-by: AntonioCastelli <aatcastelli@gmail.com>
2022-08-08 07:35:44 -04:00
Ryan Myers
41385fc098 7 new matches, and code cleanup (#215)
* Match func_8007EF80

* Match func_80027E24

* Add some names to the function

* Match func_80029DE0

* BoundingBox variables named

* Fix NON_EQUIVALENT functions not building due to struct changes

* Documenting

* Match get_level_segment_index_from_position

* Minor revision of last match

* Match traverse_segments_bsp_tree

* Match render_level_geometry_and_objects

* Cleaned up some warnings

* Update math.c includes to more specifically include our version of math.h, which fixes generating ctx.c

* Add a livediff.sh helper script

* Match func_80067D3C

* Map instances of + 0x8000000 to OS_PHYSICAL_TO_K0, because that's what made sense to me with that

* Convert a lot of data types to Mtx, update some vairable names, and fix some warnings

* Clean up the func_80068408 fast3d_cmd

* Fix unused parameter warnings in object_functions.c

* Commit suggestions from Faschz

* WIP func_8007BA5C

* func_8007BA5C WIP

* More func_8007BA5C work

* Leaving func_8007BA5C as is for now.

* WIP func_8007BF34

* Update some signatures and add some externs to help ctx.c generation

* WIP func_8007B4E8

* Fix missing reference to a var in a non-matching func

* Update src/textures_sprites.h

Co-authored-by: AntonioCastelli <aatcastelli@gmail.com>

* Update src/unknown_0255E0.c

Co-authored-by: AntonioCastelli <aatcastelli@gmail.com>

* Rename some vars in func_8002A134

Co-authored-by: Ryan Myers <foldor@gmail.com>
Co-authored-by: AntonioCastelli <aatcastelli@gmail.com>
2022-03-28 08:36:12 -04:00
Ryan Myers
b36d96a655 Matched and documented a lot of functions in controller pak (#201)
* Matched and documented a lot of functions in controller pak

* Clean up warnings on controller pak funcs

* Match func_80076A38

* Rename string_to_font_codes as I had it backwards

* Rename func_80076A38 to it's proper name

* Update and name some more funcs

* Near match for tt_menu_loop

* Remove M2C code, made SIDeviceStatus a type where possible, and reverted ghost header struct changes as I'm not happy with them

* Fix typo

Co-authored-by: AntonioCastelli <aatcastelli@gmail.com>

* Better names for SIDeviceStatus enum UNK vals.

Co-authored-by: AntonioCastelli <aatcastelli@gmail.com>

* Implement further suggestions

* Attempt to decompile func_80093D40, and got relatively close, identified some variables, but never got there yet

* Identify a couple more variables

* Match menu_boot_loop, it was *so* close, and just needed moving the s32 temp declaration.

* New matches from David just being added to my PR.

* Update return type of func_80087F14 to SIDeviceStatus, and make the #if 1 into a NON_EQUIVALENT for menu_character_loop for consistency

* Update src/unknown_0ABDF0.c

Co-authored-by: AntonioCastelli <aatcastelli@gmail.com>

Co-authored-by: Ryan Myers <foldor@gmail.com>
Co-authored-by: AntonioCastelli <aatcastelli@gmail.com>
2022-02-07 08:55:50 -05:00
Ryan Myers
247a69ae2f Fix many warnings (#195)
* Fix many warnings, mostly when using functions without including headers, and mostly in libultra files. Included a few warning ignores as well

* Add another warning fix

* Revert trailing comma for LogicUpdateRates
2021-12-16 07:58:19 -05:00
Ryan Myers
ab5a54d446 Fix dmaMesg's being an array of 1 2021-12-02 21:48:48 -05:00
Ryan Myers
c302d6f437 Working on identifying variables and cleaning up warnings continues 2021-10-29 11:53:12 -04:00
Ryan Myers
1e91eb4794 Fix more warnings by better definining some variables 2021-10-29 09:05:25 -04:00
Ryan Myers
7e717dae5e Match memory_copy, and fix some warnings 2021-10-23 20:53:03 -04:00
Ryan Myers
0056860f65 Decomp some OSViMode structs 2021-10-21 20:08:32 -04:00