nestang icon indicating copy to clipboard operation
nestang copied to clipboard

USB controller (DIY) not working [ Tang Nano 20K ]

Open rorrexatnys opened this issue 2 years ago • 4 comments

Update - I reflashed v0.6 and it seemed to work a bit better. However, trying all my controllers I was only able to achieve any input functionality with (1) ROM, and (1) controller. All buttons responded only in the nestang menu and a 240p test suite NES rom using an NES-to-USB adapter.

However, testing any common NES game (SMB1, TMNT3, etc.) none of the controls would respond via USB gamepad, using the same NES-to-USB adapter or any other controller I have.

-- Old post -- I followed the guide and wired my own USB port:

  • Pin 41 --> (D-) [white wire]
  • Pin 42 --> (D+) [green wire]
  • 15K resistor on each data line going to GND
  • 5V (Nano) --> 5V [red wire]
  • GND (Nano) --> GND_USB [black wire]

I've tried the following USB gamepads I own and haven't had any response from ROM select menu:

Sega Genesis Classic 3-Button | ID 0ca3:0025 | Sega Corp. 3B controller
SNES to USB Adapter | ID 0925:8866 | Lakeview Research WiseGroup Ltd, MP-8866 Dual Joypad
Gravis Gamepad Pro  | ID 0428:4001 | Advanced Gravis Computer Tech, Ltd GamePad Pro (if this isn't low-speed I'm not sure what is.)

This one controller eventually worked, but only on the nestang menu and one NES test ROM, but not in any common game like SMB1. NES Controller to USB Adapter | ID 1d57:0021 | Xenta NES PC Game Pad

  • I'm only using one USB port instead of the two shown, but I assume wiring only one USB doesn't affect operation? I've also tried wiring to port 2 (pins 56/54) to no avail.
  • I'm using nestang v0.6 which has USB gamepad support.
  • I've tried swapping data pins to no avail. Likewise tried with and without the pulldowns.

This is a great project, just not sure what I'm missing here for USB gamepad to work. Perhaps I'm overlooking something. Thanks in advance!

rorrexatnys avatar Oct 10 '23 16:10 rorrexatnys

I don't know if @nand2mario agrees, but I stick to the blueretro alternative (or using a cheap microcontroller to handle USB host through a library like tinyusb).

It is not a demerit to manage the peripherals to a microcontroller like MiSTer FPGA does, you save costly FPGA resources for things that are not necessarily related to the system processing besides the project cost will keep low since these devices are cheap.

If there is no issue about merging this idea to the project, I commit myself to do that.

Chandler-Kluser avatar Oct 11 '23 02:10 Chandler-Kluser

WhatsApp Image 2023-10-11 at 13 03 18 i have sucessfully use ortital low speed joysticks of any kind with nestang.. gamepads usually have glitchs. in the picture we disassembly this joysticks and install inside the wood console

mariogazziro avatar Oct 11 '23 16:10 mariogazziro

I don't know if @nand2mario agrees, but I stick to the blueretro alternative (or using a cheap microcontroller to handle USB host through a library like tinyusb).

It is not a demerit to manage the peripherals to a microcontroller like MiSTer FPGA does, you save costly FPGA resources for things that are not necessarily related to the system processing besides the project cost will keep low since these devices are cheap.

If there is no issue about merging this idea to the project, I commit myself to do that.

I think we should support both external IO controller (the blueretro approach you mentioned), and internal IO approach. The most important benefit of the blueretro approach is actually better compatibility with different peripherals like controllers. It is the approached used by MIST. The benefit of the internal approach, on the other hand, is ease-of-use. So we'll also keep that.

In short, I'll merge blueretro related code if it is clean enough.

nand2mario avatar Oct 13 '23 16:10 nand2mario

Is USB controller via GPIO deprecated now?

Would it make sense to use an M0S dock similar to NanoMig, MySTeryNano etc?

BennehBoy avatar Jun 22 '24 19:06 BennehBoy