libretro / pcsx_rearmed

ARM optimized PCSX fork
GNU General Public License v2.0
167 stars 120 forks source link

some difficulty to commit my code #38

Closed alexis-puska closed 8 years ago

alexis-puska commented 8 years ago

Hi everyone, i have some difficulty with git to commit my code, i have use several time SVN repository, but i have made some change in this projet for my personal use, 4 players with pcsx rearmed. i success made change to emulate a multitap, i use the command git clone to checkout the code on my raspberry pi, i have made a script compilation and for launch a rom. i have my code, i can't make a git pull (it's seems like a svn update because i have conflicts. i don't know how to resolved conflicts with git in command line. I have a version of this library with a multitap emulate on port one, we can play with multiplayer game 1-4 players with this version. in other game (1-2 players) we cas use the code in this fork of notaz. Can someone take my code, create a new branch on this projet pcsx-rearmed-multitap and pull the code ? i don't know how to do that, i'm a knob with git. I hope that this code will be used in the next retropie/recalbox distribution. the 2 library for the psx emulator, once for single or two player and once for multiplayer. thx pcsx-rearmed-test.zip

dankcushions commented 8 years ago

I've put your changes in my fork - https://github.com/dankcushions/pcsx_rearmed

I think for this to be accepted we need to make it a libretro core option. Eg,

{ "pcsx_rearmed_multitap1", "Multitap 1 Connected; disabled|enabled" },
{ "pcsx_rearmed_multitap2", "Multitap 2 Connected; disabled|enabled" },

or something like that. Having two versions of the program isn't needed I think, and I don't think that would be accepted. I could try this myself when I have some spare time? But you should get git working so you can get credit :)

We also should try and make this an option for the upstream version IMO. It shouldn't be much different.

alexis-puska commented 8 years ago

hi, I'm in work office and i have not many time, thank's to make my modif on this branch. i hope you have test it and this is compile. I thinks to have a libretro core option is not the best way. Some poeple on retropie / recalbox select a game and it's launch. if we have a libretro core option, we need to modifie the retroarch config files when we want to play with a game for 1-2 players, and when we want to play with a game with the multitap game support (CTR, crash bash) we need to change this option... it's long i think.

If you seen my code, i have made a table for the controler that i save in the key state of each controler and the joysticks value. We can merge the initial code and my code if we know the number of physical device controler plugged and detected when retroarch is launch. In my first think's i will create a code for use the initial code controler when retroarch launch with 1 or 2 controler plugged and detected at starting of retroarch (yellow line at bottom left of the screen). And if we have 3 and more controller, we concat the multitap sequence and send to the playstation core instead of a sequence of single controler

with one controller by psx port the sequence is : the core send 0x42 (request what is connected (type of controller), keystate) we send sequence for 1 controller. id controller, 0x53, keystate on 16 bits, joysticks state

in multitap sequence, the header is different. 0x80 0x53 and the sequence for the four controler port. if none is plugged, all subsequence controller is replace by 0xff (10 time).

dankcushions commented 8 years ago

You can have per-game core config options. If that is turned on, then you would only have to configure each game once and it would save the information for every time you load that game. I do this with the analog option already, for the games that work with analog control. I still think this idea is 'easiest' to do and the most likely to be accepted by libretro.

Is there a problem with ALWAYS being in multitap mode? Do some games not accept it?

Your idea about auto-detecting is nice - good luck! :)

alexis-puska commented 8 years ago

Yes that a good idea, but the retroarch and libretro project is biggest that this playstation core emulator.
In my test if i emulate a multitap on port 1 and plugged controller in 1A some game detect it, but if i emulate the controller 2 in port 1B, this is not seen by the playstation. Some game do'nt see the 2 controler. it's like the real playstation, only game with multitap support, supported it.

I don't know how to find the number of physical controller plugged and if i found it, if i made and option that can be requested by a core library, if the libretro/retroarch team accept this modification.

I think that will make a big meeting on irc channel of libretro/retroarch.

alexis-puska commented 8 years ago

Hello dankcushions,

How made a per-game core config options ? I thinks this was the good way to have a single and same code for the pcsx_rearmed library. is you purpose, made a per game core options to enabled ou disabled the multitap support will be accept by libretro team. Does it make some modification in libretro/retroarch source to get this options ? how can retroarch read the config files and provide theses informations ? if you have any information about it, i take ^^

Alexis

andres-asm commented 8 years ago

No modification needed. Just go to settings/configurations and enable use per-game core options available and then you should see the entry to create options files in core options

dankcushions commented 8 years ago

@alexis-puska yeah as @fr500 says, you just need to enable that option. in your retroarch.cfg, it'll be this: game_specific_options = "true"

then at the top of the quick menu > options menu, you can create a per-game options file. however, i'm not sure where they are saved.. I thought they were added to retroarch-core-options.cfg but I'm setting them and they not appearing there! BUT they are still loading correctly? Weird!

alexis-puska commented 8 years ago

hi, i'm testing it, but it not work's on retropie 3.6 i have added this line but no effect. the tetrarch-core-option.cfg have the new key that i create, when i change the value, i can see it when the emulator launch (some printf in my code for the moment). we have time, but if someone find how to activate an option on a specific game, i can made the change in the code ;) this the time we can find how to.

dankcushions commented 8 years ago

hmm, could you paste your /opt/configs/retropie/psx/retroarch.cfg ? and also /opt/configs/retropie/all/retroarch-core-options.cfg ? maybe I can spot something.

also i had a look at your code - I think you have made the changes on a previous version as it is missing some of the recent changes. see https://github.com/libretro/pcsx_rearmed/commit/18ef7635b0b265350eb8304a26edeb8d4b0b2e19 i'm trying to sort it out on my fork but i'm not too familiar with the code! i will try and test on my end and see if i can try the core-options approach also.

alexis-puska commented 8 years ago

I will take some time tonight to fork the libretro project, add the two core/game options and make my modifications, yes my original git clone has been made the 4 february. something was committed since this date. I will make a clean code and can be configured with game core option.

Edit : I look your previous commit and its seems good. you back the deleted change in my code. i take your branch tonight (if i can) and i add the game option for the multitap.

dankcushions commented 8 years ago

https://github.com/libretro/pcsx_rearmed/pull/39

we can close this now :)