Input issues with mednafen_psx

It’s not the first time you are a prick to the only one trying to help you. You are always defensive and demanding at the same time. I gave you many options. I even taught you how to use the windows terminal.

After a week or more trying to diagnose an issue I would have guessed your config might have changed at least a bit. And your issue doesn’t appear here. I’ve shown you videos of me trying the games you’re having issues with and I don’t have the issue.

Dualshock is important because that’s the controller that has analogs. With PS1 pad and analog dpad emulation you are only simulating inputs that don’t really exist.

Bottom line. Your issue can’t be reproduced. At least not by me. I have fairly recent builds of both RA and beetle. And as I mentioned the last mednafen-psx you’ll ever find.

If you disable autodetection then you need to hit configure retropad to set you inputs again.

I don’t have any of the control issues you described with SotN (USA or Japan with the English fanpatch) or RE 2 DualShock Edition USA. I don’t have the normal USA or Spain versions of RE2 or any version of TPS2 to test. I’m using a 64bit RA build I made a few days ago and a Mednafen-PSX core from lordashram’s 2014-06-09 test build. I haven’t tried beetle yet since it sounds like it has issues.

Here’s my PSX config for non analog games. I use a Wii U Pro Controller with a Mayflash USB adapter in Xinput mode, so the mappings are the same as a 360 controller. I use an add on config for games that support the DualShock controller that I tell HyperSpin to load with:

-c Config\PSX.cfg --appendconfig Config\PSX-DualShock.cfg

I fixed analogs and rumble in beetle, tested extensively, you might be interested https://github.com/libretro/beetle-psx- … 4325f7e277

Cool, thanks!

@awakened: I tested with your files and from the point I use DualShock (input_libretro_device_p1 = “517”) no buttons response. So I have to switch to PS1 joypad. Then obviously only the d-pad works because you didn’t configure joystick in your config (you did for the dualshock joysticks). So the problem is DualShock, do I need something else? This was tested on a “clean sheet” with latest build “17-07” and its medafen_psx core. I’m debugging this with Castlevania in case that makes a difference…

Your configs were a bit strange too, in order to run the game smooth I had to change a few things to: video_hard_sync_frames = “0” video_swap_interval = “1”

Could you hand me your retroarch.cfg file? I think this is the global configuration file RetroArch fallbacks to.

Castlevania doesn’t have DualShock support, so you’d want to use PS1 Joypad as your device type for that specific game. I have the left stick mapped and d-pad analog mode set to left stick in that config, so 8-way movement on that stick should work. But only in PS1 Joypad mode. If it’s not working with that device type selected I’m not sure what could be wrong; are you using RetroArch’s per-core config setting? I’ve found that can be buggy with some things.

The majority of PS1 games don’t support DualShock. Which is why it was fairly easy for me to use a non-Dualshock config as my base for most games and have the add-on config with it enabled for the few that do. There’s a decent list of DualShock enabled games at NGEmu. It’s not complete; just checking it quickly I notice it misses Chrono Cross. If you wanted to be thorough you’d have to see if you can find a better list or try enabling Dualshock in each game and seeing if analog movement or vibration works.

My retroarch.cfg is much like my other configs actually; I use it for trying out new cores before I officially add and launch them through HyperSpin. So it’s basically like my PSX.cfg, but set up for Saturn right now since I’m trying out Yabause. I don’t like the huge messy configs you get with save config on exit enabled. My configs only have things that are different from the defaults. I can merge the changes from my DualShock add-on config with my standard one if that helps: Link. I changed hard sync frames back to 0; I needed it at 1 for better performance with CRT-Royale, but I switched to CRT-Easymode which is much less demanding. I removed the swap interval line (which makes it default to 1) as well; that’s for hitchless scrolling on my 120hz monitor :). You’d of course still only use that config for games that support the DualShock controller though.

Thanks for the help Awakaned, it gave me a base to work with. I spent the last 2 hours trying to figure out what was wrong, it happens to be a bug (again!). I always default input_autodetect_enable to “true”, so I don’t need to do any mappings, only on those that weren’t auto-mapped (i.e. +0,-0,+1,-1 for the left stick) (like you I only change what is needed from default). Problem is that by default the B and A buttons had two actions each bound to them. So when you jump it also shifts to one side, etc. You can remap those two conflicting buttons and it will solve the problem.

