Dance around early support - #897
Conversation
|
This PR is not ready because I haven't tested the official RealSense D435 camera yet. However, I bought two D430s (they lack the RGB channel but are much cheaper than the D435, and I checked the IDA dump—the game doesn't need RGB frames), and they are currently on the way. I would like to test if the D430 works to help verify the support matrix of the RealSense series. Also, the current code is mostly AIGC. I want to do a local review first to avoid wasting your time on nitpicks, so I opened this as a draft PR. |
| } | ||
|
|
||
| void UDNGame::pre_attach() { | ||
| // The title has no MIDI controls. In the cabinet compatibility profile the |
There was a problem hiding this comment.
what's a cabinet compatibility profile?
| position->cy = outer_height; | ||
|
|
||
| static ULONGLONG last_log = 0; | ||
| const ULONGLONG now = GetTickCount64(); |
There was a problem hiding this comment.
get_system_milliseconds or get_performance_milliseconds
| static bool UDN_INTERACTIVE_WINDOW_RESIZE = false; | ||
|
|
||
| UINT graphics_udn_enforce_message() { | ||
| static const UINT message = RegisterWindowMessageW( |
There was a problem hiding this comment.
suggest moving all of the new UDN-specific graphics code to graphics_udn.cpp
| #include "cfg/api.h" | ||
|
|
||
| namespace games::udn { | ||
| namespace Buttons { |
There was a problem hiding this comment.
spicesdk_io.h also needs update unfortunately
|
Sad, D430 arrived but it is tricky to hack the RGB frame. The vision model Dance aRound used indeed needs RGB frames for human skeleton detection. Data with only depth information is not enough for the vision model to generate skeleton and feeds the game. So now it is hard to verify a native boot with minimal hack (D435 is too expensive). Some webcam using mediapipe works with the game, I will try to test more webcam and SteamVR to make sure code changes are stable. |
|
If it boots and the menu buttons are functional, that's good enough for me. |
e2c3300 to
d5cfe13
Compare
|
Tested full gameplay with Asphyxia and confirmed that cardio, keypad password input, and the online e-pass service are working. Score saving and user profile storage are also working. During local testing without Asphyxia, I found that the -ea option works until the user enters the score screen during their first playthrough, so I appended some new changes after the last review. |
d5cfe13 to
4cbe28a
Compare
|
To support alternative capture devices in DANCE aROUND, plugins need to redirect requests for |
| .category = "Advanced Game Options", | ||
| }, | ||
| { | ||
| // UDNEnableMIDI |
There was a problem hiding this comment.
What's the point of this option if the game will fail to work?
| } | ||
|
|
||
| std::string games::udn::get_buttons_help() { | ||
| return |
There was a problem hiding this comment.
probably worth mentioning here that MIDI is disabled
| // Use half of the game's 1920x3252 single-window render surface by default. | ||
| if (GRAPHICS_WINDOWED) { | ||
| if (!GRAPHICS_WINDOW_SIZE.has_value()) { | ||
| GRAPHICS_WINDOW_SIZE = std::make_pair(960u, 1626u); |
There was a problem hiding this comment.
GRAPHICS_WINDOW_SIZE is a user setting and this will overwrite them on disk. If the goal is to launch the game with sensible defaults, you need to use different globals.
| port_name = portName; | ||
| acio = acioHandle; | ||
| detour::trampoline_try("execexe.dll", MAKEINTRESOURCE(7), | ||
| detour::trampoline_try(execexe_CloseHandle, |
There was a problem hiding this comment.
Have you tested other Unity games to ensure they are not regressed?
| "\xd5\x80\x5e\x3b\xda\xd5\xb3\xae\xec\xe8\x99\x66\x0b\xb7\x55\xe9\xd5\x39\x03\x3d\xd3\x6d\x89\x2f" | ||
| "\x30\x2e\x0f\x3a\x35\x31\x98\x55\x65\x03\x9c\xfc\xad\xbe\x79\x21\x19\x01\x01\x18\x03\x20\x35\x2b" | ||
| "\x58\xe3\xaf\xd9\x89\x7b\x78\xc9\x2a\x19\xbe\x3b\xb5\x09\xf9\xd6\xb9\x68\x8b\x36\xa3\xc7\x39\xd7" | ||
| "\x30\x2e\x0f\x3a\x35\x31\x98\x55\x65\x03\x9c\xfc\xad\xbe\x79\x21\x19\x01\x01\x18\x03\xf2\x20\xcc" |
There was a problem hiding this comment.
What was it before? Changes like this make me nervous because we have no idea if some crusty old game relied on the old string...
| return desc.OutputWindow == main; | ||
| } | ||
|
|
||
| void pace_forced_present(UINT frame_rate) { |
There was a problem hiding this comment.
suggest: moving UDN specific graphics hook into d3d11_swapchain_udn.cpp (having clear file boundaries help us understand which ones are game-specific hacks)
937a3ae to
47e1ab1
Compare
|
Haven't test other Unity game yet, I will try to run CCJ and Polaris later. |
Resolve UDN short ordinal jump stubs before creating trampolines and prefer the kamunity ordinal import for deferred initialization when nearby trampoline allocation is unavailable. Supply the targets expected by the existing detour helper. Keep non-UDN DLL-name/ordinal hook paths and shared MinHook helpers unchanged. Co-authored-by: Codex <codex@openai.com>
Register UDN in the launcher, configuration, e-amusement detection, build and SDK I/O tables. Emulate BI2X buttons, lights and firmware state, and bridge ICCA card/keypad input to existing Spice services. Preserve native handlers for unrelated AIO nodes and reuse native error and firmware-completion predicates. Add argument and I/O overrides. Disable MIDI enumeration before UDN input initialization to avoid the WinMM startup failure, and explain the restriction in button help. Co-authored-by: Codex <codex@openai.com>
Attach existing graphics hooks on the Unity window owner thread using a one-time message hook. Keep UDN D3D11 policy in its own file and use the existing window settings and message callbacks when Unity reapplies cabinet geometry. Scope display-query, fullscreen and output-mode overrides to -w. Reuse PreciseSleepTimer for 60 FPS windowed pacing. Preserve all presentation flags and leave fullscreen intervals and display queries unchanged. Do not introduce automatic window defaults. Co-authored-by: Codex <codex@openai.com>
DANCE aROUND reads the facility name through Unity ANSI marshaling when entering the score screen after a song. Use SPICE2 LOCAL for UDN to avoid the result-page error with -ea. Preserve the packet layout, length, encoding marker, terminator and other fields. Other games retain the original upstream response bytes. Co-authored-by: Codex <codex@openai.com>
Expose the existing library alias facility through a v0.5 SDK callback appended after the v0.4 fields, preserving released field offsets and size negotiation. Protect alias registration and lookup with one shared mutex, releasing it before OS loader calls. This lets external capture replacements receive Unity DLL loads without placing device-specific implementations in Spice. Co-authored-by: Codex <codex@openai.com>
47e1ab1 to
2e1e2ac
Compare
|
Tested Polaris, it start successfully into the eco mode. Also tested windowed and full screen mode Polaris and they are all worked. |
Link to GitHub Issue or related Pull Request, if one exists
N/A
Description of change
This PR add initial supports for running Dance aRound in window mode, with keyboard, cardio supports.
Testing
cut-under-10mb.mp4
Assisted by AI.