Skip to content

Starlet v0.2.0

Choose a tag to compare

@Producdevity Producdevity released this 20 Nov 18:59
· 13 commits to master since this release

A large update: faster rendering and threading, fixes for black screens and broken effects found while bringing up The Wind Waker, Mario Party 4 and Twilight Princess, and tools to replay GX traces. Every port of mine is now built on this version.

Faster

  • Guest threads run as fibers on one host thread, and interrupts are taken on the running thread, including asynchronously while a thread spins.
  • The renderer keeps draw state, streamed vertex data and uniform snapshots between frames, shares draw groups and skips SDK state the game sets to the value it already has.
  • Draw and program keys are derived only when a draw reads them.
  • EFB copies: consecutive copies of one EFB render in one pass, resident copies are cropped with framebuffer blits, and copies the CPU reads back are written to memory without stalling the game.
  • EFB peeks and depth readbacks are answered from snapshots instead of draining the GPU. Depth readbacks arrive without a thread waiting for them.
  • Shader programs that a builder worker compiles stay with that worker instead of being compiled again on the GL thread.

Fixed

  • GX registers survive a command stream failure, so a stage transition no longer leaves the screen black (The Wind Waker).
  • EFB peeks read the rows below the frame correctly (The Wind Waker's Omori).
  • GXWaitDrawDone returns as soon as the newest draw is done.
  • Indirect textures with 5-, 4- and 3-bit offsets, and LOD from unmodified coordinates (Mario Party 4's curtains).
  • EFB copies to I4 textures, three trailing quad vertices drawn as a triangle, and slow GPU fences waited for instead of failing after one second.
  • THP video decoding keeps its memory off the game's heap, which fixes a movie crash.
  • A fault inside an asynchronous interrupt or another handler is reported as the original fault.
  • GCC 12 to 14 built two register tables wrong, which broke program keys and draw batching in GCC builds. The ports build with clang and were not affected.

New

  • Aurora bridge: Aurora-based ports (Twilight Princess, Animal Crossing, Mario Party 4) can render with Starlet on upstream Aurora, with sbc-port-overlay drawn on top. See the Aurora guide in the wiki.
  • GX trace recording and replay: record a game's command stream on a device and replay it on a host, with a cold program cache and the shader builder on. tools/replay-all.sh runs the whole set.
  • Audio diagnostics: output gaps and replayed blocks are logged with the audio counters, the SDL audio device and ALSA state are logged once, and STARLET_AUDIO_PROBE=file.wav records what the device callback plays.
  • A GameCube stick shape that models the controller's gate and the SDK clamp.
  • An opt-in second frame in flight, and full-resolution EFB snapshots on request.
  • The host tests now run on aarch64 Linux for every push.

Tested on

  • This version: Super Mario Galaxy, Super Mario Sunshine (decomp), Resident Evil 4 and Luigi's Mansion on KNULLI (RG40XX-H). Host tests pass on macOS and aarch64 Linux, and the GX trace replays pass.
  • 8d67eec, which differs only by the audio logging and the GCC fix: Pikmin 2 and Super Mario Sunshine (decomp and gc-recomp) on muOS (RG35XX-SP), Super Mario Galaxy, Resident Evil 4 and Luigi's Mansion on KNULLI, and The Wind Waker on muOS (RG35XX-H) and ROCKNIX (RG DS).

Known issues

  • Resident Evil 4 crackles on some handhelds. The new audio logging is there to find out why.
  • ROCKNIX's Panfrost driver is still slower than the Mali driver on the same H700 handhelds.

This is an unofficial fan project, not affiliated with Nintendo. GPL-3.0.