close-circle
Close
0%
0%

Digi:[S]NES

USB to SNES/NES controller using Digispark

Similar projects worth following
This project was created to allow playing games on the PC using original SNES controllers. It is based on a Digispark board but can also run on clone boards. The code uses the Digispark Joystick library and some glue code to shift in the data from the controller and maps the directional controllers to X and Y axes and the remaining switches to ordinary buttons. It will work on NES gamepads as well.

This project uses a DigiStump (or any of its clones, even homebuilt) altogether with the "DigiJoystick" library to allow the the use of a NES/SNES controller in games or emulators on a computer's USB port.

The most recent version have an auto-fire feature selectable for the action buttons just by helding it down until the USB controller device is recognized by the computer.

  • 1 × Digispark
  • 1 × Controller Mating connector

  • Autofire implemented!

    danjovic04/30/2016 at 02:28 0 comments

    Successfully implemented autofire to the sketch and updated code in github.

    The circuit was tested using #SILSpark and the #MAME USB board without the microcontroller as it has some 4021's in series just like the SNES controller.

    The autofire triggers at approximately 10Hz and can be assigned to any of the action buttons: (A,B,X,Y,TopL,TopR) just by holding down any of them and waiting for digispark to be detected as a joystick.

    (

  • Adding Auto-fire

    danjovic04/29/2016 at 22:34 0 comments

    Somebody suggested me adding programming features and auto-fire to the DIGI-SNES.

    The auto-fire is easy to implement, but it took me some minutes to find an elegant way of activating the auto-fire to the desired functions but the solution is quite simple:

    - Held the the desired buttons pressed while plug the DIGI-SNES on the USB port. Then the firmware will use the state of the activated buttons to initialize one variable that holds a mask to be applied over the button states at given intervals thus simulating sequential releases for a button that is continuously pressed.

    In the code below the button is active in '1' and the auto-fire mask bit is active in '0'.

    	// Modulate buttons with auto-fire 
    	if (++count & 2 )  {  
    		Buttons_low &= mask; 
    	}

    As for the programming I have to think it better because if I want to keep the functionality of all buttons and still can record some button sequences it will involve adding more keys to the project. Maybe a foot switch will suit to this function.

View all 2 project logs

Enjoy this project?

Share

Discussions

Schmurtz wrote 08/05/2017 at 07:07 point

Nice, thanks :)

Do you think possible to use one digispark for 2 nes controllers ?

  Are you sure? yes | no

Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates