Sonic and Sega Retro Message Board: SADX Input Mod - Fixed XInput & DInput! - Sonic and Sega Retro Message Board

Jump to content

Hey there, Guest!  (Log In · Register) Help
  • 3 Pages +
  • 1
  • 2
  • 3
    Locked
    Locked Forum

SADX Input Mod - Fixed XInput & DInput! v1.9.1, 06/10/2016

#16 User is offline Ch1pper 

Posted 26 June 2015 - 01:15 PM

  • Fighting the Battle of Who Could Care Less
  • Posts: 601
  • Joined: 01-November 09
  • Gender:Male
  • Project:Life.
  • Wiki edits:40
Yes, sorry, I was responding to you. I downloaded it this morning and, after some fiddling around with having the correct exe just now, I got it working fine. I don't have the 360 version to compare to, but at a quick glance of the character instructions it works as expected. At any rate it certainly gets the job done, so nice job!

#17 User is offline Morph 

Posted 22 July 2015 - 02:52 PM

  • AKA SonicFreak94.
  • Posts: 723
  • Joined: 01-August 08
  • Gender:Male
  • Location:Utah
  • Project:SA1/2 hax
  • Wiki edits:11
Been sitting on this update for a while now!

Version 1.5 now uses a scaled optionally-radial deadzone. This means that when an axis exceeds a deadzone, the value of the axis is a scaled value of 1 to axis max instead of deadzone + 1 to axis max (which is just a hard cutoff). That also means if you have normalization enabled (making it radial, I think? Unless I've got my terminology wrong, which I wouldn't doubt), by exceeding the deadzone on one axis, you inherently exceed it on the other; e.g pressing forward to exceed the vertical deadzone also "exceeds" the horizontal deadzone. It gives you a more Dreamcast-esque full range of motion, is enabled on the left stick by default, and disabled for the right stick since camera movement is so sensitive. If you're a sonic-the-car-driving wuss don't like the full range of motion, you can disable it in your xinput ini using the following parameters:

NormalizeL = (0/1, 1 by default)
NormalizeR = (0/1, 0 by default)



To clarify, disabling it gives you a more Gamecube-esque range of motion, and enabling it gives you the full Dreamcast range of motion.
Download on the first page or github blah blah blah.

Edit: Oh, and configurable controls might be coming next update.
This post has been edited by Morph: 22 July 2015 - 02:53 PM

#18 User is offline LimitCrown 

Posted 26 July 2015 - 01:40 PM

  • Posts: 164
  • Joined: 10-April 15
  • Gender:Not Telling
  • Location:Another Dimension
I'm encountering a few problems with the latest version of this mod. It seems that button configuration is messed up. For example, the left stick button is the start button, the camera automatically rotates, the X button is mapped to down on the d-pad, the R button is mapped to up, and a few others. The trigger buttons can't be used to adjust the camera, too.
This post has been edited by LimitCrown: 26 July 2015 - 01:44 PM

#19 User is offline Morph 

Posted 26 July 2015 - 01:51 PM

  • AKA SonicFreak94.
  • Posts: 723
  • Joined: 01-August 08
  • Gender:Male
  • Location:Utah
  • Project:SA1/2 hax
  • Wiki edits:11
Then it's not even working. Make sure your mod loader is the latest, is actually installed (does the mod manager have an "install" button?), and that you have the redists linked in the first post installed.

#20 User is offline LimitCrown 

Posted 26 July 2015 - 02:12 PM

  • Posts: 164
  • Joined: 10-April 15
  • Gender:Not Telling
  • Location:Another Dimension
Oh. It seems that I had the previous version of the SADX Mod Manager. Sorry about that. It was my mistake.

#21 User is offline CheatFreak 

Posted 03 August 2015 - 07:20 PM

  • Everything or Nothing.
  • Posts: 31
  • Joined: 22-May 13
  • Gender:Male
  • Location:Michigan
  • Project:BetterSADX Patch
Hey, I noticed that on some XInput Controllers- the rumble isn't powerful enough- the mod seems to work okay on the original 360 controller- but on others, like Logitech F710s, the rumble isn't enough to get it to move at all. Would it be possible to have scale number in the xinput.ini that makes the rumble more intense based on the input number?

#22 User is offline Morph 

