14 Commits

Author SHA1 Message Date
Pieter-Jan Briers 9ff83bcb97 Change CARD region based on loaded game disc (#137)
Region selection is based on game code, which isn't strictly correct but good enough for our use case.
2026-04-24 07:21:59 -07:00
Pieter-Jan Briers 212d01769d Tracy integration (#106)
* Sprinkle Tracy all over the project

* Move Tracy FetchContent to extern file, disable Tracy by default

* Use older CMake syntax for setting cache variables

* Fix test compile

* Rename ALIGN macro to AURORA_ALIGN

Needed because it conflicts with a macro in Apple's SDK headers on my macbook, and Tracy is now pulling in that header.
2026-04-08 19:19:58 -06:00
Luke Street 79507b88b9 Add vsync configuration 2026-04-06 23:04:43 -06:00
Luke Street 8dc57b7826 Reduce FIFO write overhead & improve codegen 2026-03-29 13:51:04 -06:00
Pieter-Jan Briers 2c631e7ea2 Make vertex arrays set via FIFO properly (#35)
* 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.
2026-03-05 22:27:16 -07:00
Pieter-Jan Briers e4afaeeeb7 OS functions start (#16)
* 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>
2026-03-02 08:33:42 -07:00
Luke Street a600b0b84c Rewrite attribute buffer, matrix & stream handling
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.
2025-04-14 17:17:59 -06:00
dbalatoni13 a18cdf3b59 Include <array> 2025-04-13 15:05:51 +02:00
Luke Street 7760ef8409 Restructure logging and add fallback logging 2025-04-06 16:32:50 -06:00
Luke Street b07d55f71d Update fmtlib 2025-04-03 21:03:11 -06:00
Luke Street 1b088e79e8 Update to SDL3 & latest imgui 2025-04-02 19:57:16 -06:00
Luke Street 5f06d873bc gx_shader: normalize normal 2022-08-09 13:40:45 -04:00
Luke Street c060e1da6b Reimplement GXCopyTex; simplify assertions 2022-08-09 02:05:33 -04:00
Luke Street 9a725c89cf Initial commit 2022-07-27 11:25:25 -04:00