GithubHelp home page GithubHelp logo

nespad's Introduction

I'm an artist ๐Ÿ‘จ๐Ÿฝโ€๐ŸŽจ
I make electronic stuff ๐Ÿ”Œ & synth stuff ๐ŸŽ›๏ธ
I teach digital fabrication โš™๏ธ
physcomp ๐Ÿ–‡๏ธ
creative coding ๐Ÿ•น๏ธ
sculpture ๐Ÿ—œ
etc.

nespad's People

Contributors

rahji avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Forkers

btb

nespad's Issues

NESpad compatibilty

I tried to use NESpad with teensy3 and it doesn't work. I know there is two 
things which may be reason for not working.

Background googling:
"At first I thought how could they possibly mess up a shift register! The only 
electronics inside the NES004 controller is the one chip. Then I opened a 
NES004E controller and saw more. There are pull up resistors on the clock and 
latch lines. Apparently the Mattel NES (and possibly all European NES) use open 
drain outputs. The NES can pull those lines low, but needs the pull up 
resistors to set the lines high. That means a European controller will work on 
a USA system, but not the other way around. The dog bone controller also 
includes pull ups."

Questions:
Does NES gamepads work with 3.3V? NES-004E which I use is built with HD14021BP, 
which supports 3-18V. Is anyone tested this?

Does NESpad support all gamepad versions? Do I need to setup input line to use 
pull-up resistor?

Original issue reported on code.google.com by [email protected] on 9 Oct 2013 at 6:19

Not Recognizing input?

What steps will reproduce the problem?
1. Using the Arduino IDE v 0017, I load the NES serial example sketch.
2. I upload the sketch to my Arduino (Atmega 328 in the official Arduino board).
3. I connect the plug on my NES controller to my Arduino using some wires, as 
described in the 
documentation.
4. I open the serial monitor.
5. I reset my Arduino.

What is the expected output? What do you see instead?

The serial monitor shows BBBB and a strange accented o character, and adds 
another copy of the 
same characters onto the end of the line once every second.  Pressing buttons 
on the NES 
controller does nothing to change this behaviour.

The LED sketch produces similarly disappointing results.  I receive no lit LEDs 
in return for my 
button presses.

I attempted to use a version of this code that did not involve the NESpad 
library, but instead just 
interpreted the NES button presses using only the contained code, and I 
received identical 
results.  Code obtained here: 
http://little-scale.blogspot.com/2007/07/nes-controller-to-
arduino.html

What version of the product are you using? On what operating system?

I am using an Arduino Duemilanove with an Atmega 328, connected to an original 
NES controller.  
The Arduino IDE is operating on a late-2008 MacBook Pro with a 2.4 GHz Intel 
Core 2 Duo, 2 GB 
RAM, running OS X version 10.5.8.

I have not encountered any similar problems using my Arduino with other 
projects interacting 
with this exact same setup.

Please provide any additional information below.


Original issue reported on code.google.com by [email protected] on 4 Nov 2009 at 10:15

error on compile

Open Example and trying to compile it (NESPad_LED)



What is the expected output? What do you see instead?
a compile...? hah :)

I get this:
/Users/theUser/Documents/Arduino/libraries/NESpad/NESpad.cpp:26:22: error: 
WProgram.h: No such file or directory
/Users/theUser/Documents/Arduino/libraries/NESpad/NESpad.cpp: In constructor 
'NESpad::NESpad(int, int, int)':
/Users/theUser/Documents/Arduino/libraries/NESpad/NESpad.cpp:46: error: 
'OUTPUT' was not declared in this scope
/Users/theUser/Documents/Arduino/libraries/NESpad/NESpad.cpp:46: error: 
'pinMode' was not declared in this scope
/Users/theUser/Documents/Arduino/libraries/NESpad/NESpad.cpp:48: error: 'INPUT' 
was not declared in this scope
/Users/theUser/Documents/Arduino/libraries/NESpad/NESpad.cpp: At global scope:
/Users/theUser/Documents/Arduino/libraries/NESpad/NESpad.cpp:51: error: 'byte' 
does not name a type
/Users/theUser/Documents/Arduino/libraries/NESpad/NESpad.cpp: In member 
function 'void NESpad::strobe()':
/Users/theUser/Documents/Arduino/libraries/NESpad/NESpad.cpp:64: error: 'HIGH' 
was not declared in this scope
/Users/theUser/Documents/Arduino/libraries/NESpad/NESpad.cpp:64: error: 
'digitalWrite' was not declared in this scope
/Users/theUser/Documents/Arduino/libraries/NESpad/NESpad.cpp:65: error: 
'delayMicroseconds' was not declared in this scope
/Users/theUser/Documents/Arduino/libraries/NESpad/NESpad.cpp:66: error: 'LOW' 
was not declared in this scope
/Users/theUser/Documents/Arduino/libraries/NESpad/NESpad.cpp: At global scope:
/Users/theUser/Documents/Arduino/libraries/NESpad/NESpad.cpp:69: error: 'byte' 
does not name a type


What version of the product are you using? On what operating system?
using 1.3 of the library, arduino 1.0.1 IDE, osx 10.7.4

Please provide any additional information below.
other libraries seem to work, and I can successfully compile examples as well 
as upload them to arduino.

Original issue reported on code.google.com by [email protected] on 24 Aug 2012 at 11:53

Default pin numbers does not work

If I start the SNESpad object with:

    SNESpad nintendo = SNESpad();

it'll not work (the returned number is always 0b1111111111111111).


But if I change the code to:

    SNESpad nintendo = SNESpad(2, 3, 4);

and change some parameters of some delayMicroseconds in the SNESpad.cpp, it'll 
work correctly. It occurs on version SNESpad_1.2.zip.


I think the actual implementation have a lot of overhead (for example, 
strobe(), shiftin() functions etc.) and probably we can create a class with a 
just-one flat function (+ the constructor) that does the job.

Based on http://www.gamesx.com/controldata/snesdat.htm description of the SNES 
controller I've created a function called getSNESbuttons that does the work 
right (please see the times in this page so you can see that your 
implementation have some timing errors).
The sketch attached uses my function as an example. If we change this function 
to be a class, probably we should change the times on delayMicroseconds because 
of the overhead in calling an object's method.

Original issue reported on code.google.com by alvarojusten on 8 Nov 2010 at 4:31

Attachments:

Compile error

NESpad gives compile error with 1.0.5 arduino. 

fix:
--- NESpad/NESpad.cpp   2013-10-08 19:42:04.995638859 +0300
+++ ../arduino-1.0.5/libraries/NESpad/NESpad.cpp        2013-10-09 
08:46:30.559913727 +0300
@@ -35,7 +35,7 @@
 // default: digital pin 2=strobe, 3=clock, 4=data
 // see readme.txt for game pad pinout
 NESpad::NESpad() {
-    NESpad::NESpad(2,3,4);
+    NESpad(2,3,4);
 }

Original issue reported on code.google.com by [email protected] on 9 Oct 2013 at 5:23

Patch file for Arduino IDE 1.0.1

In it's current state the examples won't compile using the Arduino 1.0.1 IDE. 
I've attached a patch that seems to fix the issue. The main issue is the 
inclusion of WProgram.h in NESpad.cpp. 

Original issue reported on code.google.com by [email protected] on 10 Jul 2012 at 6:08

Attachments:

2 joysticks

hi,

how can I use 2 joysticks at the same time?
I tried connecting the second one to pins 5,6,7, but it stopped reading the 
first one.

thanks,
Henrique

Original issue reported on code.google.com by [email protected] on 18 Aug 2011 at 11:47

slightly wrong check for pressed buttons on SNES-pad

Hi,
in the "SNESpad_LED"-example I noticed that the LED for button A doesn't work 
and a look into the header revealed: 
#define SNES_A       0x100
#define SNES_X       0x200
#define SNES_L       0x400
#define SNES_R       0x800
So I tested it for A,X,L,R: all 4 are not working.

digitalWrite(5,  state & SNES_A );

I don't know the signature of the digitalWrite function but it seems that there 
is some implicit cast or an overflow wich prevents that 4 buttons (which are 
bits 9-12 in the 'state' variable) testing the value to 'greater than 0' before 
passing it to the function solves the problem:

digitalWrite(5, (state & SNES_A)>0 );

Anyway, this lib is great, it is easy to use and you have 12 buttons in no time 
:D thanks for publishing it.

Original issue reported on code.google.com by [email protected] on 6 Jan 2011 at 9:56

good source for chinese nes controllers

there actually is no problem, i just could not find where to submit this:
i had no original nes or snes controllers with me, so i got couple cheap
chinese ripoffs on marketplace. they had different pinouts, but found those
pinouts on page
http://es.tldp.org/NuLies/web/2.2/Documentation/joystick-parport.txt

this part:

Pinout for NES gamepads                 Pinout for SNES gamepads

       +----> Power                   +-----------------------\
       |                            7 | o  o  o  o |  x  x  o  | 1
 5 +---------+  7                         +-----------------------/
   | x  x  o   \                            |  |  |  |          |
   | o  o  o  o |                           |  |  |  |          +-> Ground
 4 +------------+ 1                         |  |  |  +------------> Data
     |  |  |  |                             |  |  +---------------> Latch
     |  |  |  +-> Ground                    |  +------------------> Clock
     |  |  +----> Clock                     +---------------------> Power
     |  +-------> Latch
     +----------> Data

Pinout for NES clone (db9) gamepads     Pinout for NES clone (db15) gamepads

    +---------> Clock                    +-----------------> Data
    | +-------> Latch                    |             +---> Ground
    | | +-----> Data                     |             |
    | | |                              ___________________
    _____________                        8 \ o x x x x x x o / 1
  5 \ x o o o x / 1                         \ o x x o x x o /
     \ x o x o /                          15 `~~~~~~~~~~~~~' 9
    9 `~~~~~~~' 6                             |     |     |
     |   |                                |     |     +----> Clock
     |   +----> Power                     |     +----------> Latch
     +--------> Ground                    +----------------> Power


Original issue reported on code.google.com by [email protected] on 16 May 2010 at 9:45

Serial Monitor Showing no Change when Pressing Buttons

What steps will reproduce the problem?
1. Upload NESpad serial example on Arduino board.
2. Plug in wires as shown between the pinout graphic and the documentation (NES 
strobe = 
Arduino pin 2, NES clock = Arduino pin 3, NES data = Arduino pin 4, NES +5V = 
Arduino +5V 
pin, NES GND = Arduino GND pin).
3. Run program with NES controller connected.
4. Open serial monitor.
5. Press buttons on NES joypad.

What is the expected output? What do you see instead?

I expect to see the bytes sent by the chip in the NES joypad, but instead, all 
I see is:

11111111111111111111111111111111

repeating line-by-line, once each second.

What version of the product are you using? On what operating system?

I am using an Arduino Duemilanove with an Atmega 328, connected to an original 
NES controller.  
The Arduino IDE is operating on a late-2008 MacBook Pro with a 2.4 GHz Intel 
Core 2 Duo, 2 GB 
RAM, running OS X version 10.5.8.

I have not encountered any similar problems using my Arduino with other 
projects interacting 
with this exact same setup.

Please provide any additional information below.

I posted this previously, but I found that my baud rate was set incorrectly in 
the serial monitor.  
Upon setting the serial monitor baud rate to 57600 as stated in the code, the 
output changed, 
but the condition did not.  I still receive no button press data of any kind 
from my NES joypad.  
The joypad I am using was just unplugged from a working NES console, and was 
working before 
I tried to use it with my Arduino.

The code found at 
http://little-scale.blogspot.com/2007/07/nes-controller-to-arduino.html 
works just fine, though.  Just thought you should know.

Original issue reported on code.google.com by [email protected] on 5 Nov 2009 at 2:47

Timing incorrect for SNES PAL controller

The library (v1.3) doesn't work with my known working genuine SNES PAL 
Controllers (Nintendo Model No: SNSP-005) in conjunction with my Arduino 
Duemilanove and Arduino 0022. I suspect that the timings are different.

Original issue reported on code.google.com by [email protected] on 7 Mar 2011 at 8:59

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.