Giter Club home page Giter Club logo

Comments (3)

fjpolo avatar fjpolo commented on May 24, 2024

I don't know the SMS joystick and the electrical properties of the signals, but I believe it should be possible. Bear in mind that it probably works with 5V and NESTang works with 3V3 signals, so you'd probably need a logic shifter for high frequency sampling or you'd probably do with resistor voltage dividers for sampling @60-120Hz.

My approach would be to create a new module with a clock divider from 27MHz to 60-120Hz, and just sample every pin at posedge of this clock divider, and just output that register. I think that should be enough.

I don't know how the light sensor works, so I'd just keep that disconnected

from nestang.

fjpolo avatar fjpolo commented on May 24, 2024

I think this branch should do it: fjpolo/TangNano20k_SMSGamepap

Bitstream:
nes.zip

You'll get something like this if you place a scope:
Verilator_GTKWave_20231201

And this would be the pinout:
Pinout

EVK:
tang_nano_20k_pinlabel

Can't test it myself since I don't own a SMS gamepad.

⚠Don't forget to convert your 5V logic to 3V3 logic!

from nestang.

fjpolo avatar fjpolo commented on May 24, 2024

BTW @RyanMac84, NESTang parses controller as [Right Left Down Up Start Select B A] and this SMSGamepad module parses it as [0 0 Right Left Down Up B A]. Here's a new version that parses it as [Right Left Down Up 0 0 B A]:

NESTang_Nano20k_0v8_SMSGamepad_20231206.zip

I personally don't think it's gonna work that good, many NES games depend on Start and Select buttons, so idk how you'll gonna find a workaround for it

from nestang.

Related Issues (20)

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.