Skip to content

Instantly share code, notes, and snippets.

@dogtopus
Last active August 10, 2022 14:07
Show Gist options
  • Save dogtopus/48ad10409aa4ad5c408e31287623e167 to your computer and use it in GitHub Desktop.
Save dogtopus/48ad10409aa4ad5c408e31287623e167 to your computer and use it in GitHub Desktop.
Project Diva slider emulation feature charts

Slider emulation mode feature chart

Stock Buttons Sticks Touchpad ATRF TTRF TGRF AR
Absolute? ✔ (2 points only)
Pinch in/out ordering
Linear encoding ✔ (limited) ✔ (limited) ✔ (limited)
Multi-point (>2) ✔ (directions only) ✘ (current impl) ✘ (current impl) summed
Single swipe fills 31 undeterministic undeterministic 20 40 40 40 (could be ∞) 31
Maximum fills 136 (8 fingers end-to-end) 40 40 40 40+∞ 136 (8 fingers end-to-end)
Maximum speed 2583⅓ ~94²⁄₇ (~34.6 for older M39 builds) ~94²⁄₇ (~34.6 for older M39 builds) 1200 2400 2400 <32000 (?) 2583⅓
Plug-and-play ✘ (slide macros) ✘ (motion control) ✘ (dedicated controller mode)
Empty swipe SE

Notes

Acronyms

ATRF: Analog and Touchpad (2-points parallel) auto switching with cue from Rumble Feedback

TTRF: Touchpad and Touchpad (2-points parallel) auto switching with cue from Rumble Feedback

TGRF: Touchpad and touchpad (2-points parallel)+Gyroscope auto switching with cue from Rumble Feedback

AR: Analog stick Remastered (official dedicated controller slider mode)

Features

Absolute?: Whether or not the method passes the absolute position of touch points to the game and fully let the game decide how to react to the user input.

Pinch in/out ordering: Whether or not the game correctly recognizes pinch in/out slide notes (-><- and <--> notes).

Linear encoding: Whether or not the slider tracks how long the finger moves on the slider.

Multi-point (>2): Whether or not the slider is capable of reporting multiple moving touch points on the slider, including the displacement of all individual touch points (summed=reports summed displacement of all points that has the same moving directions). It might be theoretically possible to do summed multi-point reporting on ATRF and TTRF but this possibility is not currently investigated and developed.

Single swipe fills: Theoretical maximum chain-slide slots filled when swiping end-to-end using only one touch point.

Maximum fills: Theoretical maximum chain-slide slots filled when swiping end-to-end using any number of touch points. On stock slider this is calculated by finding the maximum value for maximum usable space for swiping * touch points = (32-2*n+1)*n where n represents the number of touch points the slider recognizes (recall that the slider registers any touches with 1 or more space in between as multiple touches).

Maximum speed: Theoretical maximum speed the slider can reliably fill, in slots/s. Usually calculated by maximum fills per single valid report / minimum time to perform such report.

Plug-and-play: Works with default settings (Controller vibration enabled on both system and the game, Touchpad slider input enabled) with shoulder button macros being an exception (since they are more or less required for properly doing the hold notes when using DS4 play style and switching between slide and hold macros every time after changing the controller/play style is not acceptable).

Empty swipe SE: Whether or not touching and swiping the slider produces the correct sound effect when not doing slide notes.

Extra notes about *RFs' implementation: This family of modes are based on an observation that the controller rumble is activated if and only if a chain slide note is partially filled and not failing. This makes the controller aware whether or not it is playing a chain slide note and can act accordingly by e.g. switching slider emulation methods from tilting analog sticks to swiping touchpad. By doing this it is possible to workaround limitations of various slider emulation modes and always deliver the best result possible.

Extra notes about TGRF: This mode is still mostly theoretical and all values provided here are not verified in real gameplay, thus are for reference only. Also seems that SEGA implemented some sort of assisting mechanism when using gyroscope control so that the slider will automatically increment at a rate proportional to the tilt angle. This is undesirable on our use case and although a workaround seems to be possible by abusing some of the loopholes in the input algorithm, such workaround is yet to be developed.

Extra notes about dedicated controller mode (AR): In this mode, the analog stick fields (LX, LY, RX, RY) are concatenated together as a single bitfield in little endian, with the MSB being the leftmost slider position. This allows practically perfect arcade slider emulation assuming SEGA reused the same slider logic from AFT in FTPS4/M39.

The mapping is as follows

31                              23                              15                              7                               0
+-------------------------------+-------------------------------+-------------------------------+-------------------------------+
| 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
+-------------------------------+-------------------------------+-------------------------------+-------------------------------+
|              RY               |              RX               |              LY               |              LX               |
+-------------------------------+-------------------------------+-------------------------------+-------------------------------+

Where bitpos 31 being the leftmost sensor. Each byte shall be XORed with 0x80 (stick center value) to make sure the PS4 does not register false stick operations. A simple demo can be found here (and here for value readings in floating point) (by zedamex).

While this is theoretically the best mode available, as of writing this mode is still (both Japanese and international) M39 and Japanese FTPS4 exclusive, which (severely? How many intl version FTPS4 players want a controller?) limits the usefulness of it. Other slider emulation modes like ATRF and TGRF works on all versions of FTPS4.

Moreover, it seems that in dedicated controller mode the game won't buffer the slider input for reverse swiping like what real arcade slider and analog stick would do (see https://mobile.twitter.com/r_y_u_n/status/1228754157823086592) which makes it really sensitive to potential input noises and gives a wrong judgement when this happens. One possible workaround on PS4 is to dynamically switch between TP and AR for normal slides and chain slides accordingly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment