How to do wireless, bluetooth controllers with a NES or SNES

Discuss hardware-related topics, such as development cartridges, CopyNES, PowerPak, EPROMs, or whatever.

Moderators: B00daW, Moderators

shadash
Posts: 13
Joined: Wed Aug 21, 2013 8:44 pm

How to do wireless, bluetooth controllers with a NES or SNES

Post by shadash » Wed Mar 25, 2015 12:00 pm

For the last couple of weeks I've been thinking about how to do wireless controllers for NES and SNES.

I've looked at Arduino, IR, RF, etc and I've seen a couple of projects that involved either hacking up an existing controller or creating new controller from the ground up. Instead of trying to reinvent the wheel I looked at as many existing solutions that I could find and tried to see if they could be applied in new ways.

Looking at ebay and amazon I can see that there's all kinds of NES/SNES bluetooth controllers that seem pretty nice. Why not just use one of them.

Here's the idea...

1. Get a Raspberry Pi
2. Connect a RPi supported bluetooth dongle
3. Install this https://github.com/SonnyJim/snesbot on the RPi OS
4. Get an old NES/SNES plug + cable and connect to the RPi to get Power from the NES/SNES and to send instructions to the NES/SNES
5. Pair a bluetooth controller with the RPi

It might take some modification of https://github.com/SonnyJim/snesbot to accept input from the bluetooth controller. But, when implemented this should allow users to use any bluetooth controller with an actual NES/SNES.

Please let me know what you think. I'm writing it here to get the idea out if I get too lazy to implement.

lidnariq
Posts: 9305
Joined: Sun Apr 13, 2008 11:12 am
Location: Seattle

Re: How to do wireless, bluetooth controllers with a NES or

Post by lidnariq » Wed Mar 25, 2015 12:17 pm

Since the NES/SNES protocol is roughly half-duplex SPI, it should be feasible to use the RPi's native SPI hardware rather than rely on external 4021s. (the latter is what snesbot did).

It should be easy to extend snesbot to serve as a USB/BT mouse->SNES adapter too.

shadash
Posts: 13
Joined: Wed Aug 21, 2013 8:44 pm

Re: How to do wireless, bluetooth controllers with a NES or

Post by shadash » Wed Mar 25, 2015 3:49 pm

Ahh, I didn't see that snesbot used external chips until I looked at the schematic.

Anybody know why snesbot was designed this way? Instead of wiring from the Raspberry PI GPIO to the SNES input port directly and calculating everything in software?

Image

lidnariq
Posts: 9305
Joined: Sun Apr 13, 2008 11:12 am
Location: Seattle

Re: How to do wireless, bluetooth controllers with a NES or

Post by lidnariq » Wed Mar 25, 2015 3:52 pm

He said that the RasPi couldn't keep up with the SNES automatic polling speed.

And the reason he didn't use the RasPi SPI hardware is because apparently the RasPi SPI hardware is master-only (laaaame)

shadash
Posts: 13
Joined: Wed Aug 21, 2013 8:44 pm

Re: How to do wireless, bluetooth controllers with a NES or

Post by shadash » Wed Mar 25, 2015 4:17 pm

Wow :-) thank you for the quick feedback.

flagoss
Posts: 71
Joined: Tue May 05, 2009 8:44 pm

Re: How to do wireless, bluetooth controllers with a NES or

Post by flagoss » Thu Mar 26, 2015 7:22 am

I personaly have done a Wireless Snes Controller base on that project:
http://nfggames.com/forum2/index.php?topic=4393.0

shadash
Posts: 13
Joined: Wed Aug 21, 2013 8:44 pm

Re: How to do wireless, bluetooth controllers with a NES or

Post by shadash » Thu Mar 26, 2015 8:11 am

That is a great project but it's the one I was referring to when I said "Hacking up an existing controller" initially.

- The advantage of using bluetooth is there's 1000's of controllers already available. Some are very high quality.
- The advantage of using the raspberry pi is that it's cheap, and runs linux (which has a full bluetooth software implementation).

It's too bad that there's some limitations that don't allow the raspberry pi to do all the processing. Maybe this will be addressed in a future revision. Using what's available now it wouldn't be that hard to create some boards for the 4021's that just plugged in.

flagoss
Posts: 71
Joined: Tue May 05, 2009 8:44 pm

Re: How to do wireless, bluetooth controllers with a NES or

Post by flagoss » Thu Mar 26, 2015 9:02 am

Don't you think that a Raspberry Pi is a bit bulky and overkill ? The receiver I did on mine is like 6 time smaller than a Raspberry Pi.

shadash
Posts: 13
Joined: Wed Aug 21, 2013 8:44 pm

Re: How to do wireless, bluetooth controllers with a NES or

Post by shadash » Thu Mar 26, 2015 9:38 am

True, the receiver likely would be larger than what you've created.

The advantage of doing things this way is you can use ANY bluetooth controller, keyboard, mouse, etc with the receiver. Because of emulators there's all kinds of bluetooth hardware available.

You could also likely hide the raspberry pi in the NES/SNES case with an on/off switch + allowing the default controller ports to work with wired controllers when not enabled.

lidnariq
Posts: 9305
Joined: Sun Apr 13, 2008 11:12 am
Location: Seattle

Re: How to do wireless, bluetooth controllers with a NES or

Post by lidnariq » Thu Mar 26, 2015 11:01 am

I suppose it's worth pointing out that the RasPi uses more power (from the wall) than the rest of the NES...

But meh, do what makes you happy. $25 for a RasPi A+ and a few shift registers is going to be hard to beat, especially in single quantity. Unfortunately, even the + series only has 30 GPIO, so mouse emulation would require a different hat than controller emulation. (or a 4PDT switch)

shadash
Posts: 13
Joined: Wed Aug 21, 2013 8:44 pm

Re: How to do wireless, bluetooth controllers with a NES or

Post by shadash » Thu Mar 26, 2015 11:48 am

I thought on the NES power is converted to DC and lowered to 5 volts.

According to this link http://www.raspberrypi.org/forums/viewt ... 28&t=17492 anywhere from 3.3 to 5.25 volts can power the RPi depending on how it's used.

lidnariq
Posts: 9305
Joined: Sun Apr 13, 2008 11:12 am
Location: Seattle

Re: How to do wireless, bluetooth controllers with a NES or

Post by lidnariq » Thu Mar 26, 2015 11:57 am

Power is watts, Voltage is volts. Voltage multiplied by current is power. Not the same thing at all.

NES uses about 350mA at 5V; the losses in the 7805 are large but we'll ignore that (because that's the same kind of design fix as the RasPi B to B+ using a switching regulator instead of a linear one).
Random sources imply the B uses about 400mA at 5V. I guess I exaggerated a little; the revised B+ and A+ would use less power (~230mA@5V, 130mA@5V) than the NES.

shadash
Posts: 13
Joined: Wed Aug 21, 2013 8:44 pm

Re: How to do wireless, bluetooth controllers with a NES or

Post by shadash » Thu Mar 26, 2015 12:12 pm

Double thank you for all the clear feedback.

shadash
Posts: 13
Joined: Wed Aug 21, 2013 8:44 pm

Re: How to do wireless, bluetooth controllers with a NES or

Post by shadash » Thu Apr 02, 2015 12:58 pm

Here's another way to do it with an Arduino.

- The benefit of this technique is that you don't need to use level converters between the 4021/4021's and Arduino like you do with the Raspberry Pi.
- The downside of this technique is you don't get all the linux open source bluetooth hardware compatibility out of the box.

http://www.instructables.com/id/Control ... /?ALLSTEPS

The schematic...

Image

Here's some sample source that bluetooth could be added into... (I don't know why all dpad possibilities weren't added in)

#include <SoftwareSerial.h>
SoftwareSerial softSerial(4, 11); //RX is on pin 4
int incomingByte = 5;
int A = 8;
int left = 2;
int right = 3;
int start = 7;
void setup() {
softSerial.begin(9600);
pinMode(A, OUTPUT);
digitalWrite(A, HIGH); //buttons are active low
pinMode(right, OUTPUT);
digitalWrite(right, HIGH);
pinMode(left, OUTPUT);
digitalWrite(left, HIGH);
pinMode(start,OUTPUT);
digitalWrite(start,HIGH);
}

void loop() {
if (softSerial.available()) {
incomingByte = softSerial.read();
if (incomingByte == 0) {
digitalWrite(A, LOW);
delay(500); //The A button needs a slight delay otherwise it won't be detected by the NES
digitalWrite(A, HIGH);
}
if (incomingByte == 1) {
digitalWrite(left, HIGH);
digitalWrite(right, LOW);
}
if (incomingByte == 2) {
digitalWrite(right, HIGH);
digitalWrite(left, HIGH);
}
if (incomingByte == 3) {
digitalWrite(right, HIGH);
digitalWrite(left, LOW);
}
if (incomingByte == 4) {
digitalWrite(start, LOW);
delay(200); //Same goes for the start button
digitalWrite(start, HIGH);
}
}
}

flagoss
Posts: 71
Joined: Tue May 05, 2009 8:44 pm

Re: How to do wireless, bluetooth controllers with a NES or

Post by flagoss » Fri Apr 24, 2015 6:28 am

Well just look at that: http://www.8bitdo.com/

Don't know if they will make a bluetooth receive for the actual consoles one day. Maybe the arduino bluetooth sketch poste above would work with those controller.

Post Reply