Another thing I tested is if I could run one config for both types of games, those with DualShock support and without, and they both worked. I could play Crash and I can make him walk or run, and in Castlevania I can manage the character with joystick. Can you confirm, or is there something I missed?

By the way, also wanted to ask, what is exactly analog_dpad_mode option? should be on for DS and off for PS1? This is all I found and didn’t make it clear: “Allows to use an analog to simulate the d-pad, it’s configured in a per player basis”

Castlevania doesn’t have DualShock support, so you’d want to use PS1 Joypad as your device type for that specific game. I have the left stick mapped and d-pad analog mode set to left stick in that config, so 8-way movement on that stick should work. But only in PS1 Joypad mode. If it’s not working with that device type selected I’m not sure what could be wrong; are you using RetroArch’s per-core config setting? I’ve found that can be buggy with some things.

The majority of PS1 games don’t support DualShock. Which is why it was fairly easy for me to use a non-Dualshock config as my base for most games and have the add-on config with it enabled for the few that do. There’s a decent list of DualShock enabled games at NGEmu. It’s not complete; just checking it quickly I notice it misses Chrono Cross. If you wanted to be thorough you’d have to see if you can find a better list or try enabling Dualshock in each game and seeing if analog movement or vibration works.

My retroarch.cfg is much like my other configs actually; I use it for trying out new cores before I officially add and launch them through HyperSpin. So it’s basically like my PSX.cfg, but set up for Saturn right now since I’m trying out Yabause. I don’t like the huge messy configs you get with save config on exit enabled. My configs only have things that are different from the defaults. I can merge the changes from my DualShock add-on config with my standard one if that helps: Link. I changed hard sync frames back to 0; I needed it at 1 for better performance with CRT-Royale, but I switched to CRT-Easymode which is much less demanding. I removed the swap interval line (which makes it default to 1) as well; that’s for hitchless scrolling on my 120hz monitor :). You’d of course still only use that config for games that support the DualShock controller though.[/quote]

Ive found the best way to handle multi systems is to have one base config and use.the appendconfig option with only the stuff you want to override from the main config.

Works well with auto save and everything since all changes are only saved to the main cfg.

Analog dpad mode simulates a digital dpad on an analog stick. That’s all. If you want to use just one config the best would be to use dual shock and in core options disable analog toggle. Then you would have to use the in-game witch to enable analogs on the games that support them. That’s Start+Select+all the shoulder buttons.

What’s difference between that and simply map a d-pad to a joystick directly? Or in other words, when would you want to use that?

I had it enabled and as I said my config was working for both types without doing anything.

Analogs are analog. They provide finer control. You can move them a little or all the way allowing you to crawl or walk or run.

What do you mean with anything. Noo inputs at all? Or no analog inputs?

I’m sorry I don’t know where you want to get at. You either do this: input_player1_left_axis = “-0” (use the joystick, digital or analog if supported) or this: input_player1_left_btn = “h0left” (Use d-pad, digital -or analog?-) what you mean is something like this?: input_player1_left_axis = “h0left”

“Without doing anything”. I didn’t need to change device type back and forth between ps1 and DualShock to play on both types of games, 1 config plays both, as I said on analog too, Crash walks and runs if pushed further.

Ok, seems you are quite confused here. Forgive me, not trying to call you a noob or anything, I’m just gonna be very thorough for the sake of the explanation.

Retroarch works like a console (actually a virtual console) where you run games (in this case cores). As any other console it has it’s own gamepad (virtual), it’s called the RetroPad. If it was real it would look like this:

BTW, there is no actual RGUI button in the RetroPad. Now, this gamepad as I mentioned is virtual, actually it’s an abstraction, and it was designed to cover most use cases of retrogaming. Since it’s virtual you have to map a real controller to that pad, and that’s what you are doing when configuring via RGUI or via the cfg file.

