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

Problem communicating with Nes mini clone controller #18

Open
Johnlon opened this issue Aug 25, 2021 · 3 comments
Open

Problem communicating with Nes mini clone controller #18

Johnlon opened this issue Aug 25, 2021 · 3 comments

Comments

@Johnlon
Copy link

Johnlon commented Aug 25, 2021

Apologies for posting this as an issue - not sure how to get in touch with folk who understand the protocol.

I'm finding that I cannot get a valid response from the controller until I have called decrypt and then init on it.
My controller is a cheap gamepad clone from eBay.

I can see that the nuncheck source code in controller.c get_id() seems to be reading the controller device id before doing anything else and then using that response to decide whether the init and or decrypt should be called and n what order.

However, with my controller I cannot successfully get the device id until I've already decrypted and init'd the controller.
Up until I have decrypted and init'd the controller I just get 0xFF as the device id.
This means the nuncheck64 takes be down the device unknown branch.

However if I do EXACTLY the sequence decrypt/init/getid then I get back 0x01 | 0x00 | 0xA4 | 0x20 | 0x03 | 0x01

This result is similar to the one you have for ID_NES_Classic_Mini_Clone_Encrypted however byte[4] is is 0x03 in my case rather than what you have 0x00 because my init code is requesting data format 3 and not data format 0.

Data format 0 is not available on my controller and it only respond with 8 bytes (ie format 3) and not 6 bytes so rather than doing an init requesting format 0 I'm requesting format 3. BTW If I request format 0 it still respond with format 3 regardess.

In anycase it seems the logic in nunchuck 64 doesn't work for my clone and the only order that works is .. decrypt/init and then getid or read state work fine.

Is this a known issue with some controllers?

Is there a forum where this would be better asked?

Thanks

@Johnlon Johnlon changed the title Problem wit communicating with Nes mini clone controller Problem communicating with Nes mini clone controller Aug 25, 2021
@avongil
Copy link

avongil commented Dec 21, 2022

Have you figured this problem out? I am having issues connecting my SNES wireless clone also. Any insight would be great.

@Johnlon
Copy link
Author

Johnlon commented Dec 21, 2022

Yes got it working with cloned i2c controllers off eBay....

https://hackaday.io/project/181036-nes-controller-interface-using-pic16f18446

All code is in GitHub including notes....

https://github.com/Johnlon/NESInterfaceAndPeripherals/blob/main/README.md

Hope that helps

John

@Johnlon
Copy link
Author

Johnlon commented Dec 21, 2022

Ah yours are wireless.
Mine are wired i2c

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

No branches or pull requests

2 participants