github adriadam10/mkw-recomp v0.1.22

49 minutes ago

Mario Kart World 1.9.0 is supported: the setup takes a 1.9.0 dump as it takes 1.0.0 and 1.8.0, with the new
replay list. Linux gets FSR 3.1 (built in, also in 3-4 player split screen), DLSS downloads itself on
Linux
when picked, and an AppImage for CPUs without AVX2. AMD on Windows no longer waits 20-35 s at each
start for shader programs its driver never finishes, and a GPU driver update warms the shaders again in the
setup instead of a long black start. Restart game in the in-game menus, Keyboard + one controller for two
players, and graphics fixes on 1.8.0 courses (Koopa Troopa Beach, Faraway Oasis's trees, the Crown City drawbridge).

Split screen: help keeps coming in. @bytronic-paradox sent three more changes for #600 and @andreknieriem,
@pitah81 and @v4l3r10 measured theirs on their own machines. If you play 2-4 player split screen, post a
logs/mkw.log of a race with this version, with your CPU and GPU, in #600.

Thanks to @andreknieriem, @GrimacingSoftly, @bytronic-paradox, @pitah81, @v4l3r10 and @anarqz.

Changes

For players

From pull requests:

  • #1073 by @andreknieriem: Mario Kart World 1.9.0. The setup recognises a 1.9.0 dump (.nup, .nx or a
    folder) and builds it; the game's patches, the HUD's new replay list and the race events were all found again in
    1.9.0's code. Its new texts are in the 9 extra languages too (#1060, #1003, #875).
  • #1044 by @andreknieriem: FSR 3.1 upscaling on Linux, built into the runtime (no download), also in 3-4 player
    split screen: Settings > Display, temporal upscaler FSR 3. SDR only, without frame generation; off by default as
    before.
  • #1059 by @GrimacingSoftly: the drawbridge between Crown City and Faraway Oasis (1.8.0) no longer stands up in
    the water and throws karts off on GPUs with 32 KiB of shared memory (RX 9070 XT and others).
  • #1064 by @GrimacingSoftly: Koopa Troopa Beach's sand no longer flashes large dark or bright triangles (1.8.0).
  • #1065 by @GrimacingSoftly: roadside trees near Faraway Oasis no longer vanish together as the kart comes near.
  • #1046 by @pitah81: the game no longer hitches when a controller connects or goes to sleep: the gamepads are
    read by a thread of their own (on by default; MKW_INPUT_THREAD=0 reads them as before).
  • #1023 by @pitah81: the texture prefetch pauses while a race runs, so it no longer slows the 4-player game
    thread (about 36 → 31 ms a frame there).
  • #1047 by @andreknieriem: no slow first frames at a 4-player race's start when memory is spilled to disk: the
    spill writes runs of pages at once, at most 32 MiB a second (MKW_MEM_SPILL_MIB_S).
  • #1026 by @andreknieriem: crash fix ("page state 0, not trapped") in 4-player races on Linux.
  • #1049 by @v4l3r10: less write-watch time a frame on Windows (about 2.0 → 1.5 ms in a 24-kart race): regions
    the game writes at every frame are no longer reset and protected again each time, and the memory sync's queries
    go from about 109 to 2 a frame. On by default on Windows.
  • #1062 by @bytronic-paradox: a 4-player race's frame recording is handed over instead of copied (~7 MiB a
    frame off the frame's critical path; on by default).
  • #1063 by @bytronic-paradox: on CPUs with more than one L3 cache (Ryzen 3000 with 8 cores or more and alike) the
    threads that record a frame stay in the replay thread's L3, and the game's threads on the other cores (on by
    default there).
  • #1035 by @bytronic-paradox: on Windows the replay thread really gets the core kept for it (CPU sets); before,
    the process lost that core and the replay thread never had it.
  • #1042 by @andreknieriem: on Linux the fence write-backs use their 4 threads on 6-core CPUs as meant (they stayed
    off after the replay thread's core was taken).