Every button / axis of that virtual gamepad can be mapped to a key, a button or an axis of a real input controller. Then there is the core, cores are “hardwired” to the retropad. In SNES’s case, the directional buttons are wired to RetroPad’s hat, YXABLR are wired to YXABLR and the same for SELECT/START. Analogs aren’t wired at all.

But what if you want to move the character with the Left Stick? Well that’s what analog_dpad_emulation is for. It emulates a dpad using an stick without having to remap your buttons. It doesn’t disconnect the hat, so both should work when it’s enabled. Without analog_dpad_emulation you would have to remap RetroPad’s hat to your controllers Left-stick axes to achieve the same.

With PSX things are a lot more complicated.

PSX had three notable gamepads, the basic PS1 pad (no analogs), the Dual Shock and it’s predecesor, the Dual Analog. Some games support them all, some games only support some. For instance MMX4 won’t work with a Dual Shock unless you disable the analogs (on the real console). The Dual Shock and Dual Analog had a button to toggle analogs on/off. While off these pads would behave like a PS1 Pad, when on the pad would tell the console HEY I’M A DUALSHOCK and initiated a different communication protocol.

So, in the mednafen core you have the possibility of using PS1 pad or DualShock, DualAnalog or flightstick, but you are subject to the same compatibility problems the real thing might have had with any of these controllers. Generally speaking, DualShock with analogs off should be the most compatible. But your mileage may vary.

You select your controller on the input settings menu. When you have a PS1 pad + DPAD emulation you don’t have ANY analog control. You are just simulating the DPAD on the stick and there is no granularity in movement range at all.

In this mode pushing a bit or pushing a lot of an stick will just tell the core that the button is pushed, the game might have some logic to make it appear like analog control was used but the input is pure digital.

If you change to DualShock and enabled the sticks (either by disabling the Toggle button core option which will force analogs to be on or by using START+SELECT+L1+L2+R1+R2) on a game that supports DualShock you’ll get REAL full analog control.

Now, I don’t know what happens if you have dpad emulation enabled and DualShock at the same time. My guess is DualShock overrides this but I may be mistaken. I’ll have to that. Also bear in mind a game with DS support could have different actions for the stick and the hat.

Now to your questions.

I’m sorry I don’t know where you want to get at. You either do this: input_player1_left_axis = “-0” (use the joystick, digital or analog if supported) or this: input_player1_left_btn = “h0left” (Use d-pad, digital -or analog?-) what you mean is something like this?: input_player1_left_axis = “h0left”

If you do this: input_player1_left_axis = “-0”, that’s correct and it works on all scenarios. If you do

input_player1_left_btn = “h0left” , then that’s correct too, it makes the hat left work as hat left. This is wrong: input_player1_left_axis = “h0left” it will result on the analog stick to work like a digital button.

What dpad emulation does is accept whatever you have mapped to the left stick as it was the hat without changing ANYTHING in the config.

“Without doing anything”. I didn’t need to change device type back and forth between ps1 and DualShock to play on both types of games, 1 config plays both, as I said on analog too, Crash walks and runs if pushed further.

As I said, your mileage may vary. As far as I know Crash Bandicoot does NOT support the dualshock, it will work with DualShock with the sticks off I guess. Either that or it has some logic to make if appear as if there was analog controls or you’re playing Crash Bandicoot Warped that does support it. I haven’t played much Crash games so I don’t really know.

You should always use Dual Shock with analogs on and dpad emulation off on games that support it, and in the games that don’t support it you could use PS1 pad with Analog emulation or DualShock with sticks of and Analog emulation. End result is the same.

You should use the latest beetle core that one tells you at startup if analogs are on/off and it’s the only supported core at the moment

I know more (actually much more) than you might think. But in any case the help is appreciated. I have that pic and the other one (with the commands) inside my config folder and I’m continually looking it up (this whole afternoon for example). To begin with I never had a playstation, 1, 2, 3 or 4, so I’m really ignorant on their pads. Did the PS1 ever had a stick? I searched for it a few days ago, but it’s not something people tend to ask.

So if one wants to play how it was supposed to be, d-pad emulation should be always OFF, right? meaning RetroArch defaulting to either d-pad or stick. And when you want to play with stick for those systems/games that were d-pad only, you enable it. Basically an emulation “feature”, and moreover, shortcut, since one is already able to do this configuring buttons manually.

