summaryrefslogtreecommitdiff
path: root/src/code
AgeCommit message (Collapse)Author
2024-09-03[ntsc-1.2] LoadFragment2 OK (#2118)Derek Hensley
* [ntsc-1.2] LoadFragment2 OK * Add insight about bssSize
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-09-03Target System Docs: Actor Searching [3/?] (#2120)fig02
* document target actor searching * missed something * review * mzx review
2024-09-01Document Target_Draw [Target Docs 2/?] (#2115)fig02
* document Target_Draw Co-authored-by: engineer124 <47598039+engineer124@users.noreply.github.com> * fix missed renames * retail fix * another fix --------- Co-authored-by: engineer124 <47598039+engineer124@users.noreply.github.com>
2024-08-31Target Docs [1/?] (#2110)fig02
* Target Docs Part 1 Co-authored-by: engineer124 <47598039+engineer124@users.noreply.github.com> * review --------- Co-authored-by: engineer124 <47598039+engineer124@users.noreply.github.com>
2024-08-30[ntsc-1.2] Match rand.c (#2097)Dragorn421
* [ntsc-1.2] Match rand.c * Comment on N64 Rand_ZeroOne taking the low random bits Co-authored-by: Tharo <17233964+Thar0@users.noreply.github.com> --------- Co-authored-by: Tharo <17233964+Thar0@users.noreply.github.com>
2024-08-29[ntsc-1.2] Match z_demo.c, z_eff_blure.c, z_eff_spark.c (#2096)Dragorn421
* Match z_demo.c * Match z_eff_blure.c * Match z_eff_spark.c (fake inc.) * review * improve EffectSpark_Draw match Co-authored-by: cadmic <cadmic24@gmail.com> * cleanup * fix merge * review * better match EffectBlure_DrawSimpleVertices (ty cadmic) * review * rm unneeded include versions.h --------- Co-authored-by: cadmic <cadmic24@gmail.com>
2024-08-29[ntsc-1.2] Fix some data / disassembly / undefined_syms (#2103)cadmic
* Fix some data splits * Use real fault functions in cic6105.c * Fix fault_n64.c data sizes * Format
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-28[ntsc-1.2] Match z_game_over.c, PAL 1.1 fixes (#2099)cadmic
* Match z_game_over.c (PAL 1.1 change) * Fix previous matches that are actually PAL 1.1 changes * Add versions.h to global.h * Add versions.h to z_game_over.c too * And the others too * Fix awkward wording
2024-08-28T() macro 7 (#2102)Dragorn421
* T() macro in most of the rest of code (except z_message, z_actor, ucode_disas, gfxprint, game, fault, db_camera) * remaining T() macro in boot * format * review
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-27[Audio 6/?] Build Soundfonts and the Soundfont Table (#2056)Tharo
* [Audio 6/?] Build Soundfonts and the Soundfont Table * Improve lots of error messages * First suggested changes * Make audio build debugging more friendly Co-authored-by: Dragorn421 <Dragorn421@users.noreply.github.com> * Some fixes from MM review * Make soundfont_table.h generation depend on the samplebank xmls since they are read, report from which soundfont the invalid pointer indirect warning originates from --------- Co-authored-by: Dragorn421 <Dragorn421@users.noreply.github.com>
2024-08-27T() macro 6 (#2090)Dragorn421
* T() in z_skelanime.c * T() in z_eff_blure.c * T() in z_play.c * T() in z_jpeg.c * T() in z_horse.c * T() in z_eff_spark.c * T() in z_malloc.c * T() in z_effect_soft_sprite.c * add todo on translating "確保" (litterally ~"secure", but may be better as "allocate"-ish) * review * format
2024-08-27T() macro 5 (#2089)Dragorn421
* T() in __osMalloc.c * T() in code_80097A00.c * T() in debug_malloc.c * T() in code/load.c * T() in sys_math3d.c * T() in z_collision_btltbls.c, z_fbdemo_fade.c, z_fcurve_data_skelanime.c, z_view.c * T() in z_collision_check.c * remaining T() in __osMalloc.c * __osMalloc consistency * format
2024-08-27[ntsc-1.2] Match a bunch of small stuff (#2094)cadmic
* Match z_fbdemo_wipe1.c * Fix gDPSetTileCustom * Match z_eff_ss_dead.c * Match src/code/audio_thread_manager.c * Match z_parameter.c * Match KaleidoScope_DrawWorldMap * Format * 1 -> AUDIOMGR_DEBUG_LEVEL_NO_RSP * Actually match KaleidoScope_DrawWorldMap * Add comment on duplicate code * Revert "Fix gDPSetTileCustom" This reverts commit de09338d92e50dd3b9cb8ee7214e2e6b3fecf7ff.
2024-08-27match PreRender_CopyImageRegionImpl (#2093)Dragorn421
2024-08-26[ntsc-1.2] Match system_malloc.c (#2080)cadmic
* Match ntsc-1.2 system_malloc.c * CLEAR_INTERRUPTS -> DISABLE_INTERRUPTS
2024-08-26[ntsc-1.2] Match z_vismono.c (#2091)Dragorn421
* [ntsc-1.2] Match z_vismono.c * change match to use height Co-authored-by: cadmic <cadmic24@gmail.com> --------- Co-authored-by: cadmic <cadmic24@gmail.com>
2024-08-26Add all N64 version defines (#2095)cadmic
* Add all N64 ROMs to versions.h * Remove OOT_ prefix from version defines * Make it pretty
2024-08-25[ntsc-1.2] Decompile cic6105.c, main.c (#2068)Dragorn421
* decompile-OK Main, cic6105.c * names cleanup / minimal doc * match versions * fix bad disasm metadata format * bss * bss * review 1 * review 2 * review 3 * review 4 * cleanup * bss * add some sizes to disasm metadata symbols
2024-08-25[ntsc-1.2] Match z_std_dma.c (#2082)cadmic
* Match ntsc-1.2 z_std_dma.c * Add B_80121AE3
2024-08-24T() macro 4 (#2084)Dragorn421
* T() in z_kankyo.c * T() in z_demo.c * T() in z_effect.c * remaining T() in z_sram.c * T() in z_en_encount1.c * T() in z_en_owl.c * T() in z_en_wonder_item.c * fix forgot T * Demonstration -> Demo
2024-08-24T() macro 3 (#2083)Dragorn421
* T() in z_camera.c * T() in z_parameter.c * T() in z_room.c * T() in z_kaleido_scope_call.c * T() in z_map_exp.c
2024-08-24[ntsc-1.2] Match z_kaleido_debug.c, z_lmap_mark.c (#2077)Dragorn421
* Match z_kaleido_debug.c, z_lmap_mark.c * consistent style for n64dd callbacks calls
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-20Match n64dd text in code (#2058)Dragorn421
* match n64dd text * format * fixups * add n64dd segment using baserom * cleanup syms 1 * cleanup symbols 2 * cleanup D_800FF4B0 * fix declaration usage and linking for D_800FF4B0
2024-08-20Add versions.h (#2060)Dragorn421
2024-08-20Match more ntsc-1.2 overlay draw functions (#2061)cadmic
* Match more overlay draw functions * Review
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-19Allow building the Debug ROM without debug features (#2052)cadmic
* Allow building the Debug ROM without debug features * Fix bss * Add comment * Reword again * Fix bss
2024-08-19Match ntsc-1.2 z_scene_table.c (#2050)cadmic
* Match z_scene_table.c * Attempt to fix bss ordering * Forward declare PlayState instead * Untangle circular includes in z64scene.h
2024-08-17[Audio 5/?] Build the Samplebank Table (#2044)Tharo
2024-08-17Fixup printf args fake matches (#2049)Dragorn421
2024-08-15Match ntsc-1.2 z_skelanime.c, z_view.c, z_viszbuf.c (#2041)cadmic
2024-08-14padutils.c, line numbers (#2040)Dragorn421
2024-08-14[ntsc-1.2] Match z_construct.c, z_draw.c, z_kaleido_setup.c and partially ↵Dragorn421
z_actor.c (#2039) * func_80033C30 * Interface_Init * z_draw.c * KaleidoSetup_Destroy , n64dd.h * z_kaleido_setup.c * add n64dd files to spec according to tools/disasm/ntsc-1.2/files_code.csv , they're between irqmgr.o and fault.o putting them before or after malloc_debug.o in the spec is an arbitrary choice
2024-08-14Generic actor params getters (#1359)Tharo
* Initial PARAMS_GET macros * NOSHIFT macro * Use number of bits rather than raw mask values * Add descriptions for each generic macro * Reformat * Adjust comment * format * edit en_door macro names * edit redead macro name * edit bdan switch macro name, and remove unneeded comments in go2 * mizushutter macro names * remove PARAMS_GET_S, rework ishi switch flag handling * actually remove PARAMS_GET_S * remove PARAMS_GET2_S * PARAMS_GET_U and PARAMS_GET_S * format * fix merge * format --------- Co-authored-by: fig02 <fig02srl@gmail.com> Co-authored-by: Dragorn421 <Dragorn421@users.noreply.github.com>
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-11Match ``z_fbdemo.c`` and ``z_fbdemo_fade.c`` for NTSC-1.2 (#2031)Yanis
* matched ntsc-1.2 fbdemo/fbdemo_fade * remove ifdef for fbdemo * remove macro for 's match
2024-08-11[Doc] name function func_8002DBD0 to Actor_WorldToActorCoords (#2029)krm01
* name function Actor_WorldToActorCoords * clean up some misleading usages
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-08-10Add "do {} while (0);" to CLOSE_DISPS (#2025)cadmic
2024-08-09Match remaining GC retail versions (#2019)cadmic
* Match the remaining GC retail versions * Fix BSS ordering for existing versions * Disable clang-format for #pragma increment_block_number * sramResetCode -> sSramResetCode * Replace 0xFF3F with or-ing all buttons together * Revert "Disable clang-format for #pragma increment_block_number" This reverts commit 406b6d26c92911c676a7ea9f07a1612211760e11. --------- Co-authored-by: Dragorn421 <Dragorn421@users.noreply.github.com>
2024-08-08gc-us OK (#2018)cadmic
Match BSS order and delete disassembly data
2024-08-08Match NTSC file select (#1998)cadmic
* Match NTSC file select Co-authored-by: inspectredc <inspectredc@gmail.com> * nes -> eng in macros * Duplicate more code but use less #ifs * Format --------- Co-authored-by: inspectredc <inspectredc@gmail.com>
2024-08-08Match NTSC z_kaleido_scope.c (#1988)cadmic
* Match NTSC z_kaleido_scope.c * Use new REGs everywhere * Add comments for YREG initialization * Use new REGs everywhere for real * Fix merge
2024-08-02Automate fixing BSS ordering (#2009)cadmic
* Automate fixing BSS ordering * Typo * Some cleanups * Move pragma check after printing BSS info * Some proofreading * multiprocessing, require version, some colors * Tweak output * Black + mypy * Move logging and sys.exit out of helper functions * Use stdout instead of stderr in fix_bss.py * Add suggestion to conflicting offsets error Co-authored-by: Dragorn421 <Dragorn421@users.noreply.github.com> * Remove var = list[T]() * Improve error handling Co-authored-by: Dragorn421 <Dragorn421@users.noreply.github.com> * Add error if no pointers to BSS * Add comment about process_file_worker * Only print updates if stdout is a tty * Use new binary-search-esque candidate generation algorithm Co-authored-by: Dragorn421 <Dragorn421@users.noreply.github.com> * Add Wikipedia link * More comment tweaks --------- Co-authored-by: Dragorn421 <Dragorn421@users.noreply.github.com>
2024-08-02`InitVars` -> `Profile` (#2011)fig02
* rename ActorInit * rename actorInit * rename initInfo * EffectSs Profile * _InitVars -> _Profile * format, loose ends * revert tutorial