## Link to GitHub Issue or related Pull Request, if one exists
n/a
## Description of change
- Replace unnecessary precision timers with standard sleeps to reduce
wakeups and background CPU usage.
- Reuse buffers in raw input, touchscreen, and HID output paths to
eliminate steady-state allocations.
- Pre-index HID button groups and correctly process batched HID reports.
No functional changes.
## Testing
## Link to GitHub Issue or related Pull Request, if one exists
Fixes#840
## Description of change
Currently, for subscreen games, mouse events are still delivered even
when the subscreen overlay window is not visible.
Change this so that the subscreen overlay must be active and under the
mouse cursor for the mouse-to-touch transformation to occur. Applies to
both native and wintouchemu.
## Testing
Needs to test everything again..
iidx:
- [ ] full screen with overlay
- [ ] single window with overlay
- [ ] two window
Test: mouse, poke, api, real touch screen
sdvx:
- [ ] full screen with overlay
- [ ] windowed
popn
- [x] full screen with overlay
- [x] window with overlay
- [x] dedicated window
gitadora
- [x] single window with overlay
- [x] dedicated sub window
nostalgia
- [x] fullscreen
- [x] windowed
test: poke
wintouchemu
- [ ] Do all of the above again with wintouchemu
## Link to GitHub Issue or related Pull Request, if one exists
#201
## Description of change
- Adds MJPEG camera support using Media Foundation decoding.
- Moves camera capture to asynchronous Source Reader callbacks.
- Supports native NV12 and YUY2 capture, preferring target-sized native
formats over MJPEG when possible.
- Improves capture and rendering performance through callback-paced
reads, bulk frame uploads, optimized row-based flips, and lazy
allocation of flip textures.
- Makes runtime media-type changes interrupt pending reads and safely
flush and reconfigure the Source Reader.
- Improves automatic mode selection based on aspect ratio, proximity to
1280x720, frame rate, and capture format.
- Hardens camera shutdown, flush handling, media-type changes, and
repeated capture failures.
## Testing
Tested with two cameras in tdj
## Link to GitHub Issue or related Pull Request, if one exists
Regressed by #657
## Description of change
Workaround for SDVX4 was applied too broadly and caused sdvx 1/2/3 to
not boot, depending on contents of avs-config.xml.
`property_search_safe` throws a fatal error if the node is not present.
What we wanted to do was to check for presence.
## Testing
sanity checked sdvx 1/2/3/4
## Link to GitHub Issue or related Pull Request, if one exists
n/a
## Description of change
ImGui filebrowser extension crashes due to MinGW quirk about UNC path
handling.
## Testing
## Link to GitHub Issue or related Pull Request, if one exists
Fixes#833
## Description of change
Last couple PRs - such as #820#827#828 - made the native touch hook &
touch injection using `InjectTouchInput` the default path, since it
performs much more reliably with both real touch screens and mouse (or
any other synthetic source).
However, user has reported that WINE lacks `InjectTouchInput` which
means this won't work.
As a fix, revive the old wintouchemu code. Native touch is still the
default, but under following circumstances:
1. if `-touchemuforce` is set, or
2. if any of the required Windows touch APIs are unavailable
then we fail over from native touch to wintouchemu code.
For Linux, condition #2 would be hit during init, and gracefully switch
over.
Caveat: the poke code for IIDX and Nost will continue to require native
touch, I do not want to maintain two paths for this. This means that
iidx poke will stop working on Linux, unfortunately.
## Testing
Tested on Windows with `-touchemuforce` set. This is mostly reverting
Linux code path back to where we were last release, so this should just
work with wine.
## Link to GitHub Issue or related Pull Request, if one exists
n/a
## Description of change
Touch piano mode. Allows piano keys to be played with the touch screen.
Since the touch screen is still needed for menu navigation (including
during songs) a toggle switch is added so that the user can flip between
navigation mode and piano mode.
The touch targets are pixel-perfect. Don't let the game's piano
animations fool you.
## Testing
## Link to GitHub Issue or related Pull Request, if one exists
n/a
## Description of change
Prevent the game from launching a blank window when launching fullscreen
with sub disabled.
## Testing
## Link to GitHub Issue or related Pull Request, if one exists
#814
## Description of change
Make gitadora arena model use native touch instead of wintouchemu. Only
single window mode with overlay is affected.
This removes the last consumer of `INJECT_MOUSE_AS_WM_TOUCH` so all of
that code can be deleted.
## Testing
Tested touch screen and mouse interaction with single window mode.
## Link to GitHub Issue or related Pull Request, if one exists
#814
## Description of change
Switch over Nostalgia from wintouchemu to native touch hook.
Nostalgia has some strict timing requirements (touches must be updated
on every acio poll) so this takes a slightly different path to maintain
mouse holds.
Only a handful of consumers of wintouchemu remain:
1. beatstream - but it's off by default, only enabled as errata for
buggy touchscreens, or if the user forces it on (for Show Cursor)
2. gitadora single-window overlay - this is just for mouse so not a big
deal.
3. MFC HG mode - not a priority to fix.
## Testing
Tested full screen and windowed mode with touch / mouse / poke.
## Link to GitHub Issue or related Pull Request, if one exists
Another bug reported by a sea creature
## Description of change
Fix keyboard navigation in Controllers sub tabs.
## Testing
## Link to GitHub Issue or related Pull Request, if one exists
Reported by a certain sea reptile
## Description of change
Fix the + / - buttons for number patches not working. Regressed by one
of the ImGui version updates.
## Testing
seems fine now
## Link to GitHub Issue or related Pull Request, if one exists
Fixes#814
## Description of change
Touches via the API wasn't being delivered to native touch hook;
implement this, which closes the last gap we have vs. wintouchemu.
While we're here, implement popn subscreen support for companion as
well.
## Testing
Tested for iidx/sdvx/popn
## Link to GitHub Issue or related Pull Request, if one exists
Fixes#822
## Description of change
Add hooks for `libxact.dll` which only Nostalgia uses for audio. Detect
cases where the game would fail to launch (wrong number of channels) and
log a warning / deferred log.
## Testing
tested 2024102200
## Link to GitHub Issue or related Pull Request, if one exists
Fixes#814
## Description of change
Remove iidx/sdvx/popon `native touch` options.
Remove dead code in wintouchemu that deals with these games.
Native touch is now at feature-parity with wintouchemu. Native touch
options work better with touch screens, while rawinput-based wintouchemu
has compat issues on some touchscreens. For these subscreen games
deprecate the usage of wintouchemu and make them use native touch stack
by default.
### For future consideration
Gitadora - not sure what to do with this one. We only use wintouchemu
for the single window case. For all other configurations, the game
accepts mouse and touch input without any hooks, so perhaps nothing
needs to be done here.
Nostalgia - consider moving away from wintouchemu and adopt native touch
hook here as well.
## Testing
WIP
## Link to GitHub Issue or related Pull Request, if one exists
User reported
## Description of change
Sometimes the game moved the main window after `CreateWindowExA`
returned but before D3D initialization called
`graphics_capture_initial_window`. During this gap,
`GRAPHICS_HOOKED_WINDOW` was not set, so the placement hooks could not
identify the main window and preserve its monitor override. GITADORA
main, LEFT, and RIGHT windows are now registered immediately after
creation so later placement calls cannot undo their overrides.
This also adds `-gdwsmallsize` and `-gdwsmallpos` for explicitly setting
the SMALL window size and position. Explicit values override the
corresponding monitor-derived geometry, allowing the SMALL window's
10:16 aspect ratio to be preserved instead of stretching it to fill a
monitor.
## Testing
## Link to GitHub Issue or related Pull Request, if one exists
Fixes#635
## Description of change
Adds optional **button modifiers**, allowing a binding to require one or
more "modifier" buttons to be held before it activates.
- New "Modifiers" controller page in the overlay config to bind the
Modifier 1–4 source buttons.
- Each binding gains a 4-bit modifier_mask (Modifier 1-4). It is
persisted as an optional modifiers XML attribute on button nodes and
controller-preset entries. The attribute is optional and defaults to 0,
so existing config files and presets load unchanged and the feature is
off unless the user opts in.
- The button Edit properties popup gains a "Modifiers" dropdown to pick
which modifiers a binding requires. Doesn't apply to MIDI though.
- Input evaluation skips a binding whose required modifiers are not
held, falling through to its alternatives; velocity reporting uses the
same gated path.
- Controller-preset templates gain a "Modifiers" group for importing and
exporting.
## Testing
## Link to GitHub Issue or related Pull Request, if one exists
Part 1 of many fixes for #814.
## Description of change
For the native touch hook - add code to inject synthetic touches using
Windows API (`InjectTouchInput`).
Note that this is Windows 8+ only, but we can make an assumption that we
are running on Win10+ for these games (TDJ/UFC/High Cheers) since the
cabs assume Win10.
Detect mouse events and allow IIDX poke to call into this to inject
synthetic touches.
Also, update the nativetouchhook to independently calculate window size
and rotation, instead of relying on rawinput layer.
## Testing
Tested to work with native touch option on IIDX, SDVX, POPN, all full
screen / windowed / sub on/off combinations.
Edge cases:
* sdvx main monitor rotated 270 deg
* touch invert option
* windowed mode resize / moved
All seem to work.
## Link to GitHub Issue or related Pull Request, if one exists
Regressed by #790
## Description of change
Avoid enumerating every display mode with `EnumDisplaySettings` during
the first raw touchscreen report, as it can take a couple hundred
milliseconds.
The latency-sensitive path now refreshes only the current display size
using `GetWindowRect(GetDesktopWindow())` and orientation using
`EnumDisplaySettingsEx(..., ENUM_CURRENT_SETTINGS, ..., EDS_RAWMODE)`.
Full `EnumDisplaySettings` enumeration runs only when native resolution
is needed for aspect compensation.
Jubeat and Reflec Beat now enable aspect compensation before
initializing touch input.
## Testing
Sanity checked rb/jb on laptops with non-16:9 ratio
## Link to GitHub Issue or related Pull Request, if one exists
n/a
## Description of change
In summary: for SDVX VM mode, this PR eliminates the need for `Note FPS
Target 120Hz` / `Game FPS Target 120Hz` patches typically used for AMD
GPU via synthetic responses provided via a fake NVAPI layer.
Before this change, playing on AMD GPU required patches to force the
game to render at 60Hz (See #107 for relevant discussion). Basically, if
NVAPI query fails, the game shows
`I:NvDisplayConfig: GetMainDisplayRefreshRate = 60.000hz (DUMMY)`
the game renders at 120Hz but the notes render at 60Hz, which would look
stuttery.
After this change, even without a real `nvapi64.dll`, spice will provide
a stub implementation, just enough to convince the game that the main
display is 120Hz, which causes notes to render at 120Hz as well.
This can be overridden by `-graphics-force-refresh` option.
Important note: if user has the `Note FPS Target 60Hz` patch but running
the game at 120Hz, before this change the notes would render at 60Hz,
but after this they will be at 120Hz. I don't know why anyone would
intentionally lower the notes framerate, so this is not going to be
fixed. If the user wants to run the game at 60Hz they can do so via
`-graphics-force-refresh`.
Another change - `-nonvapi` will always force down this synthetic nvapi
path, even if the system has the real `nvapi64.dll`. Even on NVDIA GPU
this option can be used to force this.
## Testing
## Link to GitHub Issue or related Pull Request, if one exists
Fixes#245
## Description of change
Introduce patch groups. JSON schema now allows for a `"type": "group"`:
```json
{
"type": "group",
"gameCode": "LDJ",
"id": "timer-freeze",
"name": "Timer Freeze Patches",
"description": "Freezes various timers in the game."
},
{
"name": "Standard/Menu Timer Freeze",
"description": "Freezes all non-premium area timers.",
"caution": "",
"gameCode": "LDJ",
"type": "memory",
"group": "timer-freeze",
"patches": [
{
"offset": 9962743,
"dllName": "bm2dx.dll",
"dataDisabled": "0F84",
"dataEnabled": "90E9"
}
]
},
{
"name": "Premium Free Timer Freeze",
"description": "Freezes all premium area timers.",
"caution": "",
"gameCode": "LDJ",
"type": "memory",
"group": "timer-freeze",
"patches": [
{
"offset": 9111965,
"dllName": "bm2dx.dll",
"dataDisabled": "7E",
"dataEnabled": "EB"
}
]
},
```
In the UI, these will show up as tree nodes. The parent is not actually
treated as a patch; e.g., its state is not saved to the patch manager
config file; only the child patches states are managed, the parent's
state only bubble up only in the UI.
In downlevel versions of spice, group parents will show up as a patch of
invalid type. Child patches will still show up as individual patches.
## Testing
*how was the code tested?*
## Link to GitHub Issue or related Pull Request, if one exists
#345
## Description of change
If IIDX/SDVX/POPN "native touch" option is enabled, show an error
message if user toggles subscreen window.
Those options are meant for users with touch screens, and disables mouse
interactions. Users who like to randomly turn on options often latch on
to this option and get confused when clicks don't register.
## Testing
## Link to GitHub Issue or related Pull Request, if one exists
n/a
## Description of change
Fix a long-standing issue of hotplug not working for keyboards and mice.
The code only registered for HID notifications; we also need to do it
for the keyboard GUID and mouse GUID.
## Testing
Confirmed that keyboards and mice can be hot unplugged and plugged.
## Link to GitHub Issue or related Pull Request, if one exists
Fixes#782
## Description of change
This addresses an issue only seen on Linux + WINE.
Defer retaining WASAPI clients until `Initialize` succeeds.
Before this PR, temporary clients created during DirectShow device
capability probing were retained as active audio clients, causing
Wine/Linux crashes in DDR and popn.
Also covers IAudioClient3, dummy, ASIO, WaveOut, and null-device
initialization paths, for consistency.
## Testing
WIP
## Link to GitHub Issue or related Pull Request, if one exists
Regressed by #793
## Description of change
Due to lock inversion, when binding an analog axis as a button, spice
deadlocks. Fix that.
Also create a separate `unordered_map` that keeps track of device
handles so that `WM_INPUT` handle can look up devices without having to
acquire the larger `devices_mutex` which could be held by (potentially)
lengthy operations like hotplug.
Fix more synchronization issues around hotplug. Latent bug exposed by
MIDI 2.0 issues.
## Testing
## Link to GitHub Issue or related Pull Request, if one exists
n/a
## Description of change
Refactor patch manager.
This one file had the UI logic, config save/load, parsing patches JSON,
applying memory patches, everything all in one cpp file. Refactor and
separate out the layers.
## Testing
Sanity checked patch workflows.
## Link to GitHub Issue or related Pull Request, if one exists
n/a
## Description of change
GDI bit blit overlay used exclusively for jubeat & shogikai was running
at 30fps, which caused the Jubeat touch debug UI to not render fast
enough. Run it at 60 fps, and also perform double buffering to avoid
flickering.
This could have been scoped to JB but I made the change for both. XP
builds will keep running at 30fps since those people run on cabs with
ancient hardware.
## Testing
Tested jubeat and shogikai, overlay renders without flickering at 60 fps
## Link to GitHub Issue or related Pull Request, if one exists
n/a
## Description of change
Fixes held touch contacts briefly dropping under rapid multi-touch (e.g.
holding several jubeat buttons and tapping elsewhere many times would
make the holds briefly release and the hold again).
A HID digitizer reports a fixed number of contact slots per report and
cycles the rest through later reports, so the touch layer keeps an
unreported contact alive for a few reports (a per-contact TTL). The TTL
was only set for contacts in the current report and had no slack, so
when the contact count rose (from the rapid taps) the reporting cycle
got longer and stationary holds were expired before the device cycled
back to them.
Now, the cycle length is recomputed every report and every tracked
contact's TTL is extended to it (never shrunk), so a rising contact
count can't starve a currently held contact. The 50 ms last-report
timeout still removes genuinely lifted contacts.
## Testing
Tested on jb, rb.
## Link to GitHub Issue or related Pull Request, if one exists
n/a
## Description of change
Fix a long standing issue with card reader behavior in jubeat.
sciunit emulation has a bug - when on the title screen / demo loop,
inserting a card did not generate an interrupt. Users always had to
press the game start button and card in. Fix this by reversing what the
actual sciunit does and mirroring the state machine behavior.
## Testing
Tested L44 and K44.
## Link to GitHub Issue or related Pull Request, if one exists
Fixes#800
## Description of change
Restores keyboard navigation by default in spicecfg, and add an option
to optionally enable it in the overlay.
## Testing
## Link to GitHub Issue or related Pull Request, if one exists
n/a
## Description of change
Similar to #797, draw an overlay to debug touch issues for reflec beat.
For rb, we draw on the ImGui surface. Draw horizontal and vertical line
for triggered sensors, and also a bounding box if scaling is in use.
Make small tweaks to how scaling works.
## Testing
Verified volzza 2 / reflesia / 1st game (landscape KBR)
## Link to GitHub Issue or related Pull Request, if one exists
n/a
## Description of change
Debouce option for touch input. Applies to all touch handlers (rawinput,
win8, win7) since it sits at the touch layer, and then consumed by jb
touch logic.
## Testing
## Link to GitHub Issue or related Pull Request, if one exists
related to #697
## Description of change
Add a new option that paints touch targets and touch points for jubeat;
gets enabled if there is a touch screen connected. This is to help
explain / debug issues when users have their touch screen issues, which
is usually due to misalignment.
Fix the touch targets being off by 1 pixel (center gap is 1px wider in
both directions).
Also, simplify the `improved` algorithm to simulate a finger and trigger
nearest-neighbor for the AC dimensions. In terms of touch performance
this is near identical to what we had before, but it allows us to draw a
nice debug overlay instead of just grids.
## Testing
Tested portrait and landscape versions of jb.
## Link to GitHub Issue or related Pull Request, if one exists
n/a
## Description of change
Two changes:
1. Handle all HID events in `WM_INPUT` and not just the first one. This
only really affects 4000Hz / 8000Hz HID devices.
2. Go back to `3x3` as the default for rb IR touch emulation and remove
`1x1` as an option as it does not perform as well as I expected.
## Testing
## Link to GitHub Issue or related Pull Request, if one exists
Fixes#603
## Description of change
Scanning for midi devices can take a while on Windows 11 with MIDI 2.0
service. Sometimes it'll take a couple seconds. Sometimes, on a PC with
zero MIDI devices, it takes 10-11 seconds.
This was causing two issues:
1. slow startup time
2. crash on invalid memory access due to a race condition
Address both.
Also fix a bug: when a device change event fires, we do a MIDI scan, and
invalidated all existing MIDI devices in favor of creating new handles.
Stop doing this, and instead check for duplicates by matching the ID and
keep existing device handles alone. Properly clean up devices on unplug.
Also: fix MIDI buttons being stuck on when unplugged while holding a
key.
## Testing
Tested with Nostroller in MIDI mode. rtpMIDI works too.
## Link to GitHub Issue or related Pull Request, if one exists
Fixes#697
## Description of change
Adds aspect-ratio compensation for raw input touch handler.
This addresses the problem with playing rawinput touch games - namely
jubeat and reflec beat - on a display that is not 16:9, and user chose
to preserve the aspect ratio. This happens a lot on:
* 16:10 touch screens
* touch screen laptops (which range from 3:2, 16:10, and so on).
Root cause is a **Windows Raw Input limitation**. Unlike
`WM_POINTER`/`WM_TOUCH`, where the OS already maps digitizer coordinates
to screen space (applying the display's calibration/scaling), Raw Input
delivers the HID digitizer's *raw* logical coordinates, spanning the
whole physical panel, with **no calibration or display-mapping data
attached**. We have to reconstruct that mapping ourselves.
When a game runs at a display mode whose aspect ratio differs from the
panel's native resolution, Windows scales the image with
letterboxing/pillarboxing (black bars). That is standard OS/GPU
behavior. Because Raw Input gives us no mapping to account for those
bars, touches land off-target. This change detects the mismatch and
remaps each touch from panel-space into the displayed image region;
touches inside the black bars are treated as released.
Adds new launcher option **`-rawtouchaspect`**.
Notes:
- Native resolution is the largest-area mode from `EnumDisplaySettings`
on the **primary** display, consistent with the existing primary-only
touch pipeline.
- Math assumes centered, aspect-preserving scaling; only one axis is
ever inset.
- A small epsilon (0.01) makes near-matched panels (e.g. 1366×768 vs
true 16:9) a no-op.
- If the user forces a stretched image, then the touches will be off
again. In this case, the user needs to use the `force off` setting.
## Testing
On my tiny Surface Go tablet,
* checked that jubeat squares align correctly
* good enough to full combo level 11 for reflec beat
## Link to GitHub Issue or related Pull Request, if one exists
#787
## Description of change
Updates usage of `windows_dll_compat_checker`
## Testing
it builds
## Link to GitHub Issue or related Pull Request, if one exists
Fixes#787
## Description of change
Remove the call to `RegGetValueA` as it is Vista and up. Replace with
`RegOpenKeyExA` + `RegQueryValueExA`
## Testing
## Link to GitHub Issue or related Pull Request, if one exists
n/a
## Description of change
`-network` and `-subnet` are poorly named. Add new names for them that
are more explicit.
Old command line parameters will continue to work, this is an additive
change.
## Testing
## Link to GitHub Issue or related Pull Request, if one exists
n/a
## Description of change
IIDX likes to call `CoCreateInstance` and `init` multiple times on ASIO
drivers, but some ASIO drivers like `Neva Uno` really don't like that
and ends up crashing. In our wrapper, cache the instances and try to
reuse them for better compatibility.
## Testing
Worked fine for FlexASIO / Xonar AE / Realtek ASIO though none of these
drivers repro the crashing behavior.
## Link to GitHub Issue or related Pull Request, if one exists
Fixes#779
Regressed by #720
## Description of change
#720 introduced a static dependency on DX9 which caused `d3d9.dll` to be
loaded at boot from `system32`. Some third party hooks (like
ifs_layeredfs and dxvk) rely on supplying a custom `d3d9.dll` in the DLL
search path (usually in modules) but this change caused Windows to skip
that check.
Remove the hard dependency on d3d9 and add a CMake check to ensure that
compiled binaries do not accidentally introduce new static imports in
the future.
## Testing
Confirmed that dxvk runs again.
## Link to GitHub Issue or related Pull Request, if one exists
n/a
## Description of change
Adds an option to disable Live2D. Can be disabled everywhere, or just
during a song.
## Testing
Tested EG final and recent Nabla.
## Link to GitHub Issue or related Pull Request, if one exists
regressed by #766, fixes#775
## Description of change
Some games like DDR leave `ShowCursor` ref count at non-negative number,
so when spice handles `WM_SETCURSOR` to change the cursor shape, it ends
up showing the OS cursor.
## Testing
## Link to GitHub Issue or related Pull Request, if one exists
n/a
## Description of change
Adds an overlay window widget for controlling OBS over WebSocket.
Add new lines to the FPS widget that shows recording / streaming timers.
Show notifications for major state changes (stream started/stopped,
recording started/paused/resumed/stopped)
## Testing
I don't have a repro but a user reported that the cursor doesn't wrap
around on one side. Correctly account for windows bleeding over to other
monitors.
DLL hook options (-k and -z) allow multiple flags being specified in
both spicecfg and via command line; they never conflict as they are
additive. Remove the warning about option conflicts.
## Link to GitHub Issue or related Pull Request, if one exists
n/a
## Description of change
Similar to how it is on SDVX, turning this on can cause graphical
glitches depending on the GPU, so it needs to be an option that users
can toggle.
## Testing
After #739 there was a regression where the cursor visibility became
inconsistent if the FPS display was shown and then another overlay
window was toggled. Fix the imgui cursor toggle logic to only check for
the overlay layer visibility.
Only affects the caption bar.
Should work for:
- [x] standalone configurator
- [x] dx9 games, including multi-window games like gitadora
- [x] Unity games
## Link to GitHub Issue or related Pull Request, if one exists
Fixes#762
## Description of change
Fix -nolegacy causing input to be not processed in spicecfg
Need to fix `run_cfg` and `CONFIGURATOR_STANDALONE` for real soon.
## Testing
## Link to GitHub Issue or related Pull Request, if one exists
n/a
## Description of change
Fully flush `tmp` file and then use `MoveFileExW` instead of `CopyFileW`
which guarantees atomic operation on NTFS.
## Testing
## Link to GitHub Issue or related Pull Request, if one exists
Building on #745
## Description of change
With `-wasapishared`, some users see `AUDCLNT_E_BUFFER_TOO_LARGE`
(`0x88890006`).
The existing one-device-period buffer clamp wasn't enough on endpoints
with a small shared buffer; the shared buffer is double-buffered, so a
full-buffer write often exceeds the free space.
### Fix
Added a FIFO bridge to `SharedRedirect` that decouples the game's
per-event writes from the shared engine's clock:
- **`GetBuffer`** hands the game a pointer into the FIFO tail to write
in place.
- **`ReleaseBuffer`** commits the write and drains `min(pending,
device_free)` frames to the device - so a write can never exceed what
the device accepts, structurally preventing the overflow on any
endpoint.
- **`GetCurrentPadding`** reports the FIFO fill level (capped to the
reported buffer size) so poll/timer-driven games pace correctly against
the virtual buffer.
## Testing
## Link to GitHub Issue or related Pull Request, if one exists
#251
## Description of change
CCJ registers for rawinput mouse. We allowed the rawinput registration
to go through to the OS, which prevents spice's rawinput stack from
using the mouse. This caused the overlay to not accept mouse input. Fix
it by not letting the rawinput registration through. Luckily, mouse
input continues to work properly in CCJ (for touch).
Also, fix a bug in DX11 overlay when toggling the main menu.
## Testing
Enable left nav for Card tab, splitting the single page into multiple
sub tabs.
Card Manager is now embedded in this UI (but can still be launched as a
separate window)
Add a timeout and skip signalling to the D3D9 capture path so the API
thread no longer waits indefinitely when Present stops during loading.
Return the last successful JPEG frame as a fallback.
## Link to GitHub Issue or related Pull Request, if one exists
#746
## Description of change
* Fix `capture.get_jpg` blocking indefinitely when D3D9 screen capture
cannot
complete during game loading (e.g. no Present calls).
* Add a 2-second timeout to `graphics_capture_receive_jpeg()` and cancel
pending capture requests on timeout.
* Signal capture skip from D3D9 failure paths via
`graphics_capture_skip()`.
* Cache the last successful JPEG per screen and return it as a fallback
when a new capture fails.
Tested with **stock iOS Spice Companion** only. I have not tested
Android or
other Companion clients. The iOS client implementation differs from the
others; this fix is server-side only.
No config file, CLI option, or API schema changes.
## Testing
* Built locally with llvm-mingw cross-compiler (WSL).
* Docker build (`src/spice2x/build_docker.sh`): Pending
* Tested with stock iOS Spice Companion on iPad: Mirror remains
connected
during game loading instead of returning to KeyPad.
## Link to GitHub Issue or related Pull Request, if one exists
#747
## Description of change
The old approach called ImGui’s `SetScrollHereY()` while the options
list was still being laid out. That caused one-frame scroll corrections
and edge-snap jitter near scroll boundaries.
The new approach in `build_options_tab()`:
1. **On click** - set a flag (`options_scroll_pending` for categories,
`options_scroll_top` for group headers).
2. **During layout** - when building the target category, record its
content position with `GetCursorPosY()` (don’t scroll yet).
3. **After all options are built** - apply scroll once by setting
`window->Scroll.y` directly, and only if the position actually needs to
change (0.5px threshold).
That deferred, single-pass scroll avoids the shake while still
supporting scroll-up, scroll-down, and re-click-to-recenter.
## Testing
In spicecfg.exe and in-game overlay, Options tab:
Open groups with many categories
Scroll content down manually, then click a higher category in the left
nav - content scrolls up to that section
Re-click the same category after manual scroll - jumps back without
shake
Rapid re-clicks when already aligned - no jitter
Switch group headers - still scrolls to top; re-click at top - no shake
## Link to GitHub Issue or related Pull Request, if one exists
n/a
## Description of change
For cab usage, when `-exec bm2dx.dll` is used without `-iidx` then
SOUND_OUTPUT_DEVICE never gets set.
Change this so that `SOUND_OUTPUT_DEVICE` gets set unconditionally if
`-iidxsounddevice` is set.
## Testing
## Link to GitHub Issue or related Pull Request, if one exists
#0
## Description of change
Combine API/Options/Advanced/Development/Search tabs into one Options
tab and add a left nav for navigation categories.
Reduce information density for options table by making each row double
the height and slightly increasing widget sizes.
## Testing
## Link to GitHub Issue or related Pull Request, if one exists
#73
## Description of change
Generated cards now start with E0040100 to fully match real cards. The
placeholder example `E004010000000000` is replaced with
`E0040100FFFFFFFF`.
The invalid placeholder/fallback PCBID `04040000000000000000` is
replaced with `01201000000000010101`, which contains a valid
header/checksum, making it closer resemble a real PCBID while still
clearly being an example.
## Link to GitHub Issue or related Pull Request, if one exists
n/a
## Description of change
This new option, `-wasapishared`, detects when the game opens WASAPI
Exclusive stream and forcibly opens a shared mode stream instead on the
real device.
#### Benefits of this:
1. No need for `force wasapi shared` patches
2. No need to change sample rate of audio devices before starting up
games
3. Adds ability to boot in shared mode even for games that do not have
shared wasapi changes (old GITADORA, popn HC)
As a result, this option is strictly better than `shared wasapi` patches
available for many games.
#### Downsides:
1. OS resampling will add a small latency, but not big enough to be
noticeable.
2. Using shared mode instead of exclusive mode adds latency, of course.
(If you cared about latency, you would use the low latency option, or
use exclusive or asio)
Basically it's the "make things work" button for audio that should work
for almost all games that we support.
The option has no effect if the game opens in shared mode.
## Testing
SDVX7 - ok
GITADORA GW - ok
popn HC - ok
IIDX - ok
## Link to GitHub Issue or related Pull Request, if one exists
n/a
## Description of change
Create three distinct layers for the overlay:
1. Bottommost persistent layer - non-interactable layer that is always
on. This was only for notifications, but now the FPS widget lives here
as well.
2. Overlay windows layer - most interactable windows go here.
3. Topmost main menu - this is reserved for the main menu (escape key)
and this is a modal dialog that occludes the layers below.
Why?
- `toggle overlay` behavior with FPS widget *also* toggling on/off was a
bit confusing (now they're two separate keys)
- FPS widget is popular, but it caused the entire overlay to be active,
which affects how input is handled
- the main menu being a standalone window was a little awkward (now it's
a modal)
## Testing
## Link to GitHub Issue or related Pull Request, if one exists
Fixes#737, regressed by #707
## Description of change
ImGui backend for DX11 pulled in dependency on a specific version of
`d3dcompiler_47.dll` which is not present on stock Win7 OS image.
Change this to a runtime load of the DLL and disable the overlay if we
can't find one.
## Testing
- [x] Win11, DX11 overlay
- [x] Win11, DX9 overlay
- [x] Win7, DX9 overlay
## Link to GitHub Issue or related Pull Request, if one exists
#730
## Description of change
Add an option that extracts channels from 7.1 ASIO and presents to 2-ch
ASIO. Same idea as the SDVX 2ch fix except for gitadora we are
duplicating the center channel to front.
## Testing
Tested SDVX and GFDM Arena.
## Link to GitHub Issue or related Pull Request, if one exists
#730
## Description of change
spicecfg is a 32-bit application. When it uses the ASIO SDK it only saw
the 32-bit drivers.
There are some ASIO drivers that have different names under 32-bit and
64-bit (Xonar AE is one of them)... so we have to manually scan the
registry and surface both the WOW32 and WOW64 nodes.
## Testing
<img width="329" height="309" alt="image"
src="https://github.com/user-attachments/assets/7abecf76-6835-4df5-8c2e-e7b425130f4c"
/>
Checked both 32-bit and 64-bit configurator, identical results.
## Link to GitHub Issue or related Pull Request, if one exists
#730
## Description of change
Flip the option - enable the Realtek hack by default, unless the user
chooses not to.
## Testing
Tested ASIO path and WASAPI path. WASAPI path should be unaffected as
the game just picks the default audio device.
## Link to GitHub Issue or related Pull Request, if one exists
#730, #718
## Description of change
Part 1)
When ASIO is in use, the game also looks for a Realtek device so that it
can open a WASAPI Exclusive mode stream for headphones.
Add an option to fake that, in case the user doesn't have a Realtek
device.
Part 2)
`-gdaasio` wasn't workign properly - fix the logic.
## Testing
Seems to work with FlexASIO, and Xonar with no real Realtek device.
## Link to GitHub Issue or related Pull Request, if one exists
n/a
## Description of change
Create `WrappedAsio`, similar to how we wrap `IAudioEndpoint`
So far, the wrapper does these things:
1. logging (for diagnosis, since iidx and gfdm don't produce any logs
when asio succeeds)
2. iidx32+ hack to work around refcount mismatch issue
3. sdvx valk cab hack to force 2-channel audio ("downmixing" by taking
only the front channels)
4. honor volume boost
As a result of `#2` the mempatch was removed from `iidx.cpp` since we
can tackle it cleanly in the hook. `#3` also removes the need for manual
patches.
Real downmixing is hard & expensive on the CPU so it was not
implemented.
## Testing
Tested iidx/sdvx/gfdm with xonar and flexasio
## Link to GitHub Issue or related Pull Request, if one exists
n/a
## Description of change
Refuse to load if `libaio.dll` exists but `<spec>` is set incorrectly
(almost certainly because the user copied old prop files from downlevel
version)
## Testing
## Link to GitHub Issue or related Pull Request, if one exists
n/a
## Description of change
Resampler:
Implement resampler for exclusive mode streams, as we are seeing more
and more devices - not just laptops but onboard audio devices - that
only support 48khz and not 44.1khz. Should work with volume boost (gain
calculated inside resample) and also downmixer (hands off intermediate
scratch buffers).
Buffer size increase:
By default many of these games request a tiny buffer when in shared mode
(TDJ uses 3ms). On some audio setup this results in crackling due to
underflow. Add an option to forcibly increase the buffer size.
## Testing
With resampler set to 48kHz and buffer set to 20ms I can reliably boot
and play IIDX on my display port monitor's speakers; previously this
wasn't possible. IIDX is event-driven.
Tested SDVX7 as well at 48kHz, which opens timer-driven streams.
## Link to GitHub Issue or related Pull Request, if one exists
Fixes#154
## Description of change
Patch the game to skip over special holo printing logic and redirect to
the normal printer, resolving the soft lock + printer failure.
## Testing
Tested `NCG-2019012900`. Other versions might not work though since this
is patch-based not hook-based.
## Link to GitHub Issue or related Pull Request, if one exists
Fixes#717, fixes#647
## Description of change
Adds an option to downmix surround sound (5.1, 7.1, etc) down to stereo
(2 speakers). This can be used in most WASAPI games, including Gitadora
and FTT.
How it works: when the game tries to open surround format (say, 7.1) we
create a fake buffer and tell the game that it is supported. In reality
we open a 2-channel stream with the real sound card. When the stream
begins, we downmix the channels down to two (using one of many
algorithms) and output to the sound card.
While we're here, implement an option to boost the game volume by some
decibel value, which is a feature often requested by SDVX players. This
was needed since downmixing can sometimes result in quieter audio.
## Testing
Tested GW Delta and FTT.
Downmix doesn't work on IIDX (32 bits) but volume boost works.
## Description of change
Filter GetIpAddrTable to selected network adapter.
Fixes the IP address error (5-1506-0000) on gitadora gw delta when
multiple network adapters are present.
## Testing
Tested on Gitadora GW Delta with both WiFi and Tailscale adapters
present.
## Link to GitHub Issue or related Pull Request, if one exists
#720
## Description of change
Pass `VK_F4` sys-key messages through to `DefWindowProc` before ImGui
ingestion, restoring the normal Alt+F4 -> `WM_CLOSE` ->
`launcher::shutdown()` path.
## Testing
- [x] Launch `spicecfg` (D3D9 default path) and press Alt+F4; window
closes and process exits
- [x] Launch `spicecfg` (software path) and press Alt+F4; window closes
and process exits
- [x] Close via title-bar X; still works
## Link to GitHub Issue or related Pull Request, if one exists
N/A
## Description of change
Adds GITADORA Arena windowed monitor layout options for the GITADORA,
LEFT, RIGHT, and SMALL windows.
This also applies the selected window border style to all four GITADORA
Arena windows, and allows the SMALL touch window to be resized in
windowed mode while keeping touch coordinates updated.
## Testing
- Manually tested GITADORA Arena windowed mode:
- default, resizable, and borderless window styles
- per-window monitor placement
- SMALL resize
- SMALL touch coordinate mapping after resize
## Description of change
**Configurator (spicecfg.exe)**
- Attempts to create a D3D9 device on startup and uses the hardware
ImGui DX9 path when successful; falls back to the existing software
rasterizer automatically if D3D9 init fails.
- Rewrites the configurator window loop: refresh-rate-aware render
timer, minimize/resize/`WM_DISPLAYCHANGE` handling, direct Win32 ->
ImGui input (keyboard, mouse, wheel), and optimized software painting
via `SetDIBitsToDevice` instead of per-frame GDI `HBITMAP` allocation.
**Overlay / input (scoped to standalone configurator)**
- Skips expensive per-frame rawinput polling in
`ImGui_ImplSpice_NewFrame` when `CONFIGURATOR_STANDALONE` is set (Win32
messages drive input instead).
- Adds software-renderer idle-frame detection (`sw_pixels_dirty` +
draw-data hash) so spicecfg only repaints when pixels actually change.
- Adds `ImGuiWindowFlags_NoScrollWithMouse` on the configurator root
window to prevent scroll jolt on non-scrollable child widgets.
## Link to GitHub Issue or related Pull Request, if one exists
#717
## Description of change
Add an option to override the ASIO device.
By default the game will try to use any ASIO driver that contains the
string `XONAR` in it.
## Testing
Tested with FlexASIO.
## Link to GitHub Issue or related Pull Request, if one exists
n/a
## Description of change
Move resize logic from `EndScene` to `Present`/`PresentEx` (resolves
Live2D frame drops in some extreme settings)
Plug small memory leak
Remove unnecessary surface Lock/Unlock
## Testing
Tested IIDX, SDVX, DDR.
## Link to GitHub Issue or related Pull Request, if one exists
#0
## Description of change
Closing spicecfg was blocked for up to ~495 ms. Runtime behavior is
unchanged: same flush interval and same output path during normal
operation. Only shutdown teardown is faster.
## Testing
Opened and closed spicecfg.exe repeatedly; the window closes immediately
with no hang
## Link to GitHub Issue or related Pull Request, if one exists
#0
## Description of change
Save config xml once instead of ~33 times
## Testing
xml is still saved properly
## Link to GitHub Issue or related Pull Request, if one exists
#0
## Description of change
Saving patches to file used to rewrite the file repeatedly, now it loads
and saves only once. Original file timestamp is now preserved on the
backup.
## Testing
Saved a very large patch set that used to take 10+ seconds; now it is
instant. Confirmed hex diffs are still accurate.
## Link to GitHub Issue or related Pull Request, if one exists
n/a
## Description of change
Subscreen overlay window used to draw above the main game surface, but
below any other ImGui widgets. Fix this so that the subscreen image is
drawn at the same z-level as the sub window itself.
This has been a long-standing issue - at least since 2023 when spice2x
first forked...
## Testing
Tested TDJ in windowed mode.
## Link to GitHub Issue or related Pull Request, if one exists
Fixes#134
## Description of change
Add ImGui DX11 backend implementation, and integrate into the spice
overlay.
The tricky part is that some of the Unity games:
1. Launch multiple windows, and
2. Can be resized (even full screen games launch at a certain resolution
and then expand to fit desktop resolution)
3. lazy load DX11 DLLs
This PR also adds screenshot functionality, but screen resize is not
implemented.
## Testing
Seems to be working for most games. Need to do final tests for:
- [x] CCJ (attract movie plays as well)
- [x] Busou Shinki (title movie plays)
- [x] MFG
- [x] QuizKnock
- [x] Polaris Chord
- [x] check dx9 for regression
## Link to GitHub Issue or related Pull Request, if one exists
#0
## Description of change
When opening the patches tab by pressing F4 in game, the Save button
doesn't appear until after initially selecting/deselecting a patch, then
it shifts all of the patch text below. To solve this annoyance, this
keeps the Save button in a fixed position (starts greyed out until a
selection) and no longer shifts the text.
## Testing
Confirmed saving selected patches still works properly in the overlay
and standalone cfg
## Link to GitHub Issue or related Pull Request, if one exists
#0
## Description of change
Combine the two layout options into one
## Testing
- [x] windowed, x4
- [x] windowed, x2
- [x] windowed, x1 with sub
- [x] fs
## Description of change
Added an option to only disable the left/right screens of gitadora gw
delta while exposing the touch panel screen.
## Testing
Tested by hand on CachyOS + hyprland + gamescope + wine + vnc + phone +
cat 🐈⬛
<img width="2560" height="1707" alt="image"
src="https://github.com/user-attachments/assets/a2ef0172-68e2-43c2-89c3-4863698f2f00"
/>
## Link to GitHub Issue or related Pull Request, if one exists
n/a
## Description of change
Adds toast notifications to the overlay.
Toast notifications are transient windows (shown for about 4 seconds).
These are drawn on top of the game even when the overlay is inactive
(i.e., when no window is open), and does not cause any input sink
behavior.
Add toasts for some common user-driven actions that could use a
notification, such as:
* screenshot
* card insert
* PIN macro
* API client connect/disconnect
* virtual printer
* screen resize toggle / scene switch
Add an option to change where the toasts are displayed, or to turn it
off entirely.
Add SDK function for it, and add it to the samples.
## Testing
Tested DDR (shown at bottom right, as is for most games) and RB (shown
top right by default).
## Link to GitHub Issue or related Pull Request, if one exists
n/a
## Description of change
Add two options:
1. option to adjust poll rate
2. option to change emulation size
Also, the default configuration is changing from:
* ~1000Hz ish to 120Hz (default)
* 3x3 point to 1x1 point
In theory this does not make a meaningful change to how the game plays.
But if people want the old behavior they can change it.
## Testing
Tested on Volzza2 and Reflesia.
## Description of change
Adds a way to automatically use the PIN Macro for P1, P2 or both when
Auto Card Insert is used.
### Launcher changes:
- Added a checkbox to enable/disable the feature
- Added a textbox for each player to set what to look for in the logs.
### How it works:
The feature requires Auto Card Insert and PIN Macro to be enabled and
set.
It uses the Auto Card Insert value to enable the feature for P1, P2 or
both, with a "master" checkbox to completely disable the feature. It
then relies on the current PIN Macro code to send the PIN to the games.
The games logs send a message when a new scene is loaded with the name
of the scene. By hooking on the logs, we can see when a PIN is required
and send the relevant macro. Games have different scene names, and
sometimes one for each player, so the field is configurable per game per
player. These could be hard-coded in a lookup table but I didn't want to
recompile the project every time I wanted to test, and I don't have all
the games to get this info from.
The PIN Macro thread is used to hook to the logs and check if the
defined string appears, which triggers the PIN macro just like a button
press would.
Setting nothing for the log trigger disables the feature for that
player. It's useful if someone wants to have Auto Card Insert enabled
for both players but only Auto Pin on 1 player, but is mainly there so
the check won't happen if nothing is set.
## Testing
I used SDVX and DDR to have a single and a two player test with the
feature both enabled and disabled. I also tested multiple combinations
of PIN Macro settings and Auto Card Insert settings with no apparent
issues. The PIN is automatically entered as soon as the game requests
it.
## Discussion
I know that hooking to the logs might not be the best solution. I'm very
open to discussions about this, and understand that this might be a deal
breaker for this feature. I made this to use with my setup and thought
I'd try opening this PR to see if the feature would be useful for
others.
I haven't found another way to make sure we're on the correct screen to
launch the PIN Macro, and sending the macro every time the Auto Card
Insert finishes had sync issues where the end of the PIN would actually
be registered by the game.
It would also be much more convenient for the users to hardcode a lookup
table for every games' log-trigger but I don't have the games currently
so I can't check the logs to see what would be best.
---------
Co-authored-by: Maxime St-Pierre <maxime.stpierre@ticketmaster.com>
## Link to GitHub Issue or related Pull Request, if one exists
#477
## Description of change
By default the game needs 4 monitors.
With the new option to disable subscreens, you can now boot fullscreen
with a single 4K monitor, with subscreen overlay enabled. Side monitors
are not shown in the overlay; only the touch screen is emulated.
## Future work
- [ ] custom resolution (-forceres) doesn't work properly (hooking
ResetEx does allow the game to boot but will render incorrectly;
probably needs hex edits)
- [x] enable this automatically if the user has fewer than 4 monitors
- [ ] ability to boot with a 4k main screen + small subscreen (with no
side screens which do nothing gameplay wise), but this whole display
emulation is a nightmare to work with & test thoroughly so it'll have to
be in the future.
## Testing
Checklist:
- [x] fs on 1 monitor with option set
- [x] fs on 2 monitor with option set
- [x] windowed - default (4 windows, no overlay)
- [x] windowed - with option set (1 window, overlay)
- [x] fs with 4 monitors?
- [x] check popn hc for regression
## Link to GitHub Issue or related Pull Request, if one exists
#694
## Description of change
Before this change, we have it set in the executable manifest to always
ask for UAC elevation.
This change removes that and instead attempts to prompt for elevation
when we launch, depending on the new developer option that is being
added here to run as current user instead of elevating.
The default behavior continues to run as admin. This is still the safest
in terms of regression risk.
A bit of history on this: while spicecfg never technically needed to
elevate, we continue to do so to avoid difference in behavior when the
game is launched. For example, if the user is using an input remapper
running without elevation, it would inject input into spicecfg running
as user but fail to do so if the game runs elevated.
WinXP builds are unaffected (there is no UAC).
Some features will straight up fail without elevation so this will
remain as a debug option. To name a few (not a complete list):
* reboot/shutdown of PC
* running at realtime process priority
* `-nvprofile` option
* ...
## Testing
## Link to GitHub Issue or related Pull Request, if one exists
#0
## Description of change
Add `-icmphook` option under spicecfg Development/Network for emulating
keepalive ping replies in user mode, so games do not need to open
privileged raw ICMP sockets. This makes connecting to networks possible
on macOS under Whisky, and on Windows with ICMP firewalled or spice
running without Administrator privileges.
## Testing
Tested DDR and SDVX on Windows 10 and macOS Tahoe. Network check status
in test menu shows `CONNECTED` when -icmphook is enabled, and `NOT
CONNECTED` when it is disabled. Actual network functionality works as
expected (under previously impossible conditions).
## Link to GitHub Issue or related Pull Request, if one exists
Continuation of #682
## Description of change
RB uses SleepEx, so it was missed during the search while working on
#682.
## Testing
Plays about the same on a 200Hz touch monitor.
## Link to GitHub Issue or related Pull Request, if one exists
n/a
## Description of change
When booting in fullscreen, hide the subscreen from the alt+tab list and
from the task bar. Alt-tabbing to it does nothing, so this is just to
avoid confusion.
No change to windowed mode.
## Testing
Tested TDJ/SDVX/Popn. Didn't test Gitadora but it's probably fine..
## Link to GitHub Issue or related Pull Request, if one exists
n/a
## Description of change
Add a new option under `Monitor` group to change the monitor resolution
before booting the game, very similar to how orientation / refresh rate
options work.
This would be useful for games like Polaris Chord that boots at current
resolution but manages to have graphical issues when not in 1080p.
## Testing
## Link to GitHub Issue or related Pull Request, if one exists
Fixes#562
## Description of change
### rawinput touch fixes
In rawinput touch handler, if the mouse events (`WM_LBUTTONDOWN`,
`WM_MOUSEMOVE`, `WM_LBUTTONUP`) originated from a touch screen, drop
them on the floor instead of treating them as touch events.
This is an attempt to fix phantom touch issues we see with some screens.
Fix another issue where, if mouse is clicked inside the window, and then
dragged outside the window and button is released, touch point (id 0)
continues to be held.
### wintouchemu fixes
If we detected a touch input recently (500ms), ignore new mouse clicks.
This isn't perfect, but hopefully it helps with filtering out mouse
clicks originating from touch screens.
Also, switch over to detecting the primary mouse button correctly, not
just the left mouse button.
### notes
Future investigation: are there really touchscreens that report a mouse
HID capability & insert mouse events? We could have a way to filter them
at rawinput level but it'll be ugly.
## Testing
Tried jubeat, beatstream..
## Description of change
There was enough feedback that the current algorithm is not ideal for
most touch screens because most touch screens are not 24". In the
current algorithm touching the gap is no-op, so people think the game is
dropping touches.
This PR introduces a new algorithm that inspect touches on the gap and
triggers the nearest square.
## Testing
Tested landscape and portrait jubeat.
## Link to GitHub Issue or related Pull Request, if one exists
continuation of #677
## Description of change
When overlay was hidden, when mouse buttons were clicked, they were
queued up and replayed when overlay became visible again.
This is due to improper usage of `GetAsyncKeyState`, per documentation.
## Testing
## Link to GitHub Issue or related Pull Request, if one exists
Fixes#681
## Description of change
`Sleep` and `sleep_for()` can be very inaccurate and varies depending on
what the OS gives us...
### `timeBeginPeriod(1)`
On boot, we are now calling `timeBeginPeriod(1)`, which affects the
whole process but makes `Sleep` more accurate. There is some risk here
if any game was relying on doing things like `Sleep(1)` and expecting it
to run for 15.6ms. Most games already call `timeBeginPeriod(1)` in the
game engine, though not the whole time, so I'm hoping that this is not
too impactful.
### Opt out of Win11 power throttling
Ensure that timer resolution change above is respected even when the
window is occluded / minimized by opting out of throttling via
`PROCESS_POWER_THROTTLING_IGNORE_TIMER_RESOLUTION`.
### Use Win10 high resolution timer instead of Sleep
On Win10 1803 and above, there is a new OS-level API for high resolution
timers; if this is available, use it
(`CREATE_WAITABLE_TIMER_HIGH_RESOLUTION`). Worth noting that WINE
doesn't support this currently.
If not, fall back to `Sleep`, which is significantly better than
`sleep_for()` in my experiments.
Callers of Sleep / sleep_for were replaced with this new timer. Most of
them anyway; calls to Sleep() with more than 100ms+ was left alone.
### Add an option as a chicken bit
To opt out I'm adding a new option called `Use Legacy Timers` which will
revert to behavior before this PR. The code paths that switched from
`sleep_for` to `Sleep` will remain in place though, not affected by the
option.
## Expected changes
In some I/O emulation modules, poll threads may run more frequently,
resulting in lower latency.
It also means that spice overall may use more CPU resources and power.
If you don't like this, you can always enable the option to opt out;
e.g., if you're on old arcade cab PC.
## Testing
DDR p4io - ok
drs touch hook - ok
IIDX camera hook - ok
CCJ trackball - ok
## Link to GitHub Issue or related Pull Request, if one exists
#676#452
## Description of change
When spice SDK or API sets or clears button and analog override, we
don't tell MDXF about it, so it may fall behind. This is a special case
for DDR MDXF I/O emulation. For Naive/Xinput I think we are getting
lucky because they usually also generate WM_INPUT events.
Update the C++ SDK sample to provide more interesting example of
emulating DDR arrows with the keyboard.
## Testing
## Description of change
Seems to be an oversight when it was initially implemented; hooks should
not load when launching `spicecfg` (or `spice -cfg` or `spice64 -cfg`).
## Link to GitHub Issue or related Pull Request, if one exists
n/a
## Description of change
Adds a flat-C, headers-only library for writing DLL plugins with spice.
This is meant to be an alternative to writing applications over spice
API which doesn't suit some scenarios like writing custom
high-performance I/O modules.
All you have to do is:
1. Create a 32-bit or 64-bit DLL with `spice_sdk_entry_point` as a
DLLExport
1. Include `spicesdk.h`, and optionally `spicesdk_io.h` (see
`extras\sdk\include`)
1. `spice_sdk_entry_point` will be called when hooks get initialized.
Call `init` with valid parameters.
1. When `init` returns, `SPICE_SDK_V0` will be filled out with a series
of function pointers; your DLL can now start calling into it.
1. Compile your DLL and add it as a DLL hook (`-k`) in spice when
launching the game.
See `v0_cpp.cpp` for an example.
V0 implements the following functions:
```
log;
get_game_info;
get_avs_info;
get_button;
set_button;
get_analog;
set_analog;
get_light;
set_light;
set_touch;
clear_touch;
insert_card;
set_keypad;
```
V0 is focused on providing common utility functions needed in a lot of
DLL hooks (get AVS info, log messages to file), and implementing I/O.
In the future, we could have more interesting things like:
* scanning and modifying memory
* installing DLL hooks
* having direct hooks into I/O emulation modules
* getting full tape LEDs
* having a callback into DX9 `Present` call
* drawing an ImGui window
More detailed documentation is coming soon in form of a wiki page.
## Testing
See included sample DLL.
## Link to GitHub Issue or related Pull Request, if one exists
Fixes#675
Yet another regression from #604
## Description of change
When overlay was hidden (not visible) it was still accepting keyboard
input, so when it became visible again the queued up keystrokes got
processed all at once.
Also, fix a bug with monitor settings update kicking in when in windowed
mode - this really should have been only for full screen.
## Testing
Tested DDR windowed / full screen, TDJ with subscreen overlay windowed /
fullscreen.
## Link to GitHub Issue or related Pull Request, if one exists
#181
## Description of change
Implement analog relative mode and delay option using a new
millisecond-based algorithm.
## Testing
WIP
## Link to GitHub Issue or related Pull Request, if one exists
Regression caused by #604, probably
## Description of change
When spicecfg or the game loses focus and regains it, scroll bar jumps
around. This was because we weren't keeping proper track of mouse wheel
position while not in focus, so when we gain it back, it's as if the
scroll bar was moved a huge distance.
## Testing
Tested spicecfg and in overlay.
## Link to GitHub Issue or related Pull Request, if one exists
#181
## Description of change
Use millisecond-based calculation to add artificial delay to the TT
input.
## Testing
Tested 64 bit TDJ and LDJ.
## Link to GitHub Issue or related Pull Request, if one exists
n/a
## Description of change
Add a checkbox to the buttons edit dialog that lets you set a device as
"always on", accomplished by setting the device to `Naive`, vkey to
`0xff` (invalid), and `Invert`.
No backend rawinput changes.
## Testing
## Link to GitHub Issue or related Pull Request, if one exists
Re-implements fix for #181 as it was removed by #668
## Description of change
Add two options to add artificial delay to turntable input. These
operate directly on the input logic (`get_tt`) which is called by I/O
emulation code.
Functionally, it's **identical** to the `Delay (experimental)` option we
had in the analog tab, just moved to Options tab.
## Testing
64 bit tdj: ok
64 bit ldj bi2a: ok
32 bit ldj ezusb: ok
Worth noting that TDJ bi2x_hook polls at 120Hz, bi2a at ~500Hz, and
ezusb at ~170Hz
## Link to GitHub Issue or related Pull Request, if one exists
Related to #181
## Description of change
This PR removes two features marked as "experimental" for analog axis -
`Delay` and `Relative Axis`.
They have been in spice as experimental option for almost 2 years.. but
they have a fundamental problem of being tied to how often the analog is
polled. Not just how often the game's I/O emulation code polls it, but
literally any source (spice API, overlay, etc).
For `Delay`, the only real usage I'm aware of is for #181 which is
delaying IIDX turntable input. For this, I will follow up with a
separate PR that adds back the delay option specifically for IIDX.
For `Relative Axis` - I'm not quite sure if any one actually uses this.
This could be implemented per-game if some game demands it. Polaris
Chord already has one, for example.
## Testing
## Link to GitHub Issue or related Pull Request, if one exists
n/a
## Description of change
Currently, all analogs are treated as circular values that wrap around.
This works for knobs and turntables, but can get weird for linear values
(like tilt sensors and sliders) especially once analog options are
enabled, such as sensitivity.
This PR groups analogs into 3 buckets: circular, linear (centered), and
linear (positive). Linear types get different algorithms applied to it
when options are set (e.g., sensitivity caps out at 0, 1 instead of
wrapping around).
In linear mode:
* Sensitivity value applies an exponential response curve (power curve)
to the original value.
* Multiplier/divisor serves as a linear cut-off.
* Relative mode works as you expect, but of course, values don't wrap
around.
* Invert and deadzone work as you expect (since they applied to the
controller input anyway)
* Smoothing is removed from the UI and has no effect.
* Delay is unaffected.
Also, fix a small bug with -/+ button not working for analog `Delay`
option.
## Testing
WIP
## Link to GitHub Issue or related Pull Request, if one exists
Fixes#663
## Description of change
Apply monitor rotation and refresh rate again when fullscreen focus is
regained.
## Testing
Tested with sdvx7
## Link to GitHub Issue or related Pull Request, if one exists
#616
## Description of change
Fix UI labels being wrong for analog stick up/down (they were reversed).
Adjust deadzone so that when sticks are bound as digital buttons, they
are not as sensitive.
Small refactoring of code.
## Testing
Tested via spicecfg using my xbox one controller.
## Link to GitHub Issue or related Pull Request, if one exists
n/a
## Description of change
Some crappy DDR soft mats (either USB-based or console pads with crappy
adapters that lack a dedicated "DDR pad mode") use X and Y analog axis
for arrows, which means they cannot cleanly report Up+Down or Left+Right
input.
According to some ancient Stepmania code, a lot of these report a middle
value (value between center and right, for example, for left+right).
Borrow this hack from Stepmania and implement it in spice as analog
input for DDR.
Also, for rawinput/xinput automatic bind scenario, update the logic so
that face buttons are always detected before analog axis / dpads for
consistency. This would help with binding any DDR pads that
simultaneously input face buttons / dpad / analog axis, so that we can
prefer face buttons when detected.
## Testing
I don't have any soft mats that have this, but it was tested with an
xbox controller.
As noted in #567, a filesystem path that contains non-ascii will break a
lot if using a clang toolchain.
Luckily, fmtlib has a lossy utf8 convert when you use it to print a path
(after including `fmt/std.h`). The vast majority of this diff is just
removing `.string()` from paths inside loggings calls.
There are some callsites I _didn't_ touch, mainly the options, because
it would be an ABI break to change those to be wide strings and I cbf
looking into settings upgrades. There are also some spots (avs mountpath
remapping, for example) where the path is guaranteed to be ascii, so I
didn't modify them.
ImGui doesn't appear to easily support wide strings (I mean, surely it
does, but I'm not gonna look too far into it) so I mostly just left
those alone too, with a few spots modified to re-use fmtlib's lossy
utf8.
Some of the changes are basically never gonna be hit IRL, like who would
put a file with a non-ascii _extension_ along with their modules? But
the diff is (I hope) pretty easy to validate as OK.
Testing has been somewhat minimal, I fired up the GCC build of spice2x
in a dodgy folder name, got mojibake (running via wine in linux so take
that as you will), ran the unmodified clang spice and crashed the same
way the reporter did. After modification, I get the exact same mojibake
so I assume if the terminal enjoys utf8 it'll display OK.
Claude (only used for review) thinks the commit is fine but is annoyed
that I use `fmt::detail` in the appdata censoring, which is part of the
private API; personally I don't care because it's pretty stable.
## Link to GitHub Issue or related Pull Request, if one exists
regression caused by #653
## Description of change
Some controllers - like the Xbox One controller I have - reports
0xffffffff as the max range value for analog, despite reporting 16-bit
width. This causes us to consider 0xffffffff as -1 so the range became
[0, -1] which is invalid.
Our automatic calibration does eventually fix this (-1 will fix itself
to become the highest actual value reported, which would be 0xffff).
This seems to be a common issue with XInput-based controllers in
general: see `Correct_Axis_Max` in
https://github.com/argonlefou/DemulShooter/blob/master/DsCore/RawInput/RawInputController.cs#653 removed the fix that was masking this issue. Put in a new fix that
fixes these up.
## Testing
Tested with Xbox One controller.
## Link to GitHub Issue or related Pull Request, if one exists
#345
## Description of change
SDVX4 data from certain private forum has bad logger configuration and
crashes on boot. Add an explicit workaround to fix up that broken
`avs-config.xml` file, scoped to `soundvoltex.dll` + 32-bit.
## Testing
Tested HH.
## Link to GitHub Issue or related Pull Request, if one exists
Regression introduced by #595
## Description of change
`avs::core::file_exists` fails if you use `\` as path separator... what
I meant to use was `fileutils::file_exists`.
This would have caused failures - mostly for gitadora players - if they
used `prop\ea3-config2.xml` for example.
## Testing
## Link to GitHub Issue or related Pull Request, if one exists
#653
## Description of change
By default, BAT Positive / Negative binds trigger when the stick is
tilted 10% off the center.
This needs a bit more customization since:
1. User may want to customize the center point (e.g., guitar controller
neutral position)
2. User may want to adjust the sensitivity (e.g., guitar controller tilt
angle to trigger wailing).
## Testing
WIP
## Link to GitHub Issue or related Pull Request, if one exists
n/a
## Description of change
Official GuitarFreaks controller has the motion sensor values with
`valuemin=-127` to `valuemax=127` and we don't deal with negative values
correctly.
## Testing
tbd
## Link to GitHub Issue or related Pull Request, if one exists
n/a
## Description of change
On some Win11 systems,
`CoCreateInstance(CLSID_DirectSoundI3DL2ReverbDMO)` started to fail with
`ERROR_MOD_NOT_FOUND` instead of `REGDB_E_CLASSNOTREG` for some reason.
## Testing
User tested.
## Link to GitHub Issue or related Pull Request, if one exists
#618
## Description of change
Add rest of the LED strip lights.
## Testing
Tested U region.
## Link to GitHub Issue or related Pull Request, if one exists
Fixes#648
## Description of change
Deal with devices in hybrid packet mode that send garbage data in second
packet when it's out of bounds (outside the number of contact points).
MSDN says they're supposed to be (0, 0), but some devices don't follow
the spec.
## Testing
I don't have a device that reports garbage values but this should fix it
in theory.
I tested on my Dell touch monitor which is in hybrid mode & sends 5
touches at a time, but can split across two packets to send up to 10
touches. It sends (0, 0) for the remaining slots when there are 6-9
touch points, but confirmed that there was no regression.
## Description of change
This code adds a window title to FutureTomTom when running in windowed
mode and allows the windowed graphics hooks to take effect.
## Testing
I ran the game and made sure fullscreen mode still worked as well as all
window move/resize functionality.
## Description of change
`std::ostringstream.str()` returns a temporary string so it's invalid to
obtain c_str from it and pass it around.
## Testing
wip
## Link to GitHub Issue or related Pull Request, if one exists
#121
## Description of change
This implements a seperate ICCA card workflow for the slotted readers
acting how Resort Anthem expects, enabling cards to be inserted.
Additionally this fixes a bug where both card units would be treated the
same (for keypad reads) under Resort Anthem.
The slotted reader workflow was implemented as a seperate function for
two reasons - it would be nice to not mess with any existing code to
avoid breaking all the functional games, and the way the slotted readers
are handled by RA seemed different enough to how everything was already
designed to where it didn't make sense to keep adding special edge cases
for RA.
## Testing
IIDX18 was tested and cards could be inserted on both P1 and P2 side.
IIDX19 through 22 was tested to make sure nothing had broken for
wavepass emulation.
## Known Issues
In IIDX18, when a card isn't set but the insert key is pressed, after
the card timeout the game will error out with an invalid state error.
## Description of change
This adds a toggleable option to remove the rounded window corners when
running a game, or a subscreen, in a window on Windows 11 and upwards.
## Testing
On Windows 11: Resort Anthem, MÚSECA and EPOLIS were tested and the
window corners were removed from both main windows and the TDJ subscreen
when running in windowed mode, with no change in fullscreen mode.
On Windows 7: IIDX18 was tested with no change, the call to
`DwmSetWindowAttribute` is ignored as `DWMWA_WINDOW_CORNER_PREFERENCE`
doesn't exist.
For XP builds, the call is compiled out to avoid linking against dwmapi
and windows_dll_compat_checker returns successfully when testing against
the XP Embedded image. I can't test it on XP, but it ran on Vista.
## Link to GitHub Issue or related Pull Request, if one exists
n/a
## Description of change
Allow DDR to be launched in borderless window (honor the spicecfg
option).
Prevent Gitadora arena model from changing the window decoration once
launched as it hangs the game.
## Testing
Tested 32/64bit ddr, gitadora arena.
## Link to GitHub Issue or related Pull Request, if one exists
#618
## Description of change
Wire up coin and more lights to bi3a_hook.
## Testing
Tested on U region
## Link to GitHub Issue or related Pull Request, if one exists
#618
## Description of change
Take the monitor hooks added for IIDX/SDVX #612 and apply it to popn as
well now that popn has a subscreen.
There is a debug option in game that actually uses three monitors, which
can be activated via hex edits. This will prevent that from working.
## Testing
Tested with 3 monitors, fs and windowed.
## Link to GitHub Issue or related Pull Request, if one exists
#618
## Description of change
The game insists on having two monitors. Hook various DX9 and Win32
monitor APIs to fake a monitor if the user only has one. This correctly
convinces the game that it needs to draw two screens instead of just
one.
## Testing
WIP
## Link to GitHub Issue or related Pull Request, if one exists
#286
## Description of change
When we migrated to event-based I/O for ImGui, it introduced an issue
where a button would be held down even when the window is not in focus,
because we didn't notify ImGui that the button was released (after the
window lost focus).
Fix the ImGui custom I/O handler so that it immediately releases all
buttons when the window focus is lost.
## Testing
tested on 32-bit windowed mode
## Link to GitHub Issue or related Pull Request, if one exists
#618
## Description of change
Add overlay for subscreen.
Add an option for no subscreen window.
Use the same "force redraw subscreen" logic we used in SDVX to fix the
same issue.
Known issues:
* still crashing when running windowed if there is only one monitor
* having only one monitor causes sunscreen overlay to not work
(NumberOfAdaptersInGroup issue?)
## Testing
## Link to GitHub Issue or related Pull Request, if one exists
#618
## Description of change
Before calling `CreateWindowEx[A/W]`, check dimensions of the window
about to be created, and check if it will be out of bounds (completely
or partially).
If it's completely out of bounds, move it to `(0, 0)` to prevent crashes
or rendering issues.
## Testing
Tested popn and sdvx.
## Link to GitHub Issue or related Pull Request, if one exists
#618
## Description of change
Basic support for lights - subwoofer RGB and button lights.
## Testing
Tested on title screen and in-game.
Tested beat pop as well since that lights up the colors in white/blue.
## Link to GitHub Issue or related Pull Request, if one exists
#618
## Description of change
Turns out running this with bi2x doesn't process buttons properly, so we
have to use bi3a.
## Testing
Seems playable now.
## Link to GitHub Issue or related Pull Request, if one exists
#624
## Description of change
See bug. Add locale hooks specifically for CCJ.
also, fix y axis direction for XInput, it was flipped because XInput
uses opposite values from what RawInput does
## Testing
Tested card in / play one round with Windows regional format set to
French (France) and other language set to English.
## Link to GitHub Issue or related Pull Request, if one exists
#616
## Description of change
The IDs don't really get used anywhere if it's not a real HID or MIDI
device, but putting them for completeness since they show up in Controls
overlay menu.
## Testing
## Link to GitHub Issue or related Pull Request, if one exists
#618
## Description of change
Implement BI2X hook I/O for service/test/coin/headphones and the deka
pop-kuns.
## Link to GitHub Issue or related Pull Request, if one exists
#618
## Description of change
The game expects the main display to be *not* HDMI, and at port 2.
Hooking DisplayConfigGetDeviceInfo allows us to boot the game on any
monitor.
Add basic I/O hook. It gets stuck in `USB I/O Checking...` for a couple
minutes but it'll eventually skip and boot to title screen.
## Testing
ugh.
## Link to GitHub Issue or related Pull Request, if one exists
#618
## Description of change
Get windowed mode to work.
## Testing
tbd... i/o doesn't work right now but it launches two windows at
least...
## Link to GitHub Issue or related Pull Request, if one exists
#616
## Description of change
`Naive` button is now called `Naive/XInput` and detects XInput
controllers
Add vibration output as "Lights"
Add proper hotplug support and multiple controllers
Fix misc bugs on x86
## Testing
I tested with two xbox controllers.
## Link to GitHub Issue or related Pull Request, if one exists
#616
## Description of change
Adds preliminary support for XInput controllers. Enough to manually bind
buttons and map analogs.
## Link to GitHub Issue or related Pull Request, if one exists
#345
Hoping that #180 is also addressed by this change, but I can't test it.
## Description of change
IIDX (TDJ) and SDVX (Valk) will now be able to boot in full screen even
with 3 or more monitors attached.
spice will "hide" from the game any monitors other than the primary
monitor and one other monitor for subscreen, allowing it to boot without
crashing - accomplished by clearing `DISPLAY_DEVICE_ATTACHED_TO_DESKTOP`
flag when monitors are enumerated over `EnumDisplayDevicesA`, and
fortunately both games seem to respect that flag.
Add options (one for IIDX, another for SDVX) that lets you specify the
monitor ID of the second monitor.
When the option is set, user-specified monitor will be used as the
subscreen. When the option is not set, spice will just pick the
lowest-indexed monitor as the subscreen, not counting the primary one of
course.
## Testing
Tested both games with three monitors. Should probably work for four or
more.
This was a lot more background work than expected, but that is the
nature of unnecessary hobbies I guess. Most things in here are obvious,
so here's the non-obvious thoughts and notes:
1. All the XP stuff is optional, if the toolchain isn't available it
won't even try
2. The docker build is the "known good" build and now has all the
required tools for XP and checking binaries
a. If you're OK with it, can add the XP_MUST_BUILD flag to
build_docker.sh
4. New `SPICE_XP` flag to comment out blocks
5. We could technically build using the Docker image I've made for my XP
compatible LLVM toolchain, but combining the binaries into a single zip
at the end of it is somewhat tedious, so I've chosen to grab the
binaries from my release
6. I also wrote a DLL checker to make sure the final binaries are
_actually_ XP compatible, which found some issues on x86_64 (I don't
know a single game that runs on 64 bit XP, but it wasn't too much effort
so whatever). This also won't run if missing, just to save the trouble.
7. The build script is still pretty shit, I've made some minor
improvements
a. `/usr/bin/env bash` instead of `/bin/bash` as it's more correct
b. Adding `-it` to the docker build, so Ctrl+C actually halts it
c. Main issue is that failures don't halt, because of the custom error
catching function. This has caused a lot of frustration, maybe we can
change that
## Testing
It runs on 32 and 64 bit installs of XP. My jubeat cab is on Win10 these
days and I haven't got around to testing an actual game, but I've
distributed test builds of this to people who *have* confirmed it works
as expected.
## Link to GitHub Issue or related Pull Request, if one exists
#0
## Description of change
Fix random crashes with CCJ.
This should remove the need to add `d3d10warp.dll` to `
preload_libraries` in `ee-config.xml`.
## Testing
Tried a couple games and didn't run into the crash..
## Description of change
Adds `-mainmonitor` option which changes the monitor layout before
launching the game. This is much more reliable than the old `-monitor`
option which operated at DX9 level. This works for TDJ/UFC subscreens,
for example.
Rename `-monitor` option to `-dx9mainadapter` to discourage use.
`-monitor` will continue to work, of course.
Changing of primary monitor happens first before any orientation changes
/ refresh rate changes, which means those options will result in the
logically correct configuration.
Create a new option category for `Monitor` (rotate, refresh rate, etc).
Add a monitor selection widget for `-mainmonitor` option in the
configurator.
Improve how we log names of monitors in the log during boot - should be
less of "Generic PnP Monitor" after this.
## Description of change
Rotate monitor & change the refresh rate **well before** the game is
launched.
This is much faster and more reliable compared to what we do now, which
is trying to do monitor changes during CreateWindow hooks. For example,
SDVX makes a bunch of OS / NVAPI calls to figure out monitor geometry
while it's booting, and by the time CreateWindow is called, the game
already made up its mind, which leads to weird graphical issues.
This affects both windowed mode and full screen.
In addition, add options for normal orientation (landscape) and upside
down (landscape, flipped) options. This can be used if the monitor is
normally rotated to portrait, but the game needs to be in landscape.
## Link to GitHub Issue or related Pull Request, if one exists
#287
## Description of change
Switch over to new event-based I/O system in ImGui so that we can keep
up with ImGui updates.
Unlike #287, this change does not modify how mouse position is handled.
That continues to be supported by newer versions of ImGui.
## Testing
wip
## Link to GitHub Issue or related Pull Request, if one exists
#593
## Description of change
* Display a confirmation dialog when clicking on `Generate` for the
first time (to prevent accidental loss of card number)
* If `cardN.txt` contents are read back successfully, show card number
in green to indicate success, and red in case of failure.
## Description of change
Merge option name and command line parameter columns.
Expand the size of widget column.
In Search tab, add a new column to display the category.
Add a highlight effect to rows when hovered over - apply this to all
tables in the configurator UI.
## Link to GitHub Issue or related Pull Request, if one exists
#596
## Description of change
Adds call to `libutils::print_dll_info` for early hooks too.
## Testing
```
[2026/03/27 09:51:16] I:launcher: SpiceTools Bootstrap (x64) (spice2x)
[2026/03/27 09:51:16] I:launcher: 1.0-V-2026-03-27T07:46:10
[2026/03/27 09:51:16] I:launcher: spice2x is free & open source; if you paid money for it, you got scammed
[2026/03/27 09:51:16] I:launcher: visit https://spice2x.github.io to download the latest version for free
[2026/03/27 09:51:16] I:launcher: arguments:
[...]
-z C:\Users\Noe\AppData\Local\Programs\SpiceTools\hooks\64\mempatcher64.dll
[...]
[2026/03/27 09:51:16] I:launcher: loading early hook DLL C:\Users\Noe\AppData\Local\Programs\SpiceTools\hooks\64\mempatcher64.dll
[2026/03/27 09:51:16] I:superexit: enabled
[2026/03/27 09:51:16] I:libutils: DLL info for mempatcher64.dll: CompanyName = aixxe, ProductName = mempatcher, Version = 4975386c637a86e8daa89d479a0c67ab28d792ec
```
## Link to GitHub Issue or related Pull Request, if one exists
#592
## Description of change
* when custom DLLs are detected (`d3d9.dll`) print out some basic data
from the PE header
* for our own NVIDIA DLL stubs, add manifest files to identify ourselves
* as a bonus, when DLL hooks are loaded from `-k`, print DLL info there
as well
This is mainly to detect when DXVK is in use.
Show better warning message when `ea3-config.xml` / `eamuse-config.xml`
is missing. Right now we just say `failed to load prop/eamuseconfig.xml`
which is really confusing when people look for `eamuse-config.xml` that
never existed in the first place.
## Link to GitHub Issue or related Pull Request, if one exists
#345
## Description of change
When X or Y axis is being bound to any button labeled `TT` or `Knob` or
`VOL-`, show a warning and ask if the user really meant to do that,
encouraging them to use the Analog tab instead.
* add `-card0` `-card1` options at the top of Cards tab to clearly
indicate that they take precedence over card files
* reorganize UI / clean up
* remove ability to directly edit the contents of `card0.txt` /
`card1.txt` as that wasn't very intuitive; instead, encourage users to
use overrides directly or use an external text editor (`Edit` button
opens notepad)
## Link to GitHub Issue or related Pull Request, if one exists
For #587
## Description of change
`Invert Touch` option is now honored by the IIDX/SDVX touch handler.
## Link to GitHub Issue or related Pull Request, if one exists
#579
## Description of change
* Fix profiles being loaded twice on tab switch
* Add more default profiles for some controllers
* Remove borders from tables since they look broken in software renderer
* Add check boxes to import/export only certain parts of of a profile
* Show device identifier string in drop down when applying profiles
since some controllers have multiple identically named interfaces
* Show completion message when action buttons are clicked (`Apply`
button, `Clear all bindings` button both become disabled & shows `done`
message)
## Link to GitHub Issue or related Pull Request, if one exists
N/A
## Description of change
Move `dirs_created` flag assignment before `dir_create_recursive` calls
in `CreateFileW_Hook` to prevent stack overflow. `dir_create_recursive`
calls `_wstat64` (ucrtbase), which internally calls `CreateFileW`,
re-entering the hook before the flag is set. GCC 13 preserved the source
order, but GCC 15 reorders the flag store after the function calls,
causing infinite recursion.
Note: I'm not fully confident the root cause is specific to GCC version
differences. Also, I cannot determine whether this directory creation
hook is truly necessary. Without these directories the game boots but
quizzes won't load, making gameplay impossible. It may be worth removing
this hook entirely, but for now this fix is needed to prevent the crash.
## Testing
Verified title screen transition on LMA-2019022700. Crashes on the
latest build without this fix.
## Link to GitHub Issue or related Pull Request, if one exists
Implements #579.
## Description of change
### Controller Presets
Add a new "Presets" tab to spicecfg that allows users to save, load, and
manage controller binding presets.
#### Save Presets
- Capture all current button, analog, and light bindings as a preset
- "Assign Labels" dialog prompts the user to name each source device
(e.g. "Player 1", "Player 2") before saving
- Device IDs are replaced with these labels, making presets portable
across different machines
- Presets are stored in `%APPDATA%/spice2x/spicetools_presets.xml`
#### Load / Apply Presets
- Preset list shows name, type (Built-in / User), and binding counts
- Apply dialog maps each preset source label to a connected device or
keyboard
- Bindings are applied per-source, supporting multi-device setups (e.g.
two PHOENIXWAN controllers)
#### Edit / Delete Presets
- Rename source labels in saved presets (propagates to all bindings)
- Delete user presets
#### Built-in Presets
- PHOENIXWAN preset for Beatmania IIDX: P1/P2 buttons (1-7, Start,
EFFECT, VEFX), turntable analogs, and button lights
## Testing
* [x] Open spicecfg, go to Buttons tab, verify Presets section loads
* [x] Verify PHOENIXWAN builtin preset appears for Beatmania IIDX
* [x] Save a new preset: confirm "Assign Labels" dialog appears with
device descriptions as defaults
* [x] Apply a preset: confirm source column shows labels, popup does not
shrink
* [x] Edit labels on a saved preset: confirm rename propagates to all
bindings
* [x] Hover over a device source tooltip: confirm vKey shows as number
Fix stale frame returned by capture API on rapid successive calls
> [!NOTE]
> Before submitting code changes...
> * Please do note that this is a GPL v3.0 open source project.
> * Please read the
[CONTRIBUTING](https://github.com/spice2x/spice2x.github.io/blob/main/CONTRIBUTING.md)
guide.
> * Maintainers reserve the right to reject or modify your submission
without reason.
> * No new compiler warnings must be introduced. Check the CI build
results.
>
> Feel free to remove this section after you have read it.
## Link to GitHub Issue or related Pull Request, if one exists
https://github.com/spice2x/spice2x.github.io/issues/582
## Description of change
When using the SpiceAPI `capture` endpoint for taking screenshots, if
you call multiple times in a row in a short period, there's a good
chance for duplicate / stale data to be returned, and you end up with
multiple identical screenshots. This is due to a race condition in the
graphics capture pipeline because the capture data is never reset to
null between invocations.
`graphics_capture_receive_jpeg()` never resets the capture buffer's data
pointer to `nullptr` after consuming it. The condition variable wait
predicate checks `data != nullptr`, so subsequent calls find the
predicate already satisfied and return immediately with the previous
frame instead of waiting for the render thread to produce a fresh one.
Fix: null out `capture.data` after copying the shared_ptr (which keeps
the pixel data alive via refcount) but before releasing the lock.
## Testing
Tested this locally and invoked the capture API 10+ times in a row
without any duplicates. Previously, every other invocation would be a
duplicate, basically.
## Link to GitHub Issue or related Pull Request, if one exists
#578
## Description of change
Use `Clear All` when there are no defaults, and `Reset All` when there
are defaults.
Clearing analogs should reset values to 0.5, not 0.
## Link to GitHub Issue or related Pull Request, if one exists
#576
## Description of change
Add `Reset All` buttons to these tabs which clears out bindings to none
/ default.
For keypads, introduce a special `Use Preset` button which lets users
pick between numpad and top row number keys.
Update UI-visible string used for vKeys, especially the numpad ones
(e.g., `.` is now `Numpad .` to distinguish from the regular `.`
period).
Breaking change: if the user never had `P1 Keypad 00` set, the default
will change from `Enter` to `Numpad -` since both enter keys trigger the
same. This will affect a small number of popn/ddr players. They can just
change it back.
## Testing
*how was the code tested?*
## Link to GitHub Issue or related Pull Request, if one exists
#574
## Description of change
Refactor so that grouping of lights are in common I/O code. Add this to
IIDX/SDVX/DDR/GitaDora.
## Testing
## Link to GitHub Issue or related Pull Request, if one exists
#574
## Description of change
* Add binds for Nostroller
* Update matching logic to ignore common device-side output names like
"Button" "Light" and "LED" (e.g., `Button 1` from a device now matches
on `P1 1`)
* For RGB matching, in addition to `Light R` on the device also try
`LightR` (Nostroller needs this)
* Add a confirmation dialog for `Clear All`
* Address minor bugs
## Testing
Seems to work on arcin, and Nostroller. Still need to retest Faucetwo.
Hopefully I didn't break Phoenixwan.
<img width="784" height="561" alt="image"
src="https://github.com/user-attachments/assets/3ac6bf6d-2ca8-40e5-80ea-b0fd9e080d7b"
/>
## Link to GitHub Issue or related Pull Request, if one exists
n/a
## Description of change
I've always been annoyed with how long it takes to bind controller
lights, made a few improvements
1) added a button+window for automatically matching device lights to
game lights with the same name
2) added button(s) to cycle through all bound lights to visually confirm
location/function
3) added button to clear all bound lights
4) split SDVX lights into sections (Buttons, Valkyrie, Nemsys, Other)
with formatting, sorted based on current game spec
## Testing
Tested with multiple games and controllers (Faucetwo, custom con) and
matching always works if the descriptor strings are labeled correctly.
Not every controller labels their LEDs the same was as spice, but for
those that do this saves a ton of time clicking every box and testing
one by one.
The SDVX table split/formatting is important because myself (and several
friends) have tried binding to Wing/Controller lights and wondered why
they weren't working in game, when they are legacy Nemsys lights instead
of the strip lights handled by Valk/bi2x. I separated the sections
visually, with tooltips, plus sort the two sections based on active spec
to further minimize the chance of someone trying to use the wrong lights
for their game.
## Link to GitHub Issue or related Pull Request, if one exists
related to #154 though this PR doesn't fix it
## Description of change
1. Add an option for cam hook so that the game can be launched without
any camera
1. Rotate image printed out by print-to-file so that it's right side up
(portrait orientation)
## Testing
Able to boot the game without any cameras, and tested printing in test
menu.
"Holo" printing remains broken.
## Link to GitHub Issue or related Pull Request, if one exists
n/a
## Description of change
Hide the ImGui-rendered cursor in the overlay when the mouse is idle for
more than 2 seconds.
## Testing
Tested windowed and fullscreen.
## Description of change
* Show more descriptive error when connection fails (for
`ERROR_WINHTTP_NAME_NOT_RESOLVED`)
* ensure patches are reloaded even if importing fails, since existing
checkboxes get reset
Logic was wrong; caught by compiling with a newer clang and it raising a
warning about the useless expression (since the second clause always
eval'd as true).
Changed to the intended functionality, but I have no ddr3 with p3io so I
can't test it. But it seems nobody ever really noticed this.
- Allow overriding the toolchains so I can avoid changes in my working
tree
- Squash warnings that the deps use, can't just add them as PRIVATE
compile flags because it's in the headers :(
- Squash those d3d9 warnings with a suppression instead of trying to
rewrite 400 lines of code
- Include order and forward decls were breaking button.h because a
declared but not defined struct can't be initiated (honestly this file
was cooked, crazy include order).
- `MAXINT` is GCC specific, `INT_MAX` is portable.
- InterlockedDecrement takes a LONG, not ULONG
- an imgui printf-style call using a direct string instead of %s (let's
ignore the fact that it's actually safe based on how the str is
constructed)
- missing `override` on a virtual subclass
- `CALLBACK` on a lambda threw me for a loop, but I believe moving it
after the arg list is the correct approach (see if it builds on gcc I
guess)
- `std::result_of` was removed in C++20, which the project is built with
## Link to GitHub Issue or related Pull Request, if one exists
Fixes#563
## Description of change
When buttons are presented as NotRange and instead an array of single
buttons, we are calling `HidP_GetUsages` expecting at most one result
back, but in reality we need to expect all possible buttons on that
usage page since `HidP_GetUsages` returns all buttons in the usage page
+ link collection which would be the entire array of buttons - see
documentation for `HidP_GetUsages` on MSDN.
## Testing
Tested with my own controller modifying USB descriptors... more
controller testing is needed.
## Link to GitHub Issue or related Pull Request, if one exists
## Description of change
Introduce a new modal dialog for picking out some of the options to
improve UX.
Implemented a few for now:
1. UI for picking ASIO drivers from a list (for -iidxasio, -sdvxasio,
-asioconvert, etc)
2. Button to generate card numbers for -card0 and card1
3. Processor Affinity selector (very similar to what's in Windows Task
Manager, list of checkboxes)
4. file selector (file open dialog for various file path overrides like
log file)
5. folder selector (folder override)
I wrote a selector for COM ports as well but how we use the value was
inconsistent (\\\\.\\COMx vs. COMx) and didn't see a huge point in it so
I didn't check it in.
## Testing
## Link to GitHub Issue or related Pull Request, if one exists
## Description of change
Deprecate backend conversion options and replace with one unified option
for enabling WASAPI exclusive conversion to ASIO.
The new option takes in a string (ASIO driver name) and when filled out,
it automatically enables the ASIO backend.
This is to avoid confusion that was caused by the previous option - the
fact that it was split into two (one to enable the conversion, another
to optionally pick which ASIO driver to use) and that user needed to
specify an integer as opposed to the driver name.
## Testing
Tested on IIDX33. Old options should continue to work.
## Link to GitHub Issue or related Pull Request, if one exists
#558
## Description of change
Same as #558 but this PR fixes the non-native touch cases (when
wintouchemu is active).
## Testing
Tested 90 and 270 degree rotation, 1080p and 1440p.
## Link to GitHub Issue, if one exists
n/a
## Description of change
Game expects primary monitor to be in 90 deg rotation, and does the
touch calculation accordingly.
If the user does 270 deg rotation ("portrait, flipped") then the game's
touch calculation is flipped upside down. Detect this and provide the
fixed up values in the touch hook.
## Testing
Tested with SDVX in 90 deg, 270 deg rotation, and 1080p, forced 1440p.
## Link to GitHub Issue, if one exists
N/A
## Description of change
Changes the array size used for collecting touch inputs from the API to
be dynamic according to the size of the input data, rather than fixed.
This fixes a crash.
## Testing
An API client was made sending touch states, both valid and invalid
(oversized). The valid states are handled identically in the test menu
while the oversized states no longer crash.
## Link to GitHub Issue, if one exists
#345
## Description of change
When DLL is configured to use TDJ I/O but spice is in LDJ mode, show an
error in LED ticker suggesting the user to turn on `-iidxtdj`.
When DLL is configured to use LDJ I/O but spice is in TDJ mode, show an
error in TDJ overaly suggesting the user to fix the DLL.
Fix a small bug that caused a white window to be created when `-w` is
enabled even when `-iidxtdj` is not, but DLL is using TDJ I/O.
## Link to GitHub Issue, if one exists
n/a
## Description of change
Allow user to specify a custom resolution for the sub monitor, in
addition to the existing refresh rate option
This would allow practically any touch monitor (including ones with
weird resolution / aspect ratio / refresh rate) to be used with
IIDX/SDVX.
## Testing
Tested with various resolution / refresh rate combinations on IIDX /
SDVX.
## Description of change
use case: user with two ICCA readers in a daisy chain configuration (as
is wired in og IIDX/DDR) wanted to play DDR using their existing
equipment.
Existing `reader/` implementation is only designed for a single reader
per com port vs two readers on one daisy chained com port. This can be
implemented and improved at a future date.
Due to time constraints `eamio-icca.dll` from btools did support both
wavepass and slotted in a daisy chain configuration, and spice does
support bt5api calls.
However, the implementation was not sufficient to allow use of both
modules correctly, often stalling, not did it allow the ability to eject
the card.
I have cleaned up the implementation such that it matches the btools
`eamiotest` implementation and allows the user to use decimal to eject
the card as desired.
As well as properly staging the requests for state of the two individual
readers, like `eamio-icca` expects.
## Testing
Tested with both wavepass and slotted (ICCA and ICCB) modules and in
combination with released `eamio-icca.dll` binaries from btools 5.49 as
released by their github using `MDX` as a test subject.
Works as expected and allows end users to use real readers (if they have
them) as virtual readers in spice's emulation layer.
## Link to GitHub Issue, if one exists
## Description of change
Some parts of the UI (e.g., Card tab) rely on early auto detection of
the game, which relies on file hints and not the game code. Two games
(PC and MFG) rely on directory presence and not file presence.
## Link to GitHub Issue, if one exists
n/a
## Description of change
Some people have weird DLLs that keep calling
`AddVectoredExceptionHandler` which ends up spamming the log.
## Testing
Tested IIDX with error + signaldisable to confirm the warning message
being shown, ran Polaris Chord once to check "hook hit" message.
The old pages UI was not intuitive and often led to questions like:
* How do I bind multiple controllers to a single input?? (failure to
discover)
* I have a ghost input that won't go away, how do I fix this? Is this a
bug? (non-intuitive UI - there are too many pages and finding out where
each binding is potentially requires scrolling through 100 pages)
* Potential perf issue - user binds too many by accident, or puts
bindings all the way in page 99, requiring us to walk each element in
the vector, wasting precious CPU cycles during an input poll.
This PR removes the multiple pages, and puts everything on a single
page, showing multiple binds in a tree structure.
It also puts a hard limit on how many alternate bindings can be made (8
for buttons, 16 for lights), though if the user has configured more in
older version they will be respected.
## Link to GitHub Issue, if one exists
#0
## Description of change
Occasionally we would read a bad "vKey" for an analog axis and end up
accessing invalid memory (beyond the size of a vector) and potentially
crash or read junk values.
## Testing
Fixed based on minidump, this was a rare repro though.
* Make a custom widget for truncated text that shows a tooltip only when
truncated
* Use the above widget more consistently in various places
* Ensure tooltips still show even when the preceding widget is disabled
## Description of change
Three bugs:
* Some keys are IME-dependent. Right Alt can be IME mode switch for
Japanese / Korean, and Right Ctrl is often the Kanji button.
* If you press modifiers like Ctrl during bind-many-naive, it will skip
over a button, because of broken for loop logic that ends up calling
`inc_buttons_many_index` too many times
* trying to cancel out of bind-many-naive with left and right mouse
buttons swap doesn't work
## Testing
Validating various IME. I don't have a keyboard in another language
though..
Doing dumb things and building inside a path that contains spaces.
Quoted the relevant bits in the build script (and a couple more
shellcheck brought up that realistically won't ever be an issue, but the
squigglies annoy me.
## Description of change
* Add a red `x` button to replace `Clear` button in binding tabs
(Buttons/Analog/Lights).
* Add a gray `x` button to replace `Clear` button in options tabs next
to input widgets
* Add helper for truncating text and adding ellipsis (...) to deal with
text overflow in tables.
* Reword some UI text for clarity
## Link to GitHub Issue, if one exists
n/a
## Description of change
Improper bounds check resulting in crash when binding mouse buttons
beyond Mouse 5.
## Testing
Tested with `Edit` function.
## Link to GitHub Issue, if one exists
n/a
## Description of change
For buttons and lights, it's possible to have multiple alternatives.
When you create alternatives and then clear then, the config files
continue to have stale entries. This is because alternatives are stored
in a vector and elements are never deleted when unbound; they get
written out to the XML on modification.
These stale XML entries live forever, and get loaded on next startup of
spice.
This PR fixes that by deleting stale entries - basically, XML nodes will
be kept only until the last valid node (properly bound button or light),
trimming the trailing invalid entries.
## Testing
Manual testing, validating XML.
## Link to GitHub Issue, if one exists
n/a
## Description of change
Disable all window options that change dimensions or position as they
cause problems with touch overlay in windowed mode. Always On Top is the
only thing that's still possible.
## Testing
## Link to GitHub Issue, if one exists
n/a
## Description of change
Before this PR, drums were in the order they appear in test menu.
This is really confusing. Change it so that they appear in the order
they do in default drummania layout.
## Testing
validated manually in gw
## Link to GitHub Issue, if one exists
n/a
## Description of change
Need to filter out system-created windows (such as `CicMarshalWnd`) when
looking up which window to mess with when user interacts with F11 menu.
While I'm here, clean up the hack for gfdm arena model that remembers
the main window.
## Testing
Tested:
DDR
gfdm arena 4 / 1 window modes
iidx (windowed mode, with/without nosub option)
sdvx with sub windows
Need to check:
full screen games
## Link to GitHub Issue, if one exists
n/a
## Description of change
Gitadora (pre-Delta) tends to soft lock, have graphical issues (menu bg
render as black), or take a long time (minutes) between scene
transitions when window is resized.
## Link to GitHub Issue, if one exists
n/a
## Description of change
Adds an option to pick from four algorithms for guitar picking input.
The default behavior is being switched from legacy (rising edge only,
always 1 frame of input) to SOCD "prefer recent" algorithm. This makes
it slightly easier to navigate the menu with the guitar.
## Testing
Validated gw, gwdelta, and sdvx just in case.
## Link to GitHub Issue, if one exists
n/a
## Description of change
Before this change, if user changes `dest`/`spec`/`rev`, then the "auto
enable patches" settings doesn't get loaded. This is because the patch
manager config file relies on having an exact match of
`model+dest+spec+rev+ext`.
This causes a lot of confusion for:
* people who edit prop files - e.g., to switch between sdvx nemsys/valk
cab modes - and forget to re-enable patches
* people who use batch scripts to change xml files on launch - e.g., for
gitadora, omnimix, etc - even if they checked auto-apply in spicecfg,
when they use the batch script to launch the game, the setting won't be
loaded
This PR solves this by just ignoring the `dest`/`spec`/`rev` fields when
checking if patches should be auto applied on launch. Yes, this may
cause false positive cases, but probably very unlikely, and it's pretty
harmless anyway.
For future consideration: should we fix up gitadora XG disparity (K32 vs
K33 etc)?
## Testing
Manually validated
## Link to GitHub Issue, if one exists
n/a
## Description of change
Add plug&play hooks for RGB camera in DRS.
## Testing
Seems to work with my crappy Logitech C270
Camera options (brightness etc) seem to work in test menu as well).
Tested by another user with realsense camera + logitech camera, both
cams were detected correctly.
## Link to GitHub Issue, if one exists
similar issue as #499
## Description of change
Fix broken bi2x_hook implementations that did not properly allocate I/O
buffers with correct sizes.
People keep copy-pasting other implementation that allocate 0 bytes of
memory, but we run the risk of memory corruption or/or game crashes if
we keep doing this.
We've seen some mystery crashes with CCJ for example, maybe this will
fix that.
While I'm here, implement SOCD cleaner for Polaris Chord.
## Testing
Tested I/O menu with CCJ, play through tutorial (didn't test matches)
Tested GWDelta (test menu and a few songs in guitar)
Tested PC (played a credit)
Tested QKS (still can't get past the title screen)
## Link to GitHub Issue, if one exists
Fixes#341
## Description of change
fix monitor auto-rotate for reflec beat
## Testing
Tested KBR, LBR, MBR (volzza2), MBR (reflesia)
## Link to GitHub Issue, if one exists
#477
## Description of change
Just like the old `sys_code_get_cmdline`, override command line
parameters in `app-config*` so that we can control windowed mode / full
screen.
## Testing
Tested both GF and DM.
Technically both games can boot into the correct mode using `-d -DM` but
we'll try to use the right one just in case.
## Link to GitHub Issue, if one exists
#477
## Description of change
This is a work in progress.
What works:
- [x] subscreen overlay shows the touch screen image (in windowed mode)
- [x] touch works in the overlay
- [x] only the main window is shown, other windows are not launched
What doesn't:
- [ ] game occasionally crashes when entering test menu?
- [ ] full screen mode is not tested at all due to monitor requirements
- [ ] need more polish (various options to control the behavior)
## Description of change
Add coin handling to SDVX BI2X. I also tried to populate the structs as
best I could.
## Testing
Tested via running spice2x on EG final, using F1 to insert coins.
## Link to GitHub Issue, if one exists
Fixes#512
## Description of change
Fix digital wailing not being recognized consistently.
Also address the fact that wailing was completely broken when lefty mode
was on. This requires a new option that the user needs to check off in
the configurator since we can't magically guess if the user is holding
the guitar in lefty mode.
- [x] fix downward wail
- [x] digital lefty mode
- [x] implement all of this for arena model i/o
- [x] test dx cab 2p
- [x] lefty toggle in overlay
- [x] fix analog not working for 2p guitar
- [ ] analog lefty mode?
## Testing
Checked GW and GW Delta
## Link to GitHub Issue, if one exists
Fixes#509
## Description of change
Implement `WrappedIAudioClient3`.
For now, we have only seen SDVX use it (EG final) and only when the
shared mode patch is enabled. Exclusive still goes through version 1.
This means that for V3 we can forego implementing backend conversion
logic (for now).
Only significant addition is `InitializeSharedAudioStream` and this IS
called by SDVX when shared mode patch is enabled.
## Testing
Tested EG final, tested year 1 data, also IIDX shared/exclusive wasapi.
## Description of change
Add an option that forces requested refresh rate value for the second
monitor; i.e., instead of 60Hz allow the user to override the adapter to
be 70Hz.
Useful for people who have a touch screen that can't do 60Hz.
I don't know if this would cause any timing issues in IIDX or SDVX, but
it seems to boot and monitor check is unaffected.
## Testing
Tested TDJ And UFC mode with a submonitor that can only do 61Hz.
## Link to GitHub Issue, if one exists
n/a
## Description of change
Use fmt library for formatting time
Round down sub-second units so that the FPS counter only updates once
per second (instead of Time and Uptime ticking independently)
clean up usage of `localtime` in `logging.cpp`
## Link to GitHub Issue, if one exists
Regressed by #401
## Description of change
Two things from testing SDVX Live2D -
1. ColorFill is almost always too expensive and will lead to drops
1. Scale factor of 0.5 causes GPU to sync and causes drops
(ARGB/XRGB doesn't matter, linear filtering doesn't matter)
1 is fixed by removing ColorFill calls on every frame - instead only do
this once when the user changes the duplicate option (on the next frame)
2 is fixed by updating the UI (limit the slider) though people can
ctrl+click to override these slider limits.
The warning label will be kept with slightly reworded text.
## Testing
tested in sdvx eg final (sudden death) - on my RTX 4070, my FPS is rock
solid 120 fps even with image resize on now.
## Link to GitHub Issue, if one exists
#345
## Description of change
Turn existing warnings for DDR codec issues into deferred error
messages.
## Testing
Tested DDR World with faked codec issues.
## Link to GitHub Issue, if one exists
n/a
## Description of change
Turning on Image Resize feature completely tanks performance of Live2D
in some SDVX songs. Add a giant warning next to the UI.
On my system with RTX 4070, Sudden Death is normally a rock solid
120FPS, but drops to 30-40FPS when resizing is on.
* linear filter does not affect this at all
* window resize options also have no effect
It's really just rendering on a larger surface + calling `StretchRect`
that does this.
Additionally, hide the resolution swap option since it sees very low
usage & has potential gotchas likes this.
## Link to GitHub Issue, if one exists
n/a
## Description of change
Apply SOCD cleaner algorithm to deal with the case where both
counter-clockwise and clockwise buttons are pressed at the same time.
In SDVX, default algorithm is to prefer the most recently pressed
direction. This is better for dealing with slams in rapid succession,
for example, as you don't have to completely let go of one direction to
hit the other now.
In IIDX, default algorithm is neutral (same behavior as before). Using
last or first algorithm results in double scratches which means you'll
likely end up with an excessive poor after hitting a scratch, so neutral
is actually beneficial. Besides, if you are serious about playing on the
keyboard, you should be using `TT +/-` and `TT +/- Alternate`.
## Testing
Tested SDVX 3, EG (old cab), EG valk cab modes, IIDX 24, 27, 33
(tdj/ldj)
## Link to GitHub Issue, if one exists
see my previous attempt #496, which has been reverted by #500
## Description of change
Two issues:
1. the original implementation of bi2x_hook for iidx misunderstood what
`aioNMgrIob2_Create` does. In the original I/O code it returns a pointer
to a C++ class instance, which would also have a vptr (pointer to a
vtable) in the beginning. The original author of this code of the hook
in spice thought that `aioNMgrIob2_Create` returns a pointer to a
pointer. This may happen to work but it's not 100% accurate, so this has
been fixed by separating out the class and the vtable allocation.
Without this, the game could have accessed memory outside this buffer.
2. And then the SDVX implementation blindly copy-pasted the IIDX
`bi2x_hook`. Along with the issue above, they also forgot to check the
I/O DLLs to see how much memory needs to be allocated and change that.
Instead, they kept the same value as IIDX, which was too small. Fix that
as well.
## Testing
Doing some extensive testing with IIDX (27-33) and SDVX versions (EG).
## Link to GitHub Issue, if one exists
n/a
## Description of change
Both games take the address returned by `aioNMgrIob2_Create` and reads
values offset from that address as part of the I/O routine. This means
that the I/O routines of these games have been accessing random
variables in data/bss segments for years, they just happened to get a
value that doesn't lead to a crash.
Stumbled upon this while trying to add a new feature that required
adding more globals, but suddenly the game stopped polling I/O when I
changed a value of my global. Scary.
## Testing
Tested both games I/O
## Link to GitHub Issue, if one exists
#477
## Description of change
Add a new option for scaling the overlay.
Gitadora Arena will receive 250% by default.
Various overlay windows have been updated to scale properly, not perfect
but they are at least usable.
## Link to GitHub Issue, if one exists
#477
## Description of change
F11 menu (window settings) did not work for arena model because the game
engine races to create many windows, so our logic of grabbing the first
window created doesn't always get the main window.
## Testing
## Link to GitHub Issue, if one exists
#477
## Description of change
Add lights for J region cab. I can't figure out how the extra lights on
U region cab are wired up.
## Testing
Tested guitar and drums, J and U regions.
## Link to GitHub Issue, if one exists
n/a
## Description of change
Get rid of log messages when adapter modes are removed, since these have
never been all that useful.
## Link to GitHub Issue, if one exists
n/a
## Description of change
Make the text color cyan to make the messages stand out.
## Testing
Verified in terminal.
## Link to GitHub Issue, if one exists
n/a
## Description of change
SDVX EG final started to pick an ASIO driver at random and tries to open
it, which causes crashes / hangs if the driver is not compatible
(ASIO4ALL in particular)
Only allow the game to access `HKLM\SOFTWARE\ASIO` if the user has a
Xonar AE, or if ASIO was configured using -sdvxasio.
## Testing
Tested year 1 data and EG final.
## Link to GitHub Issue, if one exists
#477
## Description of change
Plumb through headphone jack detection. Touch screen menu for headphone
volume lights up.
## Testing
Tested guitar.
## Link to GitHub Issue, if one exists
N/A
## Description of change
in current implementation j32d analog values are not encoded properly,
values are supposed to go up to 1023, but they show up as 771 in game
## Testing
tested with M32-007-2025092400, used DM PAD CALIBRATION menu
## Link to GitHub Issue, if one exists
N/A
## Description of change
prevents the game from creating folders on F: drive
## Testing
tested with M32-007-2025092400
## Link to GitHub Issue, if one exists
#477
## Description of change
Fix Japanese text broken in the game UI when system ACP is not
SHIFT-JIS.
## Testing
Checked song select and in-game title display.
## Link to GitHub Issue, if one exists
#477
## Description of change
Add analog and digital wail for the arena model guitar.
Fix the picking code to be the same algorithm as extdev - detect rising
edges and insert 1 frame of input.
## Testing
Tested x/y/z and digital y up/down. Only Y gets used in game though.
## Link to GitHub Issue, if one exists
Fixes#479
## Description of change
When p3io / p4io is in use with Gold Cab spec, use the old init code.
## Testing
Verified p3io / p4io / bio2 booting with 2024040200.
## Link to GitHub Issue, if one exists
#477
## Description of change
Arena cab has two sound cards and it uses `WrappedIMMDeviceCollection`
to set the volume to 100% on boot on both, instead of the typical
`GetDefaultAudioEndpoint`.
## Testing
Testing Delta, testing other games as well as they are affected.
## Link to GitHub Issue, if one exists
None
## Description of change
- Added bi2x_hook
- Added J32D (drum) and J33I (guitar) emulations
- AMI2000 card reader (this game uses this instead of ICCA)
## Testing
Played through a 15-minute session on Drummania.
Guitar mode works with keyboard input.
## Link to GitHub Issue, if one exists
None
## Description of change
Increase the heap size for GITADORA games.
Later releases of GITADORA attempt to allocate a block of memory (size
of 0x7ECF78) for notes_info.xml but fail due to heap size being too
small, leading to HDD ERROR 5-1502-0008.
## Testing
Tested with current and previous GITADORA releases.
## Link to GitHub Issue, if one exists
https://codeberg.org/nixac/spicetools/issues/4
## Description of change
Inspired by the Linux issue above in the fork, cache lstat calls for
thumbnail. IIDX 32 and 33 make a call for this every frame which can
cause significant overhead on Linux.
This is being enabled for all versions and not just the Linux variant of
the executables since it provides some marginal performance gain on
Windows.
## Testing
Tested IIDX 32/33, with the option on/off, and with AVS verbose logging
on/off.
Tested with ifs_layeredfs hook as well just to verify functionality.
## Link to GitHub Issue, if one exists
#345
## Description of change
If TDJ / VM mode is active AND user is enabled `-monitor` option (and
the value isn't 0, the primary monitor)
then disable the subscreen overlay, show an error message instead.
We're doing this because both games cannot accept emulated touch input
if `-monitor` option is in use. There is not much point in displaying
the second screen's image, other than to REALLY confuse people when
nothing happens when they click on it.
## Testing
Tested both games with `-monitor`.
## Link to GitHub Issue, if one exists
#345
## Description of change
For IIDX31+, detect if BI2A or BI2X I/O emulation becomes active, and
see if there is a mismatch between the -iidxtdj setting.
Right now a mismatch results in warning in log + deferred error log, but
in the future we could turn this into a fatal error and crash the game
to make it more obvious.
## Testing
Tested 4 combinations:
1. DLL in LDJ mode + -iidxtdj off (pass)
2. DLL in LDJ mode + -iidxtdj on (error)
3. DLL in TDJ mode + -iidxtdj off (error)
4. DLL in TDJ mode + -iidxtdj on (pass)
## Link to GitHub Issue, if one exists
#345
## Description of change
In the main menu (Esc key), instead of just saying `Show subscreen`,
detect game and say `Show TDJ Subscreen` `Show LDJ LED Ticker` etc.
For the LED ticker window, show the title bar by default, and add an
option to hide it back.
This is to help with cases where people get stuck with being in LDJ mode
when they meant to turn on TDJ.
## Testing
Tested all configurations (IIDX LDJ/TDJ, SDVX UFC, DRS)
## Link to GitHub Issue, if one exists
#452
## Description of change
Added `Sleep(4)` call to regulate how fast the `device_io` function will
call `getState` for each button. The panel buttons were commented out
because those are handled by the MDXF Control Status Buffer functions
anyways, so the work was redundant. It's also why the timing precision
from this function doesn't matter, so it can afford a longer sleep
## Testing
- Verified IO still functions properly
- Verified decrease in overall CPU usage
## Link to GitHub Issue, if one exists
#452
## Description of change
* Split the MDXF I/O option into three: auto, thread, and backfill.
`auto` is the same as what `thread` used to be before this change (based
on I/O poll rate), but `thread` now always forces thread poll mode.
`auto` is the default (behavior wise, same as before)
* For the poll rate measurement, start polling after 20s mark to avoid
frame drops during game boot
* Minor code clean up
## Testing
manual test in windowed + full screen
## Description of change
Extension of #460
An option was exposed to `spicecfg` (`P4IOBufferMode`) for toggling
between the Thread and Backfill buffer fill implementations from the
prior PR.
## Testing
- Verified the option properly toggled between the two implementations
## Link to GitHub Issue, if one exists
n/a
## Description of change
When touch monitors send touch area size information
(`TOUCHEVENTFMASK_CONTACTAREA` flag and `cxContact` / `cyContact` fields
of `TOUCHINPUT` struct) from `GetTouchInputInfo`, IIDX gets confused and
does some unexpected things when interacting with the subscreen.
As a workaround, hook `GetTouchInputInfo` and clear out the flag &
values.
This is only done for IIDX AND when -iidxnativetouch is on.
## Testing
Tested on a Dell touch monitor, simulating "bad" values.
## Link to GitHub Issue, if one exists
#452
## Description of change
(Another extension of #450)
Merged the old threading implementation into the current backfill
implementation because it was showing signs of having slightly better
timing performance. The following description is taken from the
strikethrough text from the referenced PR above:
>When the module is booted, it counts how many times
ac_io_mdxf_update_control_status_buffer was called in the first three
seconds, then calculates the approximate refresh rate of the current
game instance. If the refresh rate is under THRESHOLD_REFRESH_RATE
(120Hz), a low-priority thread dedicated to inserting polls into the
ring buffers is started and run at THREAD_REFRESH_RATE_HZ (125Hz).
Combined with the polls inserted by the main arkmdxp4 thread and
rawinput real-time events, the 125Hz update cadence is enough to bring
the span of poll history represented by the ring buffers closer to
parity with what arkmdxp4 expects.
The default mode is `THREAD_MODE` but can be switched to `BACKFILL_MODE`
(which could possibly be made as a `spicecfg` option).
There was also a fixed bug in the `ac_io_mdxf_get_control_status_buffer`
function, which should not have been writing to the `head` pointer. This
was allowing for an edge case situation where the `head` pointer was
advanced in another thread then rewound back to the previous `head` in
this thread. The real implementation only reads the pointer and returns
it.
## Testing
- Logged the ring buffer states after many iterations and verified
regular structure
- Same playtesting as the prior PRs
## Link to GitHub Issue, if one exists
Related to #458
## Description of change
Truncate text if button's identifier string might overflow the popup
dialog width
## Testing
## Link to GitHub Issue, if one exists
n/a
## Description of change
This would save a handful of instructions at best but it was bothering
me
## Testing
Tested with two controllers + naive with ddr
## Link to GitHub Issue, if one exists
#452
## Description of change
- Extension of #450
- Moved the call to `arkGetTickTime64()` outside the update function to
bring the timestamps closer to real-time
- Changed the update function to only call `getState()` if called from
`rawinput`, otherwise just fill the ring buffer entries with the last
known state
- Changed the update function to only write one ring buffer entry if
called from `rawinput`
- Moved the call to `mdxf_poll()` within `rawinput.cpp` outside the loop
that iterates over all devices
## Testing
- Logging was done to verify the span of poll history covered by each
request for 7 ring buffer entries was ~28ms, as the game expects
- Observed some improvement in timing precision since the prior
implementation
## Link to GitHub Issue, if one exists
n/a
## Description of change
`acmFormatSuggest` is known to cause significant perf issues on Linux;
add a hook to return cached results.
The fix is only active in the Linux variant.
For discussion, see
* https://codeberg.org/nixac/spicetools/issues/2
* https://codeberg.org/nixac/spicetools/issues/4
## Testing
I've only tested this on Windows, checking if iidx and popn can boot,
play songs without audio issues.
## Link to GitHub Issue, if one exists
n/a
## Description of change
In cases where the subscreen overlay window does not have anything to
show (either via misconfiguration or an error), ensure that the window
border is shown with the close button. Additionally, add a small button
to close the dialog to help the user.
## Testing
manual validation
## Link to GitHub Issue, if one exists
n/a
## Description of change
If `SCardGetStatusChange` returns `SCARD_E_SERVICE_STOPPED`, stop
polling.
Add some sleep if it fails for other reasons to prevent busy loops.
## Testing
Tested with ACR122U reader.
## Context
While testing the emulator on 60Hz for a while, I noticed there was a
pretty consistent timing bug with steps that had quick releases in
between them (mainly footswitches and sometimes jacks). As mentioned in
my previous commits, `arkmdxp4` determines press/release times for steps
based on a 7-poll history on every frame, which is normally populated at
~250Hz from the MDXF board in `libacio2`, yielding around 28ms of
polling history. When emulated, this is instead being populated
internally from `arkmdxp4` once per frame, meaning the 7-poll history
could have up to `1000/60 * 7 = 117ms` worth of step history at 60Hz. In
the case of a footswitch/jack, if you account for the real-time press
and release event that's inserted from `rawinput` during that time,
there'd actually be up `1000/60 * (7-2) = 83ms` worth of step history.
This is still a large enough window of time for `arkmdxp4` to start
confusing older on-state polls with more recent ones. Here is a real
ring buffer I logged when I reproduced the bug:
```
Frame #6: 82ms | 1
70ms | 1 <- rawinput real-time press
Frame #5: 66ms | 0
Frame #4: 49ms | 0
Frame #3: 34ms | 0 <- rawinput real-time release (coincided with frame update)
Frame #2: 16ms | 1 <- stale "held" poll
Frame #1: 0ms | 1 <- stale "held" poll
```
When `arkmdxp4` determines that a new press event occurred, it uses the
timestamp of the oldest on-state poll in the ring buffer as the press
time. In this case, it uses time 0ms instead of the correct 70ms,
resulting in the game thinking the player stepped 70ms before they
actually did. For reference, that same ring buffer snapshot would've
looked like this in the real implementation:
```
Frame #6: 82ms | 1
78ms | 1
74ms | 1
70ms | 1
Frame #5: 66ms | 0
62ms | 0
58ms | 0
```
The correct time 70ms would be assigned to that step in this case. This
demonstrates the importance of keeping the ring buffers filled with only
recent poll history, closer to the threshold of around ~28ms that the
real implementation expects.
## Description of change
~~When the module is booted, it counts how many times
`ac_io_mdxf_update_control_status_buffer` was called in the first three
seconds, then calculates the approximate refresh rate of the current
game instance. If the refresh rate is under `THRESHOLD_REFRESH_RATE`
(120Hz), a low-priority thread dedicated to inserting polls into the
ring buffers is started and run at `THREAD_REFRESH_RATE_HZ` (125Hz).
Combined with the polls inserted by the main `arkmdxp4` thread and
`rawinput` real-time events, the 125Hz update cadence is enough to bring
the span of poll history represented by the ring buffers closer to
parity with what `arkmdxp4` expects.~~
EDIT: The prior thread implementation was replaced with new logic that,
on each call to the update function, backfills the ring buffer with
entries representing the last known state of the controller. For
example, given the ring buffer with a single entry:
```
0ms | 0
```
When the update function is called on the next frame at 60Hz, the
function will insert intermediate entries as "padding" before updating
to its current state:
```
16ms | 1 <- state at current frame
12ms | 0 <- "padding"
8ms | 0 <- "padding"
4ms | 0 <- "padding"
0ms | 0 <- last known state
```
## Considerations
~~In the future, it might be worth exploring a route that interpolates
polls instead of relying on a thread for inserting polls (in other
words, creating intermediate poll entries based on the known real-time
press and release events from `rawinput`). For example, if `rawinput`
reported a press at time 10ms and a release at time 30ms, it's known
that any poll in between those times would report an on-state for that
arrow. However, considering this would involve adding multiple entries
per call (for times in the past) and how the update function can be
called from two separate threads, it may be introduce hard-to-debug edge
cases and add unnecessary complexity overall.~~
EDIT: Implemented
## Testing
~~-Verified the thread was inserting polls at the expected cadence
-Verified the thread is only created when the game's refresh rate is
below the threshold
-Verified the thread introduced no significant increase in CPU~~
- Verified the entries were being backfilled correctly on several
different refresh rate instances
- Verified the bug could no longer be reproduced
## Link to GitHub Issue, if one exists
#345
## Description of change
Most games will fail show a network error if there is no network adapter
with a valid IPv4 address
Detect this case in netfix code and show a warning message in log +
deferred error message.
## Testing
Tested with no network adapters, with IPv6 only adapter, and a
disconnected NIC.
## Context
In the real implementation of `ac_io_mdxf_update_control_status_buffer`,
it doesn't actually add entries to the pad state ring buffers (it only
marks the head entry as the "last consumed" entry), and `arkmdxp4.dll`
expects the ring buffers to be updated at regular intervals inside
`libacio2.dll` at ~250Hz per player. Instead, in the emulated version,
the updates happen in this function and that regular interval is
established internally using the game's refresh rate (60Hz, 120Hz,
144Hz, etc.). This effectively locks the polling rate of pad input to
that refresh rate, which is quite low for pad input.
## Description of change
The polling rate lock was circumvented by calling
`ac_io_mdxf_update_control_status_buffer` as soon as the game receives
controller input in `rawinput.cpp`. A simple wrapper function
`mdxf_poll` was exposed so press and release events could be added to
the ring buffers in real time as they happen. After each controller
event in `rawinput.cpp`, `mdxf_poll` calls
`ac_io_mdxf_update_control_status_buffer` for each player, checking the
pad's current state and adding it to the ring buffer if it's changed
since the last call. This results in the 0 -> 1 (press) and 1 -> 0
(release) state transitions used for gameplay to be based only on the
real-time events inserted from `rawinput.cpp`, while leaving the rest of
the entries generated from the main `arkmdxp4.dll` thread as "padding"
the game expects (I actually tried reducing the ring buffers to *only*
write entries on state transitions, but it broke gameplay, which means
the game still depends regular reporting of the pad state). Here's an
example of how a ring buffer would look if an arrow was pressed at some
time 32ms (assume 165Hz game refresh rate, ~6ms updates):
```
Old (only frame updates):
1 | 36ms
0 | 30ms
0 | 24ms
0 | 18ms
0 | 12ms
0 | 6ms
0 | 0ms
```
The game only sees the press event at time 36ms on frame update, so time
36ms is assigned to the press time of that arrow (4ms later than the
real press time).
```
New (frame updates + event updates from rawinput.cpp):
1 | 36ms
1 | 32ms <- from rawinput.cpp
0 | 30ms
0 | 24ms
0 | 18ms
0 | 12ms
0 | 6ms
```
The game sees the real press time 32ms on frame update, so the correct
press time 32ms is assigned.
## Testing
- Played on various refresh rates and verified the controller input
remains highly responsive.
- Inspected the ring buffers with a debugger and verified entries for
press and release events from `rawinput.cpp` were correctly being added
for their respective players.
## Link to GitHub Issue, if one exists
#442
## Description of change
Adds a new option that intentionally fails the recording functionality.
## Testing
Tested on iidx32.
## Link to GitHub Issue, if one exists
fixes#442
## Description of change
New NVIDIA driver update (591.44) dropped support for older NVENC API.
Specifically,
* TDJ uses `NV_ENC_PRESET_HQ_GUID` but this is no longer supported; must
be swapped with new encoder presets
* `NvEncGetEncodePresetConfig` does not take new encoder presets, the
-Ex version must be used
All of this happens because bm2dx.dll takes code from an older NVENC
sample.
To address this,
* Install additional hooks for NVENC API
* Hijack calls to `NvEncGetEncodePresetConfig` and instead swap with
`NvEncGetEncodePresetConfigEx` (only if the initial call fails, which is
how we detect old vs new driver), replacing `NV_ENC_PRESET_HQ_GUID` with
`NV_ENC_PRESET_P4_GUID` and `NV_ENC_TUNING_INFO_HIGH_QUALITY`
(functionally equivalent according to NVIDIA docs -
https://docs.nvidia.com/video-technologies/video-codec-sdk/11.1/nvenc-preset-migration-guide/index.html)
* When calling `nvEncInitializeEncoder`, hijack and swap in the preset
GUID again.
## Testing
Tested on 591.44 driver on a RTX 4070.
The resulting videos were compared as well, and they are practically
identical from encoder perspective.
## Description of change
In the real `libacio2.dll` implementation,
`ac_io_mdxf_get_control_status_buffer` returns the ring buffer entry at
`(head - index) mod size` but this function was using `(head + index)
mod size` instead. Basically, `index` is supposed to indicate how many
entries back, not forward. This was causing the polling history of each
player to be returned backwards. A few other things were updated to
bring the function's behavior closer to the real implementation:
1. Number of ring buffer entries per player were increased to 16 (this
is the size of them in the real implementation)
2. `ac_io_mdxf_get_control_status_buffer` now returns the current head
of the ring buffer (instead of a success/failure boolean), which is what
`arkmdxp4.dll` expects.
## Testing
I played a few songs to make sure nothing was broken. I also attached a
debugger and verified the ring buffer entries are *actually* now being
returned in reverse chronological order as intended.
## Description of change
In its current state, the emulated `libacio2.dll` functions
`ac_io_mdxf_get_control_status_buffer` and
`ac_io_mdxf_update_control_status_buffer` only operate using a single
head pointer (`COUNTER`) for the ring buffers of
`[panel_state,timestamp]` (simplified for brevity here) polls for both
players, when they should be maintaining a separate head pointer for
each ring buffer. On every frame, `arkmdxp4.dll` makes calls to
`ac_io_mdxf_update_control_status_buffer`, which [in this emulated
version] advances the head pointer, creates a new entry for the latest
panel state info along with the current time, and stores it at the head
of the ring buffer. This function is called for each player: After the
call for 1P, the head pointer is advanced by 1, so by the time it's
called for 2P, the head pointer had already been advanced by 1, meaning
the new entry for 2P's panel state ring buffer is written two entries
ahead of where the last entry for 2P was written. This is an example of
how the entries were written for each ring buffer:
```
Frame 1:
1P[0] = t0
2P[1] = t0
Frame 2:
1P[2] = t1
2P[3] = t1
Frame 3:
1P[4] = t2
2P[5] = t2
Frame 4:
1P[6] = t3
2P[0] = t3
...
Frame 7:
1P[5] = t6
2P[6] = t6
Frame 8:
1P[0] = t7
2P[1] = t7
```
This is an issue because `arkmdxp4.dll` calls
`ac_io_mdxf_get_control_status_buffer` on every frame to load the last 7
polls for each player, which depends on the ring buffer entries being in
reverse chronological order to properly determine when an arrow is
pressed and when it was released, but this is what it sees from the ring
buffers after 8 frames:
```
1P: t7 -> t3 -> t6 -> t2 -> t5 -> t1 -> t4
2P: t7 -> t3 -> t6 -> t2 -> t5 -> t1 -> t4
```
In this case, `arkmdxp4.dll` assigns step times based on polls that are
out of order, resulting in unpredictable timestamp assignment to each
step, with the issue compounding at lower framerates since the timestamp
deltas between each poll will be greater (see side note). After
implementing two separate head pointers for each ring buffer, those same
two arrays become:
```
1P: t7 -> t6 -> t5 -> t4 -> t3 -> t2 -> t1
2P: t7 -> t6 -> t5 -> t4 -> t3 -> t2 -> t1
```
This is how `arkmdxp4.dll` expects this data to be structured, so timing
should become more consistent after this change.
Side note: in this particular p4io implementation, the only place the
polls are updated is once per frame on the calls to
`ac_io_mdxf_update_control_status_buffer`, meaning the polling rate of
the controller used is locked to the framerate of the game. There should
be another thread not tied to the main one that listens to input from
the OS and updates these ring buffers on a much faster cadence.
## Testing
I played a few songs to make sure nothing was broken. I also attached a
debugger and verified the ring buffer entries are now being returned in
reverse chronological order as intended.
## Link to GitHub Issue, if one exists
#345
## Description of change
Add some descriptive error message for the case where we couldn't find
softid in prop files.
## Testing
manual
## Link to GitHub Issue, if one exists
n/a
## Description of change
Currently when 'bio2' specified on 'io' parameter of app-config the game
crashed due to security code check.
These codes changes security code to corresponding one and adds fake
BIO2 entry to satisfy BIO2 check.
## Testing
Tested with MDX-003 and J:I:B ident.
The game boots and A3 now displays gold cab theme and displays MATCHING
GROUP, MATCHING SIDE on NETWORK OPTIONS test mode menu.
## Link to GitHub Issue, if one exists
n/a
## Description of change
Add the raw device handle string to tooltip.
Add `Reset` button that clears all values.
## Testing
manual testing
## Link to GitHub Issue, if one exists
Fixes#432
## Description of change
Newer versions of iidx33+ reintroduces `SOUND_OUTPUT_DEVICE` env var.
iidx module must account for its return
## Testing
## Link to GitHub Issue, if one exists
#345
## Description of change
Warn user via warning message in log + auto-troubleshooter entry when
-monitor option is used in full screen with TDJ and UFC mode.
This covers yet another case where TDJ subscreen does not respond to
mouse clicks (because the game expects them to come through the primary
display). For UFC, -monitor usually results in a failure to create DX
adapter.
## Testing
Manual verification with TDJ/UFC modes and two monitors.
## Link to GitHub Issue, if one exists
For #345
Similar idea as https://github.com/spice2x/spice2x.github.io/pull/350
## Description of change
Disable camera access by default by setting `CONNECT_CAMERA` environment
var to 0 before launching. This was one of those "required" things
people clicked on, but now it's done automatically to reduce friction
for new users.
On cab setups (i.e., running without -iidx module), cameras will remain
on, unless user overrides it.
On franken setups (partial I/O) - user will need to specify what they
want via the new option, we can't guess correctly.
## Testing
## Link to GitHub Issue, if one exists
n/a
## Description of change
Combo boxes for options were not highlighting the currently selected
item. Also, when there were no description provided for an option, it
was still showing the empty `()` in the selected value.
## Testing
## Link to GitHub Issue, if one exists
n/a
## Description of change
HG cabinet uses wintouch and it requires TOUCHEVENTF_PRIMARY flag in
order to accept touch inputs.
Added wintouchemu on game hook and TOUCHEVENTF_PRIMARY flag on
wintouchemu.
## Testing
The game boots into test menu, touch now works. (tested in I/O TEST ->
TOUCH PANEL CHECK with '-s' flag)
TDJ subscreen overlay and nostalgia seems works fine regardless added
TOUCHEVENTF_PRIMARY flag but more testing required.
## Description of change
To redirect confused users why no one is developing a remote patch
server for PolCho
## Testing
checked spicecfg in working vs non-working games
## Link to GitHub Issue, if one exists
Fixes#393
## Description of change
- Fixes compatibility with IIDX 33
- Adjusts the pattern scan for "hook A" to be compatible with IIDX 27
- Refactors texture replacement to use Camera::CCameraManager2, removing
the need for a second hook
Related: https://github.com/aixxe/2dxcamhook/compare/0.4.0.0...0.5.0.0
## Testing
Booted with `-iidxcamhook` on IIDX 27, 28, 29, 30, 31, 32 & 33
Confirmed both cameras were visible in I/O test, music select settings &
gameplay
## Link to GitHub Issue, if one exists
n/a
## Description of change
For HID device descriptor, use the "W" version of Windows API, and make
sure UTF-8 is being used throughout since that's the only format IMGUI
supports.
Before this change, non-Latin characters would have shown up as `HID ???
?????` for a mouse, for example.
Due to the way ImGui loads fonts, only the following languages are
supported:
* Simplified Chinese
* Cyrillic
* Japanese
* Korean
* Thai
* Vietnamese
## Testing
Tested various combination of Windows UI language and non-Unicode
language.
## Link to GitHub Issue, if one exists
user-reported
## Description of change
When the system non-Unicode language is not set to Japanese, TDJ
subscreen katakana keyboard was broken (weird behavior with characters
not erasing, ending with corrupt characters, etc)
To fix this, add a hook for `IsDBCSLeadByte`. `IsDBCSLeadByte` assumes
system ACP (which may not be SHIFT_JIS). Instead, redirect bm2dx.dll to
use `IsDBCSLeadByteEx` instead with SHIFT_JIS explicitly specified as a
parameter.
Presumably the game was using IsDBCSLeadByte to manage the keyboard
typing logic.... which is weird because SDVX doesn't do the same.
## Testing
Tested iidx 31 and tried to do searches.
## Link to GitHub Issue, if one exists
n/a
## Description of change
They moved some DLLs around so MFC wasn't being auto-detected, and I/O
hooks were not being performed. Fix that.
## Testing
The game boots into test menu, some i/o works, touch doesn't, not
playable yet.
## Link to GitHub Issue, if one exists
#345
## Description of change
When `ea3-pos: ea3_report_posev: no such node:` is detected, add a
deferred error message and guide user to the FAQ.
## Testing
Tested SDVX with the missing XML node.
## Link to GitHub Issue, if one exists
#410
## Description of change
When raising fatal errors via `log_fatal`, also show a modal popup.
Update instances of `log_fatal` where the message was too long to fit.
## Testing
Tested various failure conditions.
## Link to GitHub Issue, if one exists
#410
## Description of change
Forcibly minimize all windows before showing the crash dialog. Without
this, the dialog shows "behind" the game when launching multi-monitor
fullscreen games (TDJ, VM)
## Testing
Tested TDJ and VM in fullscreen.
## Link to GitHub Issue, if one exists
#345
## Description of change
Show a MessageBox when signal detects a crash.
## Testing
Tested full screen and windowed games.
## Link to GitHub Issue, if one exists
#345
## Description of change
Add auto-troubleshooter messages for when audio hooks are disabled, and
when 9on12 is turned on by user.
## Testing
Manual verification
## Link to GitHub Issue, if one exists
n/a
## Description of change
Create a "full" version of the archive with api and extra binaries. The
normal archive remains in place with just src and stubs.
## Link to GitHub Issue, if one exists
n/a
## Description of change
Fix font loading - when the code was refactored in #286 I used the wrong
file extension for couple of them.
## Link to GitHub Issue, if one exists
n/a
## Description of change
Add a "Linux" variant of spicecfg/spice/spice64.exe - currently these
are the same as Windows binaries but built without dependency on
WinSCard, which makes it easier to run on WINE.
Split dist archive into two, move api and extras into the new extras
zip.
## Testing
I only checked to see that Linux variants run fine on Windows, and
checked with dumpbin to confirm that the dependency on winscard DLL is
removed. No official support will be provided for Linux builds.
## Link to GitHub Issue, if one exists
Fixes#403
## Description of change
Set CONNECT_CAMERA env var even when iidx module is not enabled, so that
camhook can work without -iidx being set with real IO
## Testing
tested with emulated i/o and real i/o by user (see linked issue)
## Link to GitHub Issue, if one exists
n/a
## Description of change
Add CMake option to disable SCard functionality. Needed by some builds
of WINE, where distributor opted to not enable scard functionality for
whatever reason
## Testing
Building with `cmake -DWITH_SCARD=OFF` does not link against winscard
Building without this option at all links against winscard
## Link to GitHub Issue, if one exists
#399
## Description of change
Add image duplication option to screen resize, allowing overflow images
to wrap around the other side.
## Testing
Tested with DDR, IIDX (windowed and full screen TDJ), SDVX (orientation
swap)
## Link to GitHub Issue, if one exists
#0
## Description of change
The original launcher::detect_bootstrap_release_code() wasn't detecting
user specified bootstrap.xml path, and was causing issues for
patch_manager and other ext check spots prior to ea3 init (as ea3 does
proper path check itself).
I've added the user path check and proper xml parsing from
detect_gameversion().
## Testing
Tested with prop/bootstrap.xml presents.
Tested with prop/bootstrap.xml not presents and -b
/path/to/bootstrap.xml
## Description of change
Detect and log troubleshooter messages for:
* (early) hook DLL load failure
* data_mods folder without ifs_hook.dll
* spice version (print out current version and add a link to github
download)
## Testing
## Description of change
iidx: 9on12 crashes iidx31+
popn: special message for createdevice failures (resolution issue)
## Testing
manually test both cases
## Description of change
Finally figured out where the deadlock was coming from - it's because
the `dump_to_logger` was writing `SuperstepSound: Audio device is not
available` to the logger which calls back into the log hook, and then
emits another deferred message, trying to acquire the lock again on the
same stack.
## Testing
Tested the superstep sound failure case again.
## Description of change
Various fixes to deferred logger -
* Rename to "auto troubleshooter"
* Fix potential deadlock
* Reword the error messages to fit in a narrower column
## Testing
tested all the error cases
## Link to GitHub Issue, if one exists
n/a
## Description of change
If log level is anything but `misc` or `all`, complain using the
deferred logger.
## Testing
Tested legacy AVS (DDR X2) and newer games.
## Link to GitHub Issue, if one exists
[#390 ](https://github.com/spice2x/spice2x.github.io/pull/390)
## Description of change
Just like the normal logger, deferred logging can be called from any
component at any time, so accessing the vector needs to be guarded.
## Testing
## Link to GitHub Issue, if one exists
#388
## Description of change
Instead of setting flags in `signal` and logging when we crash, create a
class for logging deferred semi-fatal messages, and dump them to the log
immediately before crashing or shutting down.
## Testing
Tested each failure case by injection.
## Link to GitHub Issue, if one exists
none
## Description of change
Supports PCM version 2024091200.
## Testing
1. After starting the PCM, touch card and auth.
2. Press the bill insert button.
3. Check account balance has increased.
## Link to GitHub Issue, if one exists
#345
## Description of change
Show a block of warning text if the game crashes after CreateDevice(Ex)
fails.
## Testing
Tested by injecting invalid resolution into spicecfg.
## Description of change
When the game library fails to load, recursively iterate its import
table to narrow down the missing library.
If the dependency is a commonly missing one, give the user a hint on
where to find it.
## Testing
System with an AMD GPU and LDJ-010 IIDX:
```
[2025/10/01 00:32:41] M:dependencies: bm2dx.dll
[2025/10/01 00:32:41] M:dependencies: |-- nvEncodeAPI64.dll
[2025/10/01 00:32:41] W:dependencies: | |-- [!] NVIDIA Graphics Driver
[2025/10/01 00:32:41] W:dependencies: | |-- For non-NVIDIA GPUs, copy the stub file from the spice2x release .zip.
[2025/10/01 00:32:41] F:libutils: DLL failed to load - this is a common error. Please carefully read ALL of the following steps for a fix:
```
Same system, but with SDVX:
```
[2025/10/01 00:33:53] M:dependencies: soundvoltex.dll
[2025/10/01 00:33:53] M:dependencies: |-- nvcuda.dll
[2025/10/01 00:33:53] W:dependencies: | |-- [!] NVIDIA Graphics Driver
[2025/10/01 00:33:53] W:dependencies: | |-- For non-NVIDIA GPUs, copy the stub file from the spice2x release .zip.
[2025/10/01 00:33:53] M:dependencies: |-- nvcuvid.dll
[2025/10/01 00:33:53] W:dependencies: | |-- [!] NVIDIA Graphics Driver
[2025/10/01 00:33:53] W:dependencies: | |-- For non-NVIDIA GPUs, copy the stub file from the spice2x release .zip.
[2025/10/01 00:33:53] F:libutils: DLL failed to load - this is a common error. Please carefully read ALL of the following steps for a fix:
```
Contrived example of a missing dependency of a dependency:
```
[2025/10/01 00:30:59] M:dependencies: bm2dx.dll
[2025/10/01 00:30:59] M:dependencies: |-- libaio.dll
[2025/10/01 00:30:59] W:dependencies: | |-- [!] The library could not be loaded. (126)
[2025/10/01 00:30:59] M:dependencies: |-- libaio-iob.dll
[2025/10/01 00:30:59] M:dependencies: | |-- libaio.dll
[2025/10/01 00:30:59] M:dependencies: |-- libaio-iob2_video.dll
[2025/10/01 00:30:59] M:dependencies: | |-- libaio.dll
[2025/10/01 00:30:59] M:dependencies: | |-- libaio-iob.dll
[2025/10/01 00:30:59] F:libutils: DLL failed to load - this is a common error. Please carefully read ALL of the following steps for a fix:
```
Another example of a missing file, but with 32-bit IIDX 24:
```
[2025/10/01 00:42:13] M:dependencies: bm2dx.dll
[2025/10/01 00:42:13] M:dependencies: |-- libafp-win32.dll
[2025/10/01 00:42:13] W:dependencies: | |-- [!] The library could not be loaded. (126)
[2025/10/01 00:42:13] M:dependencies: |-- libafputils-win32.dll
[2025/10/01 00:42:13] M:dependencies: | |-- libafp-win32.dll
[2025/10/01 00:42:13] F:libutils: DLL failed to load - this is a common error. Please carefully read ALL of the following steps for a fix:
```
---------
Co-authored-by: aixxe <me@aixxe.net>
## Link to GitHub Issue, if one exists
#345
## Description of change
Add a little warning message that shows when well-known exception codes
are encountered & caught by signal hooks.
## Testing
Tested by injecting bad instructions into the DLL.
## Link to GitHub Issue, if one exists
n/a
## Description of change
Recently distributed iidx data has this enabled in ea3-config.xml by
default, exposing people's PCBID in the logs.
Find the node in the XML and remove it on boot, unless user overrides it
with a new option.
## Testing
Tested using asphyxia.
## Link to GitHub Issue, if one exists
#345
## Description of change
When the directory specified in the mounttable (in avs-config.xml) lead
to bad path, remember this and show a warning message block before the
game crashes.
## Testing
Tested with simulated bad mounttable set up.
## Link to GitHub Issue, if one exists
n/a
## Description of change
Apply this fix automatically when needed -
https://github.com/two-torial/sp2xpatcher/pull/33
## Testing
Tested iidx31 to see that the patch does not apply
Checked -audiohookdisable to see that the logic gets skipped
Tested 2025041500 and 2025082500.
## Link to GitHub Issue, if one exists
n/a
## Description of change
Allow importing patches for `boot.dll`
## Testing
Observed patch for the new DLL being attempted to be imported in the
logs.
## Link to GitHub Issue, if one exists
#345
## Description of change
For IIDX / SDVX, when the subscreen surface failed to capture, display
an error message, suggesting the user to patch the game as needed.
Prior to this change, the subscreen overlay just showed an invisible
window if this happened.
## Testing
Tested IIDX windowed / full screen, and voltex full screen.
## Link to GitHub Issue, if one exists
n/a
## Description of change
Add lights output for the buttons lamp array. Only implemented the top
row of lights and not all of them, this is good enough.
## Testing
Tested with a Nostroller and also spiceremote.py.
## Link to GitHub Issue, if one exists
#345
## Description of change
If we see SuperstepSound failure during boot, remember it, and when the
game eventually crashes, log a series of warning messages to surface why
the game likely failed to launch.
## Testing
Tested both iidx and sdvx with an audio device set to not allow
exclusive mode.
## Link to GitHub Issue, if one exists
n/a
## Description of change
Add a new option that allows absolute position analog input, such as
SDVX controller knobs and IIDX turntables, to be bound as input for
Polaris Chord faders.
In practice this means turning a knob counter-clockwise results in fader
being held left (relative to velocity), and vice versa.
## Testing
Tested using FauceTwo and a mouse.
## Link to GitHub Issue, if one exists
#345
## Description of change
If `-exec` is specified, log a giant warning.
Also, fix some compiler warnings in MFG.
## Testing
Confirmed message being logged in log.txt.
## Link to GitHub Issue, if one exists
Fixes#364
## Description of change
The game attempts to hook raw input, but raw input API can only be used
by one window per process. Hook `RegisterRawInputDevices` and prevent
the game from registration for raw input notifications.
## Testing
Tested that HID keyboard works with `Bind` option.
## Link to GitHub Issue, if one exists
Fixes#362
## Description of change
Add a hook for `GetLocaleInfoEx` and return `ja-JP` to fix the
"translation not found" issue in XIF.
## Testing
Tested with/without Disable ACP option.
## Link to GitHub Issue, if one exists
Fixes#365
## Description of change
Always check both analog and digital input when calculating fader
offset.
## Testing
Tested with keyboard and xbox one controller.
## Link to GitHub Issue, if one exists
n/a
## Description of change
Adds support for Polaris Chord
## Testing
Tested with XIF:J:A:A:2024122300. IO/ICCA works, game successfully
connects to server and is playable.
## Link to GitHub Issue, if one exists
n/a
## Description of change
Change the dark brown colors used in widget backgrounds to dark gray.
Decrease the in-game overlay transparency (more opaque): 80% -> 96%.
## Testing
Tested cfg and in-game overlay.
## Link to GitHub Issue, if one exists
n/a
## Description of change
In an attempt to make the Options tab smaller, move out more options to
advanced / development tabs.
## Testing
n/a
## Link to GitHub Issue, if one exists
#345
## Description of change
Check if the path to codecs directory contains non-ASCII characters, and
display a giant warning. This is to help with troubleshooting, since
registration of xactengine silently fails (creates a bad registry entry)
if the path contains non-ASCII chars.
Log the size of codec DLLs, and log any failures from `regsvr32`.
Detect the case where user specified `-exec gamemdx.dll` for DDR which
seems to be a common pitfall. This doesn't work because gamemdx.dll does
not have a DLL entry, but for some reason people are really tempted to
do this.
## Testing
Validated the error cases.
## Link to GitHub Issue, if one exists
#345
## Description of change
If ea3 xml is missing pcbid node, AND there is no pcbid override, supply
a default value. Useful for quickly getting offline clients up &
running.
## Testing
Tested with/without pcbid override, with/without pcbid node in xml.
## Link to GitHub Issue, if one exists
#345
## Description of change
Account for the path to codec DLL having spaces in it and use wide
chars.
## Testing
Testing 32 and 64 bits.
## Link to GitHub Issue, if one exists
#345
## Description of change
On launch of spice.exe / spice64.exe, call `regsvr32` on known codecs in
the `com` directory.
Add an option to skip this (`-ddrnocodec`) as a chicken bit.
## Testing
Tested 32 and 64 bit DDR.
## Link to GitHub Issue, if one exists
#345
## Description of change
Simplify camera hook in SDVX5/6. Camera hook will always be installed
and return 0 cameras.
Deprecate `-sdvxdisablecams` option as it is no longer needed as a
result of this change.
## Testing
Tested SDVX5 final, SDVX6 year 1, and a recent SDVX6 build.
## Link to GitHub Issue, if one exists
#345
## Description of change
On launch of spice/spice64, dump bindings in Buttons and Analog tab
## Testing
Tested on 32 bit and 64 bit
## Link to GitHub Issue, if one exists
N/A
## Description of change
Minor fix for a warning in the log. Moves the check for IFS LayeredFS
_after_ loading hooks. Also checks for the module with `GetModuleHandle`
instead, which should cover all paths as long as `ifs_hook.dll` hasn't
been renamed. 😅
## Testing
Before:
```
[2025/07/19 15:59:56] W:launcher: data_mods directory was found, but ifs_hook.dll is not present; your mods will not load
[2025/07/19 15:59:56] W:launcher: to fix this, download ifs_layeredfs and add it as a DLL hook (-k)
[2025/07/19 15:59:56] W:launcher: https://github.com/mon/ifs_layeredfs
[2025/07/19 15:59:56] I:launcher: msvcrt!__argc value before: 0
[2025/07/19 15:59:56] I:launcher: msvcrt!__argc value after: 57
[2025/07/19 15:59:56] I:launcher: loading hook DLL C:\Users\Emma\AppData\Local\Programs\SpiceTools\hooks\64\ifs_hook.dll
[2025/07/19 15:59:56] I:libraryhook: LibraryHook Attach
```
After changes - no warning observed:
```
[2025/07/19 15:59:08] I:launcher: msvcrt!__argc value before: 0
[2025/07/19 15:59:08] I:launcher: msvcrt!__argc value after: 57
[2025/07/19 15:59:08] I:launcher: loading hook DLL C:\Users\Emma\AppData\Local\Programs\SpiceTools\hooks\64\ifs_hook.dll
[2025/07/19 15:59:08] I:libraryhook: LibraryHook Attach
```
## Link to GitHub Issue, if one exists
n/a
## Description of change
Allow importing patches for `libshare-pj.dll`
## Testing
Observed patch for the new DLL being attempted to be imported in the
logs.
## Link to GitHub Issue, if one exists
n/a
## Description of change
When an exception is caught during ACIO hook init, print a special
message to suggest the user to disable RTSS and MSI Afterburner, since
they are known to cause issues.
## Testing
Tried with RTSS enabled with High detection and with it disabled. Also
tried to crash the game a different way and check that the message is
not printed and the callstack is shown propeerly.
## Link to GitHub Issue, if one exists
n/a
## Description of change
Fix an issue when clicking on the TDJ windowed subscreen with overlay
active will occasionally drop all future mouse clicks, until the overlay
is completely hidden.
## Testing
Tested TDJ windowed subscreen, with poke, with auto-pin, and with
spicecompanion.
SDVX: this was never an issue for UFC mode, but this change doesn't make
any functional difference either.
## Link to GitHub Issue, if one exists
n/a
## Description of change
Add `Help` menu.
Move Licenses and About dialog under Help.
Add links to the wiki.
Make game selection drop-down slightly wider to make better use of space
that has been freed up.
## Testing
tested in cfg (with/without game), and in-game overlay
## Link to GitHub Issue, if one exists
n/a
## Description of change
Complain if nvcuda.dll, nvcuvid.dll, or nvEncodeAPI64.dll are found in
modules or in root directory. This would complain for spice-provided
stubs as well.
## Testing
## Link to GitHub Issue, if one exists
Fixes#190
## Description of change
When `-cmdoverride` is specified, any command line arguments are taken
first before merging with what is in the config file.
## Testing
Still testing...
## Link to GitHub Issue, if one exists
#41 (partially)
## Description of change
This PR adds support for outputting IIDX tape LED data via spiceapi
(`iidx_tapeled_get()`). It returns the data as a `dict`, with the key
being the LED name and the value being the list of RGB values. You can
optionally pass in a variadic list of names to filter the returned data.
The new API function is only implemented in Python since I'm not able to
test the wrappers in other languages.
An example script using the new API is available in this Beef Board PR:
https://github.com/HWXLR8/beef-board/pull/133.
Demo use case: https://streamable.com/pq5e1e
## Testing
Tested in IIDX 32 with custom Beef Board firmware along with a Python
script to read and send the tape LED data over USB.
## Link to GitHub Issue, if one exists
n/a
## Description of change
Rotate the printer output so that it's the correct orientation
(portrait, not landscape).
## Testing
Tested via test image, and also in-game, for LP and SDVX.
## Link to GitHub Issue, if one exists
n/a
## Description of change
Add a stub for `cpusbxpkm.dll`. The stub doesn't work, it's only enough
to allow the game to load; but that is irrelevant since spice hooks the
printer at runtime.
## Testing
Observed the game boot, and was able to print out the test image from
test menu. Will do more testing on a real server.
## Link to GitHub Issue, if one exists
Fixes#322
## Description of change
Ensure game launches in full screen when windowed mode setting is off.
Before this PR, the game always launched in windowed mode.
## Testing
Seems to run fine in fullscreen with the monitor in portrait mode.
It does seem to run at even lower framerate (around 24fps, vs. 30fps in
windowed) but it might be expected.
Some weirdness with the mouse cursor when the overlay is active (two
cursors).
## Link to GitHub Issue, if one exists
Fixes#320
## Description of change
Replacing the existing logic that searches for game window to hook touch
on.
Eventually, we should fix all the other games that hook touch by
matching on window title with a call to `FindProcessWindowBeginsWith`.
## Testing
Tested with notepad open that was also titled `LovePlusAC`. Game hooked
correctly when the game was in focus during boot, and also when notepad
was in focus.
## Link to GitHub Issue, if one exists
#316
(this does not fix the issue!)
## Description of change
Add an option to omit `-noCamera` option. Doing so allows the game to
boot and search for a compatible camera using KS API, but will likely
fail since we don't know what cameras are compatible. You end up with a
camera error during boot, which can be ignored by flipping a switch in
the test menu to disable the camera.
No hooks are currently done to make the camera work!
## Testing
Tested to see that turning this on triggers the camera error. No known
camera at the moment.
## Link to GitHub Issue, if one exists
Fixes#139
## Description of change
Add an option for detecting window focus when accepting input.
The new default will be to have the following:
* naive bindings will check for window focus
* rawinput binds are not affected, will continue to be accepted
regardless of focus
Other options (always / never choices) can be picked by the user to
tweak the behavior if needed.
Clean up usage of `0xff` constant to represent invalid naive vkey.
## Testing
Still in progress, especially in regards to performance.
On a i7-9700 system, 10000 calls to `superexit::has_focus()` takes
250-350 microseconds, so this should not be a big deal at all.
## Link to GitHub Issue, if one exists
n/a
## Description of change
Dump monitor resolution and refresh rate to the log on launch.
## Testing
Tested with two monitors.
## Link to GitHub Issue, if one exists
n/a
## Description of change
Allow the server to override client's quality options for screen
mirroring.
On Windows / Android versions (flutter-based) clients, this is already
in the options of those apps. However, the iOS version lacks the quality
options.
## Testing
Tested with iOS and Windows clients.
## Link to GitHub Issue, if one exists
n/a
## Description of change
Mark the option as "sensitive" which censors the option value (adapter's
IP address)
Remove the log entry from spice
This isn't perfect because most of the games like to log the IP address
and subnet anyway, but at least spice itself will stop doing it.
## Testing
Tested 64 bit LDJ with parameter set.
## Link to GitHub Issue, if one exists
n/a
## Description of change
Always log the DLL identifier string in patch manager, even if there are
no patches.
## Testing
Tested 32 / 64 bits.
## Link to GitHub Issue, if one exists
n/a
## Description of change
Log a message if d3d9.dll (and friends) are found in the game root or
the modules directory.
This is to help with troubleshooting in cases where the user is unaware
that d3d9 is being used to inject other DLLs (e.g., ifs_layeredfs), or
when DX9 reimplementation is causing issues / crashes (e.g., dxvk).
## Testing
Observed the new messages being logged in both modules / root directory.
## Link to GitHub Issue, if one exists
Fixes#307
## Description of change
Add an option for making TDJ/UFC subscreen window borderless in windowed
mode
Add another option for keeping the subscreen "always on top".
Add size / position arguments to SDVX windowed subscreen, exactly the
same as what is allowed for IIDX.
## Testing
Seems to work....
## Link to GitHub Issue, if one exists
#304
## Description of change
Complain loudly about DLL conflicts. Show warnings for each DLL that
exists in both modules directory and the root.
This is not based on LoadLibrary hooks, just enumerating DLLs via
filesystem access.
Deliberately not using `log_fatal` since these are not necessarily going
to crash the game. Some people just love to have messy installs and if
the game booted fine before, it should continue to boot.
## Testing
Tested with/without `-modules`, with/without duplicate DLLs.
## Link to GitHub Issue, if one exists
n/a
## Description of change
The check to warn the user about potential MAX_PATH violation should be
stricter. Saw a user with 150 characters run into a crash during boot
for SDVX3.
## Testing
Tested paths under 130 / over 130, in both 32/64 bits.
## Link to GitHub Issue, if one exists
n/a
## Description of change
For JSON config files of the following features:
* patch manager
* screen resize
* IIDX camera hook
* card manager
when saving a new file, store them in %appdata%\spice2x instead of
%appdata%.
On load:
1. If the JSON file exists in %appdata%\spice2x, use that (new path)
1. If the JSON file exists in %appdata%, continue to use that (legacy
path)
It's common for people to have mixed versions of spicetools/spice2x so
we'll continue to read from the %appdata% root if the files are there,
but with a preference for the new path. We will not forcibly move files.
spicetools.xml will continue to live in the %appdata% root. Moving this
will confuse a lot of people, so I'm avoiding this.
Also, this fixes `-patchcfgpath` and `-resizecfgpath` to create
directories as needed (previously the parent directory must have existed
first)
## Testing
Tested -
* existing config files are continued to be read from %appdata%
* new files get created in %appdata%\spice2x\... (both in spicecfg and
in overlay)
* can provide custom path for `-patchcfgpath` `-resizecfgpath` and
observe directories + file created in custom path, try absolute or local
relative paths
## Link to GitHub Issue, if one exists
Fixes#280
## Description of change
Introduce a variant of 32bit spice.exe that is large address aware.
## Compiling
👍
## Testing
Minimal testing has been done to see if the LAA variant can boot
existing 32 bit games.
## Link to GitHub Issue, if one exists
Fixes#277
## Description of change
To avoid confusion, temporarily remove `-sdvxlandscape` because of the
issue described in the bug above.
`forceresswap` is still kept, so there is still a way to do exactly what
`-sdvxlandscape` used to do, if someone really wants it.
## Testing
Checked that `-sdvxlandscape` is ignored, and that `-sdvxlandscape`
continues to be honored.
## Description of change
Adds `ccache` support for local compiling and Github Actions
environments. This significantly speeds up incremental builds, but cold
starts will take a little longer to compile.
The build script now has an `-i` flag to ignore the build cache if
needed. You can also manually delete the `.ccache` folder to force a
fresh build too.
For the GA workflow, it uses the
[`ccache-action`](https://github.com/hendrikmuhs/ccache-action) action
to manage and store the cached build objects. This cache should be
accessible to all branches.
I also removed the `--no-cache` flag when building the
`spicetools/spice` image since Docker will automatically invalidate
`COPY` layers if it detects the copied files have changed.
### Compile times
Compiled with a 7800X3D, 32GB 6000MT/s RAM.
| `main` | `ccache` (fresh) | `ccache` (cached) | `ccache` (ignore
cache) |
|--------|--------|--------|--------|
| 2m46.047s | 3m8.886s | 0m32.638s | 2m45.148s |
## Testing
Tested incremental builds by using another branch that's rebased on top
of this.
## Link to GitHub Issue, if one exists
n/a
## Description of change
Previously, the artifact produced by the CI action was `spice2x.zip`.
With this change, it will be `spice2x-ci-1234567.zip` where 1234567 is
the first 7 chars of the commit hash.
Note that for PRs, github produces a merge commit before queueing the
action, so the commit hash won't match up with the HEAD of a fork. The
goal is to just generate unique-ish filenames so this is not a huge
deal.
## Compiling
## Testing
Action has been run in the fork.
## Link to GitHub Issue, if one exists
n/a
## Description of change
Change the usage pattern for Card Manager UI.
### Previous behavior
Previously, it was a list of cards that you select, and click a button
to insert as P1 or P2.
This is fine, but users got confused when they pressed `Insert Card`
overlay key and got a different card inserted, or when auto-insert
didn't work as expected.
Additionally, if you play a game without continue (IIDX/DDR for
example), then it's cumbersome to bring up the overlay and click on
insert card every time.
### New behavior
Insert Card overlay now lets you pick a card and *slot* it into P1 or P2
side.
From that point on, the slotted card number is used as the override,
replacing what was previously passed to `-card0` or `-card1`. This means
that `Insert Card` button and auto-insert will pick up the new card and
use that instead.
## Compiling
👍
## Testing
Tested 1p-only game (popn) and 2p games (DDR, IIDX).
## Link to GitHub Issue, if one exists
Fixes#295
## Description of change
Add missing `Start` and `10KEY` lights output, as see in the test menu.
## Compiling
👍
## Testing
Seems fine in museca test mode.
## Link to GitHub Issue, if one exists
Fixes#292
## Description of change
This PR adds CI with Github Actions. Runs on every push and pull
request. If a new commit is pushed, any previous runs are cancelled for
that branch.
In total, these optimisations (on a 7800X3D with 32GB 6000MT/s RAM and
an NVMe Gen4 SSD):
* Reduces `spicetools/deps` image size by around 200 MB, and build time
by almost 50%
* Reduces compilation time by around 9%
Changes:
* Pull archlinux image from GHCR so that we don't run into pull limits
from docker.io
* Use `base-devel` archlinux image
* Reduces image build time from 141 seconds to 109 seconds on my machine
* Clean up unneeded packages
* Small reduction in `spicetools/deps` image size (4.35 GB vs 4.14 GB)
* Use precompiled `yay` binary
* Reduces image build time from 163 seconds to 141 seconds on my machine
* Use `nproc` to get the number of cores instead of parsing
`/proc/cpuinfo` with `awk`
* Use `ninja` to compile
* Speeds up compile times a little, around 13 seconds on my machine
* Don't run `docker run` in interactive TTY in `build_docker.sh`
* Github Actions disallows interactive TTYs
* Still allowed for the batch script
* `time` the compilation process
* Enable BuildKit in the bash script
* Required for build contexts
* Don't use `USER` instruction
* Breaks Github Actions, doesn't seem to affect build?
* More info:
https://docs.github.com/en/actions/sharing-automations/creating-actions/dockerfile-support-for-github-actions#user
* `USER` also seems to cause issues on a mounted ReFS image
* Add executable bits to bash scripts
Future ideas:
* Combine `external/Dockerfile` and `./Dockerfile` into one to
deduplicate images and save disk space
* Fix the weird `/src/src` directory structure in the Dockerfile and
build scripts
* Investigate CMake and ninja optimisations?
## Compiling
Check CI status on my fork.
## Testing
Tested with docker on Windows. Also play tested a bit to make sure the
Github Actions artifact works.
## Link to GitHub Issue, if one exists
n/a
## Description of change
Update tooltip for `-monitor` option. Move to `Graphics (Full Screen)`
to reduce clutter.
## Compilin
👍
## Testing
n/a
## Link to GitHub Issue, if one exists
Fixes#120
## Description of change
Don't call `is_touch_available` in launcher before RawInput stack is
initialized. This causes us to incorrectly fall back to the Win7/Win8
touch handler.
The desired behavior is to use rawinput touch by default for all games,
unless overridden by the user via `-wintouch`.
Add a bunch of logging so we can spot who's calling
`is_touch_available`.
As a side effect, a handful of games that previously used Win7/8 touch
will now use RawInput touch instead. If this causes any issues, they can
turn `-wintouch` on to force Win7/8 touch logic again.
## Compiling
👍
## Testing
Test:
* RB
* -wintouch
* TDJ, UFC subscreen and native touch
* overlay, especially in multi-mon
## Link to GitHub Issue, if one exists
n/a
## Description of change
No one uses this, remove them to reduce clutter. This is in preparation
to migrate from deprecated ImGui IO model to new one, and this is part
of that.
## Compiling
👍
## Testing
## Link to GitHub Issue, if one exists
n/a
## Description of change
Update ImGui to `v1.91.4`. We can't update to `v1.91.5` or newer just
yet because impl_spice depends on the old IO model of ImGui which got
removed in `v1.91.5`.
We also can't update the DX9 renderer right now, because at some point
overlay breaks in TDJ (and only in TDJ...)
Enable the new debug logging functionality in ImGui. Add a button in
overlay to toggle debug log window.
Fix some minor bugs spotted by the new ImGui debug log: mismatched API
calls, font loading issues.
## Compiling
👍
## Testing
In progress.
## Link to GitHub Issue, if one exists
n/a
## Description of change
Functionally, no change.
Move ImGui library files around so that they mirror how they are
structured in imgui releases. This will make it easier to migrate to a
future version of ImGui.
Add a handful of static asserts to check that we have the necessary
features enabled / disabled in imgui header.
## Compiling
👍
## Testing
Tested 32-bit overlay, 64-bit overlay, TDJ, and UFC overlays, and
spicecfg.
Interesting finds during ImGui testing (not part of this PR, but for
future reference when upgrading imgui version):
* Updating dx9 backend to the newest causes TDJ to stop rendering the
overlay completely (fine in UFC or any other game)
* Omitting `IMGUI_USE_BGRA_PACKED_COLOR` causes spicecfg software
renderer to use the wrong color (RGB format parsing error probably)
* At some point - v1.90? the `About` and `Licenses` buttons in spicecfg
stop responding after an upgrade, maybe our improper usage of MenuItem?
* Using the docking branch of ImGui is not required but we should just
stick to it for multi-viewport functionality which we may want to use
later.
## Link to GitHub Issue, if one exists
n/a
## Description of change
`ImGui::Columns` is a deprecated component with many issues. Migrate
Buttons/Analog/Overlay/Lights/Options... tabs to the new table API.
Clean up some UI elements around it to reduce clutter.
Note: there are still other usages of Columns API (MIDI debug output,
ACIO viewer, window manager) but no one hardly ever sees those.
Eventually they will need to be migrated if ImGui ever drops support for
them.
## Compiling
👍
## Testing
Testing all games in spicecfg and overlay.
## Link to GitHub Issue, if one exists
Fixes#27
## Description of change
In standalone configurator mode, when a mouse cursor moves outside the
window and comes back, it may get stuck in the wrong cursor type (e.g.,
get stuck in horizontal resize mode). This is a side effect of software
rendering we do that doesn't deal nicely with mouse events (i.e., not at
all).
## Compiling
Should be fine.
## Testing
Testing spicecfg, spice -cfg, spice64 -cfg, and in-game overlay.
## Link to GitHub Issue, if one exists
#0
## Description of change
When patcher URL returns an invalid response (as in, cannot be parsed as
JSON), show an error message to user.
Add a "copy text" button to copy the error message.
Fix WarnTooltip so that can handle the case where description is an
empty string for a patch - previously this was just showing as multiple
lines of empty space and then the warning.
## Compiling
It's fine except Docker build currently fails due to cmake version
issue.
## Testing
Tested valid / invalid datecodes and checked against responses.
## Link to GitHub Issue, if one exists
n/a
## Description of change
In Options (and in Advanced/API/Search tabs), remove the help marker
`(?)` and instead add a tooltip to the option name label and the control
widgets like the checkbox, text input, and combo. This is to help with
discoverability as many users failed to discover the `(?)` widget.
Similarly, update the Patches tab to remove `(?)` and add tooltips to
widgets. Patches with warnings `(!)` will continue to show it to
distinguish it from other patches.
Update styling for the tooltip (dark red background -> dark gray) so
that it stands out from other widgets.
Remove the purple option text used for game-specific options.
## Compiling
👍
## Testing
Tested in spicecfg, and in-game overlay.
## Link to GitHub Issue, if one exists
Fixes#276
## Description of change
Note: this change is not compatible with previous screen resize config;
i.e., if you had the zoom setting dialed into a certain view, after this
change it won't be the same area, so you'll have to set up a scene
again. I think this is a worthwhile cost since the old logic is just
broken in weird ways, and preserving old settings is really tedious math
(for a feature that not many people use). Besides, this change will only
use the new Scenes values from the JSON.
Rewrite the DX9 image scaler logic.
* Previously, the rendering surface was fixed at `4096*4096 px`. Now,
this is relative to the backbuffer dimensions, which depends on the game
& respects user provided `-forceres`.
* Remove "center" option, make it the default.
Above two changes fix the aspect ratio issue (scaling in portrait games
not respecting screen ratio) and things breaking at higher res (1080p
when zoomed out far enough, or when forced to run at 4k resolution for
example)
* Use `scenes` leaf of screen resize JSON config for Scene 1 as well,
completely removing ourselves from being compatible with older spice2x
versions for these values.
* Add additional bounds check before calling `StretchRect` to avoid
users getting stuck with a bad layout, which can kill performance.
## Compiling
🦾
## Testing
Tested 32 bit (popn / ddr), 64 bit (ldj), portrait and landscape modes
(kfc)
## Link to GitHub Issue, if one exists
n/a
## Description of change
Add `SDVX Landscape Mode` option, allowing you to play SDVX in landscape
monitor orientation, with black borders on left and right - similar to
how EAC does it. This is meant to be an alternative to what people do
today, which is launching in windowed mode.
By default, with just `-sdvxlandscape` enabled, EG will launch at
1920x1080 (transposed from the original 1080x1920 resolution).
It is possible to combine with `-forceres` to launch at higher
resolutions. At some point though, when rendering at large resolutions
past 1440p, at some point scaling may break due to #276.
Disabled on 32-bit SDVX since dx9 `CreateDeviceEx` call is required;
`CreateDevice` won't work. For the same reason this isn't being made a
generic option for museca/rb/etc. In theory you can supply
`-sdvxlandscape` to games like IIDX and play landscape games in portrait
mode, although again, scaling my break due to #276.
Also, add new options (bottomleft/right) for subscreen overlay position
so that they don't overlap with the main screen in landscape mode.
## Compiling
🙂
## Testing
Tested a couple versions of VW and EG.
## Link to GitHub Issue, if one exists
n/a
## Description of change
Adds a new option to forcibly set the full screen resolution.
Same idea as -windowscale.
## Compiling
🔺
## Testing
Seems to be showing similar results as -windowscale:
* Works GREAT for IIDX/SDVX
* popn launches at correct resolution but only draws a small image (at
native res) - can be scaled with F11 menu
* nostalgia is broken in weird ways, image is drawn correctly but bottom
`credits` text draws at wrong offset, game's wintouch logic broken
(perhaps expectedly)
## Other notes
In theory this could enable "play sdvx in landscape mode" option but the
image scaling doesn't quite work with extreme values.
## Link to GitHub Issue, if one exists
n/a
## Description of change
Adds Mahjong Fight Girl Support
## Compiling
+
## Testing
Tested with VFG:J:E:A:2024100800 in HG mode with VFG IO. No
modifications made to data, other than avs-config.xml and
ea3-config.xml. B and C modes don't work because of serial touchscreen.
UKS mode doesn't work because of IO.
## Link to GitHub Issue, if one exists
Fixes https://github.com/spice2x/spice2x.github.io/issues/193
## Description of change
Merges guardianblue's changes plus some code review feedback.
Adds the ability to automatically type out the digits of a PIN when an
overlay shortcut is pressed.
## Compiling
💯
## Testing
Tested:
* 32 bit popn
* TDJ, 1p/2p
* KFC, UFC
## Link to GitHub Issue, if one exists
n/a
## Description of change
When RegOpenKey* hooks fail when substituting user's ASIO driver, log a
warning message.
This can happen when the user types in the wrong value for `-iidxasio`
or `-sdvxasio`, which is a common issue.
## Compiling
🥇
## Testing
Tested LDJ/KFC
## Link to GitHub Issue, if one exists
Fixes https://github.com/spice2x/spice2x.github.io/issues/179
## Description of change
Previously, lights.read() did not accept any parameters, instead it
returned all lights implemented by the current game.
Problem is that this is too large for some embedded implementations;
also just inefficient.
Add code to accept light names as strings and only return those in the
result.
For performance, use `robin_hood::unordered_map` to speed up the lookup
operation, which was previously a linear search.
Add this to Python wrapper library. Did not bother with others.
Also, as a bonus - update lights.write_reset() to also accept a flat
list of strings, as opposed to array containing a string, which was
silly.
## Compiling
➕
## Testing
Tested using spiceremote and writing a short Python program.
## Link to GitHub Issue, if one exists
Fixes#263
## Description of change
Add "scenes" to screen resize.
* UI changes - F11 menu now has a "scene switcher" for `Scene 1/2/3/4`.
Clean up other UI bits.
* Add hotkeys for `Screen Resize Scene 1`, `Screen Resize 2`, and so on.
* Detect hot key and trigger resizes.
* Add additional objects to screen_resize.json for saving and loading
the new scene settings.
* Existing screen resize data is backwards compatible (can be
loaded/saved to JSON), and is treated as `Scene 1`.
* Add API endpoint for `Resize`, allow toggling resize on/off, switching
active scene
* Add Python wrapper. Did not bother with the other wrappers (Dart, C++,
etc)...
## Compiling
🥇
## Testing
Still testing, but seems to work fine for TDJ.
## Link to GitHub Issue, if one exists
#264
## Description of change
When spice2x is compiled with UCRT, fix up `__argc` and `__argv` for
msvcrt since some DLL hooks rely on them.
## Compiling
👍
## Testing
Tested on Win10 LTSC, Win11, and Win7.
## Link to GitHub Issue, if one exists
n/a
## Description of change
Previously, F11 menu just provided text-based hint on how to enable
-windowscale option.
Instead, show a disabled checkbox that correctly reflects the current
state, nudging the user to read the tooltip.
Elaborate the option tooltip for -windowscale as well for consistency &
explain *why* you might want to enable this.
## Compiling
💯
## Testing
Tested 32/64 bit.
2025-03-20 18:31:52 -07:00
521 changed files with 99099 additions and 39965 deletions
*version of spice, this can be seen in the About tab, and in log.txt*
*please remember to test the LATEST beta version before posting a bug about it**
*please remember to test the LATEST beta version before posting a bug about it*
## Describe the issue
*what's the issue?*
@@ -22,3 +20,7 @@ assignees: ''
> [!WARNING]
> Please make sure you remove any personally identifiable information from the log file.
> Please set `-loglevel` to `all` before launching the game for more verbose logs.
## A note on issue management
`Closed as not planned` means exactly that - it's closed, because it's not on our plans to address them any time soon. It doesn't mean your issue is invalid, it just means it's not a priority, and we can always revisit them later.
Baseline rules for patch submissions are as follows. Any patches violating the rules below will not be accepted.
### New as of March 2025
Pull requests in GitHub are open. You don't need to bother with patch file submissions anymore. To contribute, fork the repo (just the main branch), make changes in your fork, and contribute to upstream by opening a pull request to the main repo.
To contribute, fork the repo (just the main branch), make changes in your fork, and contribute to upstream by opening a pull request to the main repo.
### Adding support for games
@@ -12,6 +11,18 @@ Pull requests in GitHub are open. You don't need to bother with patch file submi
* For a new game that was never supported (not a new version of a game, but rather a new series): please wait 1 year after official AC release in Japan.
* For new version of an already supported game: proceed with caution and use generally-accepted community guidelines.
### Pull requests that will not be accepted
* Performing decryption of encrypted files.
* Including (bundling), distributing, or linking to game data, or making it easier to find/download game data.
* Any features that [phone home](https://en.wikipedia.org/wiki/Phoning_home)
* This includes automatic updaters.
* Exception: we have allowed the "patch import from URL" feature, but this has only been done under very careful considerations and plenty of warnings to the user.
* Built-in EA server that saves data. They should live in a separate project.
* Any additions to built-in patches (modifications / removals are OK if we have a good reason).
* Changes to the software license terms.
* Localization / translation for UI text. It becomes too difficult to manage by the maintainers.
### Avoiding regressions
The biggest risk in making code changes to spice is the risk of regressions. There is a **lot** of shared code used by many different games, reaching back game versions that are more than a decade old. It is practically impossible to test all supported games and versions.
@@ -22,7 +33,7 @@ Therefore, when making code changes, please be extremely careful about containin
#### Config file compatibility
Do not change the names of options, buttons binds, analogs, etc - since they are used as unique identifiers in config files. If they are changed, you will introduce an incompatibility with previous versions of config file.
Do not change the names of buttons binds, analogs, strings for command line parameters, etc - since they are used as unique identifiers in config files. If they are changed, you will introduce an incompatibility with previous versions of config file.
### Code quality requirements
@@ -30,12 +41,11 @@ Do not change the names of options, buttons binds, analogs, etc - since they are
* All currently supported games / versions must continue to work.
* Backwards compatibility must be preserved, unless there is a really good reason to break it. This includes (but not limited to): global/local config files, command line parameters, game patches, device interop (e.g., card readers), and SpiceAPI / Companion interop.
* Reasonable level of compatibility with the last release of original spicetools is expected. The stated goal of spice2x is to be a drop-in replacement for spicetools.
* Simply put, if someone has an existing install of spicetools/spice2x, copying over new version of spice2x should not result in different behavior or loss of functionality.
* Simply put, if someone has an existing install of spicetools/spice2x, copying over new version of spice2x should not result in vastly different behavior or major loss of functionality.
* Make sure you compile with the included Docker script and ensure you do not introduce **any** new compiler warnings or build breaks. The Docker script is the standard build environment, your custom Linux build environment or MSVC can be used during development, but you must validate the final build using Docker.
* Do not submit snippets of code as a "patch". Exceptions can be made for trivial changes (correct a typo, fix a single line of code...), but otherwise, a successfully compiled & fully tested patch file is required when submitting for review.
* Do not make code changes in unrelated areas; i.e., do not run code linters and auto-formatters for parts of the code that you didn't modify.
* Try to submit smaller chunks of code, instead one gigantic patch. For example, don't submit a patch for "Improve feature XYZ"; instead, submit "Change how A works to prepare for feature XYZ" "Refactor B for feature XYZ" "Add feature B to enable feature XYZ".
* Write to the log for anything useful - it helps immensely with debugging post-mortem. At the same time though, avoid spamming the log for something trivial.
* Write to the log for anything useful - it helps immensely with troubleshooting and debugging. At the same time though, avoid spamming the log for something trivial.
### UI text
spice2x has a global audience; majority of the user base do not speak English as their first language.
@@ -44,12 +54,15 @@ Use simple English, avoid colloquialism, and use concise language, even if it's
### Using OS APIs
Avoid making permanent changes to user's OS configuration. For example, spice should not make a call to set power profile to Maximum Performance, or switch default audio device. Making the reverse call to restore settings on game shutdown is **not** good enough; there is no guarantee that spice will gracefully shutdown, since games (or spice) can crash. This is to avoid inadvertently putting user's PC into a bad state, which can be seen as malware-like behavior.
Avoid making permanent changes to user's OS configuration. For example, spice must not make a call to set power profile to Maximum Performance, or switch default audio device. Making the reverse call to restore settings on game shutdown is **not** good enough; there is no guarantee that spice will gracefully shutdown, since games (or spice) can crash. This is to avoid inadvertently putting user's PC into a bad state, which can be seen as malware-like behavior.
Watch out for legacy OS compatibility. Currently, the minimum support floor is Windows 7. If you use any Windows API, make sure it's supported in Windows 7. If you need to use API that is not present in Windows 7, you must not directly link against it, otherwise spice will fail to launch on older OSes. Take a look at Windows 8 touch code (win8.cpp) for examples on how to discover OS APIs via pointers.
### Code style requirements
* Indents are four spaces.
* Try to keep under 100 characters per line. This includes comments and string literals.
* Avoid making unnecessary formatting or whitespace changes in a PR; e.g., watch out for text editor automatically stripping trailing whitespace. It pollutes the diff and slows down code review.
* For signed/unsigned integer types, prefer `cstdint` types; e.g., use `int32_t`, `uint64_t` and not `int` and `unsigned long long`.
* Always use \{ curly braces \} when appropriate; do not omit them even when it's optional; such as `for``if``else`, etc.
OK:
@@ -87,4 +100,9 @@ if (conditional)
}
```
* Please give [C++ Core Guidelines](https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines) a read. A few things to point out in spice codebase:
* We don't use GSL.
* Don't throw exceptions.
* Stick to smart pointers. For interfacing with C Win32 API and raw buffers, use `unique_plain_ptr`.
* Writing in C is also completely acceptable.
* Other than that, there are no strict rules for code formatting, but please attempt to emulate the style around the code you are modifying.
@@ -36,6 +36,7 @@ please do not ask for these, as it will never happen here.
Rules for filing a new issue or adding comments to existing issues in the tracker:
* Low effort submissions will be simply deleted, and repeated attempts will get you banned.
* Check the [known issues](https://github.com/spice2x/spice2x.github.io/wiki/Known-issues) page first before reporting a new issue. If you have some new information or workarounds for a known issue, you can file a documentation bug as well.
* Use the search function and see if there is an existing issue.
* This is not the place to obtain a guide or receive basic troubleshooting.
@@ -55,3 +56,6 @@ We explicitly do **NOT** have a Discord server for dicussions - we try to do eve
Please see [CONTRIBUTING page](https://github.com/spice2x/spice2x.github.io/blob/main/CONTRIBUTING.md) for a full list of guidelines when submitting code.
// If state hasn't changed and either the update was triggered externally or the time hasn't changed, then don't advance head pointer or write a new entry
RUN useradd user -m &&echo"ALL ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers
RUN su user -c "cd /tmp/ && git clone https://aur.archlinux.org/yay.git --depth=1 && cd yay && makepkg --noconfirm -si && yay --noconfirm -S mingw-w64-cmake"
RUN su user -c "cd /tmp/ && git clone https://aur.archlinux.org/yay-bin.git --depth=1 && cd yay-bin && makepkg --noconfirm -si && yay --noconfirm -S mingw-w64-cmake"
Some files were not shown because too many files have changed in this diff
Show More
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.