Skip to content

Releases: Thorhax/usf4-nx

usf4-nx 0.8.0

Choose a tag to compare

@Thorhax Thorhax released this 23 Oct 04:28

usf4-nx 0.8.0

New renderer: deko3d

  • The game now draws with Renut's renderer on deko3d, the Switch's own graphics API, instead of the Vulkan driver (NVK). Renut (reNut by masterspike52) is used with the author's permission.
  • It renders at 1280x720 in both handheld and docked mode and holds 60 fps in fights with the CPU at 1785 MHz and the GPU at 768 MHz, using less CPU than before. The NRO is also 10 MB smaller.
  • 720p is the only resolution: Renut has no 540p. If your usf4.toml says 540, the game draws at 720 anyway.

Switch buttons in the menus

  • Button prompts now show the Switch's buttons in the right places (the bottom face button shows B, the right one A, the left one Y, RB shows R, BACK shows −).
  • To get the Xbox icons back, set usf4_button_icons = "xbox" in usf4.toml.

Lower input latency

  • The game reads the controller later in each frame, a few milliseconds closer to the moment the picture is shown, without dropping frames.

First play

  • The first time each scene is drawn, its shaders are compiled. The first fight's loading screen can take several seconds longer once; after that they are kept on the SD card (deko3d_shaders.bin) and loading is normal.

How to update from 0.7.x (important)

This version needs a new shader file, deko3d_glsl.bin, made from your own disc. Replacing only usf4.nro is not enough this time.

  1. Open the installer at https://thorhax.github.io/usf4-nx-installer/, choose your Xbox 360 disc image (or extracted folder), and press Create usf4-nx-update.zip.
  2. Extract the zip into sdmc:/switch/ (it overwrites usf4.nro and LICENSES.txt and adds deko3d_glsl.bin).
  3. Delete these files from sdmc:/switch/usf4-nx/; the new version no longer uses them:
    • sa2_shaders.mesp
    • sa2_shaders.mesp.idx
    • cache/sa2_native_pipelines.bin
  4. Keep everything else: game_root/, your saves in usf4/, usf4.toml, logs/ and cache/vfs_index_game_root.bin.

For a new install, use the installer's Create usf4-nx.zip as before. No game files are included in this release.

usf4-nx 0.7.6

Choose a tag to compare

@Thorhax Thorhax released this 22 Oct 03:50

usf4-nx 0.7.6

Controllers

  • A controller becomes a player the first time you press a button on it, so players are numbered in the order controllers are used. Attached Joy-Cons you aren't using no longer take player 1, and Start works from any controller on the title screen.
  • A drifting stick no longer stops a controller from responding.
  • As on the Xbox 360, only the player who pressed Start controls the menus; player 2 joins at Versus character select.

Resolution

  • The game now renders at 960x540 by default, handheld and docked, and scales up to the screen. Status Monitor shows the screen output (1280x720 / 1920x1080), not the render size.
  • To change it, set sa2_render_height_handheld / sa2_render_height_docked in usf4.toml (720 or 1080; higher is sharper but may drop below 60 fps). An existing usf4.toml without these keys gets 540.

Installer

  • Fixed "Junk found after end of compressed data" in Chrome.

Install / update

Use the installer at https://thorhax.github.io/usf4-nx-installer/ with your own Xbox 360 disc image, or replace switch/usf4-nx/usf4.nro with the file below if you already have 0.7.5 installed. No game files are included.

v0.7.5

Choose a tag to compare

@Thorhax Thorhax released this 20 Oct 12:23

Ultra Street Fighter IV for Nintendo Switch, 0.7.5: a startup intro that plays while the game loads.

How to install

  1. Open https://thorhax.github.io/usf4-nx-installer/.
  2. Choose your Ultra Street Fighter IV Xbox 360 disc image (a plain .iso, about 8.7 GB) or a folder you extracted it into, and press Create usf4-nx.zip. Everything runs in your browser and your game files never leave your computer.
  3. Extract the zip (about 8 GB) into sdmc:/switch/ and start usf4.nro with a title takeover (hold R while launching an installed game) or a forwarder with full memory.
  4. Copy usf4.toml to your switch/usf4-nx directory.
  5. Make sure to overclock CPU 1785 MHz / GPU 768 MHz, memory to whatever your highest possible is.

