Skip to content

GameCube

codingncaffeine edited this page May 26, 2026 · 2 revisions

GameCube (Dolphin)

Required Configuration

Dolphin libretro has very specific requirements on Windows:

Setting Value Why
gfx_backend OGL D3D11 and Vulkan are unreliable via libretro interface
CPU core JIT64 (default) Full-speed recompilation; falls back to CachedInterpreter if unstable
fastmem disabled Avoids VEH/SEH conflicts with .NET's exception handling
fastmem_arena disabled Prevents 4 GB arena reservation inside a .NET process
AllowHwSharedContext false true causes black screen — rendering context not shared properly

Init Sequence

The order of operations matters:

  1. Set core options (all values must be strings, not integers — Dolphin's option parser rejects numeric types)
  2. Call retro_load_game
  3. After load returns, call retro_set_controller_port_device for all ports — calling before load is silently ignored

Teardown

  • FreeLibrary is skipped for Dolphin — the core's internal threads take too long to fully exit, and premature unloading causes an AV in the NVIDIA driver
  • context_destroy callback is called normally (unlike N64)

Performance Notes

  • FPS dips at startup are normal — Dolphin's JIT cache takes time to warm up
  • Stable 60fps after the first few seconds of gameplay

GL Overlay Presentation

At high internal resolutions (4x–6x), the default CPU readback path (glReadPixels + vertical flip + Marshal.Copy to WPF WriteableBitmap) becomes the bottleneck — at 6x (3840x2880) it transfers ~42 MB per frame across the PCIe bus.

Emutastic uses a GL overlay window to eliminate this entirely:

  1. A WS_POPUP overlay window is created over the game viewport
  2. After each retro_run, the FBO is blitted directly to the overlay's back buffer via glBlitFramebuffer
  3. SwapBuffers presents the frame with zero CPU involvement

This brought 6x internal resolution from ~52 fps to ~58+ fps. The CPU readback path is kept as an automatic fallback if the overlay fails to initialize.

Visual Upgrades

Dolphin renders at native 640x480 (480p). Internal resolution upscaling dramatically improves polygon clarity:

Option Native Upscaled (suggested)
dolphin_efb_scale 1 3 or 4 (1440p / 4K equivalent)
dolphin_max_anisotropy 0 4 (16x anisotropic)
dolphin_force_true_color enabled enabled
dolphin_pixel_lighting disabled enabled (per-pixel lighting, slightly heavier)
dolphin_anti_aliasing 0 2 or 4

All options take effect immediately without restarting the game. Performance at 3x–4x is smooth on modern GPUs; 5x–6x is viable on high-end cards but may cause frame drops in GPU-heavy scenes.

AMD / Intel GPU Compatibility Mode

Some AMD Radeon (notably integrated/laptop chips on Minisforum-class mini PCs) and Intel Arc GL drivers misrender Dolphin libretro's framebuffer indirection — the game ends up tucked into the bottom-left corner of the window with the rest of the area blank. NVIDIA's GL driver tolerates the FBO indirection fine; AMD/Intel sometimes don't.

Fix: open Preferences → Cores / Extras and enable the GameCube: render to default framebuffer (AMD/Intel GPU compatibility) checkbox under the Compatibility section.

What it changes when enabled:

  • get_current_framebuffer returns 0 (the default backbuffer) instead of the frontend's managed FBO
  • Frame readback uses FBO 0 instead of the managed _fboId
  • The GL overlay path is automatically disabled (it's incompatible with rendering directly to the default backbuffer)

Tradeoff: the in-game GL overlay (cog menu, save/load slots, cheats panel, recording controls) is disabled for GameCube while this is on. You can still launch games, save/load via keyboard shortcuts, and exit via the close button — you just lose the on-screen pill UI.

NVIDIA users should leave this off. Enabling it on NVIDIA hardware swaps to the CPU readback path and produces the same bottom-left bug as a side effect — the symptom appears on whichever hardware doesn't match the active mode.

Clone this wiki locally