38 Commits

Author SHA1 Message Date
CrashOveride95
ad5828b772 Remove unused Indy code, make sure debug code isn't being included in ROM version builds (#24)
* Remove outdated code from errorasm/exceptasm

* Delete osAckRamromWrite and osAckRamromRead, old unused stubs

* Remove osDriveRomInit, as this is old OS2.0I code that's not supposed to be in later versions

* Remove error.c as this was removed in 2.0J and duplicates other code

* Remove old libleo code which was only in 2.0I

* Remove mtxutil and mtxcatl as these are duplicate of functions rewritten in mgu

* Remove dump_gbi as it's literally all #if 0

* Remove GIO functions as they're leftover Indy board code

* Remove leftover Partner-N64 code

* Prevent debug code from being included in ROM version

* Remove testhost due to being a stub file with nothing in it

* Remove osExit as it's indy board code useless on non-indy

* Add ifdef _FINALROM to dumpturbo

* All debug code included in non ROM builds checked and #ifndef _FINALROM added where needed

* Add missing ifdef and endlines

* Restore libleo code (will be taken care of in a seperate PR)
2025-11-02 21:26:58 -05:00
someone2639
186699c5c3 remove last modern_gcc reference (#23)
Co-authored-by: someone2639 <someone2639@gmail.com>
2025-10-24 18:30:45 -04:00
someone2639
4858ea84dd Gamecube Controller Centering (#21)
* implement gc controller centering on boot

* add clamp macros too

* format

---------

Co-authored-by: someone2639 <someone2639@gmail.com>
2025-09-13 22:26:44 -04:00
CrashOveride95
b742894b55 New and improved make build system and other cleanups (#13)
* Remove unused C versions of gu functions which will conflict with ASM versions under the new build system
This is a holdover from the decomp, as it must support older libultra versions which used these functions; as we're basing this project off of the final 2.0L, they gotta go

* Comment out bugged unused debug code
Will be removed completely by #12 soon enough anyway, but this will break CI if I don't remove this

* C++ fix in ultra64.h

* New build system
Based off my personal "template" featuring makedepend and support for automatically building and installing all 3 library versions, along with colors
Still needs cleanup to make sure I've brought over everything from the previous makefile

* Fix clang_format

* CI fixes to account for the non-decomp build system

* Remove old makefile

* Remove decomp tools

* Accidentally removed format checker

* Change VERSION to TARGET

* Fix install target by removing unused files and bring back ZSort header

* Fix CI typo

* gzsort header removed, I will figure out how to add it in modsdk later

* just copy the whole PR folder instead and remove install.mk, unnecessary

* SDK installation shall be handled seperately

* Remove RMON and a few leftover KMC things

* Remove MODERN_CC, as everyone is gonna be building this on a modern compiler anyway
2025-08-23 22:58:24 -04:00
someone2639
dba3265aac Reactivate Assert Functionality, make ISV the only canon debug hardware (#12)
* add assertf; reactivate assertBreak

* newline after user crafted fmt string

* assertf implemented; EX cond fixed

* format

* make ISV the only initialize for now

* force initialize to 'autodetect'

* fix assertf with only format str

* format

---------

Co-authored-by: someone2639 <someone2639@gmail.com>
2025-08-23 17:41:37 -04:00
someone2639
4029179754 Controller remapping support (depends on #8) (#10)
* patch os_cont

* patch over controller.c

* patch contreaddata

* patch controller.h

* patch motor.c

* formatting

* merge OSContPad and OSContPadEx

* Add remapping support

* quick cleanup

* format

* allow resetting controller map (for remapping menus or other catastrophes)

* Document analog_mode

* Don't change motor command state if gamecube controller

* better comment and source

* document why the stick is like that

* make CI happy

---------

Co-authored-by: someone2639 <someone2639@gmail.com>
2025-07-31 08:36:33 -04:00
someone2639
195443a853 Gamecube Controller Support (#8)
* patch os_cont

* patch over controller.c

* patch contreaddata

* patch controller.h

* patch motor.c

* formatting

* merge OSContPad and OSContPadEx

* increment ptr if error channel

---------

Co-authored-by: someone2639 <someone2639@gmail.com>
2025-06-17 22:58:09 -04:00
someone2639
ece07a17ba Handle All Warnings (#2)
* set build options

* remove COMPARE and MDOERN_* switches

* remove tools makefile

* AR patching is gone too since we want a fullly decomped version

* AR is modern

* remove cwd changes

* edit my own tool to fix compile errors

* compile files generated with my own tool instead of the originals

* inline modern_gcc makefile

* port mips toolchain detection logic

* add util.mk for find-command

* remove forced AR order and strip/mdebug removal commands

* add -mabi=32 to as flags

* cseq warning

* csplayer

* env

* voicecheckword

* voicestopreaddata

* voicedata

* voicecontwrite4

* voice done

* sinf

* sched

* rg

* cosf

* timerintr

* settimer

* xprintf

* xldtob

* contram

* conteepwrite

* conteepread

* dumpturbo

* gt

* aisetnextbuf

* us2dex_emu

* loadtextureblockmipmap

* guloadtile_bug

* kmcprintf

* seq

* sndplayer

* synthesizer

* seqplayer again

* load

* fix warnings

* formatting

* address csplayer, gu

* remove if(0)

* another explicit fallthrough

* last explicit fallthrough

* simplify triple multiply

* its 4 multiplies

* its an octuple multiply

* CI formatting

* sltu in alRaw16Pull

* another sltu

* handle all sltu's

* sndplayer sltu

---------

Co-authored-by: someone2639 <someone2639@gmail.com>
2025-02-20 12:17:14 -05:00
someone2639
01fa771093 Make Version 2.0L the only build (#6)
* Strike Version L

* for includes too

* format

* include format

* remove I J and K base files

* flatten folder

* only build libgultra

* clarify the new MGU switch

* flatten build folder

* remove stray #line

* address review

* and format

---------

Co-authored-by: someone2639 <someone2639@gmail.com>
2025-02-18 16:25:18 -05:00
someone2639
c366e0122a Format the Repo (#3)
* set build options

* remove COMPARE and MDOERN_* switches

* remove tools makefile

* AR patching is gone too since we want a fullly decomped version

* AR is modern

* remove cwd changes

* edit my own tool to fix compile errors

* compile files generated with my own tool instead of the originals

* inline modern_gcc makefile

* port mips toolchain detection logic

* add util.mk for find-command

* remove forced AR order and strip/mdebug removal commands

* add -mabi=32 to as flags

* formatting changes

* add clang format files

* formatting changes

* make libgultra CI work

* install mips gcc too

* add format check tools

* Add formatting to CI

* Add CI (#4)

* make libgultra CI work

* install mips gcc too

* remove make setup

---------

Co-authored-by: someone2639 <someone2639@gmail.com>

* we don't use clang-tidy

* use 120 width for formatting

* a

* address clang-tidy messing up

* test

* align consecutive macros and declarations

* only align macros for now

* SpaceAfterCStyleCast: false

* format headers too

* remove cast space switch because its false by default

* pointers on left

* AlignConsecutiveBitFields: true

* install clang-format and clang-tidy on gh actions

* and clang-tools

* show diff in format check tool

* make CI work

---------

Co-authored-by: someone2639 <someone2639@gmail.com>
🙏
2025-02-17 22:56:09 -05:00
someone2639
efbd931cbc Set up Makefile for modern building (#1)
* set build options

* remove COMPARE and MDOERN_* switches

* remove tools makefile

* AR patching is gone too since we want a fullly decomped version

* AR is modern

* remove cwd changes

* edit my own tool to fix compile errors

* compile files generated with my own tool instead of the originals

* inline modern_gcc makefile

* port mips toolchain detection logic

* add util.mk for find-command

* remove forced AR order and strip/mdebug removal commands

* add -mabi=32 to as flags

---------

Co-authored-by: someone2639 <someone2639@gmail.com>
2025-02-17 11:28:31 -05:00
Derek Hensley
6e861af404 Move compiler includes to include/compiler (#91) 2024-11-29 01:40:49 +09:00
cadmic
1616482098 Add VI_CTRL_ANTIALIAS_MODE_0 + oot comments (#89)
* Add VI_CTRL_ANTIALIAS_MODE_0 + oot comments

Co-authored-by: Tharo <17233964+Thar0@users.noreply.github.com>

* Add VI_CTRL_ANTIALIAS_MODE_0 to vimodes

---------

Co-authored-by: Tharo <17233964+Thar0@users.noreply.github.com>
2024-08-22 10:30:10 -06:00
Derek Hensley
6e9175b807 Modern GCC (#88)
* Add modern gcc makefile

* Add MODERN define to actually be able to build

* Better modern gcc builds

Co-authored-by: Tharo <17233964+Thar0@users.noreply.github.com>
Co-authored-by: cadmic <cadmic24@gmail.com>

* Warnings

* MODERN_CC

* OPTFLAGS

* no-strict-aliasing

---------

Co-authored-by: Tharo <17233964+Thar0@users.noreply.github.com>
Co-authored-by: cadmic <cadmic24@gmail.com>
2024-08-22 10:29:10 -06:00
Derek Hensley
bcca1c8292 General docs + cleanup (#84)
* osCreateThread small cleanup

* osViSetSpecialFeatures

Co-authored-by: Tharo <17233964+Thar0@users.noreply.github.com>

* osAiSetNextBuffer

Co-authored-by: Tharo <17233964+Thar0@users.noreply.github.com>

* macros.h move to PRinternal.h

* dbgproto.h and dbgdefs.h moved to PRinternal

* Align OSPifRAM struct

Co-authored-by: Tharo <17233964+Thar0@users.noreply.github.com>

* LAN1 vimode comments

Co-authored-by: Tharo <17233964+Thar0@users.noreply.github.com>

* Stack macros

* Hex for all ALIGNED macros

* leoDiskSTack ALIGNED(0x10)

* interrupt bug

Co-authored-by: Tharo <17233964+Thar0@users.noreply.github.com>

* ASM comment

* Revert "LAN1 vimode comments"

This reverts commit bed467a67172de611cde15744eb659f996f3d157.

* STACK_START

* FPCSR_RM_RN

---------

Co-authored-by: Tharo <17233964+Thar0@users.noreply.github.com>
2024-08-20 00:19:01 -04:00
Derek Hensley
a68329aec1 Asm Formatting (#82)
* Replace STAY2 with per instruction macros

Co-authored-by: Tharo <17233964+Thar0@users.noreply.github.com>

* asm Formatting

Co-authored-by: Tharo <17233964+Thar0@users.noreply.github.com>

* Remove unused STAY macros

* space after comma for some asm args

---------

Co-authored-by: Tharo <17233964+Thar0@users.noreply.github.com>
2024-08-19 23:48:28 -04:00
Derek Hensley
52d323da2e Some Docs (#79)
* osAiGetLength

Co-authored-by: Tharo <17233964+Thar0@users.noreply.github.com>

* osAiSetFrequency

Co-authored-by: Tharo <17233964+Thar0@users.noreply.github.com>

* contquery.c

* osContSetCh

* bzero

Co-authored-by: Tharo <17233964+Thar0@users.noreply.github.com>

* osInvalDCache

Co-authored-by: Tharo <17233964+Thar0@users.noreply.github.com>

* osInvalICache

Co-authored-by: Tharo <17233964+Thar0@users.noreply.github.com>

* __osProbeTLB

Co-authored-by: Tharo <17233964+Thar0@users.noreply.github.com>

* osSetIntMask

Co-authored-by: Tharo <17233964+Thar0@users.noreply.github.com>

* osWritebackDCache

Co-authored-by: Tharo <17233964+Thar0@users.noreply.github.com>

* crc

Co-authored-by: EllipticEllipsis <73679967+EllipticEllipsis@users.noreply.github.com>
Co-authored-by: engineer124 <47598039+engineer124@users.noreply.github.com>

* __osVoiceContDataCrc

Co-authored-by: EllipticEllipsis <73679967+EllipticEllipsis@users.noreply.github.com>
Co-authored-by: engineer124 <47598039+engineer124@users.noreply.github.com>

* voice file headers

Co-authored-by: EllipticEllipsis <73679967+EllipticEllipsis@users.noreply.github.com>
Co-authored-by: engineer124 <47598039+engineer124@users.noreply.github.com>

* exceptasm

Co-authored-by: Tharo <17233964+Thar0@users.noreply.github.com>

* CHECK_IPAGE in pfsreadwritefile

* prs read write macros in __osPfsRWInode

* PIF_RAM_SIZE in sirawdma

* Additional use of VI_SUBPIXEL_SH in __osViSwapContext

* Remove PR/os.h includes from some libc files

* Add void as arg to empty arg functions

* interrupt threadasm macros

* Use NTLBENTRIES in osMapTLBRdb

* Some usage of NULL in thread.c

* Use K0BASE/RDB_BASE_VIRTUAL_ADDR instead of KUSIZE in some places

* Force semicolon usage on _osVirtualToPhysical

* replace tabs with spaces

* __osContinitialized boolean

* PR review cleanup

Co-authored-by: Tharo <17233964+Thar0@users.noreply.github.com>

* Update src/os/invaldcache.s

Co-authored-by: Tharo <17233964+Thar0@users.noreply.github.com>

---------

Co-authored-by: Tharo <17233964+Thar0@users.noreply.github.com>
Co-authored-by: EllipticEllipsis <73679967+EllipticEllipsis@users.noreply.github.com>
Co-authored-by: engineer124 <47598039+engineer124@users.noreply.github.com>
2024-07-08 17:10:43 -07:00
Derek Hensley
a1542b6ae3 Move some headers from src to include/PRinternal (#77)
* controller.h

* siint.h

* osint and viint

* piint.h

* rmonint.h

* Remove ARRLEN from controller.h

* PRinternal

* controller_gbpak.h and controller_voice.h
2024-06-06 19:51:54 -07:00
Mr-Wiseguy
2ab125a5f3 Matched 2.0I and 2.0J, fixed matched object count calculation (#53)
* Matched 2.0I and 2.0J, fixed matched object count calculation

* Update version checkbox matrix

* Mark irix 2.0H as N/A in the checkbox matrix since it's not available

* Address PR comments

* Changed tab to spaces on new files

* Converted tabs to spaces in other changes, fixed os_motor.h definitions
2023-09-02 23:17:04 -04:00
Anghelo Carvajal
8cf510c955 Add sgidefs.h header to gcc subfolder (#50) 2023-09-01 15:13:47 -07:00
Mr-Wiseguy
7b04a39156 Add support for multiple versions, match current archives under 2.0K (#52)
* Initial pass at multi-version support, matched 2.0K

* Fixed CI and made it build K, changed default version back to L

* Fixed VERSION_DEFINE not being used after rebase

* Update checkbox matrix for 2.0K

* Update readme instructions, fix ido CI

* Fix NON_MATCHING and document it in the readme

* Change default version to L, fix clean removing all builds, made distclean remove all builds, allow running clean and distclean without setup

* Made build and extracted paths match the base path format, remove unnecessary file compilation flag setting
2023-08-31 10:38:15 -04:00
Derek Hensley
b376559296 Irix support (libultra_rom/libultra OK) (#44)
* WIP

* Add ar

* POC

* WIP libultra_rom

* Simplify Makefile and match initalize

* 1 c 1 s left

* exceptasm OK

* Different weak impl

* COMPARE_AR comment for irix

* Get ar working and clean up makefile

* Some more small cleanup

* Split makefile

* dereference instead of [0]

* Small cleanups

* initialize msp and kmc libultra

* libultra_rom OK

* Warnings

* Add to readme

* Fix ido ci?

* Make libultra_rom default again

* PR review

* libultra OK

* Update Readme

* whitespace removal

* Small exceptasm clean up

* Asm symbols

* Bring over improved asm.h

* build improvements

* asm PR suggestions

* Make comment

* Fix readme table

* strip debug on setup

* GBIDEFINEs
2023-06-27 17:58:03 -07:00
Mr-Wiseguy
0417857a2c Match libgultra_d.a and libgultra.a (#36)
* Begin stages of _d

* Match audio

* Match ldiv

* match llbit

* Match string.c (memcpy matched by wiseguy)

* match syncprintf

* Match flash code and skip libc X files (will do later)

* fix flash formatting and match some voice files

* More voice files

* More voice progress

* voice finish

* Match ai and sched

* Match aisetfreq (done by Tharo) and a few more

* match eep read/write

* more io files

* match epi

* Match gbpak and motor

* PFS mostly matched

* Match PI

* Match SI

* Match SP code

* Match VI code

* Fix alignment

* Match RG

* Fix exceptasm

* parse_gbi fix

* OS part 1

* Fix conflict

* Fix some bugs

* More files

* more matching

* Almost there

* begin some libultra_d code

* add delay

* Match timerintr

* fix for merge

* match logfloat

* printregion match

* log OK

* profile OK

* commonerror OK, plus small cleanups in profile and log

* small cleanup of commonerror

* Start

* Small cleanup

* Defines for constants and other cleanup (#1)

* Integrated fakechroot to match file paths for monutil

* Added generation of symlink to /bin for the chroot

* Matched monutil (#2)

* Added support for libgultra.a building

* Matched profile for libgultra.a

* Fixed host_ptn64 symtab diff, better support for building different versions

* finish libgultra_d (#33)

* finish libgultra_d

* clean up some old comments

* IDO recomp redirect (#35)

* Updates for patched ido

* Some clean up

* new line

* Update table to reflect that libgultra.a and libgultra_d.a are matched

* Change default target to libgultra_rom

* Replaced some magic numbers with defines, removed binlink

* Added explicit alignment to any implicitly aligned variables (#37)

* newlines

* profile cleanup

* va_end

* formating

* WAIT_ON_IOBUSY

* OS_VI_SPECIAL_MAX

* Ido download latest

* yeet useless __assertBreak

* Enable ci for all L libgultra

* Fix NULL syntax

* osViGetCurrentFramebuffer

* Format (#40)

* format

* file modes

* logfloat

* Fix wrong permisions

* left*

* Cleanups

* Missed an rdb.h

* newlines

---------

Co-authored-by: CrashOveride95 <crashoveride953@gmail.com>
Co-authored-by: CrashOveride95 <40003130+CrashOveride95@users.noreply.github.com>
Co-authored-by: Derek Hensley <hensley.derek58@gmail.com>
Co-authored-by: Tharo <17233964+Thar0@users.noreply.github.com>
Co-authored-by: pixel-stuck <mathmcclintic@gmail.com>
2023-04-02 19:12:00 -07:00
Derek Hensley
d5b1bfd843 Format (#41)
* Format

* Permissions

* Appease IDO -O1

* vimodes
2023-04-02 13:59:12 -07:00
Anghelo Carvajal
c3d2972079 Remove CR from every file (#39) 2023-04-02 13:30:18 -07:00