What I was saying is that I used device_type 517 (DualShock) and I could play either Crash 3 (Warped) and Castlevania, being the latter a no-DualShock game (or is it?). How I did it; instead of using the “analog_dpad_mode” I did it manually because in my head: manual dualshock setup > manual setup > analog_dpad_mode ( > manual dualshock setup?) The dualshock stick buttons/axis are separated from the main (PS1) stick buttons, so you can have both on the same config. Yet you want the analog_dpad_mode off for the DualShock games, right?. In this case the manual DS buttons will override the manual (PS1) stick buttons. This way you can play both types of games without doing strange toggle combinations, or at least that is what I wanted to explain in my post above. I can run more tests, but tomorrow, today is enough.

"Also bear in mind a game with DS support could have different actions for the stick and the hat. "

This could be the only problem I see, but it would really suprise me that PS1 era games used so many buttons. In this case one would want to try this: input_player1_left_btn = “h0left” input_player1_left_axis = “-0” The DS joystick overrides the “axis” set, and you can keep using the dpad.

I’m using the latest RetroArch build as I said above, 17-07-2014. The core is called medafen_psx, but the core options are registered as bettle_mednafenpsx, I bet it’s the latest core build.

It would be appreciated if you or any other can reproduce my reported bug above and confirm, at this point we should cover bugs first and foremost IMO.

Yes analog dpad emulation should be off for the “real experience”. Also it should always be off when you are trying to find out why stuff is not working as intended.

In any case, one config for non DS games and one for DS games would be the most sensible choice for people who use external frontends. PS1 pad with analog emulation (if you like controlling stuff with the sticks) for non-DS games, and DualShock without analog emulation and the Toggle option disabled for DS games.

Castlevania is not a DS game as far as I’ve tested.

About the bug, I guess you mean B button doing two different things. I wasn’t able to reproduce that and no one else has reported that so I don’t know.

That’s a bit painful to setup, AFAIK that would mean from the frontend point of view setting up a new system (with all the work that carries), so for me what works is what goes, when I get an issue, I might think what to do. I don’t have many games either (54)

You haven’t run through it, or have you expressly tested and couldn’t reproduce? You need to set input_autodetect_enable to true.

I have two setups, a clean setup with nothing configured (auto detect is on by default) where I test stuff, and my gaming setup. It didn’t happen on either of those

I’ll try again tonight

Ok, tested with a clean config, nothing configured at all, made sure input_autodetect_enable was true. Upon loading RA will detect my xbox 360 controller and autoconfigure all the buttons correctly.

Fired Castlevania on Mednafen, everything working perfectly. The sticks weren’t working as intended. Enabled d-pad emulation and it worked perfectly again.

Fired Megaman X6, same results.

Fired Tony Hawk’s Pro Skater 2 with PS1 pad, everything working, switched to Dual Shock and analogs now work for rotation as intended, switched the Toggle on and then did the ANALOG combo and they were disabled as they should, switched them back on and it still worked. Same tests with GT2 and I can confirm RUMBLE is working too.

Sorry mate not a bug. Try again on a totally clean config.

Ok, I started from scratch. My goal is to use one config for both types of games (ps1 and DualShock). With that on mind device must be set to 517 (DualShock). input_autodetect_enable option is not important if you override Auto buttons with manually defined ones, which I have done. input_player1_analog_dpad_mode is not important nor relevant here. beetle_psx_analog_toggle = “disabled”.

With this you start a DualShock game and works as expected, launch a PS1 game and it doesn’t. The toggle combo start+select+2 shoulder/trigger buttons won’t work in this condition.

So I don’t understand when you say:

Change to beetle_psx_analog_toggle = “enabled”, and the PS1 game works as expected, and DualShock game works as expected too. So this is how it should be configured. Now the above combo works, although I don’t see its use since everything works out of the box. PS1 works, when combo applied pad no longer response. For DualShock games when combo is executed it will change everything to digital.

So for me this is a wrap, until new issues arise. here’s my config: http://pastebin.com/6XHjdxwX