summaryrefslogtreecommitdiff
path: root/src/code/padmgr.c
AgeCommit message (Collapse)Author
2025-04-27Delete macros.h; Delete global.h (#2516)fig02
2025-04-26add array_count.h (#2514)fig02
2025-04-23macros.h 1/?: `PRINTF` and `T` (#2509)fig02
* create printf and translation headers * non-overlays complete * printf finished * move T macro * edit comment * fix error * fix bss * remove is_64 * fix bss
2025-02-13Reduce overlay dependencies on global.h (6) (#2468)mzxrules
* add some headers, split some of z64.h * MtxClear -> IdentityMtx * more misc cleanups * move D_80116280 to header, fix build issue * remove z64.h * Revert "MtxClear -> IdentityMtx" This reverts commit 8fc74c0672f72b91ae4068e73228fc46fe9465d4. * split z64path.h and z64skin.h functions * z64face_reaction.h * cleanup overlay global references * trim padding * bss
2025-01-24Create headers for some libu64 files (#2440)mzxrules
* Create headers for some libu64 files * apply bss patch
2025-01-10[iQue] Match remaining src/boot files (#2417)cadmic
* [iQue] Match remaining src/boot files * Fix debug ROM * Use -funsigned-char * Sort ique before gc in LNx macros
2025-01-08[iQue] Create/update macros for printing debug strings (#2398)cadmic
2024-12-15Add macros for line number differences (#2365)fig02
* initial work, think I got all of them * cleanup line_numbers.h * fix gc-eu-mq-dbg * fix matching problems * remove old lines * format * missed some stuff * comment fixes * other * review changes
2024-11-17Decouple Debug Features From gc-eu-mq-dbg (#2296)fig02
* rename OOT_DEBUG to DEBUG_FEATURES * makefile changes * add DEBUG_ASSETS * fix DEBUG_FEATURES usages * format * fix errors * review * fix problem and review2 * review * add DEBUG_FEATURES to DEBUG_ASSETS check * review * whoops * format
2024-10-09[ntsc-1.0/1.1] Match line numbers in debug strings (#2255)cadmic
2024-09-03[ntsc-1.2] Match padmgr.c, sys_cfb.c, rcp_utils.c (#2111)cadmic
* Match padmgr.c * Match sys_cfb.c, rcp_utils.c * Format
2024-08-28[ntsc-1.2] Decompile fault.c (#2046)Dragorn421
* wip decomp ntsc-1.2 fault.c * more ntsc-1.2 fault.c * decompiled fault_v1.c * name fault_v1 functions, wip * try to clean up build system (two versions of the fault system coexisting) * cleanup * cleanup2 * fix build gc-eu-mq-dbg * match 2 more, ty anon * matched * review * more review * fixup spec * `(uintptr_t)ptr op int` instead of `ptr op (type*)int` * move fault.h out of global headers, properly include fault.h and versions.h * compile all fault_*.c files regardless of version by overriding FAULT_VERSION * n64 FaultMgr.framebuffer s32 -> u16* * FaultMgr.framebuffer -> FaultMgr.fb * make gc FaultMgr.fb u16* (yes, thats everything) * bss * fix Fault_Printf return type * noop FaultDrawer_SetFontColor, FaultDrawer_SetCharPad in fault_n64 * fault_color_ stuff is only for fault_gc * rm empty line in makefile * I guess `D_80105A90_unknown` is `[sg]TotalAllocFailures` * bss * `Fault_WaitInput` -> `Fault_WaitForInput` * use named fault funcs in pointers array * FAULT_OOT{N64,GC} -> FAULT_{N64,GC} * Apply suggestions from code review Co-authored-by: Derek Hensley <hensley.derek58@gmail.com> Co-authored-by: Anghelo Carvajal <angheloalf95@gmail.com> * review, sync fault_{gc,n64} * Apply `FPCSR_CE` suggestions from code review Co-authored-by: Derek Hensley <hensley.derek58@gmail.com> --------- Co-authored-by: Derek Hensley <hensley.derek58@gmail.com> Co-authored-by: Anghelo Carvajal <angheloalf95@gmail.com>
2024-08-23T() macro 2 (#2073)Dragorn421
* T() in idle.c, irqmgr.c, padmgr.c, z_locale.c * T() in z_sram.c * T() in z_bgcheck.c, z_scene.c * format
2024-08-22Add T macro for translated debug strings (#2064)Dragorn421
* Add T macro for translated debug strings * Hyral -> Hyrule * put some more care into z_std_dma
2024-08-14padutils.c, line numbers (#2040)Dragorn421
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-16Create debug macros for LogUtils functions (#1610)cadmic
2024-01-12Replace most osSyncPrintf calls with PRINTF macro (#1598)cadmic
* Replace most osSyncPrintf calls with PRINTF macro * DEBUG -> OOT_DEBUG
2022-11-16Mempak doc (#1382)Tharo
* Mempak doc * Format * Suggested changes * Further changes
2022-11-01Rename `vt.h` to `terminal.h` (#1339)Dragorn421
* `vt.h` -> `terminal.h` * `VT_` -> `T_` (as in Terminal) * `vt.h` -> `terminal.h` in includes too Pepega * Sort out tiny terminal.h include inconsistencies * Format * -> `TE_` * format * `TE_` -> back to `VT_` (parkour!) * explicit VT
2022-09-27Rumble doc (#1375)Tharo
* Rumble doc * Fixes, suggested changes * Improve padmgr retrace callback related code * Name some rumble-adjacent things, further suggested changes * Further suggested changes * Suggested changes
2022-09-03More documentation for padmgr.c (#1336)Tharo
* More documentation for padmgr.c * Update comments * Further suggested changes * Suggested changes * LOG_SEVERITY_INFO -> LOG_SEVERITY_CRITICAL * Adjust PadMgr_RequestPadData comment * Avoid array notation for args, adjust comment, rename the FaultMgr padInput field to inputs to better reflect it's an array
2022-04-08Message Queues, Threads, and surroundings cleanup (#1178)Tharo
* message queues, threads, and surroundings cleanup * Format, make the formatter prefer clang-format-11 if found * Fix __osThreadTail type * Q -> Queue, thread defines renamed * Reformat, add missing NULL * Suggested changes and further casting cleanup * Reformat * padmgr name fixes
2022-02-02Documentation for fault.c and fault_drawer.c (#1106)Tharo
* Mostly document fault and fault_drawer * FaultDrawer printf functions return s32 * Review Suggestions for comments Co-authored-by: EllipticEllipsis <73679967+EllipticEllipsis@users.noreply.github.com> * Some further review suggestions * Further changes from suggestions * Fix Fault_AddClient doc comment * Bug comment for memdump overrun, add more to Fault_PadCallback bug comment * mb -> MB, comment about bss above externs * Fix color codes Co-authored-by: EllipticEllipsis <73679967+EllipticEllipsis@users.noreply.github.com>
2021-12-07Name one is-controller-valid symbol (#1060)Dragorn421
* Document `D_8012DBC0` as `isCtrlr2Valid` * `isCtrlr2Valid` missing `g` prefix * Run formatter
2021-11-30libultra files and directories restructure (#1038)Tharo
* Restructure files, begin header restructure * Format * us2dex * Fix parallel spelling Co-authored-by: JoshDuMan <40190173+JoshDuMan@users.noreply.github.com> * Use OS_K0_TO_PHYSICAL in place of VIRTUAL_TO_PHYSICAL in osAiSetNextBuffer * Uppercase hex, exception vector address defines * Interrupt flags 1 Co-authored-by: Dragorn421 <Dragorn421@users.noreply.github.com> * Interrupt flags 2 Co-authored-by: Dragorn421 <Dragorn421@users.noreply.github.com> Co-authored-by: JoshDuMan <40190173+JoshDuMan@users.noreply.github.com> Co-authored-by: Dragorn421 <Dragorn421@users.noreply.github.com>
2021-09-28Format all translation comments like `// "..."` (hopefully all of them) (#986)Dragorn421
* Format all translation comments like `// "..."` (hopefully all of them) * Move translation comments to before on long lines Located them with `grep -r src -e '^[^(]*);[ ]*//'` Regex `osSyncPrintf\([^;]*\n.*//` didn't find more * Format two more
2021-09-04Cleanup translation comments (#924)Dragorn421
* `// Translates to:` -> `//` * `// Translation: ([^"].*)` -> `// "$1"` * Manual cleanup * Manual cleanup in `src/code/` * Use more lowercase for some all caps translations * Move translations to end of lines where it fits under 100 bytes * Move one translation to end of line manually * Run formatter * Cleanup in EnHeishi1 as suggested by Roman * Update src/code/z_play.c Co-authored-by: Roman971 <32455037+Roman971@users.noreply.github.com> Co-authored-by: Roman971 <32455037+Roman971@users.noreply.github.com>
2021-02-13Fix most compiler warnings in the boot and code segments (#674)Tharo
* Less warnings in boot & code segments * few more warnings gone * Ran formatter * z_view warning gone * -> 1 * f31 -> 31 * Remove function casts * Few more small improvements * Separate declaration and assignment in func_80091738 and Item_Give Co-authored-by: Thar0 <maximilianc64@gmail.com>
2020-10-03libultra cleanup (#215)Random
* cleanup libultra * fixes - use quotes instead of <> for includes - add macros for zelda specific thread priorities - fix Makefile - properly format the remaining pfs structs * fix button macros + add CHECK_BTN_ANY/CHECK_BTN_ALL * remove ULTRA_ABS * fix includes * update z_player.c/z_lib.c + run format.sh * merge upstream/master * fix include in En_Goroiwa * fix includes
2020-06-21Decompile jpegdecoder.c, padsetup.c and code_800C3C20.c (#217)Random
* Decompile jpegdecoder.c, padsetup.c and code_800C3C20.c * change func_800C3C20's prototype and rename some fields in jpeg related structs * Fix comment in Jpeg_GetU16 and change func_800C3C20 * use a switch in padsetup.c
2020-06-17Matched some controller files (#178)Lucas Shaw
* osPfsIsPlug.c and osContSetCh.c OK * update * __osPfsGetStatus.c OK * removed unused asm * Updated all libultra controller files to use new structs instead of the temporary structs. Added os_pfs.h * controller updates * fixed header guard * Made suggested changes
2020-06-13Fix various non matching issues and introduce #ifdef NON_EQUIVALENT instead ↵Roman971
of #if 0 (#207)
2020-05-25Decompile a bunch of small files (#160)Random
* Decompile a bunch of small files * Rename dacrate to dacRate * Run format.sh * Minor fixes in PR #160
2020-04-22Finished code_801031F0.c, guPosition.c, guLookAtHilite.c (#84)Lucas Shaw
* started microcode decomp * Modified spec to fix error * osContGetQuery OK * Decompiled guLookAtHilite.c * guPosition.c OK * Fixed formatting * osViSetEvent.c OK * Deleted unnecessary files * Made suggested changes, merged playblack.c * Removed line breaks from comments * Removed argument listing
2020-04-18Naming some functions in libultra_code, decompiling a decent amount. (#77)Lucas Shaw
* osgetactivequeue ok * osspdevicebusy ok * osGetCurrFaultedThread ok * osSpRawStartDma OK * __osSpSetPc and osViGetCurrentFramebuffer OK * sinf, sins, and sptask OK * coss OK * cosf OK * ran format.sh * Updated PR to use ultratypes * osContStartQuery OK * ran format.sh * Updated PR to fix issues * Made suggested changes
2020-04-14padmgr and related (#71)silv3rwing07
* In process of moving changes over from old repo * Merged in changes * Finished import of padmgr changes from old repo * Adjusted some volatile * Improving padmgr volatile situation * Almost matched osReadMempak * Working on osMempakDataCRC * Explanations and equivalents but no matches for osMempakAddrCRC and osMempakDataCRC * OK after merge * Matched osMempakAddrCRC and osMempakDataCRC * Matched osReadMempak * Updated PadMgr function names to be less like original code * Changed variable names to make them further from original code * Changed names and it stopped matching * Undid clang-format steamrollering whitespace memes * Cleaned up Input names * More formatting changes * Moved padmgr to z64.h, deleted padmgr.h
2020-04-08Decompile sleep.c and printutils.cRandom
- Decompile sleep.c (OK) - Decompile printutils.c (OK) - Fix 1 non-matching in z_room.c - Get rid of some magic numbers
2020-04-05Fixes in PR #50Random
- Rename "sGraph_UpdateTime" to "sGraphUpdateTime" - Rename "Graph_Ct"/"Graph_Dt" to "Graph_Init"/"Graph_Destroy" - Change the LOG_STRING macro - Rename "LOG_VALUE" to "LOG_NUM" - Fix brace style - Rename "UcodeInfo"/"UcodeDisas" to "UCodeInfo"/"UCodeDisas" - Fix field names in "UCodeDisas" - Fix typo in "GraphicsContext" - Change the size of unknown fields in "GraphicsContext" to hex - Rename "game_init_func" to "gameStateInitFunc"
2020-04-04Add log macrosRandom
- Add log macros required to match `Graph_GetNextGameState`
2020-03-22Format all src C filesRoman971
2020-03-18Various fixes/matchesRoman971
- Matched all remaining functions in `__osMalloc.c`, 2 functions in `code_8007BF90.c`, 1 in `code_800A9F30.c`, 2 in `fault.c`, 1 in `fault_drawer.c`, 1 in `gfxprint.c`, 2 in `z_camera.c` - Improved most other remaining non matchings to ensure they are actually equivalent and to get them closer to matching - Added a `alloc.h` header file in the process of working on `fault.c` non matchings - Decompiled `padmgr.c` data/bss in order to improve padmgr non matchings - Removed unused `z_en_wallmas.c` data files - Moved functions confirmed to be in `z_cheap_proc.c` to their own file with that name
2020-03-17First proper commit.Jack Walker