summaryrefslogtreecommitdiff
path: root/src/libultra
AgeCommit message (Collapse)Author
2025-06-04Remove "z64" prefix from all headers (#2518)fig02
* z64 - a * z64 - b * z64 - c * z64 - d * z64 - e * z64 - f * z64 - g * z64 - h * z64 - i * z64 - l * z64 - m * z64 - o * z64 - p * z64 - q * z64 - r * z64 - s * z64 - t * z64 - v * restore file * fix merge * fix merge --------- Co-authored-by: Dragorn421 <Dragorn421@users.noreply.github.com>
2025-05-24Cleanup includes in header files (#2540)Dragorn421
* Cleanup includes in header files * include libc headers without libc/ prefix * fix * fix2 * fix3 * fix4 * some bss lol * bss * fix
2025-04-27Delete macros.h; Delete global.h (#2516)fig02
2025-04-26add array_count.h (#2514)fig02
2025-04-19Remove Variables.h; Decouple z64.h from global.h (#2507)fig02
* progress * z64.h issues sorted * remove variables.h * format * n64 fix * another fix * did the wrong fix * fix libleo * fix bss * review * remove instead of comment
2025-04-11variables.h cleaning: migrate audio variables (#2504)fig02
* migrate audio variables, fix libultra thing * remove extra newlines * fix * add required pragmas * fix bss * audio table fixes * fix bss
2025-04-06variables.h cleaning: migrate libultra variables (#2503)fig02
* variables.h cleaning: migrate libultra variables * another increment_block_number * fix bss
2025-03-27Make the rounding mode setting explicit in osInitialize (#2497)Tharo
2025-02-26Reduce dependencies on global.h (10) (#2490)mzxrules
* reduce z64.h size * fix z_cheap_proc.inc.c * ,bss * remove temp delcaration
2025-02-15fix assembly warning in normalize.s (#2473)Dragorn421
2025-02-04Finish matching ique-cn (#2451)Tharo
* git subrepo clone git@github.com:Thar0/com-plugin.git tools/com-plugin subrepo: subdir: "tools/com-plugin" merged: "e8543312d" upstream: origin: "git@github.com:Thar0/com-plugin.git" branch: "main" commit: "e8543312d" git-subrepo: version: "0.4.6" origin: "https://github.com/ingydotnet/git-subrepo" commit: "110b9eb" * ique-cn OK * Review suggestions * Most suggestions * git subrepo pull tools/com-plugin subrepo: subdir: "tools/com-plugin" merged: "81595ed1c" upstream: origin: "git@github.com:Thar0/com-plugin.git" branch: "main" commit: "81595ed1c" git-subrepo: version: "0.4.6" origin: "https://github.com/ingydotnet/git-subrepo" commit: "110b9eb" * Fix other versions
2025-01-21[iQue] Import libultra audio library files (#2433)Tharo
Note about comments in these files: The libultra audio library was originally available to developers in source code form, unlike most of libultra. These files are based on these source code forms, adapted to meet the style of this project. The comments in the files as of this commit are, apart from the style, comments from the original SGI authors.
2025-01-15[iQue] Fix osMotorInit (#2425)cadmic
2025-01-11[iQue] Use CPP includes in spec and update for iQue (#2399)cadmic
* Update spec for iQue * Use CPP includes for spec overlays, scenes, and libultra * Fix iQue + DEBUG_FEATURES * Define BBPLAYER, merge function definitions * Add Makefile dependency on spec_includes * Fix libc order for iQue * Match src/libultra/bb/sa/common.c to fix linker errors * Use C versions of getcount/setcompare for iQue * Format * Small fixes to line up boot segment * Remove zlib.c
2025-01-10[iQue] Match PI-related files in libultra/io (#2408)Tharo
* [iQue] Match PI-related files in libultra/io, set correct thread ID for vimgr * Create a define for the hardcoded address in devmgr.c * Fix BSS
2025-01-10[iQue] Match remaining libultra/os files (#2414)Tharo
* Match remaining libultra/os files * Align box id macros * Fix bss, format * Fix BSS * Clarify some comments * More bug comment * Comment * Fix BSS
2025-01-10[iQue] Match libultra/gu (#2402)Tharo
* [iQue] Match libultra/gu * Match sqrtf
2025-01-10[iQue] Match handwritten asm files in libultra/os, match C replacements of ↵Tharo
osGetCount and __osSetCompare (#2413) * [iQue] Match handwritten asm files in libultra/os, match C replacements of osGetCount and __osSetCompare * Format * Adjust some label names in dcache functions
2025-01-10[iQue] Import vimodes from ultralib (#2403)Tharo
* [iQue] Import vimodes from ultralib * Account for pixel_advance change on iQue * Actually do the fix properly
2025-01-09[iQue] Match remaining libultra/io files (#2411)Tharo
* [iQue] Match remaining libultra/io files * Match osSpTaskYielded * Fix bss, remove double space in controller.h * Fix BSS
2025-01-07[iQue] Match libultra/libc (#2407)Tharo
2025-01-07[iQue] Match libultra/mgu (#2406)Tharo
2025-01-07[iQue] Match osViSetMode (#2404)Tharo
2025-01-06[iQue] Match exceptasm.s and parameters.s (#2401)Tharo
2025-01-03[iQue] Match skapi.s, create bbskapi.h documenting the syscalls (#2400)Tharo
2024-12-28Add missing vimode splits in iQue disassembly (#2393)cadmic
2024-12-28Use IDO for assembling handwritten asm files in src (#2390)Tharo
* as0 * Fix ASOPTFLAGS for src/libc, remove unnecessary noreorder region in kanread * Suggested changes * Use %half to load the boot bss size for matching Co-authored-by: cadmic <cadmic24@gmail.com> * Wrap all of __osProbeTLB in noreorder --------- Co-authored-by: cadmic <cadmic24@gmail.com>
2024-12-26Set up iQue disassembly (#2384)cadmic
* Set up iQue disassembly * Label libultra vimodes * Format * skapi.c -> skapi.s * Fix AudioDebug functions * Group D_80134488 with fp.s in disassembly * Label boot bss * Add bss split for siacs
2024-12-13Move build.c definitions to the makefile, introduce and use libultra version ↵Tharo
defines in libultra instead of PLATFORM defines (#2353) * Move build.c definitions to the makefile, introduce and use libultra version defines in libultra instead of PLATFORM defines * MAJOR+MINOR versions -> VERSION+PATCH, stringify build defines in makefile, let the libultra version determine the OPTFLAGS for libultra files * Clang format moment * Remove LIBULTRA_VERSION_ID, tweak OS_VERSION and libultra version definitions * Better fix for formatting problems
2024-12-02Fix some more GCC warnings, mark some bugs based on GCC warnings (#2309)Tharo
* Fix some more GCC warnings, mark some bugs based on GCC warnings * Weird formatting * Suggested changes * More weird indentation I guess * UNREACHABLE() macro, add missing NORETURNs to fault_n64.c * AVOID_UB for PAL path in z_file_nameset.c * Remove comments about return types * Remove temp no longer needed
2024-09-06Miscellaneous libultra header fixes (#2139)cadmic
* Miscellaneous libultra header fixes * Fix bss? * Reword RCP timeout
2024-09-03[ntsc-1.2] Import libleo from Decompollaborate/n64dd (#2104)cadmic
* Create stack.h for STACK/STACK_TOP * Import libleo from Decompollaborate/n64dd Co-authored-by: Anghelo Carvajal <angheloalf95@gmail.com> Co-authored-by: Elliptic Ellipsis <elliptic.ellipsis@gmail.com> * Use (unsigned) int when in mdebug * Apply suggestions from code review Co-authored-by: Tharo <17233964+Thar0@users.noreply.github.com> * Use && in leocmdex.c * Use proper names for character tables, revert sNonKanjiIndices * Fix incorrect OSMesg casts * Use LEO_ERROR_GOOD even where docs say 0 Co-authored-by: Tharo <17233964+Thar0@users.noreply.github.com> * Remove "Presumably" comment * Whitespace * Remove redundant (debug-only) returns --------- Co-authored-by: Anghelo Carvajal <angheloalf95@gmail.com> Co-authored-by: Elliptic Ellipsis <elliptic.ellipsis@gmail.com> Co-authored-by: Tharo <17233964+Thar0@users.noreply.github.com>
2024-08-29Move driverominit and sprintf to src/boot/ (#2105)cadmic
2024-08-28[ntsc-1.2] Match N64 libultra (#2081)cadmic
* Match N64 libultra * INITIALIZE_FUNC -> OSINITIALIZE_FUNC * Document osGetIntMask * Refer readers of osGetIntMask to osSetIntMask comment * Whitelist new static functions in disasm unksyms check
2024-08-20Move non-libultra libc functions to src/libc/ (#2055)cadmic
* Move non-libultra libc functions to src/libc/ * Add explicit nops in delay slots * Don't rely on CPP expanding undefined macros to 0 * Delete old Makefile rules * Fix type of memset()
2024-08-12Add names to all typedef'd structs, unions, and enums (#2028)cadmic
* Add names to all typedef'd structs, unions, and enums * wtf vs code * Use a better regex
2024-08-11Set up build system and disassembly for ntsc-1.2 (#2021)cadmic
* Set up build system for ntsc-1.2 * Set up disassembly for ntsc-1.2 * Add all unnamed functions to functions.txt * Update docs/retail_versions.md for ntsc-1.2 * Format * Update docs/retail_versions.md Co-authored-by: Dragorn421 <Dragorn421@users.noreply.github.com> * Remove mention of US * OOT_N64 -> PLATFORM_N64, OOT_GC -> PLATFORM_GC * Move mtxutil to libultra/gu * Fix libultra/io bss splits * Fix merge --------- Co-authored-by: Dragorn421 <Dragorn421@users.noreply.github.com>
2024-06-19Experiment: remove global.h dependency from sys_math, sys_math3d, z_lib (#1956)mzxrules
* split sys_math, sys_math3d, z_lib from global.h * suggestions * forgot this * more math stuff * nit fix * re-add ichain.h * resolve tharo's comments
2024-02-02Match retail padmgr.c and sys_rumble.c (#1693)cadmic
* Match retail padmgr.c * Match retail sys_rumble.c * Poke jenkins
2024-01-29Move __osPfsInodeCache and __osPfsPifRam (#1654)cadmic
* Move __osPfsInodeCache to pfsgetstatus.c * Move __osPfsInodeCache to contfps.c and __osPfsPifRam to pfsisplug.c
2023-11-22Misc Cleanup (#1585)engineer124
* misc cleanup * more fake matches * revert for sym
2023-11-12Fix misc 21 (#1573)Dragorn421
* Make `sNew` in (unused) `code_800FC620.c` a string It is passed as a filename to `__osMallocDebug` so should be a nul-terminated string, not a char[3] missing an explicit \0 * Fix gcc warning in `JpegDecoder_ParseNextSymbol` about SLL on negative value -1U is an unsigned value, aka 0xFFFFFFFF I keep -1 because it seems that's what a jpeg standard has too References: https://stackoverflow.com/questions/40508958/shifting-a-negative-signed-value-is-undefined https://www.w3.org/Graphics/JPEG/itu-t81.pdf (page 105, figure F.12) * Small cleanup * Fix few mistakes (thanks gcc warnings) * Add `@bug` in file select settings draw code, using the wrong array * format * format main * rename arg for a happy formatter * Move important function call out of a printf
2023-10-27libc cleanup (#1568)Tharo
* libc cleanup * Suggested changes, small alloca tweak * Remove printf include
2023-07-06Reorganize Audio Files & Name Remaining Audio Files (#1494)engineer124
* reorganize audio files * audio code files * split audio and libaudio * audio_init_params to audio_configuration * simplify file names * move aisetnextbuf to libaudio * move src/audio -> src/code/audio * adjust makefile comment * reorganize again into internal/external * adjust comment * restructure again
2023-01-10Fix misc 19 (#1488)Dragorn421
* "bgs sword" -> "biggoron sword" * Animation_ChangeImpl: last arg is `ANIMTAPER_` enum * TransitionTileStatus -> state * Tiny gbi.h formatting fixups * some cleanup on floormaster * misc float ops cleanup * sunsSongState = SUNSSONG_INACTIVE * continueFlag == CS_CMD_STOP * fix few camera names inconsistency * textual 0 padding? not on my lawn * libultra: construct address from end of dmem rather than oob from imem * more free1 -> 2 fixup
2022-12-12Rename dequeuethread.c to thread.c, move data from createthread.c to ↵Tharo
thread.c (#1464)
2022-12-12Fix misc GCC compatibility issues (#1463)Dragorn421
* Fix osGetMemSize being optimized to `return 8MB` by gcc Co-authored-by: Tharo <17233964+Thar0@users.noreply.github.com> Co-authored-by: ariahiro64 <45049787+ariahiro64@users.noreply.github.com> * Workaround f32 to s16 cast for binang being UB if binang doesn't fit s16 Co-authored-by: Tharo <17233964+Thar0@users.noreply.github.com> Co-authored-by: ariahiro64 <45049787+ariahiro64@users.noreply.github.com> * osGetMemSize fixup * include z64math in z64camera Co-authored-by: Tharo <17233964+Thar0@users.noreply.github.com> Co-authored-by: ariahiro64 <45049787+ariahiro64@users.noreply.github.com>
2022-11-13Improvements to Video Interface related functions and data (#1332)Tharo
* Improvements to VI related functions * Fix * Suggested changes * Comment enum values Co-authored-by: engineer124 <47598039+engineer124@users.noreply.github.com> * Suggested changes, plus comments in visetspecial.c * Name gViConfigModeType * Further suggested changes * Format * Fix comment on modeLPN2 Co-authored-by: engineer124 <47598039+engineer124@users.noreply.github.com>
2022-11-13Improve rcp.h, remove `HW_REG` macro (#1425)Tharo
* Real rcp.h * Correction to comment in initialize.c * Try fix R4300.h * Adjust rcp.h formatting, remove defines in other headers that are now in rcp.h * Suggested changes, document a bug in the modified osAiSetNextBuffer * More rcp.h formatting changes
2022-10-15Lightweight trigonometry doc (#1356)Dragorn421
* Doc units of trig functions * "Very simple" yet I made a mistake * sins returns in [-0x7FFF,0x7FFF] as the [-1,1] range * Also `sys_math_atan.c` * Remove `@param`s without descriptions * Add note on Math_Atan2S/F arguments being unlike atan2 * "from (1,0) to (x,y)" -> "from vector ..." * arg names -> `angle` * Improve `@return` comment on atans