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

Add in support for using PS3 Guitars as PS2 Guitars in PADEMU #896

Merged
merged 8 commits into from
Mar 23, 2023

Conversation

sanjay900
Copy link
Contributor

@sanjay900 sanjay900 commented Mar 19, 2023

To do this, I added in support for parsing the PS3 Guitar reports, as the hid report format for PS3 Instruments differs from the standard controller. I also added in support for PADEMU to support different models, as PS2 guitars use a different model in the query model and mode command. I also force hold dpad left, as this is another thing the games use for detecting guitars.

For PS3 Guitar Hero Guitars, I map the accelerometer once it hits certain ranges, while for RB Guitars i just map the tilt bit directly as it is still digital on those.

For the frets, I use the RB style mappings as most other instruments except for the PS3 Guitar Hero Guitar use that format, and then when translating the pad I swap yellow and blue for guitar hero guitars.

Pull Request checklist

Note: these are not necessarily requirements

  • I reformatted the code with clang-format
  • I checked to make sure my submission worked
  • I am the author of submission or have permission from the original author
  • [] Requires update of the PS2SDK or other dependencies
  • Others (please specify below)

Pull Request description

Allow using PS3 Guitar Hero Guitars as PS2 Guitar Hero Guitars

Add in a pad_get_model function that allows for getting the model when
querying the model and make, as the Guitar Hero games use this for
identifying Guitar Hero Guitars. Also, force holding down D-pad left as
this is also used by the games for identifying Guitars.
@sanjay900 sanjay900 changed the title Add support for PS2 Guitars to PADEMU Add in support for emulating PS2 Guitar Hero guitars using PS3 Guitar Hero Guitars to PADEMU Mar 19, 2023
@sanjay900
Copy link
Contributor Author

If you want to test this but don't have a PS3 guitar handy, I actually wrote these changes to support some firmware I am working on for various microcontrollers for emulating various instruments, so if you have a spare pi pico or arduino hanging around you can also just emulate a guitar with https://sanjay900.github.io/guitar-configurator

@sanjay900 sanjay900 force-pushed the master branch 3 times, most recently from 036d127 to 557652c Compare March 19, 2023 20:03
@sanjay900 sanjay900 marked this pull request as draft March 19, 2023 20:04
@sanjay900 sanjay900 force-pushed the master branch 6 times, most recently from 9758835 to 17f5cfe Compare March 19, 2023 21:24
@sanjay900 sanjay900 changed the title Add in support for emulating PS2 Guitar Hero guitars using PS3 Guitar Hero Guitars to PADEMU Add in support for using PS3 Guitars as PS2 Guitar Hero Guitars via PADEMU Mar 19, 2023
@sanjay900 sanjay900 marked this pull request as ready for review March 19, 2023 22:13
@sanjay900
Copy link
Contributor Author

sanjay900 commented Mar 19, 2023

I had it tested with original hardware for both PS3 Guitar Hero Guitars, and PS3 Rock Band guitars, and everything works, including tilt.

@sanjay900 sanjay900 changed the title Add in support for using PS3 Guitars as PS2 Guitar Hero Guitars via PADEMU Add in support for using PS3 Guitars as PS2 Guitars via PADEMU Mar 19, 2023
@sanjay900 sanjay900 changed the title Add in support for using PS3 Guitars as PS2 Guitars via PADEMU Add in support for using PS3 Guitars as PS2 Guitars in PADEMU Mar 19, 2023
@AKuHAK
Copy link
Member

AKuHAK commented Mar 20, 2023

@sanjay900 it seems that you are actively working on this pr, let us know when it will be ready for review.

@sanjay900
Copy link
Contributor Author

sanjay900 commented Mar 20, 2023

I am done with it now, had a few more people test it and fixed it up after some feedback.
@AKuHAK

@AKuHAK
Copy link
Member

AKuHAK commented Mar 21, 2023

@sanjay900 can you check with opl test iso how much opl uses ram without your additions, and how much with? If these changes requires too much ram, maybe it will be useful to add additional setting for it.

@sanjay900
Copy link
Contributor Author

sanjay900 commented Mar 21, 2023

@sanjay900 can you check with opl test iso how much opl uses ram without your additions, and how much with? If these changes requires too much ram, maybe it will be useful to add additional setting for it.

Can this easily be done without a console? I don't actually own a PS2 myself. If you gave me some instructions on how to do this i might be able to get someone to test it for me, but I'm not actually sure how to test the ram usage myself.

@AKuHAK
Copy link
Member

AKuHAK commented Mar 21, 2023

Can this easily be done without a console? I don't actually own a PS2 myself. If you gave me some instructions on how to do this i might be able to get someone to test it for me, but I'm not actually sure how to test the ram usage myself.

Oh, but how are you testing guitar support then? Anyway, you just put iso into USB DVD folder and run it as usual, with enabled pademu. Then you compile version with and without your changes and just run both versions with enabled pademu and all other settings the same.

image

@sanjay900
Copy link
Contributor Author

sanjay900 commented Mar 21, 2023

Can this easily be done without a console? I don't actually own a PS2 myself. If you gave me some instructions on how to do this i might be able to get someone to test it for me, but I'm not actually sure how to test the ram usage myself.

Oh, but how are you testing guitar support then? Anyway, you just put iso into USB DVD folder and run it as usual, with enabled pademu. Then you compile version with and without your changes and just run both versions with enabled pademu and all other settings the same.

image

I sent a link with a download in a discord server with a bunch of people who play / mod older guitar games, and a bunch of people tested it with various different guitars. I'll flick these instructions to someone and report back.

Where abouts can I obtain a copy of the opl test iso from @AKuHAK ?

@AKuHAK
Copy link
Member

AKuHAK commented Mar 21, 2023

@sanjay900
Copy link
Contributor Author

sanjay900 commented Mar 21, 2023

@AKuHAK
Screenshot_2023-03-21_10-51-20
With my changes

Screenshot_2023-03-21_10-38-16
Without my changes

@AKuHAK
Copy link
Member

AKuHAK commented Mar 21, 2023

So with your changes it uses less RAM? -512 bytes from what I see. Nice, I hope that you didnt mix the screenshots. anyway 512 byte difference isnt much, so its acceptable. If you can confirm that normal pademu still works after your changes, I think that your pr can be merged without problems.

@sanjay900
Copy link
Contributor Author

So with your changes it uses less RAM? -512 bytes from what I see. Nice, I hope that you didnt mix the screenshots. anyway 512 byte difference isnt much, so its acceptable. If you can confirm that normal pademu still works after your changes, I think that your pr can be merged without problems.

Lol yep I did switch the screenshots, whoops
I'll ask someone to check that it works normally still.

@sanjay900
Copy link
Contributor Author

@AKuHAK just got confirmation that it is still fully working with standard PS3 controllers, so normal PADEMU is still working.

@AKuHAK AKuHAK merged commit d26da79 into ps2homebrew:master Mar 23, 2023
@AKuHAK
Copy link
Member

AKuHAK commented Mar 24, 2023

@sanjay900 can you take a look at this issue?

@ZavEntNet
Copy link

Multiplayer Mode is Unplayable using 2 PS3 Guitars, tested on GH1, GH2 and Rock 80's, Can You solve this ??

@sanjay900
Copy link
Contributor Author

Multiplayer Mode is Unplayable using 2 PS3 Guitars, tested on GH1, GH2 and Rock 80's, Can You solve this ??

I don't really know enough about PADEMU to know why this would be the case, so i wont be able to fix it

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

Successfully merging this pull request may close these issues.

None yet

3 participants