Comments (15)
SukkoPera, I confirm that the new code works with both DDG controllers. Thanks for moving this forward indeed!
from psxnewlib.
Thanks for your report, I will add the two-handle version to the compatibility list.
I know there are other libraries around but they all have issues with one controller or the other. The most famous one doesn't support non-DualShock controllers, for instance. On the contrary, the one you posted doesn't seem to support Analog Sticks/Buttons as available on DualShock and DualShock 2 controllers, at a quick glance. This is one of the reasons why I set to write the one library to rule them all. As stated in the README, I am interested in supporting all the controllers out there, but I can't get my hands on them all, I need help from other people.
In this case, there are a few things you can do for the single-handle version:
-
First: IIRC you will use the
PsxControllerBitBang
driver: if this is the case, try setting HOLD_TIME to 0 and see if anything changes. Or, if you can, please also make a test with thePsxControllerHwSpi
driver (but that will require you to use the HW SPI pins). -
Second: Could you try if the following improves the situation?
- Set INTER_CMD_BYTE_DELAY to 50.
- Set ATTN_DELAY to 100.
Please try the two mods both alone and together and let me know if they help.
-
If all the above fails, enable debug output by uncommenting the
DUMP_COMMS
#define in PsxNewLib.h, try the DumpButtonsBitBang example, let it run a few seconds and post the output here.
from psxnewlib.
(Just for my own reference, this issue is a follow-up from here.)
from psxnewlib.
Test setup:
The densha de Go controller is cabled to an Arduino Lenoardo according to https://github.com/tylau0/DenGo/blob/main/PSX2USB_mod3.ino, which is modified from the PSX2USB.ino example in this library.
The USB output of the Arduino is cabled to a PC.
I use the "Set up USB Controllers" on Windows 10 to test the functioning of the controller. With the one-handle one, all key presses are not detected. In contrast, with the two-handle one, the buttons are detected pressed as expected. If I change to use the PsXLibrary, the one-handle controller works.
-
I set the HOLD_TIME to 0. It doesn't change the situation. My setup isn't set with SPI so the SPI test is skipped for the time being.
-
It doesn't work with INTER_CMD_BYTE_DELAY set to 50.
For ATTN_DELAY, I don't call the PsxControllerHwSpi.sh and it seems to be related to the use of SPI. Since I am not setting it up. Anyway I try the case with changing ATTN_DELAY and both, but both cases don't improve anything. -
Output
Repetition of the following:
...
<-- 01 42 00
--> FF FF FF
<-- 01 42 00
--> FF FF FF
<-- 01 42 00
--> FF FF FF
<-- 01 42 00
--> FF FF FF
...
Hope this helps.
from psxnewlib.
Thanks a lot for your tests. I just wanted to point out that there's an ATTN_DELAY
setting for the BitBanging backend too, can you please try changing that one.
The only other thing that comes to mind is trying to put external pull-ups (1k) on the CMD and DATA lines. I know it's a bit cumbersome though, would it help if I sent you one of my PsxControllerShields?
from psxnewlib.
SukkoPera, thanks for the prompt response.
Further working on the test, I find out that to get the newly loaded library running, I need to unplug and then replug the USB connection from the Arduino after loading the new library. With this I confirm that changing INTER_CMD_BYTE_DELAY to 50 or ATTN_DELAY to 100 in the places that you suggest could get the Densha de Go one-handle controller TCPP-20001. Making both changes would also make it to work too. The two-handle version SLPH-00051 and the typical dual shock controller SCPH-1200 are also working with all these new settings.
from psxnewlib.
Sorry for the delay, I am working on definitely too many things at once :(.
Anyway, I was going to make similar changes for #8 so I took the plunge and tried to fix both issues at once.
Could you please checkout the guncon_support
branch and test if it works with both DDG controllers now?
from psxnewlib.
Glad to hear that! I'll make a new release soon, thanks for your help!
from psxnewlib.
One more thing: I can add your code among the library examples, is that ok with you?
from psxnewlib.
You're welcome.
Yes you could add my code as an library example. You may wish to use https://github.com/tylau0/DenGo/blob/main/PSX2USB_mod.ino as this one doesn't involve other optional parts other than the Densha de Go controller.
from psxnewlib.
All changes merged and example added to master in 632e893, thanks a lot for your help.
Going to release a new version including everything in a couple of minutes.
from psxnewlib.
Commenting on an old closed issue here, but looking for clarity: the README for this project says that you need 1k pullup resistors, but @tylau0 's blog post is not using them and it seems that they were only a (ultimately unneeded) suggestion in this issue. As someone without a ton of experience with these controllers (yet?) I'm wondering whether they're necessary here to get the DDG controllers going, and if not, why not?
from psxnewlib.
IMHO they are required. The original PS has them, and that's enough of a reason for me. Besides it's not much of an effort nor cost. Otherwise signal analysis would be necessary in order to make sure they they rise quickly enough compared to the original PS.
from psxnewlib.
Yeah, tonight I tested with a PS2 controller and it absolutely did not work without the pullups. I guess now the question is how exactly the Densha de Go controller was working for @tylau0 without them. Is it possible the controller has them built-in?
from psxnewlib.
Yes, it is possible. Not all controllers require them, other controllers will work with higher pull-ups, but relying on that means trying your luck. Even worse, if everybody starts doing whatever they like, deviating from the specs, it all just becomes a support nightmare for me. Actually it already is, thanks to the widespread false information that PS controllers can safely be used at 5V and that the ACK signal is unnecessary, sigh.
from psxnewlib.
Related Issues (20)
- Namco Volume Controller SLPH-00015 and 3.3V Arduinos support HOT 16
- Hardware SPI on Leonardo HOT 16
- Trying for most part of 2 days to get this working HOT 5
- Adding support for the Jogcon's motor HOT 13
- Analog Dualshock controller (SCPH-1200) gives type "Guitar Hero". HOT 4
- Wireless Controller keeps disconneting HOT 8
- Multitap (devel branch) HOT 6
- Support for more boards HOT 16
- Generic controller not working HOT 3
- enableAnalogSticks not working HOT 5
- Library cannot compile for RP2040 devices HOT 3
- SCPH-1150 rumble HOT 4
- Seeking compatibility with Steering Wheel Madcatz Dual Force HOT 7
- Controller features detection HOT 1
- Agetec Bass Landing Fishing Controller SLUH-00063
- Multitap buttonPressed HOT 2
- A0 and A1 as OUTPUT for button press???????? HOT 3
- Joystick_ does note name a type; did you mean 'Joystick'? HOT 3
- Guncon support HOT 47
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from psxnewlib.