Monday, December 21, 2009

NES - Arduino shield bit shift / potentiometer test

The potentiometer test worked without a hitch. The first video is running a diagnostic tool I found on nesdev (nestress). The problem was that the test would end when you hit select and start on either controller, so as I was testing the full range of values it would just quit! So I wrote up my own code in the second video to spit out the values. I had to make a few adjustments to the Arduino code to ensure that all of the outputs would be changed simultaneously, otherwise it's possible that the NES could latch halfway through a change. I'll post all code/schematics once I sort everything out, until then feel free to contact me if you have any questions!

I've also been working on additional input via the second port to GlitchNES. Right now I have the potentiometer cycle the first color of the palette, it's not much different than changing the hue on your TV, but it's still pretty cool. I'll take some pictures of it tonight.


  1. Being the ignorant one that I am, I'm a bit unsure of how you are communicating with the NES from the 4021. Once you upload the .pde, I may have to dig out my old system and test this out! Glad to see you're seeing this one through, yeah?

  2. Not ignorant, I just didn't put enough detail!

    I'm using a development cartridge from I wrote up a simple program (assembly) for the NES to spit out the status of the gamepad. The Arduino sketch simply gets the value from ADC0 and puts the byte out on the digital line (PORTD). Checkout if you're interested in NES hardware. Let me know if you need any help. If you decide to pickup the hardware I'll gladly send the source.

    Thanks for the link by the way! I like the site! ( right?)

  3. Thanks for the info! Unfortunately the PowerPak is a bit out of my price range at the moment. Being an EE student, I'm almost always flat broke. If you'd be willing to write a post describing your setup, and how you got started, I'd be more than glad to write about it!

    Yep, we're just starting out from an old blog of mine. No need for thanks, you've got some good reads, and we're always happy to help out!

  4. Hopefully your website becomes the first and best in the eyes of google search
    Agen Bola Terpercaya