Skip to content

PC optimization

sp2xdev edited this page Jun 9, 2024 · 96 revisions

To reduce desyncs, frame drops, and stuttering:

General advice

  • Having a powerful PC with expensive CPU and GPU will not automatically let you run these games better. In fact, it can actually run worse - read below on how to set things up to avoid issues.
  • On the contrary; it is no longer recommended that you buy used office computers (Optiplex) for this purpose. Newer games run on low-spec "gaming" PCs, so you'll want a standard form factor PC with upgradable parts.
  • These are not games you downloaded from Steam that runs better with tweaks to graphics settings, these are arcade games designed to run on specific PC configuration with extremely specific settings. Throw out conventional wisdom on "how to make PC games run better"; instead, the goal is to mimic an arcade PCB as closely as possible.

Caution

If your PC is severely underpowered, even if you follow all the steps here, you're not going to have a great experience.

Similarly, if your sound card / DAC can't properly support the required frequency, bitrate, and output format (wasapi exclusive or ASIO), no matter what you do, you're going to have desync issues.

Monitor checks and framerate

  • Press F12 to see the FPS counter, confirm that it's what you expect. Also check your monitor (if not, check log.txt) to see that the game launched at the correct refresh rate. You want those numbers to match (60FPS and 60Hz, 120FPS and 120Hz).

    • Avoid using patches that run at refresh rates not originally intended by the game engine, as it may result in graphical glitches or overlapping sound effects.
    • In menus, your framerate will swing wildly, and this is perfectly normal, as the games aren't perfectly optimized for menus. Check for FPS only during gameplay.
  • Do not, under any circumstances, use "skip monitor check" patches. You might be asking, "why does the hex edit exist if you're not supposed to use it?" - the answer it that those were added for tools and EA server developers to boot the games quicker. If you're actually playing the game, you should keep monitor check.

  • It's OK if monitor checks aren't exactly 60.000Hz or 120.000Hz - because they're not like that at the arcade either. For example, IIDX LM cabs stabilize around 119.98xx.

    • Your monitor may boot into 59.94Hz or 119.2Hz (for example). This is OK for most games, as monitor check will eventually stabilize to match your refresh rate.
  • If you have multiple monitors, be careful when using Only use one monitor (-graphics-force-single-adapter) option to display the game full screen on the primary monitor and showing the desktop on the other monitor. For IIDX TDJ, this may result in unstable monitor check, and rare microstutters / desyncs in the game. This may be affecting SDVX VM as well, but difficult to tell. This is most likely due to how DirectX renders full screen games with V-Sync enabled, in addition to drawing the desktop on a different monitor.

CPU

  • Set Windows power profile to High Performance to keep the processor frequencies high.
    • Arcade cabinets run with similar configurations where CPUs are held at maximum frequency; some of these games depend on this aspect to keep a steady framerate. IIDX, SDVX, and Nostalgia are known to be heavily affected by this.
    • Make sure you turn it back to normal profile when done playing.
    • Instead of setting an entire profile, you could also edit an existing profile and change Minimum processor state and Maximum processor state to 100%. Be aware that depending on your PC, your CPUs may hit a thermal or current limit by doing this.
  • If you have a hybrid processor (heterogeneous configuration with E-Cores and P-Cores) - use Process Efficiency Class (-processefficiency) to run the games on the P-cores.
    • You can also use a custom affinity mask with Process Affinity (-processaffinity). You can use this tool to calculate the mask if you are unsure what to do.
  • Process Priority (-processpriority) can help but it's recommended that you just leave it to the default, which sets it to high priority.

Turning off CPU idle states (micro-optimizations)

These won't help with stuttering, but may help with keeping a steady framerate, keeping the frame time (milliseconds between frames) in 0-1ms error range. This may help if you have inconsistent timing in IIDX, for example.

  • You can go into the BIOS and disable any processor power management features. This would range from: Intel SpeedStep, Turbo Boost, various C-state and P-state scaling, OS-managed processor power management, any processor-idle power save features, etc.
  • Disabling HyperThreading/SMT. Not enough data has been gathered but some claim that this may help on some older processors. The typical recommendation is to disable via the BIOS.

GPU

  • For NVIDIA GPU, use Add NVIDIA application profile (-nvprofile) option.
    • This will attempt to automatically disable G-SYNC and set power mode to maximum performance.
    • You can also manually turn off G-Sync and set power mode to maximum performance in NVIDIA settings.
    • This is especially helpful for high-end GPUs, because they will downclock aggressively for not-so-demanding games (like the games supported by spice) to reduce heat / power.
  • For other GPUs, make sure VRR (FreeSync, Adaptive Sync) is disabled, and see if it's possible to set power policy to maximum performance (and not power saving or recommended).
  • Always keep V-Sync options to the default (usually Application controlled). This will allow games to enable V-Sync when necessary, which is most games. Never forcibly turn on or turn off V-Sync via GPU settings, no matter what guide you have read has claimed.
    • For example, if you force V-Sync on, for TDJ and VM, both screens will launch at 60Hz, which is not what you want.
  • Do not put an artificial FPS cap. Use V-Sync instead.
  • DirectX 9on12 options may result in better or worse performance. This is entirely up to your GPU and the game you are trying to run. Generally, try leaving it off first (use DX9), and only if you have issues, switch to DX9on12.

