#81  
Old 1st November 2015, 12:48 AM
ExtremeDude2's Avatar
ExtremeDude2 ExtremeDude2 is offline
Alpha Tester
Project Supporter
Senior Member
 
Join Date: Apr 2010
Location: USA
Posts: 2,653
Default

This guy tho.
__________________
Quote:
Originally Posted by dsx! View Post
are you american or something
Reply With Quote
  #82  
Old 24th February 2016, 11:52 AM
jcbeer jcbeer is offline
Junior Member
 
Join Date: Dec 2015
Posts: 3
Default

Quote:
Originally Posted by Jeremy517 View Post
I suggest changing BUTTON_ANALOG_VALUE in XInputController.h and THRESHOLD in DirectInput.h to much lower values.

For controllers with circular ranges of motion for the analog sticks, the current values can't be hit in the diagonals. This keeps you from being able to press two C buttons at once when using analog sticks for the C buttons. For games that use the C buttons for movement (Goldeneye and Perfect Dark when using controller style 1.2, Turok, etc), being able to press two C Buttons at once is a necessity.

After a bit of experimentation, I found that values of 50 feel ideal to me.
This is true.

Fun fact about your experimental value: I modified the plugin much like you, but without experimentation, and I got 49.

If we divide the analog stick into 8 equal size sectors:



and the sectors, starting from the top going clockwise, correspond to pressing C-UP, C-UP + C-RIGHT, C-RIGHT etc, the correct "button is pressed" threshold value for this behavior (without introducing magnitude + angle calculation) would be 127 * sin(pi/8), which is about 48.6, which is 49 since stick values are integers.

There are some theoretical disadvantages to this approach, but they are not likely to be an issue in the real world.


Another issue is the deadzone correction in XInputController.cpp. The deadzone area is calculated like a square, not a circle. So the deadzone is much larger than it should be when pressing diagonal directions.

By default in Xinput the deadzone is also different for the left and right stick and is quite large, the controller is designed for this.

I have changed the code to give the desired input behavior when using a stick as buttons, and I've also changed the deadzone to be circular and use the deadzone values suggested by microsoft for left and right stick respectively.
The "deadzone fix" makes using the sticks feel much nicer esp. when doing precise inputs for clipping through walls and stuff if you like doing those kinds of things.

If anybody's interested in the modified code or even an updated plugin dll I can provide it, let me know..

Last edited by jcbeer; 24th February 2016 at 12:00 PM.
Reply With Quote
  #83  
Old 24th February 2016, 06:19 PM
jcbeer jcbeer is offline
Junior Member
 
Join Date: Dec 2015
Posts: 3
Default

I added the modified source files (no GPL violation) and a compiled plugin to this post. Note that I haven't changed the name or version of the plugin, so you can't run this plugin and the normal NRage V2 at the same time
Attached Files
File Type: zip NRage_Input_V2_jcb.zip (75.5 KB, 34 views)
Reply With Quote
  #84  
Old 25th February 2016, 06:49 AM
Jeremy517 Jeremy517 is offline
Junior Member
 
Join Date: Apr 2013
Posts: 2
Default

I changed the values in both input plugins and the pull request was merged about a month ago, so if you just grab the latest source or a build from the last month, you should have the analog stick C Button fix.
Reply With Quote
  #85  
Old 26th February 2016, 10:58 AM
jcbeer jcbeer is offline
Junior Member
 
Join Date: Dec 2015
Posts: 3
Default

Quote:
Originally Posted by Jeremy517 View Post
I changed the values in both input plugins and the pull request was merged about a month ago, so if you just grab the latest source or a build from the last month, you should have the analog stick C Button fix.
Okay i thought the project was dead There was no changes to the value when i checked out from the svn repository a few days ago but they might have moved from sourceforge?
I'd like to do some overhaul on the deadzone treatment, right now making slight diagonal inputs is impossible at 10+% ish deadzone levels
Reply With Quote
  #86  
Old 26th February 2016, 04:05 PM
Melchior's Avatar
Melchior Melchior is offline
Alpha Tester
Project Supporter
Super Moderator
 
Join Date: Apr 2007
Location: NH, USA
Posts: 196
Default

That's because they are on Github now
https://github.com/project64/project64/
__________________
(PC Specs)
CPU: AMD FX-9590 4.7GHz 8-core
CPU Instructions: MMX, SSE1-4
Motherboard: Asus SABERTOOTH 990FX R2.0
GPU: nVidia GTX 750Ti SC 2GB
GFX Drivers: Nvidia v416.34
OS: Windows 7 Ultimate 64-bit SP1
RAM: 32GB Kingston 1866MHz DDR3

Favorite Emulators:
PS2 : PCSX2 (Auto-Builds)
SNES : ZSNES

My PJ64 setup:
EXE : v2.4.0.691
GFX : Project64-Video (v2.2.0.691)
SPU : AziAudioNEW (v0.70)(2017-09-14)
INPUT : NRage(v2.5.3.691)
RSP : RSP (v1.7.4.691)
Reply With Quote
  #87  
Old 28th February 2016, 06:33 AM
HatCat's Avatar
HatCat HatCat is offline
Alpha Tester
Project Supporter
Senior Member
 
Join Date: Feb 2007
Location: In my hat.
Posts: 16,260
Default

Quote:
Originally Posted by jcbeer View Post
This is true.

Fun fact about your experimental value: I modified the plugin much like you, but without experimentation, and I got 49.

If we divide the analog stick into 8 equal size sectors:



and the sectors, starting from the top going clockwise, correspond to pressing C-UP, C-UP + C-RIGHT, C-RIGHT etc, the correct "button is pressed" threshold value for this behavior (without introducing magnitude + angle calculation) would be 127 * sin(pi/8), which is about 48.6, which is 49 since stick values are integers.

There are some theoretical disadvantages to this approach, but they are not likely to be an issue in the real world.
Reading this, I was interested by the 8 equal-size sectors part since not long ago I was wondering whether to have intervals of 8 revolutions or some other number, per control stick spin, in an automated fast stick rotation hotkey I added to my keyboard only plugin.

In case it matters I had written a bit more about it at: http://forum.pj64-emu.com/showthread.php?t=5468
Though I imagine it's unrelated to the issue at hand here (certainly to DirectInput etc.).
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT. The time now is 07:17 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.