Posted 03 August 2015 - 07:29 PM

  • AKA SonicFreak94.
  • Posts: 723
  • Joined: 01-August 08
  • Gender:Male
  • Location:Utah
  • Project:SA1/2 hax
  • Wiki edits:11
Yeah, I can do that. I already have the infrastructure set up anyway, and it would certainly be easier than tuning the rumble to be perfect on all controllers (I only have a (dying) 360 controller and a DS4). I'll add it to my to do list.

#23 User is offline Morph 

Posted 16 September 2015 - 05:46 PM

  • AKA SonicFreak94.
  • Posts: 723
  • Joined: 01-August 08
  • Gender:Male
  • Location:Utah
  • Project:SA1/2 hax
  • Wiki edits:11
Version 1.6:
  • Implemented configurable rumble multiplier (1.0 by default). Add the field RumbleFactor to your configuration file to change it.
  • Re-implemented per-controller rumble by detecting the enabled state of the controller.
  • Fixed a bug (with a hack1) which caused slow acceleration when running diagonally from a complete stop.

1 This is implemented by intentionally scaling the axis out of range, then clamping back down to the proper range. The game does this normally to some degree, but I intend to fix the issue ingame which causes the bug in the first place (assuming I can find it). This is configurable if you want to disable it, for example. Just add the ScaleFactor field to your configuration file. The minimum value is 1.0 (disabled, pre-hack behavior), and the default is 1.5 (post-hack default).

#24 User is offline Morph 

Posted 29 November 2015 - 02:58 AM

  • AKA SonicFreak94.
  • Posts: 723
  • Joined: 01-August 08
  • Gender:Male
  • Location:Utah
  • Project:SA1/2 hax
  • Wiki edits:11
New version time! Before updating, there's a few things you should know. The mod has been renamed, so this will not overwrite the old installation of the mod. I recommend deleting it (after backing up xinput.ini) before continuing. If you have any configuration in xinput.ini, you should grab that, rename it to config.ini and put it somewhere safe. Once you've downloaded the newly named mod, you can place config.ini into the mod's folder and it will load just as it did before. It's also using Visual C++ 2015, so you'll have to grab the new redist (linked in the first post) before it will work.

Version 1.7:
  • Renamed from 'xinput-mod` to 'input-mod'.
  • Switched from pure XInput to SDL2 for simultaneous DirectInput and XInput usage.
  • Removed analog scale hack and fixed underlying problem.1
  • Allowed use of keyboard/mouse when no controllers are connected.2
  • Increased theoretical maximum number of controllers from 4 (but sometimes 8) to 8.
  • Allowed loading of SDL controller databases for controllers that behave incorrectly.3


1 The problem as described in the last release seemed to be caused by the way SADX normalizes analog sticks. I've hacked around that and replaced it with the value that's calculated per controller poll which fixes the issue.

2 When no controllers are connected, the controller polling loop in the mod doesn't run. It lets the original DirectInput polling loop do its thing which allows you to use the keyboard and mouse again. Convenient, but still a cover up for the underlying problem: I need to implement it myself.

3 Say your right stick is causing the camera to rotate into oblivion, or your triggers make you run, or some other weird thing. You can create an SDL2 controller definition to be loaded by the mod. It looks for 'gamecontrollerdb.txt` in the mod directory. For more information, as well as a great starting point, check out this repo. There's also an example in the Remarks section of this API documentation.

Edit: Oops. If your mod's folder name is "sadx-input-mod", drop "sadx-" from the name, as that will be how it is from now on.
This post has been edited by Morph: 29 November 2015 - 03:11 AM

#25 User is offline CheatFreak 

Posted 07 December 2015 - 04:15 PM

  • Everything or Nothing.
  • Posts: 31
  • Joined: 22-May 13
  • Gender:Male
  • Location:Michigan
  • Project:BetterSADX Patch