Ours:

  • A GPU driver update warms the shaders again from the start screen, with its progress bar, instead of a start
    that compiled for up to 2 minutes with nothing on screen (#1051, #1034, #1057, #1070).
  • AMD on Windows: shader programs the driver never finishes no longer hold every start for 20-35 s (#1031,
    #1041, #1066, #1067, #977): the ones stuck at a start are remembered for that driver and left to the race, the
    prewarm threads stuck in the driver no longer slow the game to a crawl, and the setup's warm-up step gives up after
    5 minutes without progress instead of waiting forever.
  • An AppImage for CPUs without AVX2 on Linux (mkw-…-x86_64-noavx2.AppImage), like the Windows -noavx2 zip
    (discussion #833, #82).
  • Picking DLSS on Linux downloads its library into the game folder, as on Windows; no more copying
    libnvidia-ngx-dlss.so by hand.
  • Restart game in the in-game menu (classic menu and the native overlay's Game tab): the game closes as from the
    window and starts again, so settings that need a restart apply (discussion #1020).
  • Keyboard + one controller in Controls: two players with the keyboard and one controller, switched while the
    game runs; the missing-controller notice points to it.
  • Touchpad opens the menu in Controls: off, the DualShock 4 / DualSense touchpad leaves the menu alone
    (discussion #1039).
  • The HUD at the screen edges works on 1.0.0 too (HUD position: edges, ultrawide; #959).
  • Intel integrated GPUs (Arc 140V, MSI Claw): no more patchy ground or striped videos: their texture tile slots
    follow their memory instead of a fixed 768 MiB (#925).
  • 4 GB discrete GPUs (GTX 1050 Ti): no more black and magenta ground in races: the render target reserve grows
    as needed instead of taking its whole size at start.
  • Trees, bushes and grass that appeared and vanished at random (#986): three more shader programs reset their
    lists before other workgroups add to them.
  • A start whose mkw.ini lost its romfs line uses the game package the last setup linked, instead of "RomFS
    not found" (#1038).
  • On Linux, logs/mkw.log is written also when the desktop sends the game's output to ~/.xsession-errors
    (#993).

For developers

  • #1050 by @anarqz: plugin API 7: the game clock (60 Hz ticks and the host's time) and hacks_lock's bit for
    code mods.
  • #1028 by @v4l3r10: probes for GPU reads and writes of imported pages frozen read-only.
  • A crash in another DLL no longer names a lifted function; on Windows the report adds the thread's name and its host
    stack (#1019). Each start on Windows logs Windows' newest crash record of mkw.exe from the last 3 days, for fast
    fails that leave no error line (#927, #979, #1025, #1032).
  • MKW_TRACE=audio gives each 5.1 speaker's level (#1021); MKW_INPUT_STALL_LOG times the input poll's steps;
    MKW_PAIRS_HANG_TEST and MKW_PAIRS_STALL_MS for the prewarm stall; MKW_REPLAY_PAR_DRAW_TIMES is a known
    mkw.ini key.
  • tools/analisis/bin/port_check.py checks a port of the patches and version.c's addresses to a new game version
    and lists the SDK functions its main imports that the runtime does not replace.

Tested before publishing

From the packages Actions built for this tag, before publishing:

  • The whole setup from the Linux AppImage (game 1.0.0) ran every step (generate, compile, shaders, warm-up) and ended
    OK.
  • The whole setup from the Windows zip (6-thread Windows PC, game 1.0.0) in about 19 minutes.

Install

  • Linux x86-64, glibc 2.31 or newer (Debian 11, Ubuntu 20.04, SteamOS and later): chmod +x the AppImage and run it.
    The game it builds lives in ~/.local/share/mkw-recomp. On 64-bit ARM (ARMv8.2: Snapdragon 8 Gen 1 and newer), the
    -aarch64.AppImage.
  • Windows 10/11 x64: unpack the zip into a folder and run mkw.exe.
  • Either: a Vulkan 1.3 GPU and about 30 GB free. Open Game files, point it at your own dump of Mario Kart World
    1.0.0, 1.8.0 or 1.9.0 (its exefs/ and romfs/, or one .nup or .nx file) and press Set up. Nothing of the game ships here: the setup builds it on your
    machine and downloads NVIDIA's nvdisasm and ptxas (pinned by sha256; 84 MB on Linux, 126 MB on Windows) to
    describe the shader encoding.
  • Every package and the mkw.exe in the zip carry a build attestation: gh attestation verify mkw.exe --repo adriadam10/mkw-recomp shows it was built by this repository's GitHub Actions. An antivirus that flags it by its
    behaviour (it compiles and loads the game's code) is a false positive: report it to that antivirus.

Updating

From 0.1.5 on, the start screen offers a newer release (Update to vX) and installs it: it downloads it, checks it,
replaces the program and sets up again only what changed. From an older version, once by hand: Linux, run the new
AppImage; Windows, unpack the new zip over the same folder; then press Set up again (the steps already done are
skipped).

Known issues

  • Windows: the setup can stop at the shaders step with spec.py failed when every try to read NVIDIA's
    instruction description comes out garbled (more likely while the PC is busy). Run the setup again: the next try
    usually passes. A fix is in the works.

Reporting a problem

Open an issue with the bug form and attach the logs: logs/mkw.log (the game), logs/launcher.log (the start screen) and
logs/setup.log (the setup's tools), in ~/.local/share/mkw-recomp on Linux and next to mkw.exe on Windows.

Don't miss a new mkw-recomp release

NewReleases is sending notifications on new releases.