* Add debug group/marker GX/GD API
* This keeps happening
* Don't crash if debug group stack underflows
* Missed a debug check
* Stubs
* Last stub?
* We hate C++
* Oh right release exists
* Make vertex arrays set via FIFO properly
Adds a new GX_LOAD_AURORA FIFO command with a GX_LOAD_AURORA_ARRAYBASE subcommand. This enables us to pass 64-bit pointers & sizes in command lists and such.
Added GDSetArraySized and made GDSetArray/GDSetArrayRaw panic.
* Dropped this assert.
* Remove duplicated code
I accidentally re-introduced this while I was splitting the diffs for the other PR.
* OS memory start
OSInit()
MEM1 size configurable via AuroraConfiguration
Fancy guard pages (who knows if it'll be useful)
* OSGetTime() and OSGetTick()
* Fix OSPhysicalToCached etc for 64-bit pointers
* Specify memory size in OS boot info
Used by TP at least
* Fix MEM1Start/MEM1End definition
oops
* Implement some OS arena functions
* DEBUG -> NDEBUG
* Implement memory translation functions
I decided to remove the macros from the header given they're very unlikely to matter perf wise and it reduces code duplication.
There's no distinction between cached and uncached. Physical is relative to MEM1.
* Fix symbol mismatches from forgetting to include the header
* Implement OSReport and similar logging functions
* Fix OSBaseAddress
Ugh
* Implement OSGetPhysicalMemSize
* Fix usage of static for global variables
* Remove ../ prefixes from OS CMake file
CLion did this
* Remaining headers needed for TP to build
* Rider's "Unversioned Files" will keep trolling me
* Remove TP-specific OSReport functions
* Hardcode OS_BUS_CLOCK in os.h
TP has it referenced in an initializer, so relying on MEM1 being initialized is impossible.
* Import TP ARAM emulation code
* Guard against double OSInit() calls.
---------
Co-authored-by: Luke Street <luke@street.dev>
* Alias PS* math functions to C_* when not on GEKKO
TP has some call sites that directly reference the PS functions, so we need to redirect these to the C implementations
* Implement remaining mtx math functions
Taken from TP decomp
* Replace mtx assert function stubs with the C assert macro
We presumably do not care about preserving the original line numbers from decomp.
* Fix mtxstack asserts truncating pointers
* Make Vec have "struct Vec" name too
Fixes compile in TP
Now array attributes (GXSetArray) will be properly
fetched based on the vertex format. Buffers are
still assumed to be byte-swapped to little-endian.
Stream handling completely redone and many issues
resolved.
Eliminates matrix transposes. AURORA_NATIVE_MATRIX
is no longer necessary and removed.