[Patch] Input System

Technical discussion for those interested in Supermodel development and Model 3 reverse engineering. Prospective contributors welcome.
Forum rules
Keep it classy!

  • No ROM requests or links.
  • Do not ask to be a play tester.
  • Do not ask about release dates.
  • No drama!

[Patch] Input System

Postby HarryTuttle » Sat Mar 11, 2017 12:43 pm

Very little changes to the Input System in general. Maybe Bart could keep an eye on it and see if it fits his private build and/or could be safely submitted to the current public one.

<Inputs.cpp>
- Changed middle value for 'FishingReel' from '0x80' to 0, so that leaving analog/digital controls in neutral position doesn't cause fishing reel to spin. Total excursion "resolution" is halved, but at least is more usable.
- Swapped 'FishingRodY' and 'FishingStickY' axis min/max levels so you don't have to invert them in supermodel.ini, also control mapping is a little more obvious and natural (i.e. InputFishingStickDown = "JOY1_POV1_DOWN")
- Code cosmetics: adjusted some alignment using spaces and tabs

<Main.cpp>
- Added 'InputSystem' option parsing to supermodel.ini, in addition to the existing one from command-line. Add it to the 'Global' section and specify, between double quotes, the subsystem (i.e. InputSystem = "xinput")
- Changed (non working) mouse hiding function from "Inputs->GetInputSystem()->SetMouseVisibility()" to "SDL_ShowCursor()" and set to hide it when playing with light gun (Lost Word) or when in fullscreen.

<Model3.cpp>
- (From MAME) sets only one bit, instead of two, for gear shift up/down in Harley. Can't see any difference though.
- Added correct cast/select inputs for "getbass". For what is worth, since is still unplayable.
Attachments
diff.zip
(3.59 KiB) Downloaded 32 times
Last edited by HarryTuttle on Sat Mar 11, 2017 2:33 pm, edited 1 time in total.
User avatar
HarryTuttle
 
Posts: 318
Joined: Thu Mar 09, 2017 8:57 am

Re: [Patch] Input System

Postby Ian » Sat Mar 11, 2017 2:10 pm

I'll let Bart merge these :)
Ian
 
Posts: 874
Joined: Tue Feb 23, 2016 9:23 am

Re: [Patch] Input System

Postby HarryTuttle » Sat Mar 11, 2017 2:32 pm

Ian wrote:I'll let Bart merge these :)


Thank you very much! :)
User avatar
HarryTuttle
 
Posts: 318
Joined: Thu Mar 09, 2017 8:57 am

Re: [Patch] Input System

Postby Bart » Sun Mar 12, 2017 10:37 am

I'll take a look at this later today. I think the best approach will be to merge it in and then try to merge it back to my local branch. I was actually working on converting over the input system to my new config scheme but haven't touched it in a few weeks.
User avatar
Bart
Site Admin
 
Posts: 1838
Joined: Thu Sep 01, 2011 2:13 pm
Location: New York City

Re: [Patch] Input System

Postby HarryTuttle » Sun Mar 12, 2017 11:28 am

Ok :)

I've also modified the GNU Toolchain makefile, if interested.

Beside the tidier output, the important change is that you can compile faster by multithreading, before it stopped halfway and you had to reissue the command to finish.
User avatar
HarryTuttle
 
Posts: 318
Joined: Thu Mar 09, 2017 8:57 am

Re: [Patch] Input System

Postby Bart » Thu Apr 06, 2017 10:50 pm

Merged in the Harley and Bass Fishing changes (although I changed the reel input into an analog input, like a pedal, rather than an analog axis). I spent some time trying to understand what's with the the rod appearing to be constantly pressed in one direction or the other horizontally but couldn't figure it out. The input test in the service menu works fine.
User avatar
Bart
Site Admin
 
Posts: 1838
Joined: Thu Sep 01, 2011 2:13 pm
Location: New York City

Re: [Patch] Input System

Postby Bart » Fri Apr 07, 2017 7:04 am

HarryTuttle wrote:- Changed (non working) mouse hiding function from "Inputs->GetInputSystem()->SetMouseVisibility()" to "SDL_ShowCursor()" and set to hide it when playing with light gun (Lost Word) or when in fullscreen.


SetMouseVisibility() isn't working? I thought it was. Or do you mean specifically in windowed modes?
User avatar
Bart
Site Admin
 
Posts: 1838
Joined: Thu Sep 01, 2011 2:13 pm
Location: New York City

Re: [Patch] Input System

Postby HarryTuttle » Fri Apr 07, 2017 9:13 am

Bart wrote:
HarryTuttle wrote:- Changed (non working) mouse hiding function from "Inputs->GetInputSystem()->SetMouseVisibility()" to "SDL_ShowCursor()" and set to hide it when playing with light gun (Lost Word) or when in fullscreen.


SetMouseVisibility() isn't working? I thought it was. Or do you mean specifically in windowed modes?


The mouse is always shown, no matter what. This is the original code in <Main.cpp>:
Code: Select all
Inputs->GetInputSystem()->SetMouseVisibility(!s_runtime_config["FullScreen"].ValueAs<bool>());


The problem is not the argument passed to SetMouseVisibility, it's the function that, based on input system type could be either:
Code: Select all
void CSDLInputSystem::SetMouseVisibility(bool visible)

or
Code: Select all
void CDirectInputSystem::SetMouseVisibility(bool visible)

but doesn't affect the mouse visibility. Honestly, however, I didn't dig much into the code, I just cut short by inserting "SDL_ShowCursor".

Maybe an hint: I choose "xinput" system in Supermodel config, could it be that it's missing the correspondent function?
User avatar
HarryTuttle
 
Posts: 318
Joined: Thu Mar 09, 2017 8:57 am

Re: [Patch] Input System

Postby Bart » Fri Apr 07, 2017 10:37 am

I'll have a look at this tonight or tomorrow. Thanks!
User avatar
Bart
Site Admin
 
Posts: 1838
Joined: Thu Sep 01, 2011 2:13 pm
Location: New York City


Return to The Dark Room

Who is online

Users browsing this forum: No registered users and 3 guests