I don't seem to be able to get rumble to work at all on my F710 still, even setting the rumble multiplier to be like- 5 doesn't seem to have any effect.
I know the rumble in my controller works, it has a button on the front that vibrates the motors when you press it, (it also turns rumble on/off but that's not the issue here, I always keep rumble on)
I also tested my rumble with Xpadder and it seems to work fine with that as well.

Any way we could bugtest this sometime?
F710s are pretty common gamepads, so not having it work with those is rather annoying, especially because I much prefer it to the standard Xbox 360 pad.

Edit: After setting the rumble factor to like 50, it now has very slight rumble, and increasing it beyond that seems to do nothing.
This post has been edited by CheatFreak: 07 December 2015 - 04:49 PM

#26 User is offline Morph 

Posted 23 January 2016 - 01:58 AM

  • AKA SonicFreak94.
  • Posts: 723
  • Joined: 01-August 08
  • Gender:Male
  • Location:Utah
  • Project:SA1/2 hax
  • Wiki edits:11
A new version has been released that refactors the way rumble works. I was parsing what was actually the rumble duration as the rumble magnitude which is obviously wrong, but it has now been fixed. It's also leveraging the game's object infrastructure, so I don't have to do any more timer shenanigans. As a result, the rumble is also automatically halted when paused, and resumed when unpaused, which is pretty nice.

Full changelog and download here (Version 1.8).

Edit: And yeah, CheatFreak and I did some debugging on IRC. I'm not just ignoring him I swear =P
This post has been edited by Morph: 23 January 2016 - 02:06 AM

#27 User is offline Morph 

Posted 21 February 2016 - 06:41 PM

  • AKA SonicFreak94.
  • Posts: 723
  • Joined: 01-August 08
  • Gender:Male
  • Location:Utah
  • Project:SA1/2 hax
  • Wiki edits:11
Version 1.9 has been released, although it's mostly a compatibility update. It has such features as rumble during cutscenes, rumble enabled by default when you make a new save, minimum rumble time, and "mega rumble", which fires both motors any time a rumble function is called. Click the link for details on these changes. Too lazy to write them here. :v:

#28 User is offline Morph 

Posted 10 June 2016 - 07:23 PM

  • AKA SonicFreak94.
  • Posts: 723
  • Joined: 01-August 08
  • Gender:Male
  • Location:Utah
  • Project:SA1/2 hax
  • Wiki edits:11
Bugfix update Version 1.9.1 has been released. It removes the CutsceneRumble field because as it turns out, that was actually for demo playback, and fixes some rumble inconsistencies. See the link for more details.

#29 User is offline BlazeHedgehog 

Posted 03 January 2017 - 02:42 AM

  • A "Community Enigma"?
  • Posts: 1395
  • Joined: 23-January 05
  • Gender:Male
  • Wiki edits:51
So I may have run in to a bug, but there's a problem: I don't know how I triggered it, or if it was just a temporary conflict with the other mods I'm using along with the Input Mod.

https://www.twitch.t...111730790?t=59m

I destroyed all the Kikis driving go-karts in Twinkle Park, but the last one, in the blue kart, hit me before I could kill him. Once I killed him and jumped in his kart, I could not accelerate. Upon pausing and restarting the level, everything worked as it should. Mods I am using, in the order they are listed in the Mod Manager:

Quote

Mipmapped Textures
SADX:FE - Code
SADX:FE - Data
SADX:FE - Green ECZ Ocean
SADX:FE - SET Layouts
SADX:FE - Sounds
SADX:FE - Textures
Dreamcast Bosses
Dreamcast Branding
Dreamcast Casinopolis
Dreamcast Egg Carrier
Dreamcast Emerald Coast
Dreamcast Final Egg
Dreamcast Hot Shelter
Dreamcast Ice Cap
Dreamcast Lost World
Dreamcast Mystic Ruins
Dreamcast Past
Dreamcast Red Mountain
Dreamcast Sky Deck
Dreamcast Speed Highway
Dreamcast Station Square
Dreamcast Sub Games
Dreamcast Twinkle Park
ADX Voices
Input Mod
Palette Lighting


I've tried recreating the conditions and I can't get it to trigger again. For all I know, it might not even be an Input Mod bug!

#30 User is offline Morph 

Posted 03 January 2017 - 03:38 AM

  • AKA SonicFreak94.
  • Posts: 723
  • Joined: 01-August 08
  • Gender:Male
  • Location:Utah
  • Project:SA1/2 hax
  • Wiki edits:11
Good news: the fact that you could pause and restart means the input mod was working fine.
Bad news: I have no idea how that happened :v:

edit: p.s. mipmapped textures mod is no longer necessary since the mod loader can automatically generate mipmaps
This post has been edited by Morph: 03 January 2017 - 03:41 AM

  • 3 Pages +
  • 1
  • 2
  • 3
    Locked
    Locked Forum

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users