Audio

  • Prefer to use exclusive WASAPI or ASIO, and avoid shared mode WASAPI whenever possible. See this page for more details.
  • For games with shared audio (DirectSound or WASAPI Shared Mode) - try Low Latency Shared Audio option to reduce latency. See here for more details.
  • For IIDX 24 and below, try hypersonik.
  • For pop'n music, popnhax, which has various options for adjusting audio/visual offset.
  • Don't run audio over HDMI or DisplayPort as they may add significant latency. Some games are incompatible with this unless patched.
  • Using optical out (SPDIF) port from audio cards usually results in higher latency than analog output.

Memory and disk

  • Make sure you have enough RAM. 4gb isn't going to cut it these days, even on a minimal OS setup.
  • Ensure XMP is enabled, if your hardware is capable. This helps with frame drops in animation-heavy scenes (Live2D in SDVX for example).
  • Consider disabling paging in Windows. Arcade machines run with paging disabled, and the games will assume this is the case (instead of pinning the memory to RAM, they assume that memory is never paged out). While this is not recommended for general use PCs, it is recommended for playing these games to reduce stutters. Just make sure you have enough RAM.
  • Most modern versions will require that you run the games off an SSD.
  • If log.txt tends to be spammed with messages, it can affect performance; set Log Level (-loglevel) to Fatal if this becomes an issue.
    • Remember to set it back to the default if you want to share log.txt with others for troubleshooting.

Windows

  • Add an exception to Windows Defender to avoid scanning the game files.
  • Disable the hypervisor and VBS (Virtualization-Based Security).
  • If you're looking for a good clean OS image - the same used on arcade cabinets - Windows 10 IoT Enterprise LTSC is recommended. Just be mindful, it's not Windows 10 IoT, it's not Windows 10 Enterprise, it's Windows 10 IoT Enterprise LTSC.
    • Contrary to popular belief, IoT Enterprise is a general-purpose OS with a full desktop environment, and is not too different from full version of Windows. (the non-Enterprise IoT SKU is different, however, as it lacks the desktop UI by default).

On gaming laptops...

Caution

For best experience, it is generally discouraged that you run these games on laptops due to endless oddities people have encountered in the past.

The issues range from: display panel not supporting the required resolution + refresh rate, firmware triggering a thermal throttle resulting in low performance, audio incompatibility issues, switchable graphics causing games to display a white screen....

This does not mean games will run poorly; rather, if the games run poorly, you are on your own to figure out workarounds.

If you have no choice but to run on a laptop:

  • Try to run on an external monitor.
    • Display built into laptops tend to be more restrictive about what resolution and refresh rate combinations are supported, so connecting to an external monitor alleviates that.
  • Make sure it's plugged into a power source.
    • For thermal and battery issues, many laptop firmware implementations will force the entire system to be throttled on battery power.
  • If you have switchable graphics (iGPU + dGPU), make sure it's set to use the dGPU for spice.
    • Do note that in some rare cases, even if you instruct the system to force usage of dGPU for spice, the laptop firmware ignores your preference and use the iGPU anyway; this usually happens when you hit the thermal limit, or when on battery power.

Game-specific

IIDX

  • If you have an underpowered PC & experience stutters while playing, you could try disabling the video. You can accomplish this by going to the blue menu in song select and changing Camera Display Position to show the camera instead of the BGAs. If you don't have a camera, it'll just show a black box, saving you from a lot of CPU cycles.
  • LDJ patched to run at 120Hz tends to use less resources than TDJ.

Gitadora

  • Gitadora tends to stutter and not scroll the notes smoothly when Full Screen Optimizations is enabled. Right click on spice64.exe, Properties, Compatibility tab, Change settings for all users, and check Disable fullscreen optimizations.

SDVX

  • Frame drops from Live2D are often solved by turning on XMP in BIOS, if it isn't on already.
  • There are some EA server-side flags that can be toggled that may affect client-side graphics performance (SUBMONITOR_VSYNC_ENABLE and USE_CUDA_VIDEO_PRESENTER). See SDVX known issues page.

Turning off optional Spice features

If you're on a low-end PC, you might want to try the following options:

  • Disable Spice Overlay (-overlaydisable)
  • Disable All Spice Audio Hooks (-audiohookdisable)
  • Disable D3D9 Device Hook (-nod3d9devhook) (will also disable a bunch of useful features as a side-effect)

Further reading / Reference

This page is loosely based on https://iidx.org/infinitas_pc.