Updating from 0.7.4: only usf4.nro changed. Replace sdmc:/switch/usf4-nx/usf4.nro with the one attached here; the shader package and game files stay as they are.

The usf4.nro attached here is the Switch build the installer downloads. On its own it does nothing: it needs the shader package and the game files the installer makes from your disc. This release contains no game data.

Changes since 0.7.4

  • The black screen after launch (about 1.5 s of GPU clock checks plus 2–4 s of the game's first loading) now happens while the intro plays.

Switch results (540p, CPU 1785 MHz / GPU 768 MHz, memory 2700 MHz)

  • Fights run at 60 fps; CPU total about 205% out of 400%, GPU 70–79% in Status Monitor.
  • Intro: 169 of 169 frames shown on time, with the game loading at the same time.
  • The first time an effect or place appears, the graphics pipelines are compiled and it can stutter for a moment; they are kept on the SD card afterwards.

Known issues

  • Hitches of up to about 550 ms on boot and on versus/stage loading screens (the game's own loads), and up to about 175 ms at round and match changes.
  • Occasional single frames of 40–50 ms in fights, from the game's own work at moments such as round starts and super/ultra pop-ups.

Licenses

usf4.nro is GPL-3.0 and contains the libraries listed in LICENSES.txt of the package (source: this repository); new in this release is pl_mpeg (MIT), which decodes the intro. Ultra Street Fighter IV is a trademark of Capcom; this project is not affiliated with or endorsed by Capcom.

❤️ Enjoying the port?
If this project helped you out, consider buying me a coffee on Ko-fi or supporting on Patreon to support future updates!

Support on Ko-fi Support on Patreon

v0.7.1

Choose a tag to compare

@Thorhax Thorhax released this 17 Oct 10:56

Ultra Street Fighter IV for PC and Nintendo Switch: much lower CPU load in fights on the Switch.

Switch results (540p, CPU 1785 MHz / GPU 768 MHz, memory 2700 MHz)

  • Fights run 59.9–60.3 fps.
  • CPU total in fights is 197–216% out of 400% (0.6.9: 227–244%).
  • The main game thread went from about 88% of a core to 54%.
  • Status Monitor in fights: cores 62 / 79–89 / 56–70%, GPU 69–71%.
  • Threads give up their core about 0.15–0.2 million times a second instead of 0.7–1 million.

Changes since 0.6.9

  • The game's frame limiter sleeps instead of spinning (usf4_cpu_frame_limiter_sleep, on by default).
    • When a frame finished early, the game waited for the next one by looping "Sleep(0), read the clock" until 16.67 ms had passed.
    • It now sleeps for the time still missing, minus 1 ms (usf4_frame_limiter_margin_us), then finishes the wait exactly as the game did. Frames start at the same moment as before.
  • The main thread sleeps while its jobs run (usf4_cpu_job_wait_block, on by default).
    • After handing work to its four job workers, the main thread waited with a Sleep(0) loop, up to 0.9 million times a second.
    • It now spins briefly (usf4_job_wait_spin_us, 20 µs), then sleeps until a worker finishes a job, with a 2 ms safety timeout.
  • Both changes switch themselves off if the game code is not the code they were written for. Set an option to false in usf4.toml to get the original behaviour.
  • Profiling builds now count yields and short sleeps per caller in the 10-second report.

Known issues

  • Hitches of up to about 550 ms on boot and on versus/stage loading screens (the game's own loads), and up to about 170 ms at some round changes.
  • Occasional single frames of 40–50 ms when the game loads new shaders, and a one-time hitch the first time an effect needs new pipelines.

No binaries

This release has no files attached. The NRO contains code recompiled from the game, so build it from your own copy of the game (docs/building.md).

v0.6.9

Choose a tag to compare

@Thorhax Thorhax released this 17 Oct 05:32

Ultra Street Fighter IV for PC and Nintendo Switch: much lower GPU load in fights on the Switch.

Switch results (540p, CPU 1785 MHz / GPU 768 MHz, memory 2700 MHz)

  • Fights run 59.5–59.7 fps on scenes with about 400 draws per frame.
  • Status Monitor GPU load in fights is 70–73% (0.6.8: 81–89%, 0.6.7: 94–95%).
  • On the GPU, the EDRAM stencil copies fell from 3.4 ms per frame to 0.3 ms (measured with a profiling build).
  • Cores 64 / 85 / 83%.

Changes since 0.6.8

  • 0.6.9: edge tiles of stencil clears no longer copy their old stencil (usf4_edram4_stencil_edges_skip, on by default).
    • Every frame the game clears a few small render targets (512×512, 1024×1024, 320×180) with one rectangle that sets stencil to 0.
    • Their width is padded to whole 80×16 EDRAM tiles (for example, 1040 for a 1024-wide target), so the last tile of each row is only partly covered.
    • Those tiles used to get their old stencil first, through 8 extra passes, only for padding pixels the target never draws.
    • They now count as cleared too. The padding keeps stale stencil bits, so it is not bit-exact there. No visual difference was found on the PC or the console. Set the option to false for the exact behaviour.

Known issues

  • Hitches of up to about 550 ms on boot and on versus/stage loading screens (the game's own loads), and up to about 170 ms at some round changes.
  • A one-time hitch the first time an effect needs new pipelines.

No binaries

This release has no files attached. The NRO contains code recompiled from the game, so build it from your own copy of the game (docs/building.md).

v0.6.8

Choose a tag to compare

@Thorhax Thorhax released this 17 Oct 03:39

Ultra Street Fighter IV for PC and Nintendo Switch: the Switch build no longer runs the profiling measurements, which lowers CPU and GPU load.

Switch results (540p, CPU 1785 MHz / GPU 768 MHz, memory 2700 MHz)

  • Fights run 59.5–59.9 fps.
  • Total CPU use in fights fell from 240–255% to 217–242% (out of 400%).
  • Status Monitor in fights: GPU 81–89% (was 94–95% in 0.6.7, on different stages), cores 71 / 92 / 81% on Dudley's stage.

Changes since 0.6.7

  • 0.6.8: profiling measurements off in the Switch build. Two options had been on since the 0.2.0 profiling build:

    • sa2_gpu_marks_categories: a GPU timestamp at every change of pass type. With it off, the GPU writes one per batch of work.
    • switch_profile_stacks: interrupted every thread every 1 ms to record stacks.

    The 10-second report (logs/rex/rex_profile.log, CPU use per thread, graphics-thread timing) is still written. Set both options to true for a profiling build.

Known issues

  • Hitches of up to about 700 ms on boot and on versus/stage loading screens (the game's own loads).
  • A one-time hitch the first time an effect needs new pipelines.
  • With sa2_gpu_marks_categories off, "GPU per Swap" in the log only measures the time between frames, not GPU load.

No binaries

This release has no files attached. The NRO contains code recompiled from the game, so build it from your own copy of the game (docs/building.md).

v0.6.7

Choose a tag to compare

@Thorhax Thorhax released this 17 Oct 02:56

Ultra Street Fighter IV for PC and Nintendo Switch: less CPU work per frame on both the game thread and the graphics thread.

Switch results (540p, CPU 1785 MHz / GPU 768 MHz, memory 2700 MHz)

  • Fights run 59.4–59.9 fps, including the busiest stages (about 500 draws per frame).
  • On those scenes the graphics-command thread's work per frame fell from 12.2 ms (0.6.5) to 10.9–11.2 ms, about 21.8 µs per draw (was about 24 µs).
  • The game's copy routines went from about 13% of the main game thread to 3.5%.
  • Status Monitor in fights: cores 76 / 77 / 94%, GPU 95%.

Changes since 0.6.5

  • 0.6.7: fewer memory allocations on the graphics-command thread.
    • The EDRAM sync, tile-copy and depth-clear paths reuse kept work lists instead of allocating new ones on every call.
    • The draw-to-shader pairing table has a fixed size and starts fresh each frame. It used to grow without limit.
    • On the Switch, the per-draw memory-readability check reads the guest page table instead of asking the system.
  • 0.6.6: the game's memcpy routines run as the host's memcpy (usf4_cpu_native_memcpy, on by default). Two Xbox 360 C-library copy routines (sub_8220FFE8, sub_82514750) use the host's memcpy when the source and destination don't overlap. The guest code is checked at its first call, and overlapping copies run the original code. PC audit (usf4_cpu_native_memcpy_audit): about 14.5 million copies compared, no differences.

Known issues

  • Hitches of up to about 600 ms on boot and on versus/stage loading screens (the game's own loads).
  • A one-time hitch the first time an effect needs new pipelines.

No binaries

This release has no files attached. The NRO contains code recompiled from the game, so build it from your own copy of the game (docs/building.md).

v0.6.5

Choose a tag to compare

@Thorhax Thorhax released this 16 Oct 13:40

Ultra Street Fighter IV for PC and Nintendo Switch: smoother fights, no save hitches.

Switch results (540p, CPU 1785 MHz / GPU 768 MHz, memory 2700 MHz)

  • Fights run 59.3–59.8 fps, including the busiest stages (about 500 draws per frame).
  • On those scenes the graphics-command thread's work per frame fell from about 14 ms (0.6.3) to 12.2 ms.
  • Save-related hitches of 183–417 ms are gone.

Changes since 0.6.0

  • 0.6.5: video recording off (switch_video_recording, false by default). Recording a clip crashed the game; screenshots still work.
  • 0.6.4: vertex data rechecked less often (usf4_vertex_cache_interval_max, 8). A vertex range that keeps the same bytes and is drawn every frame is checked every 2, 4, then up to 8 frames. Anything not drawn in the previous frame is checked first; a range seen changing is checked every frame from then on. PC audit (usf4_vertex_cache_audit): about 80,000 skipped checks, none had changed.
  • 0.6.4: new pipelines saved 15 s after they appear (was 60 s), so a first-time stutter, such as a new special move's effects, isn't repeated next session.
  • 0.6.2–0.6.3: vertex cache (usf4_vertex_cache, 24 MB). Vertex ranges are kept on the GPU across frames instead of being byte-swapped and copied every frame (about 6 MB per frame saved). On the Switch the checks use the CPU's CRC32 instructions.
  • 0.6.1: faster save folder (vfs_light_scan_writable). Mounting the save folder (314 files) went from 216–570 ms to 5–6 ms on the SD card.

Known issues

  • Hitches of 66–480 ms on boot and on versus/stage loading screens (the game's own loads).
  • A one-time hitch the first time an effect needs new pipelines.

No binaries

This release has no files attached. The NRO contains code recompiled from the game, so build it from your own copy of the game (docs/building.md).

usf4-nx 0.6.0

Choose a tag to compare

@Thorhax Thorhax released this 15 Oct 12:26

Ultra Street Fighter IV for PC and Nintendo Switch: lower GPU clocks.

Switch results (540p, handheld)

  • Fights hold 60 fps at CPU 1785 MHz / GPU 768 MHz, Nintendo's own top docked-mode clocks (no CPU or GPU overclock). Memory was still at 2700 MHz in these tests.
  • At GPU 998.4 MHz the GPU is idle about 4–5 ms per frame. A stage with many background characters runs 55–58 fps because of the CPU side, not the GPU.

Changes since 0.5.x

  • 0.6.0: column depth imports (usf4_edram4_import_columns, on by default). The game clears its shadow maps in vertical strips that leave a sliver per tile row. Each column of slivers is now reloaded in one GPU job instead of one per row, and its late stencil fetches likewise. Depth reloading went from about 5.2 to 4.4 ms per frame at 998.4 MHz.
  • 0.5.7: job-list yield (usf4_cpu_job_pop_yield). Job workers waiting on an empty XDK job list yield the core, which fixes the 0.5.6 fight slowdown (11 fps → 60).
  • Homebrew menu author: Thorhax.
  • Optional personal icon: app/icon_local.jpg (git-ignored).
  • Original repository icon and README.

Known issues

  • Hitches of 150–300 ms at round and scene transitions.

No binaries

This release has no files attached. The NRO contains code recompiled from the game, so build it from your own copy of the game (docs/building.md).