Every Common::SPSCQueue goes, and with it the mutexes in front of the
multi-producer ones:
- WorkQueueThread runs on an sthread fed by an mpsc_stack, so any
thread pushes without a lock, and parks on retro_eventcount.
- AsyncRequests hands requests to the video thread through a
retro_waitable_spsc of pointers; a blocking request lives on the
caller's stack.
- CoreTiming's off-thread events and the DVD thread's results move to
mpsc_stack, dropping the CoreTiming write lock.
- Real Wiimote reports cross threads as fixed 32-byte records in
retro_spsc rings; the read thread receives straight into the ring.
- Bluetooth passthrough frees transfers through an mpsc_stack whose
nodes live in the transfers' own buffers, queues incoming packets in
mirrored retro_spsc rings and hands ACL data to IOS in place.
- PerformanceTracker's frame times move to a retro_spsc ring.
The core never creates a NetPlay client or server; only the standalone
frontends did. Drop NetPlay with what only it used: the traversal
client, ENet, the QoS session, the NetPlay config layer and settings,
the chat and golf overlays, the netplay index, the save sync plumbing
in BootSessionData and WiiRoot, the disc sync hashes, and the Android
app's netplay feature and JNI bindings.
From RetroArch's libretro-common: rthreads, retro_eventcount,
retro_spsc, retro_waitable_spsc, mpsc_stack and retro_atomic, with the
units they need (features_cpu, rtime, compat_strl), built as their own
library group.
The core only ever outputs through libretro, so drop the ALSA, cubeb,
null, OpenAL, OpenSL ES, PulseAudio and WASAPI streams, the backend
selection, and the vendored cubeb and OpenAL. SoundStream is now one
non-virtual class, implemented by the libretro output in
DolphinLibretro/Audio.cpp.
Also drop the settings only the backends read (backend, volume, mute,
mute on disabled speed limit, latency, WASAPI device) and the volume
and mute helpers. The mute-on-fast-forward toggle never had an effect,
as the libretro stream ignored volume changes.
The GameCube microphone, Wii Speak and Logitech mic keep their libretro
microphone path; the unbuilt cubeb capture path and its Windows COM
worker thread go.
Dolby Pro Logic II decoding (SurroundDecoder, FreeSurround) stays.
Drop DolphinAnalytics and Common/Analytics along with every game-quirk,
game-start, performance-sample and GPU-bug-override report, the
Main.Analytics settings, and the Android opt-in dialog, settings
entries, JNI hooks and session-timestamp tracking that only fed it.
DriverDetails loses its to_string helpers and stored driver name,
which only built the bug-override report.
Discord presence was already disabled in the core (Host callbacks were
stubs and Boot turned it off); drop UICommon's DiscordPresence, the
vendored discord-rpc, its settings and the Host_UpdateDiscord* hooks.
The DolphinDevice Discord IOCTLs now answer IPC_EACCES, as Dolphin does
with presence disabled.
X11Utils was only used by DolphinNoGUI, a standalone frontend, so both
go.
UpdaterCommon, WinUpdater, MacUpdater and UICommon's AutoUpdate only
served the standalone Dolphin frontends; RetroArch updates the core.
Also drop the AutoUpdate settings, the update-track build string and
the u32 WindowsRegistry::ReadValue instantiation only WinUpdater used.
The core runs only inside a libretro frontend. The Qt frontend and its
submodule go, together with what only it used: the Qt DBus screensaver
inhibit, the JIT's single-block erase, the string translator hook, the
Qt translation catalogs and Transifex config, the desktop packaging
(NSIS, RPM, Flatpak) and the autoupdate overview.
The core takes its input from the libretro frontend and never builds the
SDL controller backend. The SDL submodule, the backend, its config entries
and the SDL hints and version bits of the Qt frontend go.
The static Makefile is the only build. GitLab CI and the GitHub workflows
build with it, with the same lanes and toolchains; the MSVC workflow and
the CMake-only macOS universal-binary script go, as nothing builds them.
The Readme describes the Makefile build.
A bare make picks the Windows build from OS=Windows_NT, which every MSYS2
environment sets whatever uname -s reports, or from a MinGW-w64 CC. The
Windows build defaults to gcc/g++ instead of make's built-in cc.
Builds parallel_gamecubewii_libretro for every lane .gitlab-ci.yml covers:
unix (Linux x86_64/aarch64), webos, win64 (MinGW-w64), osx (x86_64/arm64,
CROSS_COMPILE), ios-arm64, tvos-arm64, android-arm64 and android-x86_64.
The source lists and per-library flags follow what the CMake LIBRETRO=ON
build links into the core, without the units only the standalone frontends
use. The per-platform configure results for curl, libusb, libiconv and mGBA
are checked in under Externals/<library>/makefile; the remaining generated
files are produced by the Makefile under obj/gen.
The Android input backend's JNI entry points belong to the Android app and
are left out of the core, which links with --no-undefined everywhere.
The Windows code builds against MinGW-w64 headers older than 12.0 as well:
D3D12 includes d3d12sdklayers.h explicitly, and the constants, declarations
and const-correct pointer types those headers lack for D3D12, device
notifications, the Wii Remote Bluetooth path, the IOS IP stack and thread
naming are provided locally.
A region-free title runs in the fallback region, which Dolphin takes
from the system locale. Kodi on LibreELEC runs with no locale, so that
is PAL, and Japanese WiiWare marked region-free hangs on a black screen.
Run such a title in the region its game ID names, for that run only.
Titles with a region of their own, and IDs that name none, are
unchanged.
Dolphin fitted its picture into the frame by the Aspect Ratio mode, bars
and all, and the frontend scaled the frame to 4:3 or 16:9 once more, so
every mode but Stretch came out squeezed or stretched (Custom, Custom
Stretch and Raw the most). Dolphin now always stretches over the frame,
and the core gives the frontend the aspect ratio Dolphin works out for the
chosen mode (Presenter::CalculateDrawAspectRatio for a given mode), again
whenever it changes. Stretch and VR are as before.
Vulkan hands the frontend the whole swapchain image Dolphin presented
into, as D3D11 and OpenGL do with their backbuffer, instead of the EFB's
size (640x528 against a 640x480 image), which squeezed the picture.
StateManager::Restore() bound back only slot 0 of the vertex shader's
constant buffers and neither the custom constants at slot 2 nor the
framebuffer, while it told Apply() they were all the core's. A shader
preset binds its uniform and push constant buffers at slots 0 and 1, so
the core went on drawing with the preset's buffer at slot 1: a black
picture with sound, which stayed black after the preset was turned off
(#378, #452). The frontend's passes also found the core's 64-byte
buffer at the vertex shader's slot 1.
In dual core mode the CPU thread ends the frame with StopGpuLoop() while
retro_run() runs the GPU loop. When the CPU thread got there before the
frontend thread entered RunGpuLoop(), the loop of the last frame still
counted as stopped, the Stop() did nothing, and RunGpuLoop() ran with
nothing to end it: the frontend hung in retro_run() and the CPU thread
stayed paused. StopGpuLoop() now also sets a flag the loop checks on
each pass, cleared once the loop has ended.
Fixes#462
A frontend can only get a real Wiimote by offering the Real WiiMote
device for each port, next to the emulated Wiimote. This option lets the
player pick one device for every Wii port instead, in place of what the
frontend set: any of the Wiimote devices, a Real WiiMote or a GameCube
Controller. Left at "Set per port", the frontend's choice stands.
Real WiiMote also scans for Wiimotes continuously, since a real one is
only found by scanning.