hrydgard / ppsspp

A PSP emulator for Android, Windows, Mac and Linux, written in C++. Want to contribute? Join us on Discord at https://discord.gg/5NJB6dD or just send pull requests / issues. For discussion use the forums at forums.ppsspp.org.
https://www.ppsspp.org
Other
11.43k stars 2.19k forks source link

Perfect GTA LCS camera movement #9019

Closed TheOfficialFloW closed 3 years ago

TheOfficialFloW commented 8 years ago

Recently I have found a way to gain native control over the pspemu in the PS Vita. Soon I have written a plugin for GTA LCS that patches the camera functions in order to return the right analog values.

I have posted an explaination/tutorial on how I have found them and I would love if developers join this project and try to patch other games. http://wololo.net/talk/viewtopic.php?f=5&t=47219&p=413608#p413608

This will also highly benefit PPSSPP as people will get the best gaming experience using this.

Tell me what you think, TheFloW

unknownbrackets commented 8 years ago

We actually do support the right analog stick already:

https://github.com/hrydgard/ppsspp/blob/842a29b0aedd2e5db59128f3b25b06d803d27386/Core/HLE/sceCtrl.cpp#L54 https://github.com/hrydgard/ppsspp/blob/842a29b0aedd2e5db59128f3b25b06d803d27386/Core/HLE/sceCtrl.h#L27 https://github.com/hrydgard/ppsspp/blob/f77ba7ba3ac72e52cac8c0f7dd62ec7ffd5e7a3b/UI/ControlMappingScreen.cpp#L501 https://github.com/hrydgard/ppsspp/blob/f77ba7ba3ac72e52cac8c0f7dd62ec7ffd5e7a3b/UI/EmuScreen.cpp#L705

And we handle it in the way you would expect: we just fill the ctrl bits. This was used by some HD remasters released for the PS3, and I believe it's been tested with them. So any hack to make a game read these bits should Just Work.

Have you already tried the patch in PPSSPP? Did it not work?

-[Unknown]

TheOfficialFloW commented 8 years ago

Here's a demonstration: https://twitter.com/theflow0/status/780481867149615104

EDIT: Ah sorry I missunderstood you. I haven't tried my patch in ppsspp yet, as I have never used it and so not familiar with it

unknownbrackets commented 8 years ago

Yeah, it sounds like an interesting project. There has also been work done on 60 fps patches for various games and texture replacement packs. Lots of cool areas to enhance games.

I mean, theoretically, one could even enable touch. It would just mean exposing a new function which would have to be added to the stub table in the game patch - or potentially just reusing something like sceIoDevctl. But I'm sure a touch controls patch would be a ton of work.

But this right stick support is pretty cool since it additionally works on the Vita and maybe even on the PS3 (not sure if its remaster support can be coerced into running non-remaster games - afaik it's just an emulator, likely same as with minis.)

-[Unknown]

LunaMoo commented 8 years ago

Just done one myself for a completely different game as a proof of concept, so yeah such patches are already possible on ppsspp using cwcheats to inject code, and right analog is read just fine by normal non remastered games.

Not terribly hard and seems to work better than 8 direction + acceleration which is the case when mapping face buttons to analog stick, but in the end I don't feel like it greatly improved my experience, using a real gamepad over psp was already a huge improvement, so maybe that's why, or maybe psp games are just too simple for it to matter:P.

TheOfficialFloW commented 8 years ago

Nice patch!

For GTA it really makes my gaming experience better, my reason for this post here is to see whether PPSSPP would like to integrate my patches and also because I want to motivate people to write patches for more games, at least for the AAA games, so maybe you @LunaMoo, might be interested too in supporting this project.

Myself I am going to find offsets for all GTA regions and versions.

LunaMoo commented 8 years ago

Will probably not do much more myself simply because I don't have many of such games and also it might be too time consuming, a resource which I recently don't have much. With GitS I had some general plan already since I thought about doing something similar in the past ~ for mouse control, considered using external program / cheat engine to feed the game with mouse info ~ to avoid dealing with ppsspp mouse issues ~ and that had it's own issues, not really sure, if it could get close to proper mouse control anyway so I just gave up on it.

Unsure if [Unknown] or Henrik would like the idea of "integrating" game mods within ppsspp, if cwcheat support isn't enough for your mod, you might need to wait for #724

RinMaru commented 8 years ago

@Fadi5555 I think this would benefit allot of games.

RinMaru commented 8 years ago

@Fadi5555 AFAIK these patches will need to be made individually for each game so this isnt universal. someone would need to code it into TRL and other games

unknownbrackets commented 8 years ago

It doesn't sound like there are any bugs to fix here - it works. I'm sure people would like to see these patches, but it's not really about the emulator.

If anything, it might make sense for someone to create a separate repo, and manage the patches for various games there.

As far as including them in PPSSPP by default, I personally have my reservations, but could see it making sense. Probably makes more sense to consider that when there are a number of patches available so we can think through the UI right for users, if we decided to include (and of course, would need the patch authors to be okay with them being included.)

-[Unknown]

unknownbrackets commented 3 years ago

Closing as per the above. We now have some support the plugins as well (although not kernel function support), so it may be possible to use the same plugins on a PSP and in PPSSPP. See #13335.

-[Unknown]