summaryrefslogtreecommitdiff
path: root/src/libultra/os
AgeCommit message (Collapse)Author
2025-08-19Handwritten asm: OS functions, libm_vals (#1821)Tharo
* Handwritten asm: OS functions, libm_vals * rm hardware_regs.ld * andi -> and, addiu -> addu * CACHE macro
2025-08-16Handwritten asm: exceptasm, get/setintmask (#1819)Tharo
* Handwritten asm: exceptasm, get/setintmask * Fix maybe * Update warnings * Remove .global from jlabel * Move os_internal_rsp inclusion to os.h * Make HWINT_* defins consistent
2025-08-07parameters.s (#1820)Tharo
2025-08-05Handwritten asm: Register getter/setter functions (#1815)Tharo
* Handwritten asm: Register getter/setter functions * Formatting fix
2024-06-03More General Cleanup (#1638)Derek Hensley
* LINKER_FILES in makefile * COLPOLY_GET_NORMAL * math header * libc * M_PI for cosf and sinf files * MAXFLOAT * Revert "MAXFLOAT" This reverts commit 96b75ffaa89b1a4ca1c08278b28bc3c70224701a. * Remove SHT_MINV * SHRT_MAX * Add M_PI * Angle macros * f suffix * Format
2024-01-29General Cleanup 3 (#1543)Derek Hensley
* voicestopread -> voicestopreaddata * PadMgr_ThreadEntry * PointLight_t * OS_VI_UNK28 * print stuff * Remove OS_PRIORITY_THREADTAIL * sBoeDlists -> sBoeModelInfo * Prerender_DrawBackground2D * segments * Revert "print stuff" This reverts commit 1d833e2f0d2e013d73ab9c4826fac8efefdc830b. * format * Update src/overlays/actors/ovl_En_Mkk/z_en_mkk.c Co-authored-by: engineer124 <47598039+engineer124@users.noreply.github.com> --------- Co-authored-by: engineer124 <47598039+engineer124@users.noreply.github.com>
2024-01-15General Cleanup (#1529)Derek Hensley
* Cleanup * vi define cleanup * kdebugserver * osmotor * Remove sqrtf.c * Move osFlash out of libultra * PadUtils_Destroy * BOOT_ADDRESS_ULTRA * Fault * Format * viconfig.h * More small cleanups * gfx cleanup * Format * Forgot to save * variables.h * dListTable -> dListSides * Fix header includes
2023-11-16Fix ultratypes types (#1454)Derek Hensley
* Fix ultratypes types * Add back size_t and NULL * Callocs * Callocs pt 2 * bool * STDC version checks
2023-11-02Enable `-Wint-conversion` warning (#1266)Anghelo Carvajal
* fixing some warnings * more pointer fixing * Use `-Wno-int-conversion` on audio files * more progress * fix * more pointer fixes * kinda progress * Fix remaining casts * Format * fix merge * fix warnings * fix parameter * use SEGMENT_ROM_START_OFFSET a bit more * format * fix audio warnings * some more fixes * fix en_go * review * review * whoops, missing cast * review * review * ->data * format * review * fix * asPtr * fix * Update src/code/sched.c Co-authored-by: Derek Hensley <hensley.derek58@gmail.com> * review * fix in EnDnh * improve format * engo * format * fix * format * Update include/z64.h Co-authored-by: Derek Hensley <hensley.derek58@gmail.com> * TexturePtr * fix warnings * fix warnings * format * fix * review --------- Co-authored-by: Derek Hensley <hensley.derek58@gmail.com>
2023-10-26Yet another libultra cleanup (#1384)Anghelo Carvajal
* os symbols * various variables * more variables * more cleanup * yeet HW_REG * OS_PHYSICAL_TO_K0 and other cleanups * Rename r4300.h * migrate pimgr data and cleanup on initialize.c * rename osFlash symbols * cleanup gu * vimodes * yeet rmon, do libc files * some os files * hardwareinterrupt * cleanup a lot of os files * cleanup osVirtualToPhysical * various io files * another io chunk * final io chunk * yeet hardware.h * yeet PHYSICAL_TO_VIRTUAL and VIRTUAL_TO_PHYSICAL * fix typo * fix merge * remove global.h from libultra files * fixes and format * brief explanation * review * review * review * review * SEGMENTED_TO_K0 * Revert "SEGMENTED_TO_K0" This reverts commit f8d62d670f91af401feb56489e1cbc45a1260049. * take two * bss * bss
2023-09-15Move libultra variables to their respective headers (#1369)Anghelo Carvajal
* internal_rsp; move size_t and NULL to ultratypes.h * guint.h * Move system variables to os_system.h * controller, pi and vi * osint.h * piint.h * siint, ucode, viint, voiceinternal * Remove remaining variables from variables.h * format * final renames * bss * review * review
2023-09-02Move libultra function declarations to libultra headers (#1196)Anghelo Carvajal
* Delete unused headers * Move PR and io to ultra64 * move headers to ultra64 * more cleanups * more reorganizing * i think that should be all * format * ifdef guards cleanup * Add IO_READ and IO_WRITE macros for future use * warnings * review Co-authored-by: Tharo <17233964+Thar0@users.noreply.github.com> * warnings again * warn * ifdef guards * fix merge * fix merge * fix merge * bss * padutils.h * bss * bss * bss * fix merge * bss * bss * bss * fix merge * fixes * fixes * bss * bss * fix merge * fix * fix * fix includepaths * fix paths * bss * fix * ultra64/ -> PR/ * header guards * fix ehader guards * fix * fix++ * format * bss is borken * prevent 2 * :despair: * bss * rename assert to dbg_hungup * fix * a * fix * bss * fix * bss * bss --------- Co-authored-by: Tharo <17233964+Thar0@users.noreply.github.com>
2023-07-08Port OoT's docs for `fault.c` and `fault_drawer.c` (#1199)Anghelo Carvajal
* fault.h * some docs stealing * fix building * fault_internal.h * pass * finish stealing docs * finish cleanup * format * warning * Update src/boot_O2_g3/fault.c Co-authored-by: Derek Hensley <hensley.derek58@gmail.com> * Update src/boot_O2_g3/fault.c Co-authored-by: Derek Hensley <hensley.derek58@gmail.com> * Update src/boot_O2_g3/fault.c Co-authored-by: Derek Hensley <hensley.derek58@gmail.com> * review Co-authored-by: Derek Hensley <hensley.derek58@gmail.com> * arggggg * arggggg part 2 * STACK * PHYS_TO_K0(0x400000) * format * fix * Instance * format * Neutral reset * variables.h cleanup * bss * frameBuffer * format * Update src/boot_O2_g3/fault.c Co-authored-by: Derek Hensley <hensley.derek58@gmail.com> * review Co-authored-by: Derek Hensley <hensley.derek58@gmail.com> * Update src/boot_O2_g3/fault.c Co-authored-by: Derek Hensley <hensley.derek58@gmail.com> * bss * bss * bss * callback cleanup * fix function declarations * fix again * bss * bss * Update src/overlays/actors/ovl_En_Fishing/z_en_fishing.c Co-authored-by: engineer124 <47598039+engineer124@users.noreply.github.com> * Update src/boot_O2_g3/fault.c Co-authored-by: engineer124 <47598039+engineer124@users.noreply.github.com> * bss * bss * Update src/boot_O2_g3/fault.c Co-authored-by: engineer124 <47598039+engineer124@users.noreply.github.com> * review * import bss * format * minor cleanup * bss * review * fix * bss * bss * bss * bss * bss * format * a * Z_PRIORITY_FAULT * bss * fix * idle.c bss doesn't want to get fixed :c * review * bss --------- Co-authored-by: Derek Hensley <hensley.derek58@gmail.com> Co-authored-by: engineer124 <47598039+engineer124@users.noreply.github.com>
2023-06-06Misc Cleanup 3 (#1268)engineer124
* begin more cleanup * more enums * typo * == * fix go.h * fix RaceDogInfo struct * PR Review * PR Suggestions * missed one * missed even more * fix params * fix number
2023-06-04Misc Cleanup (#1257)engineer124
* a lot of brackets, and some other things * oops * another bracket * check flag all * just a few more... * PR suggestions * PR comment * pr * one more bracket
2023-03-21Misc Cleanup 14 (#1214)Derek Hensley
* bgId * z64scene.h whitespace * SubS_ComputeTrackPointRot casts * Macros cleanup * ifs * Empty Loops * Lights_FindBufSlot void * SkelAnime_GetFrameData * }; * Struct inits * fs * @todo * Bug comments * EnPofusen and ObjUm * Trailing comma * Revert "bgId" This reverts commit eea073c5ac30fd41f50436eeade43a811d0f0981. * Revert "z64scene.h whitespace" This reverts commit 399fd57550b7536b357ab6283360042f2e3e1467. * Revert "SubS_ComputeTrackPointRot casts" This reverts commit dea896c8743475508a3c7391e9d19cdb6b63f6a7. * FAKE * Review * Format
2022-07-23Hex Cleanup (#960)engineer124
* Hex Cleanup * PR Suggestions
2022-07-11General Cleanup 4 (#871)Derek Hensley
* PartTimerWorker -> PartTimer * cleanup * format * objChan draw macro * Fix macro * Fix warning * PR Review * Missed 1 ull * UINT16_MAX * Remove todo from footmark * Remove * from tex in AnimatedMat_DrawTexCycle
2021-12-07Macro Clean up (#454)engineer124
* Add OS macros * MTXMODE cleanup * format * More matrix mode macros missed
2021-11-05Add `stddef.h` and libc headers cleanup (#396)Anghelo Carvajal
* Move headers to include/libc * stddef * move math.h * General cleanup * move fabs, sqrtf and sqrt to math.h * move alloca and assert * whoops
2021-09-30setglobalintmask OK (#299)EllipticEllipsis
2021-09-30resetglobalintmask OK (#298)EllipticEllipsis
2021-09-29sethwinterrupt OK (#301)EllipticEllipsis
2021-09-27afterprenmi.c OK (#297)EllipticEllipsis
2021-08-18Migrated a lot of `boot` bss, matched a few NON_MATCHINGs in `boot` (#266)EllipticEllipsis
* Import bss to boot_main and idle, match last function in idle * Some pointer cleanup in idle, spec * Clean up idle, add build.c, add bss to CIC6105 * Import rand bss * sptask bss and a macro * sptask updated to use libultra macros * siacs.c bss * Macros in CIC and idle * controller bss * seteventmesg bss * spec * pimgr and piacs bss * initialize OK, threadsave, initialize, pimgr bss * Match DmaMgr_Start * Fix bss reorder using separate file * Small cleanup of hex/dec in buffer sizes * Add comment, remove unused bss from spec * Merge remote-tracking branch 'upstream/master' into boot_bss * Format * Delete files * remove commented-out structs * Bit more cleanup * Addressed reviews * Format
2021-08-10Sort boot files (#260)Tharo
2021-08-07sched.c OK (#248)Tharo
* sched * Minor fixes * Format headers in the ultra64 folder, bitshifts in defines * Fix PI_STATUS_ERROR * Update variables
2021-08-04Fix gcc warnings (#246)Anghelo Carvajal
* fix a huge amount of warnings * fix another big bunch * fix remaining warnings * Run formatter
2021-08-03Overhaul the build system (#234)Tharo
* wip * fix * add disassembler * Disasm builds OK * Variable addends * More wip * Rodata migration implemented * Cleanup old tools * Try fix submodule -> subrepo merge * git subrepo pull --force --remote=https://github.com/zeldaret/ZAPD.git tools/ZAPD subrepo: subdir: "tools/ZAPD" merged: "602e609" upstream: origin: "https://github.com/zeldaret/ZAPD.git" branch: "master" commit: "602e609" git-subrepo: version: "0.4.3" origin: "https://github.com/ingydotnet/git-subrepo" commit: "2f68596" * Builds again but assets are totally broken * git subrepo pull --force tools/asm-processor subrepo: subdir: "tools/asm-processor" merged: "1ffdb08a" upstream: origin: "https://github.com/simonlindholm/asm-processor.git" branch: "master" commit: "1ffdb08a" git-subrepo: version: "0.4.3" origin: "https://github.com/ingydotnet/git-subrepo" commit: "2f68596" * More cleanup, move functions.txt and variables.txt to tools/disasm and rm tables * rm z64compress in preparation for subrepo * git subrepo clone (merge) https://github.com/z64me/z64compress.git tools/z64compress subrepo: subdir: "tools/z64compress" merged: "eb11085c" upstream: origin: "https://github.com/z64me/z64compress.git" branch: "main" commit: "eb11085c" git-subrepo: version: "0.4.3" origin: "https://github.com/ingydotnet/git-subrepo" commit: "2f68596" * Fix asset extraction * Fix diff-init make rule * Split code bss * Split assumed linker bug padding from assembly files * add filelists for mm.us.rev1 * Maybe working, but I'm not sure * add overlays to spec * Add rodata to actos * Everything compiles * Make a lot of C files for code * Add almost every file in code to spec * whoops * 3 code files left * add scenes to spec * More progress on progress.py * Fix skelanime in spec * audio files! * Fix merge issues * Fix some C files in code * Fix remaining code files * Use existing O1 C files in spec * reorder boot order in spec * update spec * fault.c * Convert relocs on completed actors, fixbaserom uses current rom name * more boot files * Add VT macros and script * finish already existing boot files * most of libultra * fix 64bits libultra files * Use C files for libultra, wrap some functions in NON_MATCHING * Remove duplicate of OS_CLOCK_RATE from fault.c * C files for fbdemos * delete dumb files * bootstrap C files, still need to add them to the spec * update fixbaserom * boot OK? * I forgot to commit the spec * C for gamestates * C for kaleido * Change all includes to "" * copy actor sizes script from oot * I forgot to delete those files * Basic C files for effects * Add effects initvars names * Remove mislabelled boot functions from header/txt * Begin porting bootstrap_fx, some sizes * Fix <> * Fix enum * Fix diff.py * fix libultra stuff * update regconvert * update setup warnings * add some missing ; * Fix some makefile stuff and other fixes on some non_matching functions * add executable flag in extract_baserom and fixbaserom * fix relative path * copy assist from oot * fix map path * another assist path fix * Delete C files for handwritten files * add code_801A51F0 to spec * add gfxbuffers to spec * Move rodata to top of each file when possible * UNK_TYPEs for func_801A51F0 * Remove kaleido rodata from spec * Update spec and undefined_syms for recent merge * GCC warnings and fix errors in nonmatchings, * round percentage numbers * progress script: format changes * progress: error on non-existing files * fix warning in z_scene_table * Match 2 nonmatchings in z_actor * Warnings in lightswitch and invadepoh * Fix warning in z_actor_dlftbls * I though I fixed this one * whoops * Comment out CC_CHECK * Removed redundant ultra64.h includes * Update asm_processor, sorted boot_O1 into other folders, completed the fbdemo bootstrap, cleaned up undefined_syms * Completed gamestates bootstrap * Split kaleido_scope * Remove section.h and segment.h, move keep object externs to a common location in variables.h * Completed effects bootstrap * Segmented address externs for effects, fbdemos, gamestates and kaleido * Move actor data externs out of the if 0 * Segmented address externs for actors * Prepare actionfunc detection * fix script, how did it even work before * Fix actionfunc script again, re-introduce some more intermediate prints to the disassembler * Automated actionFunc detection in actors * Segmented addresses from player .text * rm old segment addrs script and fix build * Move sizes folder to tools * Make build.py executable * New Jenkinsfile Prayge * Remove numpy dependencies * Add warnings_disasm_current.txt * my bad * Update spec and undefined_syms * Add z_eff_ss_hahen to pametfrog * git subrepo pull (merge) --force tools/z64compress subrepo: subdir: "tools/z64compress" merged: "163ca2af" upstream: origin: "https://github.com/z64me/z64compress.git" branch: "main" commit: "163ca2af" git-subrepo: version: "0.4.3" origin: "https://github.com/ingydotnet/git-subrepo" commit: "2f68596" * Make z64compress print to stdout * sneeky commit to update warnings tooling * test * Another test * Mark fixing overlay reloc generating as a TODO * Update warnings stuff * Communicate the return code from running z64compress back to the Makefile through the wrapper * Run formatter, remove extra commented copy of function * Re-fix some includes * Convert atan to hex to conform to decided style * Some tidying up, remove c for fp and the other two handwritten code files * BSS in z_collision_check & z_scene_proc * add static back in * Fix timerintr bss, add file to spec, some cleanup * Remove externs * Newline * Readd enums * Typo * Colours * Comments for hitmark enum values Co-authored-by: EllipticEllipsis <73679967+EllipticEllipsis@users.noreply.github.com> * Improvements and suggestions * Organize and remove unused imports and use env for python3 scripts, delete unused overlay.py Co-authored-by: angie <angheloalf95@gmail.com> Co-authored-by: Elliptic Ellipsis <elliptic.ellipsis@gmail.com> Co-authored-by: engineer124 <engineer124engineer124@gmail.com> Co-authored-by: EllipticEllipsis <73679967+EllipticEllipsis@users.noreply.github.com>
2021-05-18Format everything (#141)Anghelo Carvajal
* Add trailing comma * Run format and add some missing trailing commas * Enforce the same clang-format version for everybody * z_en_m_fire1
2021-04-29Adds in scene support (#117)Kenix3
* 1 scene done, Z2_SOUGEN OK * All scenes OK * Makefile improvements * Use WIP ZAPD branch as submodule * Add spawn rotation flag macro * Fix bad merge * Move scenes to be in their own subfolders * Rename and restructure extracted baserom files * Progress tracking for assets * Add asset progress to csv * Use master ZAPD * Use distclean like in OOT * Fix up a few things with the makefile * Fix scenes not being dumped from ELF Co-authored-by: Rozelette <Uberpanzermensch@gmail.com>
2021-04-07z_lib fully matched (#85)Rozelette
* z_lib OK * Documentation * Added stdbool and stdint * Fixup for new names * Fixup bad merge * Feedback * Use u/s32 for intptr_t
2021-03-27Some OOT transfers, some renaming, etc (#75)Lucas Shaw
* Progress on various files * gfxprint stuff * split some rodata, add iconv for rodata string parsing * z_std_dma rodata * 2 nonmatchings in gfxprint * mtxuty-cvt ok * more * match a function in idle.c * progress * Cleanup * Rename BgPolygon to CollisionPoly * progress * some effect stuff * more effect progress * updates * made suggested changes * z_effect_soft_sprite_old_init mostly ok Co-authored-by: Lucas Shaw <lucas.shaw1123@gmail.com> Co-authored-by: Rozelette <Rozelette@users.noreply.github.com>
2021-03-27Restructure how buffers are set up (#77)Rozelette
2020-06-06Adds TODO comments to remove implementation defined pointer manipulation.Kenix3
2020-02-28Move variables in .data for most of boot files that have been decompiledrozlette
2020-01-20Port a bunch of libultra files from sm64rozlette
2020-01-12Port over fault.c from oot decomprozlette
2020-01-08Update to latest ghidra projectrozlette
2019-12-07Generate all major headers from ghidra projectrozlette
2019-09-29Use structs.h generated from Ghidra projectrozlette
2018-11-16Use hex instead of decimalrozlette
2018-11-13Disassemble a bunch of filesrozlette
2018-10-25Decompile {g,s}etthreadpri.crozlette
2018-10-25Fix tabsrozlette
2018-10-25Dump current statusrozlette