Giter VIP home page Giter VIP logo

Comments (7)

 avatar commented on September 13, 2024

I just went through the code last night and found what's going on. Retrogame is pulling the inputs high and reading them as active_low.

Is there any way to reverse this logic? Can I have it start low and read active_high??

from adafruit-retrogame.

PaintYourDragon avatar PaintYourDragon commented on September 13, 2024

Around line 330:
gpio[GPPUD] = 2; // Enable pullup
Change the value to '1' to enable pull-down (instead of pull-up).
You'll then need to look through the code for references to the intstate[] array -- reverse the '0' and '1' checks on the 'c' variable following the read() call.

from adafruit-retrogame.

 avatar commented on September 13, 2024

Thanks. I'll look through the code tonight and let you know how it goes.

from adafruit-retrogame.

 avatar commented on September 13, 2024

Changed the code as described and works great. I was going to use some logic inverters for the circuit if it was too hard to change the code, but it looks like I won't be needing them.

from adafruit-retrogame.

 avatar commented on September 13, 2024

Sorry to necromance an old closed issue but:
My arcade recently needed an overhaul and I updated retrogame to the latest version. How can I achieve the same effect with the new version?

from adafruit-retrogame.

PaintYourDragon avatar PaintYourDragon commented on September 13, 2024

The code has gotten rather hairy as of late in order to support I2C port expanders. Trying to make the same changes is the path to madness.

If the old version did what you needed, I'd suggest sticking with it. There've been no performance improvements, just added features for some current and future projects.

If you didn't back that up, click the "commits" link (above the repository file list) and locate a version of the code of similar vintage, then make the described changes.

from adafruit-retrogame.

 avatar commented on September 13, 2024

I do have a backup of my previous installation, I'll just stick with that, then. Thanks for the quick reply!

from adafruit-retrogame.

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.