djtulan/nunchuk64

Problem communicating with Nes mini clone controller

Opened this issue · 3 comments

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

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

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

Ah yours are wireless.
Mine are wired i2c