Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix cellPadGetData #5311

Merged
merged 2 commits into from
Nov 7, 2018
Merged

Fix cellPadGetData #5311

merged 2 commits into from
Nov 7, 2018

Conversation

elad335
Copy link
Contributor

@elad335 elad335 commented Nov 5, 2018

Dont write to press data buffer if CELL_PAD_SETTING_PRESS_ON option was not specified. For now remove clear for other unused parts of the buffer, if a testcase is needed I can write it but I know testing this kinda stuff is a little tricky. Fixes dead island (#5215)

@digitaldude555
Copy link

digitaldude555 commented Nov 5, 2018

screenshot 777
screenshot 776

Fixes press x in williams pinball and makes it go ingame. Also fixes chime super deluxe.

@AniLeo
Copy link
Member

AniLeo commented Nov 5, 2018

List of known fixed games:

  • Mad Riders
  • Call of Juarez: Gunslinger
  • Williams Pinball Classics
  • Dead Island Riptide
  • Chime Super Deluxe

@Kravickas
Copy link
Contributor

Does this apply for games that doesnt react on start up with native ui ?
Like hawx, i cant test.

@elad335 elad335 closed this Nov 6, 2018
@elad335 elad335 reopened this Nov 6, 2018
@elad335
Copy link
Contributor Author

elad335 commented Nov 6, 2018

@Kravickas no it doesnt.

@Asinin3
Copy link
Contributor

Asinin3 commented Nov 6, 2018

Also fixes Call of Juarez Bound By Blood face button inputs on the fullgame and demo! They're both likely playable with this change. EDIT: Confirmed Call of Juarez Cartel is fixed too

@Luffykun007
Copy link

Luffykun007 commented Nov 6, 2018

and Tekken Revolution is also fixed with this PR?

@Asinin3
Copy link
Contributor

Asinin3 commented Nov 6, 2018

Test it.

* Remove complete buffer clear
* If pressure sensitivity option is not specified, write zeroes (should this be handled from our actual controller handler?)
* Check sensor setting before reporting changes
@elad335
Copy link
Contributor Author

elad335 commented Nov 6, 2018

Changed a few things according to a hwtest:

  • If pressure sensitivity option is not specified, write zeroes. (previously written corresponding sesnsitivity values to button presses.)
  • Check sensor setting before reporting changes.
    Testcase invalidates data read with -1 (cant be written by the function) and then reads controller data a with a few settings combinations.

tty output

@Luffykun007
Copy link

Luffykun007 commented Nov 6, 2018

@Asinin3 tested and does not fix!

@incognitoh
Copy link

This PR also fixes the game "nail'd". Buttons now work.

data->button[CELL_PAD_BTN_OFFSET_PRESS_R1] = pad->m_press_R1;
data->button[CELL_PAD_BTN_OFFSET_PRESS_R2] = pad->m_press_R2;
}
if (pad->m_port_setting & CELL_PAD_SETTING_PRESS_ON)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are we missing some length checks? Or is the check against CELL_PAD_LEN_NO_CHANGE enough? There is a check against CELL_PAD_LEN_CHANGE_PRESS_ON that was removed here, I'm just wondering if this could now overflow.

Copy link
Contributor Author

@elad335 elad335 Nov 7, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, CELL_PAD_LEN_NO_CHANGE check is enough. the test shows that its modified regardless of the option or the lengh if there was any new data. which is why I removed a comment saying that realhw only writes up to len.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks

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

Successfully merging this pull request may close these issues.

None yet

8 participants