Project

General

Profile

Actions

Emulator Issues #11878

closed

Turntable Extension, increasing the range of Table Left/Right makes it send backwards/negative input

Added by shockdudeX about 5 years ago. Updated about 5 years ago.

Status:
Fixed
Priority:
Normal
Assignee:
% Done:

0%

Operating system:
N/A
Issue type:
Bug
Milestone:
Regression:
No
Relates to usability:
No
Relates to performance:
No
Easy:
No
Relates to maintainability:
No
Regression start:
Fixed in:
5.0-10979

Description

Game Name?

DJ Hero 2
(probably DJ Hero 1 as well)

Game ID? (right click the game in the game list, Properties, Info tab)

SWBE52

MD5 Hash? (right click the game in the game list, Properties, Verify tab, Verify Integrity button)

e7232c297731730c8b98a15661f12780
(note: wbfs image)

What's the problem? Describe what went wrong.

For some turntables, notably the 360 turntable, increasing the Table Left/Right range is required to make the turntable sensitive enough in-game.
With an increased range, fast turntable movements can make the game receive negative/backwards input - this can cause dropped combos which is bad for a rhythm game.
Ideally, the input value should be capped at the maximum value and not go backwards. Integer roll-over, maybe?

What steps will reproduce the problem?

No turntable required.
Map a keyboard key to "Right Table, Left". Also map keys to Green Right, Red Right, and the joystick.
Boot DJ Hero 2 and get to the main menu (pictured)
Press the Table key, the menu should scroll down.
Increase the "Right Table, Left" range to 125.
Press the Table key, the menu scrolls up. Expected the menu to scroll down.

Is the issue present in the latest development version? For future reference, please also write down the version number of the latest development version.

Yes, 5.0-10975

Is the issue present in the latest stable version?

Yes, 5.0

What are your PC specifications? (CPU, GPU, Operating System, more)

Intel i7-4720HQ
Nvidia GTX 860M
Windows 10 1903


Files

mainmenu.png (1.19 MB) mainmenu.png shockdudeX, 10/15/2019 03:26 AM
Actions #1

Updated by shockdudeX about 5 years ago

This also affects the Crossfader. Bind a key to a Crossfade direction, set the range to 150, and the crossfader will go the opposite direction in-game.

Actions #2

Updated by shockdudeX about 5 years ago

Confirmed a integer rollover in how the turntable bits are encoded.
Editing Turntable.cpp Update() so that the left/right table State is always between -1 and 1 makes this issue go away.

I haven't contributed to Dolphin before and I'm pretty sure this solution can be better implemented by someone else. Should I open a PR anyway?

Actions #3

Updated by Billiard26 about 5 years ago

  • Status changed from New to Accepted
  • Assignee set to Billiard26

I'll make a PR tonight if you don't get to it.

Actions #4

Updated by Billiard26 about 5 years ago

  • Status changed from Accepted to Fix pending
Actions #5

Updated by shockdudeX about 5 years ago

Billiard26 wrote:

https://github.com/dolphin-emu/dolphin/pull/8407

@shockdudeX
Please test the PR if you can.

Tested with a 360 turntable, it works great! No more reverse inputs.
The code looks good to me, too, much nicer than what I had written. Thanks for the implementation!

Actions #6

Updated by JosJuice about 5 years ago

  • Status changed from Fix pending to Fixed
  • Fixed in set to 5.0-10979
Actions

Also available in: Atom PDF