## 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..
## 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
#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
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.
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.
- 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, 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
#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
## 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
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
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
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
#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
#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
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
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
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
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
#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
#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
#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
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
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
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
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.